SwapOptions
@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
/keysetsendpoint - 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?
optionalcounter:number
Defined in: cashu-ts/src/model/types/index.ts:83
includeFees?
optionalincludeFees:boolean
Defined in: cashu-ts/src/model/types/index.ts:87
keysetId?
optionalkeysetId:string
Defined in: cashu-ts/src/model/types/index.ts:86
outputAmounts?
optionaloutputAmounts:OutputAmounts
Defined in: cashu-ts/src/model/types/index.ts:81
outputData?
optionaloutputData:object
Defined in: cashu-ts/src/model/types/index.ts:88
keep?
optionalkeep:OutputDataLike[] |OutputDataFactory
send?
optionalsend:OutputDataLike[] |OutputDataFactory
p2pk?
optionalp2pk:object
Defined in: cashu-ts/src/model/types/index.ts:92
locktime?
optionallocktime:number
pubkey
pubkey:
string
refundKeys?
optionalrefundKeys:string[]
privkey?
optionalprivkey:string
Defined in: cashu-ts/src/model/types/index.ts:85
proofsWeHave?
optionalproofsWeHave:Proof[]
Defined in: cashu-ts/src/model/types/index.ts:82
pubkey?
optionalpubkey:string
Defined in: cashu-ts/src/model/types/index.ts:84