Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.
WalletSwaps runs same-chain and cross-chain swaps from a Server Wallet. A swap is quoted first, reviewed by your application, and only then confirmed, so no funds move on a quote alone.Swaps are durable. Progress continues across restarts, which means your application supplies storage and a scheduler rather than awaiting a single call.Import the swap surface from the SDK’s /trails entry point:
import { WalletSwaps, TrailsClient, EvmChainReader, type SwapAsset, type SwapStore,} from '@polygonlabs/oms-server-wallet-sdk/trails'
import { SerialExecutor, type ServerWallet } from '@polygonlabs/oms-server-wallet-sdk'// Your durable swap records, and the restored wallet from the quickstart.declare const swapStore: SwapStoredeclare const wallet: ServerWallet// A dedicated executor, separate from the one passed to ServerWallet.const swapExecutor = new SerialExecutor()// Host-approved asset policy. Never build this from request input.const assets: SwapAsset[] = [ { chainId: 137, asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', decimals: 6, symbol: 'USDC' }, { chainId: 8453, asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', decimals: 6, symbol: 'USDC' },]const swaps = new WalletSwaps({ wallet, executor: swapExecutor, store: swapStore, assets, enabled: true, trails: new TrailsClient({ apiKey: 'YOUR_TRAILS_API_KEY', origin: 'https://wallet-api.example.com', }), chains: new EvmChainReader({ 137: 'https://YOUR_POLYGON_RPC', 8453: 'https://YOUR_BASE_RPC', }),})
Four of these deserve attention:
assets is your own allowlist of tradable assets. A swap request naming an asset outside it is rejected, which is what keeps a caller from routing funds into an arbitrary token.
executor is an exclusive executor dedicated to WalletSwaps, separate from the one you passed to ServerWallet. WalletSwaps holds it for each swap step and for every ordinary debit, then calls the wallet, which runs its own executor. See storage and concurrency.
trails.apiKey is separate from your OMS publishable key and belongs only in your backend. Omitting trails raises SWAPS_UNAVAILABLE.
enabled must be true to start new swaps. When it is not, SWAPS_DISABLED is raised and existing swaps still progress.
Do not pass the ServerWallet executor to WalletSwaps. Every WalletSwaps call runs inside its executor and then calls the wallet, which waits on its own executor. When both are the same exclusive executor, the inner call waits for the outer one and neither completes.
Once a wallet uses swaps, send its ordinary transfers through swaps.prepareTransfer and swaps.executeTransfer rather than the ServerWallet methods. They take the same arguments, and they refuse a debit with DEBIT_PENDING while a swap, recovery, or earlier transfer on that chain is unresolved. Run other wallet calls, such as rotate or signing, through swaps.walletCommand(() => wallet.rotate()) so they serialize against swap work too.EvmChainReader accepts one HTTPS RPC URL per chain. A missing URL, or one carrying credentials or a fragment, raises RPC_CONFIGURATION when the SDK first reads that chain.
amount is a decimal string in the origin asset’s base units, so '10000000' is 10 USDC at 6 decimals. Never pass a floating-point token amount.slippageBps accepts 10, 50, or 100. A same-chain swap uses the same call with one chainId on both sides.The wallet must be restored before quoting, otherwise WALLET_PENDING is raised.
Quoting does not move funds. The swap stays in the quoted phase until you confirm it with the exact quote revision you reviewed.quote carries the terms your review should apply to:
Field
Meaning
revision
The identifier you pass to confirmSwap
expectedOutput
Destination amount at the quoted rate, in base units
minimumOutput
Least the swap will deliver at the requested slippage
inputAmount
Origin amount to be spent
priceImpact
Price impact of the route
fees
Route fees
providers
Route providers
expiresAt
When the quote stops being confirmable
// Apply your own authorization rules to `quoted` before this point.const confirmed = await swaps.confirmSwap(swapId, quoted.quote.revision)
If the quote changed since you read it, confirmSwap raises STALE_QUOTE rather than executing against terms you did not review. Re-read the swap, apply your rules to the new quote, and confirm that revision.Confirming is idempotent. A second call with the same revision returns the current state instead of starting another swap.
A confirmed swap advances through activation, funding, and settlement. Your application drives that work:
// Call on a schedule: a persistent timer in Node, or an alarm per wallet on Workers.await swaps.tick()const view = await swaps.getSwap(swapId)console.log(view.phase, view.nextAt)const recent = await swaps.listSwaps()
tick(limit) performs the work that is due and returns. nextAt on a swap view tells you when that swap next needs attention, or is null when it needs none. Funding a swap uses a sponsored transfer, so the wallet pays no gas.Use reconcileSwap(id) when a swap’s upstream result is uncertain. As with transfers, never start a second swap because a response was lost.
When a swap leaves funds short of the destination, prepareRecovery builds a recovery that returns them to the wallet, and confirmRecovery authorizes it. Recovery follows the same review-then-confirm shape as a swap, and it is restricted to the wallet’s own address and your reviewed assets.prepareRecovery(id, recoveryId, source) takes the swap ID, a recovery ID that you own, and 'origin' or 'destination' for the side of the route that holds the funds. confirmRecovery(id, recoveryId, revision) authorizes the revision of that entry in the swap view’s recoveries. Both return the swap view, and tick then drives the confirmed recovery.Recovery is available even when enabled is false, so turning off new swaps does not strand funds from existing ones.
The confirmed revision does not match the current quote
QUOTE_EXPIRED
The quote or recovery review expired before confirmation, so request a new one
DEBIT_PENDING
A swap, recovery, or transfer on the same chain has an unresolved debit
WALLET_BUSY
The swap store holds more than 1,000 unresolved operations for the wallet
RPC_CONFIGURATION
EvmChainReader has no valid HTTPS RPC URL for the chain
WALLET_PENDING
The wallet has not been restored yet
WALLET_DISABLED
The wallet is disabled
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Polygon Developer Docs","colors":{"primary":"#670DE5","light":"#9551F5","dark":"#500AB2"},"logo":{"light":"https://mintcdn.com/polygon-labs/ll1LL3IdpC3YxXZu/logo/light.svg?fit=max\u0026auto=format\u0026n=ll1LL3IdpC3YxXZu\u0026q=85\u0026s=d54ddb30492807a0eadf38093c075f2f","dark":"https://mintcdn.com/polygon-labs/ll1LL3IdpC3YxXZu/logo/dark.svg?fit=max\u0026auto=format\u0026n=ll1LL3IdpC3YxXZu\u0026q=85\u0026s=3b2b67f82ff1720328da11b176a86499"},"favicon":"https://mintcdn.com/polygon-labs/neKXk5towK-oBDip/favicon.png?fit=max\u0026auto=format\u0026n=neKXk5towK-oBDip\u0026q=85\u0026s=64034729f6d0b52274b3093da8c47b2c","api":{"openapi":"api-reference/openapi.yaml","params":{"expanded":"all"},"playground":{"display":"interactive"},"mdx":{"server":["https://sandbox-api.polygon.technology/v0.13","https://api.polygon.technology/v0.13"]}},"appearance":{"default":"light"},"navbar":{"links":[{"href":"/resources/build-with-ai","label":"Build with AI"},{"href":"https://polygon.technology/get-access?utm_source=docs\u0026utm_medium=navbar\u0026utm_campaign=oms_access","label":"Request OMS Access"}]},"footer":{"socials":{"x":"https://x.com/0xPolygon","github":"https://github.com/0xPolygon","linkedin":"https://www.linkedin.com/company/polygonlabs","discord":"https://discord.com/invite/polygon-support-635865020172861441"},"links":[{"items":[{"label":"Support","href":"https://support.polygon.technology/support/home"}]}]},"fonts":{"family":"Fustat"},"integrations":{"ga4":{"measurementId":"G-RJ6JC0EEY5"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"polygon-labs","hasAudioNarration":false,"actualSubdomain":"polygon-labs","customDomains":["docs.polygon.technology"],"gitSource":{"type":"github","owner":"0xpolygon","repo":"new-polygon-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae227de12cf5a20bf48f656","collectionId":"5a6bdf1b-e2a5-41d4-822f-a5b676cf4ba1","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae227de12cf5a20bf48f656"},"feedback":{"contextualFeedback":{"allowEmail":true},"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae3128c90bdcff7cbc2fb55","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Polygon Chain","count":385},{"language":"default","tag":"Wallets","count":164},{"language":"default","tag":"Developer Tools","count":94},{"language":"default","tag":"API Reference","count":78},{"language":"default","tag":"Agglayer","count":73},{"language":"default","tag":"Platform","count":64},{"language":"default","tag":"Matic.js","count":59},{"language":"default","tag":"SDK","count":57},{"language":"default","tag":"Non-custodial","count":55},{"language":"default","tag":"Guides","count":46}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@polygon.technology","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"69cbd3d67f226f107dbd9b72","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"Can I move assets between different chains with OMS?","status":"active","generatedBy":"manual","createdAt":"2026-03-31T14:01:58.134Z","updatedAt":"2026-03-31T14:01:58.134Z","__v":0},{"_id":"69cbd3b07f226f107dbd9a9b","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"What are my options for integrating a wallet?","status":"active","generatedBy":"manual","createdAt":"2026-03-31T14:01:20.206Z","updatedAt":"2026-03-31T14:01:20.206Z","__v":0},{"_id":"69cbd3737f226f107dbd9910","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"How does KYC / KYB work in OMS?","status":"active","generatedBy":"manual","createdAt":"2026-03-31T14:00:19.974Z","updatedAt":"2026-03-31T14:00:19.974Z","__v":0}],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":".nav-tabs{gap:0!important;align-items:center!important}div:has(>.nav-tabs){height:58px!important}.fam-grp .nav-tabs-item,.nav-tabs a.nav-tabs-item{padding:7px 12px!important;font-size:14px;font-weight:500;color:#64708f!important;transition:color 120ms ease,background 120ms ease}.fam-grp .nav-tabs-item:hover,.nav-tabs a.nav-tabs-item:hover{color:#141635!important}html.dark .fam-grp .nav-tabs-item,html.dark .nav-tabs a.nav-tabs-item{color:rgba(255,255,255,.55)!important}html.dark .fam-grp .nav-tabs-item:hover,html.dark .nav-tabs a.nav-tabs-item:hover{color:#fff!important}.fam-grp{display:inline-flex;align-items:center;gap:4px}.fam-gap{width:1px;height:22px;background:#dfe3f0;margin:0 16px;flex-shrink:0}.fam-grp .nav-tabs-item>div{display:none!important}.fam-grp .nav-tabs-item{border-radius:8px;white-space:nowrap;text-decoration:none;transition:color 120ms ease,background 120ms ease!important}.fam-grp .nav-tabs-item.fam-active-tab{background:#eae4f5!important;color:#500ab2!important;font-weight:500!important}.fam-grp .nav-tabs-item.fam-active-tab svg{color:#500ab2!important}html.dark .fam-gap{background:rgba(255,255,255,.14)}html.dark .fam-grp .nav-tabs-item.fam-active-tab{background:rgba(103,13,229,.22)!important;color:#a78bfa!important}html.dark .fam-grp .nav-tabs-item.fam-active-tab svg{color:#a78bfa!important}#navbar a[href*=build-with-ai]{background:#fff!important;color:#141635!important;border:1px solid #c8cfe1!important;font-weight:600!important;transition:border-color 140ms ease,background 140ms ease!important}#navbar a[href*=build-with-ai]:hover{border-color:#141635!important;background:#f6f6fc!important}html.dark #navbar a[href*=build-with-ai]{background:0 0!important;color:#fff!important;border-color:rgba(255,255,255,.25)!important}html.dark #navbar a[href*=build-with-ai]:hover{border-color:#fff!important;background:rgba(255,255,255,.06)!important}#navbar a[href*=get-access]{background:#0b0814!important;color:#fff!important;border:1px solid #0b0814!important;transition:background 140ms ease!important}#navbar a[href*=get-access]:hover{background:#2a2640!important}html.dark #navbar a[href*=get-access]{background:#fff!important;color:#0b0814!important;border-color:#fff!important}html.dark #navbar a[href*=get-access]:hover{background:#e5e7eb!important;border-color:#e5e7eb!important}#sidebar-content a.text-primary,#sidebar-content a[class*=text-primary-light]{background-color:transparent!important}#sidebar-content a:not(.text-primary):not([class*=text-primary-light]):hover{background-color:rgba(103,13,229,.06)!important}#content-area:has(.api-section) #page-title{font-size:1.75rem;line-height:2.25rem}#content-area:has(.api-section) #header .prose{font-size:.9375rem;line-height:1.6}@container page-header (min-width: 520px){#content-area:has(.api-section) #header:has(.eyebrow) .eyebrow{display:flex;align-items:center;min-height:2.25rem;padding-right:11rem}#content-area:has(.api-section) #header:has(.eyebrow) .eyebrow~div:has(#page-context-menu){position:static}#content-area:has(.api-section) #header:has(.eyebrow) .eyebrow~div #page-context-menu{position:absolute;top:0;right:0;margin:0}}.api-section[data-api-section=authorizations]:has(+.api-section[data-api-section=headers]) .api-section-heading-title{font-size:0}.api-section[data-api-section=authorizations]:has(+.api-section[data-api-section=headers]) .api-section-heading-title::after{content:\"Authorization and headers\";font-size:1.125rem}.api-section[data-api-section=authorizations]+.api-section[data-api-section=headers] .api-section-heading{display:none}.api-section[data-api-section=authorizations]:has(+.api-section[data-api-section=headers]) .primitive-param-field:last-child{border-bottom-width:1px}.api-section .api-section-heading .border-b,.api-section .primitive-param-field{border-color:#d1d5db}html.dark .api-section .api-section-heading .border-b,html.dark .api-section .primitive-param-field{border-color:#374151}.api-section .primitive-param-field>.py-6{padding-top:.875rem;padding-bottom:.875rem}.api-section .primitive-param-field .mt-4{margin-top:.5rem}@media (min-width:1600px){#body-content:has(.api-section){max-width:1760px}#body-content:has(.api-section) #content-container{max-width:1440px}}"}],"page":{"pagePath":"wallets/sdk/server/swaps","slug":"/wallets/sdk/server/swaps","pageMetadata":{"title":"Swaps","sidebarTitle":"Swaps","description":"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.","href":"/wallets/sdk/server/swaps"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`WalletSwaps`}),` runs same-chain and cross-chain swaps from a Server Wallet. A swap is quoted first, reviewed by your application, and only then confirmed, so no funds move on a quote alone.`]}),`\n`,_jsx(_components.p,{children:`Swaps are durable. Progress continues across restarts, which means your application supplies storage and a scheduler rather than awaiting a single call.`}),`\n`,_jsxs(_components.p,{children:[`Import the swap surface from the SDK’s `,_jsx(_components.code,{children:`/trails`}),` entry point:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WalletSwaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TrailsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` EvmChainReader`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SwapAsset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SwapStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@polygonlabs/oms-server-wallet-sdk/trails'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configure-the-swap-client`,children:`Configure the swap client`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SerialExecutor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ServerWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@polygonlabs/oms-server-wallet-sdk'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Your durable swap records, and the restored wallet from the quickstart.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`declare`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` swapStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SwapStore`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`declare`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` wallet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ServerWallet`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A dedicated executor, separate from the one passed to ServerWallet.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` swapExecutor`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` SerialExecutor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Host-approved asset policy. Never build this from request input.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` assets`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SwapAsset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chainId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 137`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`asset:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`decimals:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`symbol:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'USDC'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chainId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8453`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`asset:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`decimals:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`symbol:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'USDC'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` swaps`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` WalletSwaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` executor:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swapExecutor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swapStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` assets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` enabled:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` trails:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TrailsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_TRAILS_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` origin:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://wallet-api.example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chains:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` EvmChainReader`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 137`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://YOUR_POLYGON_RPC'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8453`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://YOUR_BASE_RPC'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Four of these deserve attention:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`assets`})}),` is your own allowlist of tradable assets. A swap request naming an asset outside it is rejected, which is what keeps a caller from routing funds into an arbitrary token.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`executor`})}),` is an exclusive executor dedicated to `,_jsx(_components.code,{children:`WalletSwaps`}),`, separate from the one you passed to `,_jsx(_components.code,{children:`ServerWallet`}),`. `,_jsx(_components.code,{children:`WalletSwaps`}),` holds it for each swap step and for every ordinary debit, then calls the wallet, which runs its own executor. See `,_jsx(_components.a,{href:`/wallets/sdk/server/storage-and-concurrency`,children:`storage and concurrency`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`trails.apiKey`})}),` is separate from your OMS publishable key and belongs only in your backend. Omitting `,_jsx(_components.code,{children:`trails`}),` raises `,_jsx(_components.code,{children:`SWAPS_UNAVAILABLE`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`enabled`})}),` must be `,_jsx(_components.code,{children:`true`}),` to start new swaps. When it is not, `,_jsx(_components.code,{children:`SWAPS_DISABLED`}),` is raised and existing swaps still progress.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not pass the `,_jsx(_components.code,{children:`ServerWallet`}),` executor to `,_jsx(_components.code,{children:`WalletSwaps`}),`. Every `,_jsx(_components.code,{children:`WalletSwaps`}),` call runs inside its executor and then calls the wallet, which waits on its own executor. When both are the same exclusive executor, the inner call waits for the outer one and neither completes.`]})}),`\n`,_jsxs(_components.p,{children:[`Once a wallet uses swaps, send its ordinary transfers through `,_jsx(_components.code,{children:`swaps.prepareTransfer`}),` and `,_jsx(_components.code,{children:`swaps.executeTransfer`}),` rather than the `,_jsx(_components.code,{children:`ServerWallet`}),` methods. They take the same arguments, and they refuse a debit with `,_jsx(_components.code,{children:`DEBIT_PENDING`}),` while a swap, recovery, or earlier transfer on that chain is unresolved. Run other wallet calls, such as `,_jsx(_components.code,{children:`rotate`}),` or signing, through `,_jsx(_components.code,{children:`swaps.walletCommand(() => wallet.rotate())`}),` so they serialize against swap work too.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`EvmChainReader`}),` accepts one HTTPS RPC URL per chain. A missing URL, or one carrying credentials or a fragment, raises `,_jsx(_components.code,{children:`RPC_CONFIGURATION`}),` when the SDK first reads that chain.`]}),`\n`,_jsx(Heading,{level:`2`,id:`quote-a-swap`,children:`Quote a swap`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` swapId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` quoted`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`quoteSwap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swapId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` originChainId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 137`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` originAsset:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destinationChainId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8453`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` destinationAsset:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '10000000'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` slippageBps:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Phase:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quoted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Quote revision:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quoted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`revision`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`amount`}),` is a decimal string in the origin asset’s base units, so `,_jsx(_components.code,{children:`'10000000'`}),` is 10 USDC at 6 decimals. Never pass a floating-point token amount.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`slippageBps`}),` accepts `,_jsx(_components.code,{children:`10`}),`, `,_jsx(_components.code,{children:`50`}),`, or `,_jsx(_components.code,{children:`100`}),`. A same-chain swap uses the same call with one `,_jsx(_components.code,{children:`chainId`}),` on both sides.`]}),`\n`,_jsxs(_components.p,{children:[`The wallet must be restored before quoting, otherwise `,_jsx(_components.code,{children:`WALLET_PENDING`}),` is raised.`]}),`\n`,_jsx(Heading,{level:`2`,id:`review-and-confirm`,children:`Review and confirm`}),`\n`,_jsxs(_components.p,{children:[`Quoting does not move funds. The swap stays in the `,_jsx(_components.code,{children:`quoted`}),` phase until you confirm it with the exact quote revision you reviewed.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`quote`}),` carries the terms your review should apply to:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revision`})}),_jsxs(_components.td,{children:[`The identifier you pass to `,_jsx(_components.code,{children:`confirmSwap`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expectedOutput`})}),_jsx(_components.td,{children:`Destination amount at the quoted rate, in base units`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`minimumOutput`})}),_jsx(_components.td,{children:`Least the swap will deliver at the requested slippage`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`inputAmount`})}),_jsx(_components.td,{children:`Origin amount to be spent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`priceImpact`})}),_jsx(_components.td,{children:`Price impact of the route`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fees`})}),_jsx(_components.td,{children:`Route fees`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`providers`})}),_jsx(_components.td,{children:`Route providers`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expiresAt`})}),_jsx(_components.td,{children:`When the quote stops being confirmable`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// Apply your own authorization rules to `quoted` before this point.\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` confirmed`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`confirmSwap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swapId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quoted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`revision`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`If the quote changed since you read it, `,_jsx(_components.code,{children:`confirmSwap`}),` raises `,_jsx(_components.code,{children:`STALE_QUOTE`}),` rather than executing against terms you did not review. Re-read the swap, apply your rules to the new quote, and confirm that revision.`]}),`\n`,_jsx(_components.p,{children:`Confirming is idempotent. A second call with the same revision returns the current state instead of starting another swap.`}),`\n`,_jsx(Heading,{level:`2`,id:`drive-and-track-progress`,children:`Drive and track progress`}),`\n`,_jsx(_components.p,{children:`A confirmed swap advances through activation, funding, and settlement. Your application drives that work:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Call on a schedule: a persistent timer in Node, or an alarm per wallet on Workers.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`tick`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` view`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSwap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swapId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`view`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`view`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`nextAt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` recent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`listSwaps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`tick(limit)`}),` performs the work that is due and returns. `,_jsx(_components.code,{children:`nextAt`}),` on a swap view tells you when that swap next needs attention, or is `,_jsx(_components.code,{children:`null`}),` when it needs none. Funding a swap uses a sponsored transfer, so the wallet pays no gas.`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`reconcileSwap(id)`}),` when a swap’s upstream result is uncertain. As with transfers, never start a second swap because a response was lost.`]}),`\n`,_jsx(Heading,{level:`2`,id:`phases`,children:`Phases`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Phase`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`quoted`})}),_jsx(_components.td,{children:`Quoted, awaiting your confirmation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`preparing`})}),_jsx(_components.td,{children:`Preparing the funding transfer`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`activating`})}),_jsx(_components.td,{children:`Activating the swap intent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`funding`})}),_jsx(_components.td,{children:`Funding in progress`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settling`})}),_jsx(_components.td,{children:`Awaiting settlement on the destination chain`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`succeeded`})}),_jsx(_components.td,{children:`Complete`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expired`})}),_jsx(_components.td,{children:`The quote expired before confirmation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsx(_components.td,{children:`Terminal failure`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`attention`})}),_jsx(_components.td,{children:`Requires operator review`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`recovering`})}),_jsx(_components.td,{children:`Recovery in progress`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`refunded`})}),_jsx(_components.td,{children:`Funds returned to the wallet`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`attention`}),` is not a failure. It means the swap cannot proceed without a decision from you, so surface it rather than retrying it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`recovery`,children:`Recovery`}),`\n`,_jsxs(_components.p,{children:[`When a swap leaves funds short of the destination, `,_jsx(_components.code,{children:`prepareRecovery`}),` builds a recovery that returns them to the wallet, and `,_jsx(_components.code,{children:`confirmRecovery`}),` authorizes it. Recovery follows the same review-then-confirm shape as a swap, and it is restricted to the wallet’s own address and your reviewed assets.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`prepareRecovery(id, recoveryId, source)`}),` takes the swap ID, a recovery ID that you own, and `,_jsx(_components.code,{children:`'origin'`}),` or `,_jsx(_components.code,{children:`'destination'`}),` for the side of the route that holds the funds. `,_jsx(_components.code,{children:`confirmRecovery(id, recoveryId, revision)`}),` authorizes the `,_jsx(_components.code,{children:`revision`}),` of that entry in the swap view’s `,_jsx(_components.code,{children:`recoveries`}),`. Both return the swap view, and `,_jsx(_components.code,{children:`tick`}),` then drives the confirmed recovery.`]}),`\n`,_jsxs(_components.p,{children:[`Recovery is available even when `,_jsx(_components.code,{children:`enabled`}),` is `,_jsx(_components.code,{children:`false`}),`, so turning off new swaps does not strand funds from existing ones.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SWAPS_UNAVAILABLE`})}),_jsxs(_components.td,{children:[`No `,_jsx(_components.code,{children:`trails`}),` gateway was configured`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SWAPS_DISABLED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`enabled`}),` is not `,_jsx(_components.code,{children:`true`}),`, so new swaps are refused`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STALE_QUOTE`})}),_jsx(_components.td,{children:`The confirmed revision does not match the current quote`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`QUOTE_EXPIRED`})}),_jsx(_components.td,{children:`The quote or recovery review expired before confirmation, so request a new one`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DEBIT_PENDING`})}),_jsx(_components.td,{children:`A swap, recovery, or transfer on the same chain has an unresolved debit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WALLET_BUSY`})}),_jsx(_components.td,{children:`The swap store holds more than 1,000 unresolved operations for the wallet`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RPC_CONFIGURATION`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`EvmChainReader`}),` has no valid HTTPS RPC URL for the chain`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WALLET_PENDING`})}),_jsx(_components.td,{children:`The wallet has not been restored yet`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WALLET_DISABLED`})}),_jsx(_components.td,{children:`The wallet is disabled`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Swaps","sidebarTitle":"Swaps","description":"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.","href":"/wallets/sdk/server/swaps"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configure the swap client","slug":"configure-the-swap-client","depth":2,"children":[]},{"title":"Quote a swap","slug":"quote-a-swap","depth":2,"children":[]},{"title":"Review and confirm","slug":"review-and-confirm","depth":2,"children":[]},{"title":"Drive and track progress","slug":"drive-and-track-progress","depth":2,"children":[]},{"title":"Phases","slug":"phases","depth":2,"children":[]},{"title":"Recovery","slug":"recovery","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/polygon-labs/3aef159c73509324/analytics.js","/_mintlify/custom/polygon-labs/3af50e0aa9bbe82e/custom.js"],"subdomain":"polygon-labs","siteName":"Polygon Developer Docs","title":"Swaps - Polygon Developer Docs","contextualStarterQuestions":[{"_id":"6abe41a9fb80c68f0e36259a","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"How do I quote a swap?","status":"active","generatedBy":"contextual","path":"wallets/sdk/server/swaps","createdAt":"2026-10-01T11:19:05.781Z","updatedAt":"2026-10-01T11:19:05.781Z","__v":0},{"_id":"6abe41a9fb80c68f0e36259b","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"What is the assets allowlist?","status":"active","generatedBy":"contextual","path":"wallets/sdk/server/swaps","createdAt":"2026-10-01T11:19:05.781Z","updatedAt":"2026-10-01T11:19:05.781Z","__v":0},{"_id":"6abe41a9fb80c68f0e36259c","deploymentId":"69a9bcc427671ec5a2e05f92","questionText":"How do cross-chain swaps work?","status":"active","generatedBy":"contextual","path":"wallets/sdk/server/swaps","createdAt":"2026-10-01T11:19:05.781Z","updatedAt":"2026-10-01T11:19:05.781Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T11:19:01.111Z","originalFileLocation":"wallets/sdk/server/swaps.md"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Polygon Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Swaps - Polygon Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Polygon Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.polygon.technology/wallets/sdk/server/swaps\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://polygon-labs.mintlify.app/_mintlify/api/og/v2?division=SDK\u0026amp;title=Swaps\u0026amp;description=Quote%2C+review%2C+and+execute+same-chain+and+cross-chain+swaps+from+a+Server+Wallet%2C+with+durable+progress+tracking+and+recovery.\u0026amp;theme=430e64796fff481709b26ceb\u0026amp;signature=86ae87e0577eed099589249cc66ad7cedff7fc72a780a6cdb653bac774aaf557\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Swaps - Polygon Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://polygon-labs.mintlify.app/_mintlify/api/og/v2?division=SDK\u0026amp;title=Swaps\u0026amp;description=Quote%2C+review%2C+and+execute+same-chain+and+cross-chain+swaps+from+a+Server+Wallet%2C+with+durable+progress+tracking+and+recovery.\u0026amp;theme=430e64796fff481709b26ceb\u0026amp;signature=86ae87e0577eed099589249cc66ad7cedff7fc72a780a6cdb653bac774aaf557\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/polygon-labs/62XjF4p_S3sLlTMv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Polygon Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#670DE5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.polygon.technology/wallets/sdk/server/swaps\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/wallets/sdk/server/swaps.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.polygon.technology/#organization\",\"name\":\"Polygon Developer Docs\",\"url\":\"https://docs.polygon.technology\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/polygon-labs/ll1LL3IdpC3YxXZu/logo/light.svg?fit=max\u0026auto=format\u0026n=ll1LL3IdpC3YxXZu\u0026q=85\u0026s=d54ddb30492807a0eadf38093c075f2f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.polygon.technology#website\",\"name\":\"Polygon Developer Docs\",\"url\":\"https://docs.polygon.technology\",\"publisher\":{\"@id\":\"https://docs.polygon.technology/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.polygon.technology/wallets/sdk/server/swaps#webpage\",\"url\":\"https://docs.polygon.technology/wallets/sdk/server/swaps\",\"name\":\"Swaps\",\"description\":\"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\",\"dateModified\":\"2026-10-01T11:19:01.111Z\",\"isPartOf\":{\"@id\":\"https://docs.polygon.technology#website\"},\"breadcrumb\":{\"@id\":\"https://docs.polygon.technology/wallets/sdk/server/swaps#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.polygon.technology/wallets/sdk/server/swaps#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Wallets\",\"item\":\"https://docs.polygon.technology/wallets/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custodial\",\"item\":\"https://docs.polygon.technology/wallets/custodial-wallets\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Server Wallets\",\"item\":\"https://docs.polygon.technology/wallets/server-wallets\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SDK\",\"item\":\"https://docs.polygon.technology/wallets/sdk/server/quickstart\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Swaps\",\"item\":\"https://docs.polygon.technology/wallets/sdk/server/swaps\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.polygon.technology/wallets/sdk/server/swaps#article\",\"headline\":\"Swaps\",\"name\":\"Swaps\",\"description\":\"Quote, review, and execute same-chain and cross-chain swaps from a Server Wallet, with durable progress tracking and recovery.\",\"url\":\"https://docs.polygon.technology/wallets/sdk/server/swaps\",\"mainEntityOfPage\":{\"@id\":\"https://docs.polygon.technology/wallets/sdk/server/swaps#webpage\"},\"dateModified\":\"2026-10-01T11:19:01.111Z\",\"publisher\":{\"@id\":\"https://docs.polygon.technology/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.polygon.technology#website\"}}]}\u003c/script>","siteName":"Polygon Developer Docs","nav":{"global":null,"tabs":[{"tab":"Platform","icon":"layer-group","pages":[{"title":"Platform","href":""}]},{"tab":"Payments","pages":[{"title":"Payments","href":"/payments/overview"}]},{"tab":"Wallets","groups":[{"group":"Wallets","expanded":true,"pages":[{"title":"OMS wallets","sidebarTitle":"Overview","href":"/wallets/overview"},{"group":"Custodial","expanded":true,"pages":[{"title":"OMS Custodial Wallets","sidebarTitle":"Overview","href":"/wallets/custodial-wallets"},{"title":"Custodial wallet quickstart","sidebarTitle":"Quickstart","href":"/wallets/custodial-wallets-quickstart"},{"title":"OMS fiat wallets","sidebarTitle":"Fiat wallets","href":"/wallets/fiat-wallets"},{"group":"Server Wallets","pages":[{"title":"Server Wallets","sidebarTitle":"Overview","href":"/wallets/server-wallets"},{"group":"SDK","pages":[{"title":"Server Wallet SDK quickstart","sidebarTitle":"Quickstart","href":"/wallets/sdk/server/quickstart"},{"title":"Identity and credentials","sidebarTitle":"Identity and credentials","href":"/wallets/sdk/server/identity-and-credentials"},{"title":"Storage and concurrency","sidebarTitle":"Storage and concurrency","href":"/wallets/sdk/server/storage-and-concurrency"},{"title":"Transfers","sidebarTitle":"Transfers","description":"Prepare, execute, and track native and ERC-20 transfers from a Server Wallet, and handle uncertain submissions correctly.","href":"/wallets/sdk/server/transfers"},{"title":"Swaps","sidebarTitle":"Swaps","href":"/wallets/sdk/server/swaps"},{"title":"Sign and verify","sidebarTitle":"Sign and verify","description":"Sign plain messages and EIP-712 typed data from a Server Wallet, with each signature verified against the wallet before it is returned.","href":"/wallets/sdk/server/sign-and-verify"},{"title":"Balances","sidebarTitle":"Balances","href":"/wallets/sdk/server/balances"}]}]}]},{"group":"Non-custodial","expanded":true,"pages":[{"title":"OMS Non-Custodial Wallets","sidebarTitle":"Overview","href":"/wallets/non-custodial-wallets"},{"title":"SDK Quickstart","sidebarTitle":"Quickstart","href":"/wallets/quickstart"},{"group":"Features","pages":[{"title":"Authentication","href":"/wallets/authentication"},{"title":"Wallet Operations","href":"/wallets/wallet-operations"},{"title":"Gas Sponsorship","href":"/wallets/gas-sponsorship"},{"title":"Smart Sessions","href":"/wallets/smart-sessions"},{"title":"Private Send","href":"/wallets/private-send"},{"title":"Recovery","href":"/wallets/recovery"},{"title":"Security","href":"/wallets/security"}]},{"group":"SDK","pages":[{"title":"OMS Wallet SDKs","sidebarTitle":"Overview","href":"/wallets/sdk/overview"},{"group":"Guides","pages":[{"title":"Send USDC","sidebarTitle":"Send USDC","href":"/wallets/sdk/guides/send-usdc"},{"title":"Swap wallet assets","sidebarTitle":"Swap","href":"/wallets/sdk/guides/swap"},{"title":"Earn with Trails","sidebarTitle":"Earn","href":"/wallets/sdk/guides/earn"},{"title":"Backend wallet verification","sidebarTitle":"Backend verification","href":"/wallets/sdk/guides/backend-wallet-verification"},{"title":"Manage smart sessions from a backend","sidebarTitle":"Backend smart sessions","href":"/wallets/sdk/guides/backend-smart-sessions"}]},{"group":"TypeScript","pages":[{"title":"TypeScript SDK quickstart","sidebarTitle":"Quickstart","href":"/wallets/sdk/typescript/quickstart"},{"title":"TypeScript SDK authentication","sidebarTitle":"Authentication","href":"/wallets/sdk/typescript/authentication"},{"title":"TypeScript sessions and access","sidebarTitle":"Sessions and access","href":"/wallets/sdk/typescript/sessions-and-access"},{"title":"Send transactions with TypeScript","sidebarTitle":"Send transactions","href":"/wallets/sdk/typescript/send-transactions"},{"title":"Sign and verify with TypeScript","sidebarTitle":"Sign and verify","href":"/wallets/sdk/typescript/sign-and-verify"},{"title":"TypeScript balances and history","sidebarTitle":"Balances and history","href":"/wallets/sdk/typescript/balances-and-history"},{"title":"TypeScript networks","sidebarTitle":"Networks","href":"/wallets/sdk/typescript/networks-and-reference"},{"title":"TypeScript API reference","sidebarTitle":"API reference","href":"/wallets/sdk/typescript/api-reference"},{"title":"Use the TypeScript SDK with wagmi","sidebarTitle":"Using with wagmi","href":"/wallets/sdk/typescript/using-with-wagmi-connector"}]},{"group":"React Native","pages":[{"title":"React Native SDK quickstart","sidebarTitle":"Quickstart","href":"/wallets/sdk/react-native/quickstart"},{"title":"React Native authentication","sidebarTitle":"Authentication","href":"/wallets/sdk/react-native/authentication"},{"title":"React Native sessions and access","sidebarTitle":"Sessions and access","href":"/wallets/sdk/react-native/sessions-and-access"},{"title":"Send transactions with React Native","sidebarTitle":"Send transactions","href":"/wallets/sdk/react-native/send-transactions"},{"title":"Sign and verify with React Native","sidebarTitle":"Sign and verify","href":"/wallets/sdk/react-native/sign-and-verify"},{"title":"React Native balances and history","sidebarTitle":"Balances and history","href":"/wallets/sdk/react-native/balances-and-history"},{"title":"React Native networks","sidebarTitle":"Networks","href":"/wallets/sdk/react-native/networks-and-reference"},{"title":"React Native API reference","sidebarTitle":"API reference","href":"/wallets/sdk/react-native/api-reference"}]},{"group":"Swift","pages":[{"title":"Swift SDK quickstart","sidebarTitle":"Quickstart","href":"/wallets/sdk/swift/quickstart"},{"title":"Swift SDK authentication","sidebarTitle":"Authentication","href":"/wallets/sdk/swift/authentication"},{"title":"Swift sessions and access","sidebarTitle":"Sessions and access","href":"/wallets/sdk/swift/sessions-and-access"},{"title":"Send transactions with Swift","sidebarTitle":"Send transactions","href":"/wallets/sdk/swift/send-transactions"},{"title":"Sign and verify with Swift","sidebarTitle":"Sign and verify","href":"/wallets/sdk/swift/sign-and-verify"},{"title":"Swift balances and history","sidebarTitle":"Balances and history","href":"/wallets/sdk/swift/balances-and-history"},{"title":"Swift networks","sidebarTitle":"Networks","href":"/wallets/sdk/swift/networks-and-reference"},{"title":"Swift API reference","sidebarTitle":"API reference","href":"/wallets/sdk/swift/api-reference"}]},{"group":"Kotlin","pages":[{"title":"Kotlin SDK quickstart","sidebarTitle":"Quickstart","href":"/wallets/sdk/kotlin/quickstart"},{"title":"Kotlin SDK authentication","sidebarTitle":"Authentication","href":"/wallets/sdk/kotlin/authentication"},{"title":"Kotlin SDK sessions and access","sidebarTitle":"Sessions and access","href":"/wallets/sdk/kotlin/sessions-and-access"},{"title":"Kotlin SDK send transactions","sidebarTitle":"Send transactions","href":"/wallets/sdk/kotlin/send-transactions"},{"title":"Kotlin SDK sign and verify","sidebarTitle":"Sign and verify","href":"/wallets/sdk/kotlin/sign-and-verify"},{"title":"Kotlin SDK balances and history","sidebarTitle":"Balances and history","href":"/wallets/sdk/kotlin/balances-and-history"},{"title":"Kotlin SDK networks","sidebarTitle":"Networks","href":"/wallets/sdk/kotlin/networks-and-reference"},{"title":"Kotlin API reference","sidebarTitle":"API reference","href":"/wallets/sdk/kotlin/api-reference"}]}]},{"group":"Examples","pages":[{"title":"Interactive Demo","mode":"wide","href":"/wallets/examples/interactive-demo"},{"title":"Neobank iOS Demo","href":"/wallets/examples/neobank-ios"},{"title":"Hosted Wallet","href":"/wallets/hosted-wallet"},{"title":"Custom Wallet","href":"/wallets/custom-wallet"},{"title":"Automate USDC collection with a Treasury Wallet","sidebarTitle":"Treasury Wallet","href":"/wallets/treasury-wallet"},{"title":"Offer Yield Accounts to Your Users","sidebarTitle":"Offer Yield Accounts","href":"/wallets/morpho-vault-deposit"},{"title":"Agentic Wallets","href":"/wallets/agentic-wallets-overview"}]}]},{"group":"Technical Reference","expanded":true,"pages":[{"title":"OMS Wallet Architecture","href":"/wallets/architecture"},{"title":"Smart Sessions: Technical Deep Dive","href":"/wallets/smart-sessions-deep-dive"},{"title":"Wallet Configuration","href":"/wallets/wallet-configuration"},{"title":"Guard Firewall","href":"/wallets/guard-firewall"},{"title":"OMS Wallet Infrastructure","href":"/wallets/infrastructure"},{"title":"Timed Recovery: Technical Reference","href":"/wallets/timed-recovery-technical"},{"title":"Multi-Auth Linking","href":"/wallets/multi-auth-linking"},{"title":"Supported networks","sidebarTitle":"Supported networks","mode":"wide","href":"/wallets/supported-networks"}]}]}]},{"tab":"Cross-chain","pages":[{"title":"Cross-chain","href":"/cross-chain"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"Infrastructure","icon":"server","pages":[{"title":"Infrastructure","href":"/infrastructure"}]},{"tab":"Polygon Chain","pages":[{"title":"Polygon Chain","href":"/pos/overview"}]},{"tab":"Polygon CDK","pages":[{"title":"Polygon CDK","href":"/chain-development/cdk"}]},{"tab":"Agglayer","pages":[{"title":"Agglayer","href":"/interoperability/overview"}]},{"tab":"Agentic","pages":[{"title":"Agentic","href":"/payment-services/agentic-payments/agent-integration/intro"}]}]},"title":"Swaps - Polygon Developer Docs","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":[],"chunks":[]}