NEAR Intents charge method backed by the 1Click Swap API.
The method accepts only type="hash" credentials. It verifies an origin
deposit, waits for 1Click to reach a terminal settlement state, and returns
a receipt only after the merchant's destination delivery reaches SUCCESS.
quote/1 requests the executable EXACT_OUTPUT quote whose single-use
deposit address becomes the charge recipient. Its result contains the
amount, currency, recipient, and method_config values needed by
MPP.Plug, plus the provider quote deadline that bounds challenge expiry.
Direct origin-RPC verification is enabled for EVM origins by setting
"origin_rpc_url". Other origins use the specification's 1Click status
observation mode: the presented hash must be one of the backend-observed
origin transactions for the deposit address.
Configuration
"origin_network"— source CAIP-2 network"destination_network"— merchant CAIP-2 network"destination_asset"— merchant CAIP-19 asset"destination_recipient"— merchant destination address"amount_out"— exact destination amount in base units"min_amount_in"— minimum accepted origin deposit in base units"refund_to"— origin-chain refund address bound into the challenge"quote_deadline"— executable quote deadline returned by 1Click"one_click_url"— optional API base URL"one_click_jwt"— optional partner JWT; never exposed in challenges"origin_rpc_url"— optional EVM origin RPC URL"origin_req_options"— optional Req options for origin RPC"poll_timeout_ms"— optional settlement poll ceiling"poll_interval_ms"— optional status poll interval"store"— optional atomic store implementingMPP.Tempo.Store.update/3; defaults toMPP.Tempo.ConCacheStore
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
verify | 2 | Verify an origin deposit and await terminal NEAR Intents settlement. | - |
quote | 1 | Request a wet EXACT_OUTPUT 1Click quote and return MPP method options. | - |
challenge_method_details | 1 | Return the public NEAR Intents settlement fields for the 402 challenge. | - |
validate_config! | 1 | Validate required NEAR Intents route and store configuration. | - |
credential_types | 0 | Return the only accepted NEAR Intents credential type: hash. | - |
method_name | 0 | Return the NEAR Intents payment method identifier. | - |
Summary
Functions
Return the public NEAR Intents settlement fields for the 402 challenge.
Return the only accepted NEAR Intents credential type: hash.
Return the NEAR Intents payment method identifier.
Requests an executable 1Click quote.
Validate required NEAR Intents route and store configuration.
Verify an origin deposit and await terminal NEAR Intents settlement.
Types
Functions
@spec challenge_method_details(MPP.Method.intent()) :: map() | nil
@spec challenge_method_details(MPP.Intents.Charge.t()) :: map()
Return the public NEAR Intents settlement fields for the 402 challenge.
# descripex:contract
%{}
Return the only accepted NEAR Intents credential type: hash.
# descripex:contract
%{}
@spec method_name() :: String.t()
Return the NEAR Intents payment method identifier.
# descripex:contract
%{}
@spec quote(map()) :: {:ok, quote_result()} | {:error, term()}
Requests an executable 1Click quote.
The input uses CAIP identifiers for the MPP challenge and explicit 1Click
asset IDs at the provider boundary. The returned map can be passed into a
dynamically built MPP.Plug configuration.
Validate required NEAR Intents route and store configuration.
# descripex:contract
%{}
@spec verify(map(), MPP.Intents.Charge.t()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Verify an origin deposit and await terminal NEAR Intents settlement.
# descripex:contract
%{}