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

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.

    • 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

    • 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>