Skip to main content

SwapOptions

@cashu/cashu-ts


@cashu/cashu-ts / SwapOptions

Type Alias: SwapOptions

SwapOptions = object

Defined in: cashu-ts/src/model/types/index.ts:80

Param

Optional parameters for configuring the swap operation:

  • amount: amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set
  • proofs proofs matching that amount
  • outputAmounts? optionally specify the output's amounts to keep and to send.
  • counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect
  • keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the /keysets endpoint
  • includeFees? include estimated fees for the receiver to receive the proofs
  • proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts
  • pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set!
  • privkey? will create a signature on the proofs secrets if set

Properties

counter?

optional counter: number

Defined in: cashu-ts/src/model/types/index.ts:83


includeFees?

optional includeFees: boolean

Defined in: cashu-ts/src/model/types/index.ts:87


keysetId?

optional keysetId: string

Defined in: cashu-ts/src/model/types/index.ts:86


outputAmounts?

optional outputAmounts: OutputAmounts

Defined in: cashu-ts/src/model/types/index.ts:81


outputData?

optional outputData: object

Defined in: cashu-ts/src/model/types/index.ts:88

keep?

optional keep: OutputDataLike[] | OutputDataFactory

send?

optional send: OutputDataLike[] | OutputDataFactory


p2pk?

optional p2pk: object

Defined in: cashu-ts/src/model/types/index.ts:92

locktime?

optional locktime: number

pubkey

pubkey: string

refundKeys?

optional refundKeys: string[]


privkey?

optional privkey: string

Defined in: cashu-ts/src/model/types/index.ts:85


proofsWeHave?

optional proofsWeHave: Proof[]

Defined in: cashu-ts/src/model/types/index.ts:82


pubkey?

optional pubkey: string

Defined in: cashu-ts/src/model/types/index.ts:84