TypeScript SDK
@aurora-is-near/intents-connect: the headless client and execution runner.
@aurora-is-near/intents-connect is a headless client for the Intents Connect API. You write a recipe (the steps to run on the destination chain). The runner takes a recipe plus a quote and drives the whole execution, from intermediary lookup to SUCCESS.
Entry points
@aurora-is-near/intents-connect (core) · @aurora-is-near/intents-connect/react (hooks)
Runtime deps
valtio, @scure/base. No chain SDKs
Peer deps
react >=18.2, optional and only needed for /react
Format
ESM only
Wallets
Bring your own WalletConnector, or use intents-connect-wallet
Install
npm install @aurora-is-near/intents-connect
# ready-made wallets + deposit transfers (recommended)
npm install @aurora-is-near/intents-connect-walletQuick start
import {
createIntentsConnectApi,
createExecutionRunner,
type Recipe,
} from '@aurora-is-near/intents-connect';
const USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC on Base
// 1. Describe the steps. `amount` is opaque: template it, never inspect it.
const supply: Recipe<{ pool: string }> = {
id: 'aave-supply',
intent: 'aave_supply',
title: 'Supply to Aave',
flow: 'bridge-in',
type: 'evm',
destination: { chain: 'base', assetId: 'nep141:base-…', tokenAddress: USDC },
buildSteps: ({ intermediary, amount }, { pool }) => [
{ to: USDC, functionSignature: 'approve(address,uint256)',
parameters: [pool, amount], value: '0' },
{ to: pool, functionSignature: 'supply(address,uint256,address,uint16)',
parameters: [USDC, amount, intermediary, '0'], value: '0' },
],
};
// 2. Create the API client and a runner bound to the user's wallet.
const runner = createExecutionRunner({
api: createIntentsConnectApi({
baseUrl: 'https://intents-connect-alpha-api.aurora.dev',
apiKeyProxyUrl: '/api/intents-connect', // your server adds x-api-key
}),
wallet: connector, // a WalletConnector, see Wallet integrations
onEvent: (event) => console.log(event),
});
// 3. Run it: sign → deposit → bridge → steps → SUCCESS.
const execution = await runner.run({
recipe: supply,
params: { pool: '0x…' },
quote: {
originAsset, destinationAsset, amount, // atomic units
swapType: 'EXACT_INPUT', slippageTolerance: 100, // bps
},
originChain: 'base',
originToken: { contractAddress: USDC, decimals: 6 },
depositViaWallet: true, // false = show a deposit address / QR instead
});Keep the API key off the client. In browsers, pass
apiKeyProxyUrland notapiKey. The two create calls go to your proxy, which adds thex-api-keyheader. All other calls go straight tobaseUrl.
What you provide
API access
baseUrl + apiKey (server) or apiKeyProxyUrl (browser)
createIntentsConnectApi
A deposit transfer
Only when depositViaWallet: true
wallet.makeTransfer or transfer plugins
A quote
Origin and destination assets, amount, slippage
plan.quote
Runner methods
preview(plan)
Dry-run a bridge-in: fee, spendable amount, frozen steps. No side effects
run(plan)
Execute a bridge-in end to end. Resolves on a terminal status
previewSteps(plan) / runSteps(plan)
Same pair for steps-only executions (no bridge, funds already in the intermediary)
resume(executionId, options?)
Continue an execution after a reload, a timeout or a lost tab
retryDeposit()
Retry the wallet transfer after the user rejected it
cancel(executionId?)
Sign delete_execution:{id} and delete the execution
getPhase() / getStore()
Read state: the current phase, or the full valtio store
dispose()
Stop polling and release the runner
Only one flow runs per runner at a time. Details: Lifecycle & errors.
Signing standards
The origin wallet signs, whatever the destination chain is.
erc191
EVM (personal_sign)
✅
raw_ed25519
Solana
✅
nep413
NEAR
✅
sep53
Stellar
✅ (can't be cancelled client-side, clears on expiry)
tip191 / ton_connect
Tron / TON
❌ not yet
SDK → HTTP API
Every call maps to an endpoint in the Intents Connect API Reference.
api. method
Endpoint
Reference
🔑 = sends x-api-key, or goes through apiKeyProxyUrl.
Next
Recipes & fees: step shape, placeholders, fee strategies
Lifecycle & errors: phases, events, recovery
React:
IntentsConnectProvideranduseExecutionExamples: real integrations, end to end
Last updated
