@arkade-os/sdk Documentation - v0.4.21
    Preparing search index...

    Class Ramps

    Ramps is a class wrapping settle method to provide a more convenient interface for onboarding and offboarding operations.

    • IWallet.settle
    • onboard
    • offboard
    const ramps = new Ramps(wallet);
    const feeInfo = { intentFee: {}, txFeeRate: '1' };
    await ramps.onboard(feeInfo); // onboard all boarding inputs
    await ramps.offboard('bc1q...', feeInfo); // collaboratively exit all virtual outputs to an onchain address
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create convenience wrappers for onboarding and offboarding flows.

      Parameters

      • wallet: IWallet

        Wallet used to query funds and execute settlement transactions

      Returns Ramps

    Properties

    wallet: IWallet

    Wallet used to query funds and execute settlement transactions

    Methods

    • Offboard virtual outputs, or collaboratively exit them to an onchain address.

      Parameters

      • destinationAddress: string

        The destination address to offboard to.

      • feeInfo: FeeInfo

        The fee info to deduct from the offboard amount.

      • Optionalamount: bigint

        The amount to offboard. If not provided, the total amount of virtual outputs will be offboarded.

      • OptionaleventCallback: (event: SettlementEvent) => void

        Optional callback that receives settlement events

      Returns Promise<string>

      The Arkade transaction id created by settlement

      Error if no virtual outputs remain after fee deduction or the destination address cannot be decoded

      • IWallet.getVtxos
      • IWallet.settle
      const feeInfo = { intentFee: {}, txFeeRate: '1' };
      const ramps = new Ramps(wallet);
      await ramps.offboard('bc1q...', feeInfo);
    • Onboard boarding inputs.

      Parameters

      • feeInfo: FeeInfo

        The fee info to deduct from the onboard amount.

      • OptionalboardingUtxos: ExtendedCoin[]

        Specific boarding inputs to onboard. If not provided, all boarding inputs will be used.

      • Optionalamount: bigint

        Amount to onboard. If not provided, the total amount of boarding inputs will be onboarded.

      • OptionaleventCallback: (event: SettlementEvent) => void

        Optional callback that receives settlement events

      Returns Promise<string>

      The Arkade transaction id created by settlement

      Error if no boarding inputs remain after fee deduction or if amount exceeds available value

      • IWallet.getBoardingUtxos
      • IWallet.settle
      const feeInfo = { intentFee: {}, txFeeRate: '1' };
      const ramps = new Ramps(wallet);
      await ramps.onboard(feeInfo);