estimatePortalDeposit
Estimate a portal deposit that shields in place. Mirrors Vault.portalShield: gross - floor(gross * depositFee / 10000) - pendingNoteCommitment - portalDeployment. Bridge routing/reimbursement is service-owned and must be quoted separately; this action deliberately does not substitute withdrawal fees or guess a destination.
Import
import { estimatePortalDeposit } from "@0xcurvy/curvy-sdk/actions";Usage
const result = await estimatePortalDeposit({ networkSlug, token, amount, config });Signature
function estimatePortalDeposit(parameters: EstimatePortalDepositParameters): Promise<PortalDepositEstimate>Returns
Promise<PortalDepositEstimate>
The action resolves or returns the value shown in the signature.
Parameters
networkSlug
- Type:
string - Required: yes
The network whose vault fees should be applied, by slug.
const result = await estimatePortalDeposit({
networkSlug,
token,
amount,
});token
- Type:
bigint - Required: yes
The vault token id of the deposited currency.
const result = await estimatePortalDeposit({
networkSlug,
token,
amount,
});amount
- Type:
bigint - Required: yes
The gross deposit amount in the vault token's base units.
const result = await estimatePortalDeposit({
networkSlug,
token,
amount,
});signal
- Type:
AbortSignal - Required: no
Aborts the fee reads.
const result = await estimatePortalDeposit({
networkSlug,
token,
amount,
signal,
});config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
const result = await estimatePortalDeposit({
networkSlug,
token,
amount,
config,
});Errors
Errors from config resolution and the underlying SDK operation are propagated to the caller.
Related
Source
packages/@0xcurvy/sdk/src/actions/planner/estimatePortalDeposit.ts