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

    Class Ramps

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

    const ramps = new Ramps(wallet);
    await ramps.onboard(); // onboard all boarding utxos
    await ramps.offboard(myOnchainAddress); // collaborative exit all vtxos to onchain address
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    wallet: IWallet

    Methods

    • Offboard vtxos, or "collaborative exit" vtxos to 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 vtxos will be offboarded.

      • OptionaleventCallback: (event: SettlementEvent) => void

        The callback to receive settlement events. optional.

      Returns Promise<string>

    • Onboard boarding utxos.

      Parameters

      • feeInfo: FeeInfo

        The fee info to deduct from the onboard amount.

      • OptionalboardingUtxos: ExtendedCoin[]

        The boarding utxos to onboard. If not provided, all boarding utxos will be used.

      • Optionalamount: bigint

        The amount to onboard. If not provided, the total amount of boarding utxos will be onboarded.

      • OptionaleventCallback: (event: SettlementEvent) => void

        The callback to receive settlement events. optional.

      Returns Promise<string>