intents.near (public) into intents.far (confidential), using either the 1Click API or near.com. Both routes end the same way: the amount is credited to your account id on intents.far as an imt: balance, ready to quote against on the private relay.
How a shield works
Tokens enterintents.far in exactly one way. A transfer on intents.near moves them to the Treasury account 51e8f94d77b5e90dc9852ca6113771e11e8382ce69473a75e313e41665de7cbe with a memo naming the recipient. The Private PoA Bridge sees that transfer and mints the same amount on intents.far as imt:<treasury>:<public id> (for example imt:51e8f94d…7cbe:nep141:wrap.near) to the recipient. Moving back is the reverse: an imt_burn on intents.far with a memo naming the NEAR recipient, and the Treasury releases on intents.near.
You never call the bridge yourself. 1Click and near.com both drive it for you. Your NEAR account id and signing key are the same on both contracts.
Before you start
- Your Partner JWT from partners.near-intents.org. 1Click accepts it as
X-API-Key. - Your solver’s NEAR account. Shield to the account that signs your quotes; the confidential balance is credited to whatever account you name as the recipient.
- Your inventory sitting inside
intents.nearunder that account. If it is still on another chain, see From an origin chain.
- 1Click API
- near.com
Scriptable. Use this for the migration and for any later rebalancing.A shield is a 1Click swap of an asset into itself with the output routed to Confidential Intents. 1Click runs it without a counterparty, so Keep Paste the generated Repeat per asset. The example solver does exactly this and exposes it as
slippageTolerance: 0 is safe. Three calls per asset.1
Quote
depositType: INTENTS funds the swap from your intents.near balance. recipientType: CONFIDENTIAL_INTENTS credits the output to your account on intents.far. recipient and refundTo are both your solver account id.Run once with "dry": true and compare quote.amountOut to amount so you see any fee before committing.quote.depositAddress from the response. For this deposit type it is an account id on intents.near.2
Generate and sign the funding intent
1Click builds the exact NEP-413 payload to sign so the transfer to The response
depositAddress is attributed to your quote.intent is a NEP-413 payload (message, nonce, recipient). Sign it with your solver’s NEAR key as-is. The nonce is bound to the quote; do not alter the payload.See Signed Intent Execution for the generate and submit contract, and Signing Intents for the payload shape.3
Submit
intent payload into signedData unchanged, then add public_key and signature from your solver key.Poll GET https://1click.chaindefuser.com/v0/status?depositAddress=<depositAddress> until status is SUCCESS. swapDetails.nearTxHashes carries the shield transaction on intents.near; the mint on intents.far has no public hash.npm run one-click:deposit-confidential.From an origin chain
If the tokens are not yet insideintents.near, skip the intermediate deposit: quote with depositType: ORIGIN_CHAIN and recipientType: CONFIDENTIAL_INTENTS. 1Click returns a chain deposit address; send the tokens there and the output is minted confidentially to recipient in one hop. No generate-intent or submit-intent needed.Moving back (unshield)
Same three calls with the types reversed:depositType: CONFIDENTIAL_INTENTS, recipientType: INTENTS, refundType: CONFIDENTIAL_INTENTS, same asset in and out. generate-intent returns an intents.far transfer for you to sign, and the output lands in your intents.near balance. The example solver exposes this as npm run one-click:withdraw-confidential.Verifying the balance
Confidential balances are read through 1Click with a User-Session token. There is no public RPC forintents.far, so mt_batch_balance_of will not work.
1
Sign an empty intent
Sign an empty NEP-413 payload with your solver key: signer your account, deadline about 60 seconds out, nonce from
VersionedNonceBuilder.createTimestampedNonceBytes(now) in @defuse-protocol/intents-sdk. No intents.2
Authenticate
accessToken and expiresIn. See Authenticate User with Signed Data for the full payload per wallet, and Authenticating end users for how the token is used.3
Read balances
"source": "private" are your intents.far balances, reported under the public token id with the imt: prefix stripped.Next steps
Confidential Intents
Architecture, private relay, and the solver response format
Confidential Example
Wire quoting, nonces, and balance queries into the example solver