spur-client - v0.5.1
    Preparing search index...

    Class SpurCompiledSwap

    SpurCompiledSwap is the recommended way to execute a swap.

    If you want to manage delivery of the transaction youself, you can access it as swapTx.

    Index

    Constructors

    Properties

    blockhash: Readonly
    quote: SpurQuote
    swapTx: VersionedTransaction

    Methods

    • Uses Connection.confirmTransaction and Connection.simulateTransaction to await the success or failure of the swap execution.

      Parameters

      • connection: Connection

        a @solana/web3.js Connection

      • Optionalcommitment: Commitment

        (optional) uses commitment configured on connection by default

      Returns Promise<null | TransactionError>

    • Returns string

      the base58 encoded signature of the swap tx.

    • Parameters

      • connection: Connection

      Returns Promise<string>

    • Sign transaction using the provided Wallet.

      Parameters

      • wallet: SignerWalletAdapter

        a Solana Wallet Adapter usually accessed by useWallet().wallet.adapter

      Returns Promise<SpurCompiledSwap>

    • Sign transaction using the provided Keypair.

      Parameters

      • signer: Signer

        a @solana/web3.js Keypair

      Returns SpurCompiledSwap