Transaction Configuration
Getting transaction parts and maximum amount to transfer/withdraw
Last updated
Was this helpful?
Getting transaction parts and maximum amount to transfer/withdraw
Last updated
Was this helpful?
The user's request to send or withdraw money may produce several transactions to the privacy pool in the common case. It depends on both a local account/notes configuration and transfer destinations amount as well. The following method is used to evaluate transactions needed to process request
txType
is transaction type (a member of enum)
transfers
- a set of transfer requests (use single request with requested amount for withdrawal as well)
relayerFee
- a raw which will be used to estimate total transaction fee (will requested under the hood when undefined)
withdrawSwap
is an optional amount of tokens which should swap in withdraw transaction. It may influence the typical withdraw transaction cost due to extra fee component (ignored for other transaction types)
updateState
- update the state before parts evaluating
allowPartial
- try to build result even in case of insufficient balance
Calculating maximum available amount for transfers and withdrawals. This estimation doesn't take into account pool contract limits
withdrawSwap
is an optional amount of tokens which should swap in withdraw transaction. It may influence the typical withdraw transaction cost due to extra fee component (ignored for other transaction types)
updateState
- update the state before parts evaluating
Promise
returns token amount in the pool dimension
Promise
returns array of s which describe all transactions needed to process input request, or a void array if request cannot be processed (e.g. in case of insufficient funds)
txType
is transaction type (a member of enum)
relayerFee
- a raw which will be used to estimate total transaction fee (will requested under the hood when undefined)