- Preparing search index...
- The search index is not available
cardano-sdk
Function splitChangeAndComputeFee
- splitChangeAndComputeFee(inputs: Set<Utxo>, outputs: Set<TxOut>, changeLovelace: bigint, changeAssets: undefined | TokenMap, constraints: SelectionConstraints, getChangeAddresses: (() => Promise<Map<PaymentAddress, number>>), fee: bigint): Promise<{
change: TxOut[];
fee: bigint;
feeAccountedFor: boolean;
}>
-
Parameters
-
inputs: Set<Utxo>
-
outputs: Set<TxOut>
-
changeLovelace: bigint
-
changeAssets: undefined | TokenMap
-
-
getChangeAddresses: (() => Promise<Map<PaymentAddress, number>>)
-
fee: bigint
Returns Promise<{
change: TxOut[];
fee: bigint;
feeAccountedFor: boolean;
}>
Recursively compute the fee and compute change outputs until it finds a set of change outputs that satisfies the fee.