Hierarchy

  • SwapAggregator

Constructors

Properties

environment: Environment

Methods

  • Parameters

    • quote: CrossChainQuote

    Returns Promise<{
        error: boolean;
        message: string;
    }>

  • Retrieves a cross-chain quote for a given set of parameters.

    Parameters

    • params: CrossChainSwapParams

      The parameters for the cross-chain swap.

    Returns Promise<{
        data: CrossChainQuote[];
        message: string;
    }>

    A promise that resolves to the cross-chain quote.

  • Executes a cross-chain claim based on the provided parameters.

    Parameters

    • params: ExecuteCrossChainClaimParams

      The parameters for executing the cross-chain claim.

    Returns Promise<any>

    A promise that resolves to the result of the cross-chain claim execution.

  • Parameters

    • params: ExecuteCrossChainSwapParams

    Returns Promise<undefined | string>

  • Parameters

    • params: ExecuteCrossChainSwapParams

    Returns Promise<undefined | string>

  • Executes a swap instruction based on the provided parameters.

    Throws

    An error if the network ID is invalid or if the required connection provider or signer is not provided.

    Parameters

    • params: ExecuteSameChainInstructionParams

      The parameters for executing the swap instruction.

    Returns Promise<undefined | string>

    A promise that resolves to the result of executing the swap instruction.

  • Executes a cross-chain transfer based on the provided parameters.

    Throws

    An error if the transfer hash is not found or if an invalid bridge is specified.

    Parameters

    • params: ExecuteCrossChainTransferParams

      The parameters for the cross-chain transfer.

    Returns Promise<{
        success: boolean;
        txHash: string;
    }>

    A promise that resolves to the result of the cross-chain transfer.

  • Parameters

    • params: getAttesationParams

    Returns Promise<{
        attestationSignature: undefined;
        destHash: any;
        messageBytes: undefined;
        vaa: undefined;
    } | {
        attestationSignature: undefined;
        destHash: undefined;
        messageBytes: undefined;
        vaa: Buffer;
    } | {
        attestationSignature: any;
        destHash: undefined;
        messageBytes: any;
        vaa: undefined;
    }>

  • Retrieves the claim instruction for a cross-chain claim .

    Parameters

    • params: GetCrossChainClaimParams

      The parameters for the claim instruction.

    Returns Promise<{
        data: any;
        message: string;
    }>

    serialised instruction to claim

  • Parameters

    • quote: CrossChainQuote
    • txHash: string

    Returns Promise<undefined | string>

  • Retrieves the cross-chain swap instruction for executing a cross-chain swap.

    Parameters

    • params: ExecuteCrossChainSwapParams

      The parameters for executing the cross-chain swap.

    Returns Promise<{
        data: any;
        message: string;
    }>

    A promise that resolves to the cross-chain swap instruction.

  • Parameters

    Returns Promise<Connection | Aptos | JsonRpcProvider | BaseProvider>

  • Parameters

    • targetChain: NetworkId
    • targetProvider: Aptos | JsonRpcProvider | BaseProvider
    • bridge: BridgeId

    Returns Promise<string>

  • Parameters

    • quote: CommonRouteInterface
    • txHash: string

    Returns Promise<undefined | string>

  • Redeems a failed cross-chain transfer

    Throws

    Error if the redemption fails or if the bridge is unsupported.

    Parameters

    • params: RedeemParams

      The parameters for the redemption.

    Returns Promise<any>

    The hash of the redemption transaction.

  • Get swap instructions to execute same chain swap

    Parameters

    • params: SameChainInstructionParams

      The parameters for the same chain swap instruction

    Returns Promise<{
        data: any;
        message: string;
    }>

    The swap instructions for executing the same chain swap

  • Get swap quote for same chain swaps

    Parameters

    • params: SameChainSwapParams

    Returns Promise<{
        data: CommonRouteInterface[];
        message: string;
    }>

Generated using TypeDoc