Skip to content

@lelantos-org/sdk / protocol / withdrawNetFor

Function: withdrawNetFor() ​

ts
function withdrawNetFor(publicOut, asset): WithdrawNet;

Defined in: @lelantos-org/sdk/dist/wallet/assets/amounts.d.ts:28

Split a withdrawal's gross into what the recipient receives and what the protocol keeps.

withdrawNet with withdrawBps, scale, index and yieldEnabled read off the asset, so the deposit rate cannot be passed in its place and yieldEnabled cannot be omitted, which would misreport the net of a yield asset.

Parameters ​

ParameterType
publicOutCircuitAmountLike
assetAssetInfo

Returns ​

WithdrawNet