estimateIntent
Select spendable notes and return fees, delivered amount, a sanitized route, and an in-memory handle that can be passed to executeIntent.
Import
ts
import { estimateIntent } from "@0xcurvy/curvy-sdk/actions";Usage
ts
const estimation = await estimateIntent({ intent });Signature
ts
function estimateIntent(parameters: EstimateIntentParameters): Promise<IntentEstimation>Returns
Promise<IntentEstimation>
The action resolves or returns the value shown in the signature.
Parameters
intent
- Type:
Intent - Required: yes
The transfer intent to plan and estimate.
ts
const result = await estimateIntent({
intent,
});minimumInputFinalityPolicy
- Type:
InputFinalityPolicy - Required: no
Integration-level lower bound that account/intent settings cannot weaken.
ts
const result = await estimateIntent({
intent,
minimumInputFinalityPolicy,
});submissionMode
- Type:
SubmissionMode - Required: no
Override the config's submission path for this estimate and its prepared execution.
ts
const result = await estimateIntent({
intent,
submissionMode,
});config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
ts
const result = await estimateIntent({
intent,
config,
});Errors
NoActiveAccountErrorwhen no account is active.- a typed
CurvyErrorwhen selection or estimation fails.
Related
- Interacting with assets guide
executeIntent— Execute a handle returned by estimateIntent.getPlanSteps— Return the ordered, sanitized steps an integrator can present to a user.estimateExternalTransfer— Pre-deposit estimate for a swap-public-style external transfer.estimateBridge— Quote a bridge/swap before committing — for the swap UI (in-app/public) and send-with-exit-bridge.