@lightprotocol/stateless.js - v0.22.1-alpha.1
Other Libraries
Documentation
GitHub
Preparing search index...
selectMinCompressedSolAccountsForTransfer
Function selectMinCompressedSolAccountsForTransfer
selectMinCompressedSolAccountsForTransfer
(
accounts
:
CompressedAccountWithMerkleContext
[]
,
transferLamports
:
number
|
BN
,
)
:
[
selectedAccounts
:
CompressedAccountWithMerkleContext
[]
,
total
:
BN
]
Selects the minimal number of compressed SOL accounts for a transfer.
Sorts the accounts by amount in descending order
Accumulates the amount until it is greater than or equal to the transfer amount
Parameters
accounts
:
CompressedAccountWithMerkleContext
[]
transferLamports
:
number
|
BN
Returns
[
selectedAccounts
:
CompressedAccountWithMerkleContext
[]
,
total
:
BN
]
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Other Libraries
Documentation
GitHub
@lightprotocol/stateless.js - v0.22.1-alpha.1
Loading...
Selects the minimal number of compressed SOL accounts for a transfer.