On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.
Secret organization API key from the partner panel, for servers. Sent on swap creation as Authorization: Bearer <key> to attribute the swap to your organization. Optional; an invalid key is rejected. Never use it in client-side code.
Body
application/json
Body of POST /v2/swap/submarine — Boltz-shaped, camelCase. Accepts both the maker's native shape (pairId + preimageHash +
fromAmount) and the stock Boltz SDK shape (from + to + invoice,
with the hash and on-chain amount derived server-side).
A kaleidoswap: beneficiary handoff carrying the invoice to pay, in
place of invoice. This is how a payer funds a swap that pays someone else: the
recipient's wallet emits one string and the payer's passes it
through, rather than the payer knowing to pull an invoice out of it. The maker checks the request's network and expiry, and the swap is
atomic exactly as it always was — the lockup commits to the
recipient's payment hash, so the maker can only claim it by paying
them.
Amount, in the from-asset's smallest unit, the taker will lock
on-chain. Optional for a BTC↔BTC submarine: derived from the invoice
amount + the pair's fees (Boltz expectedAmount). For a Liquid
submarine (L-BTC or L-USDT) the invoice is authoritative and this legacy
field is accepted only when it equals the canonical inverse quote.
The BOLT11 invoice the taker wants paid over Lightning — the
maker pays it once the taker's lockup/VHTLC confirms, then claims
the lockup with the preimage the payment reveals. Its payment hash
must equal preimage_hash. Boltz-shaped submarine: the user
supplies the invoice to be settled.
With offer: the Lightning amount, in sats, to request from a
variable-amount offer. Optional for a fixed-amount offer, and must
equal its amount when given. Rejected without offer.
BOLT12 alternative to invoice: an lno1… offer the taker wants
paid. The maker fetches an invoice from it at create time (without
paying), binds the swap to that invoice's payment hash — returned as
preimageHash — and releases the payment once the lockup confirms. Mutually exclusive with invoice and with an explicit preimageHash.
Optional pairHash rate-lock: the hash the taker quoted against. When present it's verified against the pair's current rate card and a
mismatch is rejected with 400 pair_hash_mismatch.
Whether the maker accepts a 0-conf deposit. Always false — the swap
engine has no zero-conf path. Present because stock Boltz
clients require it (non-Option in their CreateSubmarineResponse).
Per-swap taker credential, 32 bytes hex. Issued once, here. Present it as X-Swap-Auth on POST /v2/swap/{id}/rate-decision;
without it the maker can't tell the taker from anyone else who
happens to know the swap id.
Only when invoice is a hold invoice of this maker: the swap that
minted it, which this one pays in-process instead of over Lightning. One hash binds both: the claim of that swap's lockup reveals the
preimage that lets the maker claim this deposit. Only an Arkade
deposit paying a reverse to an RGB lockup is admitted.
BOLT12 (offer) creates only: the payment hash of the invoice the
maker fetched from the offer — the hash the lockup commits to, which
the taker could not know in advance. 32 bytes hex.
RGB routes only (from on rgb_l1): how to lock the RGB asset in
the swap tree's P2TR address. expectedAmount is then the asset
amount in the contract's units, not sats.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"KaleidoSwap Documentation","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/kaleidoswap/jZkXeFEXDE4-8PkF/assets/logos/kaleidoswap-full-logo-horizontal-onlight.svg?fit=max\u0026auto=format\u0026n=jZkXeFEXDE4-8PkF\u0026q=85\u0026s=8cf2002b5e2b8ea1cfb0523af2525f09","dark":"https://mintcdn.com/kaleidoswap/jZkXeFEXDE4-8PkF/assets/logos/kaleidoswap-full-logo-horizontal.svg?fit=max\u0026auto=format\u0026n=jZkXeFEXDE4-8PkF\u0026q=85\u0026s=1d5d02f344b0a00783670693d8d928ec"},"favicon":"https://mintcdn.com/kaleidoswap/jZkXeFEXDE4-8PkF/assets/logos/kaleidoswap-favicon.ico?fit=max\u0026auto=format\u0026n=jZkXeFEXDE4-8PkF\u0026q=85\u0026s=7a218e79e2eff3be0d975a63e39bf5af","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://maker.signet.kaleidoswap.com"}},"navbar":{"links":[{"href":"/sdk/installation","label":"Build"}],"primary":{"type":"button","label":"Download the Apps","href":"https://kaleidoswap.com/products"}},"footer":{"socials":{"x":"https://x.com/kaleidoswap","github":"https://github.com/kaleidoswap","telegram":"https://t.me/kaleidoswap"}},"integrations":{"posthog":{"apiKey":"phc_g3NF1o9hsu8tFROxZaRT9JfD1BdBEQYfIIcrkVzTkps","apiHost":"https://eu.i.posthog.com","sessionRecording":true}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"whats-kaleidoswap/introduction"},{"language":"cn","navbar":{"links":[{"href":"/cn/sdk/installation","label":"构建"}],"primary":{"type":"button","label":"下载应用","href":"https://kaleidoswap.com/products"}},"href":"cn/whats-kaleidoswap/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kaleidoswap","hasAudioNarration":false,"actualSubdomain":"kaleidoswap","customDomains":["docs.kaleidoswap.com"],"gitSource":{"type":"github","owner":"kaleidoswap","repo":"docs","deployBranch":"main","contentDirectory":"mintlify-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae21c728ead5bbc3c1d7030","collectionId":"ce7c4641-3d9a-4f3c-9cc2-027b7777d86f","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae21c728ead5bbc3c1d7030"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae2233ab344d78ea3e3a604","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API Reference","count":42},{"language":"en","tag":"Reference","count":28},{"language":"en","tag":"CLI","count":28},{"language":"cn","tag":"参考","count":25},{"language":"en","tag":"Desktop App","count":24},{"language":"en","tag":"SDK","count":24},{"language":"cn","tag":"简介","count":24},{"language":"cn","tag":"桌面应用","count":24},{"language":"en","tag":"Introduction","count":22},{"language":"cn","tag":"SDK","count":17},{"language":"en","tag":"AI Tools","count":11},{"language":"en","tag":"Node SDK","count":11},{"language":"cn","tag":"AI 工具","count":11},{"language":"cn","tag":"CLI","count":11},{"language":"en","tag":"Extensions","count":10},{"language":"cn","tag":"浏览器扩展","count":10},{"language":"en","tag":"Guides","count":9},{"language":"cn","tag":"API 参考","count":9},{"language":"en","tag":"Wallet Operations","count":8},{"language":"cn","tag":"钱包操作","count":8},{"language":"cn","tag":"概览","count":8},{"language":"default","tag":"Chain swaps","count":7},{"language":"default","tag":"Atomic RGB swaps","count":5},{"language":"default","tag":"Reverse swaps","count":5},{"language":"default","tag":"Chain data","count":4},{"language":"default","tag":"Recovery","count":4},{"language":"default","tag":"Service","count":4},{"language":"default","tag":"Submarine swaps","count":4},{"language":"default","tag":"Lightning channels (LSPS1)","count":3},{"language":"default","tag":"Swap status","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"editor-v7-file-tree","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":"editor-nav-generations","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":"editor-agent-model-picker","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"main img,main img.rounded{display:block;margin-left:auto;margin-right:auto;border-radius:.5rem;box-shadow:0 4px 8px -1px rgb(0 0 0/.12),0 12px 28px -4px rgb(0 0 0/.18)}.dark main img,.dark main img.rounded{border-radius:.5rem;box-shadow:0 4px 8px -1px rgb(0 0 0/.45),0 14px 34px -4px rgb(0 0 0/.65)}main :is(p, figure) :is(a, div, span):has(img[src*=\"/desktop-app/\"]),main :is(p, figure):has(img[src*=\"/desktop-app/\"]){padding:0!important;background:0 0!important;border:0!important;box-shadow:none!important}main img[src*=\"/desktop-app/\"],main img[src*=\"/extension/\"]{display:block;height:auto;border-radius:.5rem;box-shadow:0 4px 8px -1px rgb(0 0 0/.12),0 12px 28px -4px rgb(0 0 0/.18)}main img[src*=\"/desktop-app/\"]{margin:1.5rem auto;padding:0!important;background:0 0!important;border:0!important;width:min(100%,800px);max-width:800px}.dark main img[src*=\"/desktop-app/\"],.dark main img[src*=\"/extension/\"]{box-shadow:0 4px 8px -1px rgb(0 0 0/.45),0 14px 34px -4px rgb(0 0 0/.65)}main img[src*=\"/extension/\"]{margin-left:auto;margin-right:auto;max-width:360px}"}],"page":{"pagePath":"api-reference/submarine-swaps/create-a-submarine-swap","slug":"/api-reference/submarine-swaps/create-a-submarine-swap","pageMetadata":{"title":"Create a submarine swap","description":"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. **Verify the lockup against your own key before funding it.** The response carries `swapAuth`, issued once: store it with the swap.","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine","href":"/api-reference/submarine-swaps/create-a-submarine-swap","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. \", _jsx(_components.strong, {\n children: \"Verify the lockup against your own key before funding it.\"\n }), \" The response carries \", _jsx(_components.code, {\n children: \"swapAuth\"\n }), \", issued once: store it with the swap.\"]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a submarine swap","description":"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. **Verify the lockup against your own key before funding it.** The response carries `swapAuth`, issued once: store it with the swap.","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine","href":"/api-reference/submarine-swaps/create-a-submarine-swap","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Submarine swaps"],"summary":"Create a submarine swap","description":"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. **Verify the lockup against your own key before funding it.** The response carries `swapAuth`, issued once: store it with the swap.","operationId":"create_submarine_swap","requestBody":"c17d179e-f45a-4428-a01b-940a22f2d702","responses":{"201":"f740e0a4-982a-4e58-b024-aa891b340e24","400":"b4da3350-7244-4916-9910-5f8812d0a29a","409":"41b161ae-cbbb-4f97-b8d7-3e1f76f08bca","422":"1ad707be-1e0b-4a15-a729-a89835fcff02","429":"8684d3c2-4b1f-4775-b1f2-1f8879eebb54","503":"6062edac-b9cb-43b3-b3a2-fa6e241f2bda"},"security":["a18a7f89-ac47-42d5-be6a-e9d0e4d37102","3882c9b1-e634-44b9-b1bf-f0543cc89c5e","f1b7e842-67f6-49bb-80ba-d3d9cc151a21"],"method":"post","type":"path","servers":["5a853f64-bde2-49c1-8aad-ff97a3fd5e5f"],"path":"/v2/swap/submarine","baseUrlOptions":["https://maker.signet.kaleidoswap.com"],"title":"Create a submarine swap","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Body of `POST /v2/swap/submarine` — Boltz-shaped, camelCase. Accepts both the maker's native shape (`pairId` + `preimageHash` +\n`fromAmount`) and the **stock Boltz SDK** shape (`from` + `to` + `invoice`,\nwith the hash and on-chain amount derived server-side).","required":["refundPublicKey"],"properties":{"refundPublicKey":{"type":"string","description":"The taker's 33-byte compressed refund public key, hex.","isRequired":true,"uniqueKey":"refundPublicKey","typeLabel":"string"},"beneficiary":{"oneOf":[{"type":"string","description":"A `kaleidoswap:` beneficiary handoff carrying the invoice to pay, in\nplace of `invoice`. This is how a payer funds a swap that pays **someone else**: the\nrecipient's wallet emits one string and the payer's passes it\nthrough, rather than the payer knowing to pull an invoice out of it. The maker checks the request's network and expiry, and the swap is\natomic exactly as it always was — the lockup commits to the\nrecipient's payment hash, so the maker can only claim it by paying\nthem.","uniqueKey":"beneficiary.oneOf.0","typeLabel":"string"},{"type":"null","description":"A `kaleidoswap:` beneficiary handoff carrying the invoice to pay, in\nplace of `invoice`. This is how a payer funds a swap that pays **someone else**: the\nrecipient's wallet emits one string and the payer's passes it\nthrough, rather than the payer knowing to pull an invoice out of it. The maker checks the request's network and expiry, and the swap is\natomic exactly as it always was — the lockup commits to the\nrecipient's payment hash, so the maker can only claim it by paying\nthem.","uniqueKey":"beneficiary.oneOf.1","typeLabel":"null"}],"uniqueKey":"beneficiary","typeLabel":"string | null"},"from":{"oneOf":[{"type":"string","description":"Boltz: on-chain currency symbol (e.g. `\"BTC\"`). Combined with `to` into\na `pairId` when `pairId` is absent.","uniqueKey":"from.oneOf.0","typeLabel":"string"},{"type":"null","description":"Boltz: on-chain currency symbol (e.g. `\"BTC\"`). Combined with `to` into\na `pairId` when `pairId` is absent.","uniqueKey":"from.oneOf.1","typeLabel":"null"}],"uniqueKey":"from","typeLabel":"string | null"},"fromAmount":{"oneOf":[{"type":"integer","format":"int64","description":"Amount, in the from-asset's smallest unit, the taker will lock\non-chain. Optional for a BTC↔BTC submarine: derived from the invoice\namount + the pair's fees (Boltz `expectedAmount`). For a Liquid\nsubmarine (L-BTC or L-USDT) the invoice is authoritative and this legacy\nfield is accepted only when it equals the canonical inverse quote.","minimum":0,"uniqueKey":"fromAmount.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Amount, in the from-asset's smallest unit, the taker will lock\non-chain. Optional for a BTC↔BTC submarine: derived from the invoice\namount + the pair's fees (Boltz `expectedAmount`). For a Liquid\nsubmarine (L-BTC or L-USDT) the invoice is authoritative and this legacy\nfield is accepted only when it equals the canonical inverse quote.","minimum":0,"uniqueKey":"fromAmount.oneOf.1","typeLabel":"null"}],"uniqueKey":"fromAmount","typeLabel":"integer\u003cint64> | null"},"invoice":{"oneOf":[{"type":"string","description":"The BOLT11 invoice the taker wants paid over Lightning — the\nmaker pays it once the taker's lockup/VHTLC confirms, then claims\nthe lockup with the preimage the payment reveals. Its payment hash\nmust equal `preimage_hash`. Boltz-shaped submarine: the user\nsupplies the invoice to be settled.","uniqueKey":"invoice.oneOf.0","typeLabel":"string"},{"type":"null","description":"The BOLT11 invoice the taker wants paid over Lightning — the\nmaker pays it once the taker's lockup/VHTLC confirms, then claims\nthe lockup with the preimage the payment reveals. Its payment hash\nmust equal `preimage_hash`. Boltz-shaped submarine: the user\nsupplies the invoice to be settled.","uniqueKey":"invoice.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoice","typeLabel":"string | null"},"invoiceAmount":{"oneOf":[{"type":"integer","format":"int64","description":"With `offer`: the Lightning amount, in sats, to request from a\nvariable-amount offer. Optional for a fixed-amount offer, and must\nequal its amount when given. Rejected without `offer`.","minimum":0,"uniqueKey":"invoiceAmount.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"With `offer`: the Lightning amount, in sats, to request from a\nvariable-amount offer. Optional for a fixed-amount offer, and must\nequal its amount when given. Rejected without `offer`.","minimum":0,"uniqueKey":"invoiceAmount.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoiceAmount","typeLabel":"integer\u003cint64> | null"},"offer":{"oneOf":[{"type":"string","description":"**BOLT12 alternative to `invoice`**: an `lno1…` offer the taker wants\npaid. The maker fetches an invoice from it at create time (without\npaying), binds the swap to that invoice's payment hash — returned as\n`preimageHash` — and releases the payment once the lockup confirms. Mutually exclusive with `invoice` and with an explicit `preimageHash`.","uniqueKey":"offer.oneOf.0","typeLabel":"string"},{"type":"null","description":"**BOLT12 alternative to `invoice`**: an `lno1…` offer the taker wants\npaid. The maker fetches an invoice from it at create time (without\npaying), binds the swap to that invoice's payment hash — returned as\n`preimageHash` — and releases the payment once the lockup confirms. Mutually exclusive with `invoice` and with an explicit `preimageHash`.","uniqueKey":"offer.oneOf.1","typeLabel":"null"}],"uniqueKey":"offer","typeLabel":"string | null"},"pairHash":{"oneOf":[{"type":"string","description":"Optional `pairHash` rate-lock: the hash the taker quoted against. When present it's verified against the pair's current rate card and a\nmismatch is rejected with `400 pair_hash_mismatch`.","uniqueKey":"pairHash.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional `pairHash` rate-lock: the hash the taker quoted against. When present it's verified against the pair's current rate card and a\nmismatch is rejected with `400 pair_hash_mismatch`.","uniqueKey":"pairHash.oneOf.1","typeLabel":"null"}],"uniqueKey":"pairHash","typeLabel":"string | null"},"pairId":{"oneOf":[{"type":"string","description":"Trading-pair key, e.g. `\"BTC/BTC\"`. Optional when `from`+`to` are given.","uniqueKey":"pairId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Trading-pair key, e.g. `\"BTC/BTC\"`. Optional when `from`+`to` are given.","uniqueKey":"pairId.oneOf.1","typeLabel":"null"}],"uniqueKey":"pairId","typeLabel":"string | null"},"preimageHash":{"oneOf":[{"type":"string","description":"The taker's BOLT11 payment hash — `SHA256(preimage)`, 32 bytes hex. Optional: derived from `invoice` when absent (Boltz behaviour).","uniqueKey":"preimageHash.oneOf.0","typeLabel":"string"},{"type":"null","description":"The taker's BOLT11 payment hash — `SHA256(preimage)`, 32 bytes hex. Optional: derived from `invoice` when absent (Boltz behaviour).","uniqueKey":"preimageHash.oneOf.1","typeLabel":"null"}],"uniqueKey":"preimageHash","typeLabel":"string | null"},"to":{"oneOf":[{"type":"string","description":"Boltz: Lightning currency symbol (e.g. `\"BTC\"`).","uniqueKey":"to.oneOf.0","typeLabel":"string"},{"type":"null","description":"Boltz: Lightning currency symbol (e.g. `\"BTC\"`).","uniqueKey":"to.oneOf.1","typeLabel":"null"}],"uniqueKey":"to","typeLabel":"string | null"},"webhook":{"oneOf":[{"type":"object","description":"Optional HTTPS callback for status changes (Boltz `webhook` shape). Persisted on the swap row; the dispatcher reads it on each\n`SwapUpdate`.","required":["url"],"properties":{"url":{"type":"string","description":"Callback URL.","isRequired":true,"uniqueKey":"webhook.oneOf.0.url","typeLabel":"string"},"hashSwapId":{"type":"boolean","description":"When `true`, the swap id in the callback payload is `SHA256(swap_id)`\n— for merchants that don't want correlatable ids on the wire.","uniqueKey":"webhook.oneOf.0.hashSwapId","typeLabel":"boolean"},"status":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"webhook.oneOf.0.status.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"`None` (the\nfield absent) means *every* transition is delivered.","uniqueKey":"webhook.oneOf.0.status.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"`None` (the\nfield absent) means *every* transition is delivered.","uniqueKey":"webhook.oneOf.0.status.oneOf.1","typeLabel":"null"}],"uniqueKey":"webhook.oneOf.0.status","typeLabel":"string[] | null"}},"uniqueKey":"webhook.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"webhook.oneOf.1","typeLabel":"null"}],"uniqueKey":"webhook","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"refundPublicKey":"\u003cstring>","beneficiary":"\u003cstring>","from":"\u003cstring>","fromAmount":1,"invoice":"\u003cstring>","invoiceAmount":1,"offer":"\u003cstring>","pairHash":"\u003cstring>","pairId":"\u003cstring>","preimageHash":"\u003cstring>","to":"\u003cstring>","webhook":{"url":"\u003cstring>","hashSwapId":true,"status":["\u003cstring>"]}}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"f740e0a4-982a-4e58-b024-aa891b340e24":{"description":"Swap created.","content":{"application/json":{"schema":{"type":"object","required":["id","swapAuth","claimPublicKey","address","swapTree","timeoutBlockHeight","expectedAmount","acceptZeroConf","bip21"],"properties":{"acceptZeroConf":{"type":"boolean","description":"Whether the maker accepts a 0-conf deposit. Always `false` — the swap\nengine has no zero-conf path. Present because stock Boltz\nclients require it (non-Option in their `CreateSubmarineResponse`).","isRequired":true,"uniqueKey":"acceptZeroConf","typeLabel":"boolean"},"address":{"type":"string","description":"P2TR lockup address (or `ark1…` VHTLC / `el1…` Liquid HTLC).","isRequired":true,"uniqueKey":"address","typeLabel":"string"},"bip21":{"type":"string","description":"BIP-21 funding URI for the taker's wallet (`bitcoin:\u003caddr>?amount=\u003cbtc>`). Empty for Arkade/Liquid lockups, which are not `bitcoin:` URIs.","isRequired":true,"uniqueKey":"bip21","typeLabel":"string"},"claimPublicKey":{"type":"string","description":"33-byte compressed maker pubkey (hex) used in the MuSig2 aggregate.","isRequired":true,"uniqueKey":"claimPublicKey","typeLabel":"string"},"expectedAmount":{"type":"integer","format":"int64","description":"Amount the taker must lock on-chain (Boltz `expectedAmount`).","minimum":0,"isRequired":true,"uniqueKey":"expectedAmount","typeLabel":"integer\u003cint64>"},"id":{"type":"string","description":"Swap id (26-character string).","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"swapAuth":{"type":"string","description":"Per-swap taker credential, 32 bytes hex. Issued **once**, here. Present it as `X-Swap-Auth` on `POST /v2/swap/{id}/rate-decision`;\nwithout it the maker can't tell the taker from anyone else who\nhappens to know the swap id.","isRequired":true,"uniqueKey":"swapAuth","typeLabel":"string"},"swapTree":{"type":"object","description":"`swapTree` returned on every swap creation + status response.","required":["claimLeaf","refundLeaf"],"properties":{"claimLeaf":{"type":"object","description":"One tapscript leaf — leaf-version byte (`196` / `0xc4` for elements,\n`192` / `0xc0` for Bitcoin) plus the hex script.","required":["version","output"],"properties":{"output":{"type":"string","description":"Hex-encoded leaf script.","isRequired":true,"uniqueKey":"swapTree.claimLeaf.output","typeLabel":"string"},"version":{"type":"integer","format":"int32","description":"Tapscript leaf-version byte.","minimum":0,"isRequired":true,"uniqueKey":"swapTree.claimLeaf.version","typeLabel":"integer\u003cint32>"}},"isRequired":true,"uniqueKey":"swapTree.claimLeaf","typeLabel":"object"},"refundLeaf":{"type":"object","description":"One tapscript leaf — leaf-version byte (`196` / `0xc4` for elements,\n`192` / `0xc0` for Bitcoin) plus the hex script.","required":["version","output"],"properties":{"output":{"type":"string","description":"Hex-encoded leaf script.","isRequired":true,"uniqueKey":"swapTree.refundLeaf.output","typeLabel":"string"},"version":{"type":"integer","format":"int32","description":"Tapscript leaf-version byte.","minimum":0,"isRequired":true,"uniqueKey":"swapTree.refundLeaf.version","typeLabel":"integer\u003cint32>"}},"isRequired":true,"uniqueKey":"swapTree.refundLeaf","typeLabel":"object"}},"isRequired":true,"uniqueKey":"swapTree","typeLabel":"object"},"timeoutBlockHeight":{"type":"integer","format":"int32","description":"Refund-leaf timelock (block height for BTC/Liquid; unix-ts for\nArkade — see the persisted form for which).","minimum":0,"isRequired":true,"uniqueKey":"timeoutBlockHeight","typeLabel":"integer\u003cint32>"},"assetId":{"oneOf":[{"type":"string","description":"Swap asset for Liquid routes (L-USDT); omitted on BTC/Arkade routes.","uniqueKey":"assetId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Swap asset for Liquid routes (L-USDT); omitted on BTC/Arkade routes.","uniqueKey":"assetId.oneOf.1","typeLabel":"null"}],"uniqueKey":"assetId","typeLabel":"string | null"},"feeAssetId":{"oneOf":[{"type":"string","description":"Elements fee/policy asset for Liquid routes (L-BTC).","uniqueKey":"feeAssetId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Elements fee/policy asset for Liquid routes (L-BTC).","uniqueKey":"feeAssetId.oneOf.1","typeLabel":"null"}],"uniqueKey":"feeAssetId","typeLabel":"string | null"},"internalHop":{"oneOf":[{"type":"object","description":"**Only when `invoice` is a hold invoice of this maker**: the swap that\nminted it, which this one pays in-process instead of over Lightning. One hash binds both: the claim of that swap's lockup reveals the\npreimage that lets the maker claim this deposit. Only an Arkade\ndeposit paying a reverse to an RGB lockup is admitted.","required":["payeeId"],"properties":{"payeeId":{"type":"string","description":"Id of the paid swap.","isRequired":true,"uniqueKey":"internalHop.oneOf.0.payeeId","typeLabel":"string"}},"uniqueKey":"internalHop.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"internalHop.oneOf.1","typeLabel":"null"}],"uniqueKey":"internalHop","typeLabel":"object | null"},"invoiceAmount":{"oneOf":[{"type":"integer","format":"int64","description":"**BOLT12 (`offer`) creates only**: the Lightning amount, in sats, the\nfetched invoice is for and the maker will pay.","minimum":0,"uniqueKey":"invoiceAmount.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"**BOLT12 (`offer`) creates only**: the Lightning amount, in sats, the\nfetched invoice is for and the maker will pay.","minimum":0,"uniqueKey":"invoiceAmount.oneOf.1","typeLabel":"null"}],"uniqueKey":"invoiceAmount","typeLabel":"integer\u003cint64> | null"},"preimageHash":{"oneOf":[{"type":"string","description":"**BOLT12 (`offer`) creates only**: the payment hash of the invoice the\nmaker fetched from the offer — the hash the lockup commits to, which\nthe taker could not know in advance. 32 bytes hex.","uniqueKey":"preimageHash.oneOf.0","typeLabel":"string"},{"type":"null","description":"**BOLT12 (`offer`) creates only**: the payment hash of the invoice the\nmaker fetched from the offer — the hash the lockup commits to, which\nthe taker could not know in advance. 32 bytes hex.","uniqueKey":"preimageHash.oneOf.1","typeLabel":"null"}],"uniqueKey":"preimageHash","typeLabel":"string | null"},"referralId":{"oneOf":[{"type":"string","description":"Boltz compatibility field. The maker currently has no referral\nattribution and returns JSON `null`.","uniqueKey":"referralId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Boltz compatibility field. The maker currently has no referral\nattribution and returns JSON `null`.","uniqueKey":"referralId.oneOf.1","typeLabel":"null"}],"uniqueKey":"referralId","typeLabel":"string | null"},"rgb":{"oneOf":[{"type":"object","description":"**RGB routes only** (`from` on `rgb_l1`): how to lock the RGB asset in\nthe swap tree's P2TR `address`. `expectedAmount` is then the asset\namount in the contract's units, not sats.","required":["assetId","amount","recipientId","blinding","htlcSat","scriptPubkey","transportEndpoints","minConfirmations"],"properties":{"amount":{"type":"integer","format":"int64","description":"Asset amount in the contract's smallest unit; equals `expectedAmount`\n(submarine) or `onchainAmount` (reverse).","minimum":0,"isRequired":true,"uniqueKey":"rgb.oneOf.0.amount","typeLabel":"integer\u003cint64>"},"assetId":{"type":"string","description":"RGB contract id (`rgb:…`).","isRequired":true,"uniqueKey":"rgb.oneOf.0.assetId","typeLabel":"string"},"blinding":{"type":"string","description":"Decimal blinding chosen by the maker. A string preserves all 63 bits\nin JavaScript clients, whose JSON numbers lose precision above 2^53.","isRequired":true,"uniqueKey":"rgb.oneOf.0.blinding","typeLabel":"string"},"htlcSat":{"type":"integer","format":"int64","description":"Sats of the HTLC output: at least this (submarine); 546 plus the\nclaim fee at `claimFeeRate` (reverse).","minimum":0,"isRequired":true,"uniqueKey":"rgb.oneOf.0.htlcSat","typeLabel":"integer\u003cint64>"},"minConfirmations":{"type":"integer","format":"int32","description":"Confirmations the lock needs before the other side acts on it; the\ntimeout leaves room for them and for the claim to confirm.","minimum":0,"isRequired":true,"uniqueKey":"rgb.oneOf.0.minConfirmations","typeLabel":"integer\u003cint32>"},"recipientId":{"type":"string","description":"rgb-lib recipient id of the HTLC script: the proxy key of the lock\nconsignment.","isRequired":true,"uniqueKey":"rgb.oneOf.0.recipientId","typeLabel":"string"},"scriptPubkey":{"type":"string","description":"The HTLC output script (hex), the same P2TR as `address` /\n`lockupAddress`.","isRequired":true,"uniqueKey":"rgb.oneOf.0.scriptPubkey","typeLabel":"string"},"transportEndpoints":{"type":"array","items":{"type":"string","uniqueKey":"rgb.oneOf.0.transportEndpoints.items.[INDEX]","typeLabel":"string"},"description":"RGB proxy the lock consignment is posted to.","isRequired":true,"uniqueKey":"rgb.oneOf.0.transportEndpoints","typeLabel":"string[]"},"claimFeeRate":{"oneOf":[{"type":"integer","format":"int64","description":"**Reverse only**: fee rate, sat/vB, `htlcSat` funds the claim at.","minimum":0,"uniqueKey":"rgb.oneOf.0.claimFeeRate.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"**Reverse only**: fee rate, sat/vB, `htlcSat` funds the claim at.","minimum":0,"uniqueKey":"rgb.oneOf.0.claimFeeRate.oneOf.1","typeLabel":"null"}],"uniqueKey":"rgb.oneOf.0.claimFeeRate","typeLabel":"integer\u003cint64> | null"},"cooperativeRefund":{"oneOf":[{"type":"string","uniqueKey":"rgb.oneOf.0.cooperativeRefund.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"rgb.oneOf.0.cooperativeRefund.oneOf.1","typeLabel":"null"}],"uniqueKey":"rgb.oneOf.0.cooperativeRefund","typeLabel":"string | null"}},"uniqueKey":"rgb.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"rgb.oneOf.1","typeLabel":"null"}],"uniqueKey":"rgb","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"acceptZeroConf":true,"address":"\u003cstring>","bip21":"\u003cstring>","claimPublicKey":"\u003cstring>","expectedAmount":1,"id":"\u003cstring>","swapAuth":"\u003cstring>","swapTree":{"claimLeaf":{"output":"\u003cstring>","version":1},"refundLeaf":{"output":"\u003cstring>","version":1}},"timeoutBlockHeight":1,"assetId":"\u003cstring>","feeAssetId":"\u003cstring>","internalHop":{"payeeId":"\u003cstring>"},"invoiceAmount":1,"preimageHash":"\u003cstring>","referralId":"\u003cstring>","rgb":{"amount":1,"assetId":"\u003cstring>","blinding":"\u003cstring>","htlcSat":1,"minConfirmations":1,"recipientId":"\u003cstring>","scriptPubkey":"\u003cstring>","transportEndpoints":["\u003cstring>"],"claimFeeRate":1,"cooperativeRefund":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"b4da3350-7244-4916-9910-5f8812d0a29a":{"description":"Malformed input or webhook URL.","content":{"application/json":{"schema":{"type":"object","description":"Boltz-shaped error envelope.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code, e.g. `pair_hash_mismatch`.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"41b161ae-cbbb-4f97-b8d7-3e1f76f08bca":{"description":"An active swap already exists for this preimageHash.","content":{"application/json":{"schema":{"type":"object","description":"Boltz-shaped error envelope.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code, e.g. `pair_hash_mismatch`.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"1ad707be-1e0b-4a15-a729-a89835fcff02":{"description":"Quoting/inventory/derivation failure, an invoice the maker cannot pay under its payout CLTV cap (`invoice_cltv_too_large`), or an invoice of this maker that cannot be paid in-process (`internal_hop_unsupported`, `internal_hop_refused`).","content":{"application/json":{"schema":{"type":"object","description":"Boltz-shaped error envelope.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code, e.g. `pair_hash_mismatch`.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"8684d3c2-4b1f-4775-b1f2-1f8879eebb54":{"description":"Over the caller-rate or rolling notional budget; carries Retry-After.","content":{"application/json":{"schema":{"type":"object","description":"Boltz-shaped error envelope.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code, e.g. `pair_hash_mismatch`.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"6062edac-b9cb-43b3-b3a2-fa6e241f2bda":{"description":"signing key, node, or quoting engine unavailable.","content":{"application/json":{"schema":{"type":"object","description":"Boltz-shaped error envelope.","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code, e.g. `pair_hash_mismatch`.","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional human-readable detail. Present on 4xx; absent on 5xx.","uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","details":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a18a7f89-ac47-42d5-be6a-e9d0e4d37102":{},"3882c9b1-e634-44b9-b1bf-f0543cc89c5e":{"PartnerAuth":{"type":"http","scheme":"bearer","bearerFormat":"kld_test_… / kld_live_…","description":"Secret organization API key from the partner panel, for servers. Sent on swap creation as `Authorization: Bearer \u003ckey>` to attribute the swap to your organization. Optional; an invalid key is rejected. Never use it in client-side code.","scopes":[],"schemeName":"PartnerAuth"}},"f1b7e842-67f6-49bb-80ba-d3d9cc151a21":{"OrgKey":{"type":"apiKey","in":"header","name":"X-Kaleido-Org-Key","description":"Public organization key (64 hex characters) for client-side attribution. A label, not a credential. Sent on swap creation only. Never combine with `PartnerAuth`.","scopes":[],"schemeName":"OrgKey"}}},"servers":{"5a853f64-bde2-49c1-8aad-ff97a3fd5e5f":{"url":"https://maker.signet.kaleidoswap.com","description":"Signet (Mutinynet)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"kld_test_… / kld_live_…","description":"Secret organization API key from the partner panel, for servers. Sent on swap creation as `Authorization: Bearer \u003ckey>` to attribute the swap to your organization. Optional; an invalid key is rejected. Never use it in client-side code.","scopes":[],"schemeName":"PartnerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Secret organization API key from the partner panel, for servers. Sent on swap creation as `Authorization: Bearer \u003ckey>` to attribute the swap to your organization. Optional; an invalid key is rejected. Never use it in client-side code.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"PartnerAuth","name":"Authorization"}],"title":"PartnerAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-Kaleido-Org-Key","description":"Public organization key (64 hex characters) for client-side attribution. A label, not a credential. Sent on swap creation only. Never combine with `PartnerAuth`.","scopes":[],"schemeName":"OrgKey"},"schema":{"title":"X-Kaleido-Org-Key","type":"string","description":"Public organization key (64 hex characters) for client-side attribution. A label, not a credential. Sent on swap creation only. Never combine with `PartnerAuth`.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"OrgKey","name":"X-Kaleido-Org-Key"}],"title":"OrgKey"}]},"originalFileLocation":"openapi.json"},"subdomain":"kaleidoswap","siteName":"KaleidoSwap Documentation","title":"Create a submarine swap - KaleidoSwap Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/submarine-swaps/create-a-submarine-swap","matchLevel":0},"cn":{"href":"/api-reference/submarine-swaps/create-a-submarine-swap","matchLevel":0}}},"lastModified":"2026-10-28T16:31:00.297Z","originalFileLocation":"api-reference/submarine-swaps/create-a-submarine-swap.mdx","locale":"en"},"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=\"system\"}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=\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.\">\u003cmeta data-mint-head name=\"application-name\" content=\"KaleidoSwap Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_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/kaleidoswap/Pdo8Pj4dmhUA96o_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a submarine swap - KaleidoSwap Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"KaleidoSwap Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://kaleidoswap.mintlify.app/_mintlify/api/og/v2?division=Submarine+swaps\u0026amp;title=Create+a+submarine+swap\u0026amp;description=On-chain+%E2%86%92+Lightning.+You+send+the+invoice+to+pay+and+your+refund+public+key%3B+the+maker+returns+the+lockup+address%2C+the+expected+amount%2C+the+swap+tree%2C+and+its+\u0026amp;theme=cfe07bcada45289f816a9e3e\u0026amp;signature=750b9cfa479d7766a67c8eea5220732dfe34fbdc40a0af73c67b25f39a832fa3\">\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=\"Create a submarine swap - KaleidoSwap Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://kaleidoswap.mintlify.app/_mintlify/api/og/v2?division=Submarine+swaps\u0026amp;title=Create+a+submarine+swap\u0026amp;description=On-chain+%E2%86%92+Lightning.+You+send+the+invoice+to+pay+and+your+refund+public+key%3B+the+maker+returns+the+lockup+address%2C+the+expected+amount%2C+the+swap+tree%2C+and+its+\u0026amp;theme=cfe07bcada45289f816a9e3e\u0026amp;signature=750b9cfa479d7766a67c8eea5220732dfe34fbdc40a0af73c67b25f39a832fa3\">\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/kaleidoswap/Pdo8Pj4dmhUA96o_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"KaleidoSwap Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/submarine-swaps/create-a-submarine-swap.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.kaleidoswap.com/#organization\",\"name\":\"KaleidoSwap Documentation\",\"url\":\"https://docs.kaleidoswap.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/kaleidoswap/jZkXeFEXDE4-8PkF/assets/logos/kaleidoswap-full-logo-horizontal-onlight.svg?fit=max\u0026auto=format\u0026n=jZkXeFEXDE4-8PkF\u0026q=85\u0026s=8cf2002b5e2b8ea1cfb0523af2525f09\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.kaleidoswap.com#website\",\"name\":\"KaleidoSwap Documentation\",\"url\":\"https://docs.kaleidoswap.com\",\"publisher\":{\"@id\":\"https://docs.kaleidoswap.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap#webpage\",\"url\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap\",\"name\":\"Create a submarine swap\",\"description\":\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.\",\"dateModified\":\"2026-10-28T16:31:00.297Z\",\"isPartOf\":{\"@id\":\"https://docs.kaleidoswap.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KaleidoSwap Documentation\",\"item\":\"https://docs.kaleidoswap.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a submarine swap\",\"item\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap#apireference\",\"headline\":\"Create a submarine swap\",\"name\":\"Create a submarine swap\",\"description\":\"On-chain → Lightning. You send the invoice to pay and your refund public key; the maker returns the lockup address, the expected amount, the swap tree, and its timeout. Verify the lockup against your own key before funding it. The response carries swapAuth, issued once: store it with the swap.\",\"url\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap\",\"mainEntityOfPage\":{\"@id\":\"https://docs.kaleidoswap.com/api-reference/submarine-swaps/create-a-submarine-swap#webpage\"},\"dateModified\":\"2026-10-28T16:31:00.297Z\",\"publisher\":{\"@id\":\"https://docs.kaleidoswap.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.kaleidoswap.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"KaleidoSwap Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"KaleidoSwap Documentation","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/whats-kaleidoswap/introduction"}]},{"tab":"Desktop App","pages":[{"title":"Desktop App","href":"/desktop-app/getting-started/introduction"}]},{"tab":"Extensions","pages":[{"title":"Extensions","href":"/extensions/introduction"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk/introduction"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/introduction"}]},{"tab":"AI Tools","pages":[{"title":"AI Tools","href":"/ai-tools/introduction"}]},{"tab":"API Reference","groups":[{"group":"Introduction","icon":"flag","pages":[{"title":"Maker API","sidebarTitle":"Overview","href":"/api-reference/introduction"},{"title":"API Conventions","sidebarTitle":"Conventions","href":"/api-reference/getting-started"},{"title":"Swap Flow","sidebarTitle":"Swap Flow","href":"/api-reference/swap-protocol"}]},{"group":"Service","icon":"server","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/health","href":"/api-reference/service/health-check"},{"title":"Get maker info","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/info","href":"/api-reference/service/get-maker-info"},{"title":"Get Lightning nodes","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/nodes","href":"/api-reference/service/get-lightning-nodes"},{"title":"Get maker version","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/version","href":"/api-reference/service/get-maker-version"}]},{"group":"Pairs and quotes","icon":"tags","pages":[{"title":"Get a quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/quote","href":"/api-reference/pairs-and-quotes/get-a-quote"},{"title":"List pairs","description":"The rate cards currently published for one swap type (`submarine`, `reverse`, or `chain`), as a map of `from → to → card`. A card carries the route's limits, fees, rate, and a `hash`. Pass that `hash` as `pairHash` when you create a swap to hold the maker to the terms you displayed.","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/{type}/pairs","href":"/api-reference/pairs-and-quotes/list-pairs"}]},{"group":"Submarine swaps","icon":"bolt","pages":[{"title":"Create a submarine swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine","href":"/api-reference/submarine-swaps/create-a-submarine-swap"},{"title":"Get the preimage","description":"The preimage the maker learned by paying your invoice: your proof of payment.","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/submarine/{id}/preimage","href":"/api-reference/submarine-swaps/get-the-preimage"},{"title":"Cooperative refund (submarine)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine/{id}/refund","href":"/api-reference/submarine-swaps/cooperative-refund-submarine"},{"title":"Get the lockup transaction","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/submarine/{id}/transaction","href":"/api-reference/submarine-swaps/get-the-lockup-transaction"}]},{"group":"Reverse swaps","icon":"arrow-rotate-left","pages":[{"title":"Create a reverse swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse","href":"/api-reference/reverse-swaps/create-a-reverse-swap"},{"title":"Cooperative claim (reverse)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse/{id}/claim","href":"/api-reference/reverse-swaps/cooperative-claim-reverse"},{"title":"Abandon a reverse swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse/{id}/refund","href":"/api-reference/reverse-swaps/abandon-a-reverse-swap"},{"title":"Get the lockup transaction","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/reverse/{id}/transaction","href":"/api-reference/reverse-swaps/get-the-lockup-transaction"},{"title":"Get the direct payment URI","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/reverse/{invoice}/bip21","href":"/api-reference/reverse-swaps/get-the-direct-payment-uri"}]},{"group":"Chain swaps","icon":"link","pages":[{"title":"Create a chain swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain","href":"/api-reference/chain-swaps/create-a-chain-swap"},{"title":"Cooperative claim of your lockup","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/claim","href":"/api-reference/chain-swaps/cooperative-claim-of-your-lockup"},{"title":"Get a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/chain/{id}/quote","href":"/api-reference/chain-swaps/get-a-re-quote"},{"title":"Accept a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/quote","href":"/api-reference/chain-swaps/accept-a-re-quote"},{"title":"Cooperative refund (chain)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/refund","href":"/api-reference/chain-swaps/cooperative-refund-chain"},{"title":"Get the lockup transactions","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/chain/{id}/transactions","href":"/api-reference/chain-swaps/get-the-lockup-transactions"},{"title":"Accept or reject a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/rate-decision","href":"/api-reference/chain-swaps/accept-or-reject-a-re-quote"}]},{"group":"Swap status","icon":"signal","pages":[{"title":"Get several statuses","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/status","href":"/api-reference/swap-status/get-several-statuses"},{"title":"Get swap status","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/{id}","href":"/api-reference/swap-status/get-swap-status"},{"title":"Status stream (WebSocket)","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/ws","href":"/api-reference/swap-status/status-stream-websocket"}]},{"group":"Recovery","icon":"life-ring","pages":[{"title":"Restore swaps","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/restore","href":"/api-reference/recovery/restore-swaps"},{"title":"Get the highest used index","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/restore/index","href":"/api-reference/recovery/get-the-highest-used-index"},{"title":"Request a recovery challenge","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/auth/challenge","href":"/api-reference/recovery/request-a-recovery-challenge"},{"title":"Recover swapAuth","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/auth/recover","href":"/api-reference/recovery/recover-swapauth"}]},{"group":"Atomic RGB swaps","icon":"atom","pages":[{"title":"List atomic pairs","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/atomic/pairs","href":"/api-reference/atomic-rgb-swaps/list-atomic-pairs"},{"title":"Get an atomic quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/quote","href":"/api-reference/atomic-rgb-swaps/get-an-atomic-quote"},{"title":"Get atomic swap status","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/atomic/{id}","href":"/api-reference/atomic-rgb-swaps/get-atomic-swap-status"},{"title":"Complete the swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/{id}/complete","href":"/api-reference/atomic-rgb-swaps/complete-the-swap"},{"title":"Submit the request","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/{id}/request","href":"/api-reference/atomic-rgb-swaps/submit-the-request"}]},{"group":"Pay-through","icon":"paper-plane","pages":[{"title":"Create a pay-through order","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/pay","href":"/api-reference/pay-through/create-a-pay-through-order"}]},{"group":"Lightning channels (LSPS1)","icon":"network-wired","pages":[{"title":"Get channel options","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/lsps1/info","href":"/api-reference/lightning-channels-lsps1/get-channel-options"},{"title":"Order a channel","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/lsps1/order","href":"/api-reference/lightning-channels-lsps1/order-a-channel"},{"title":"Get a channel order","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/lsps1/order/{id}","href":"/api-reference/lightning-channels-lsps1/get-a-channel-order"}]},{"group":"Chain data","icon":"cubes","pages":[{"title":"Get fee estimates","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/fees","href":"/api-reference/chain-data/get-fee-estimates"},{"title":"Get chain heights","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/heights","href":"/api-reference/chain-data/get-chain-heights"},{"title":"Get fee estimate for one currency","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/{currency}/fee","href":"/api-reference/chain-data/get-fee-estimate-for-one-currency"},{"title":"Get chain height for one currency","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/{currency}/height","href":"/api-reference/chain-data/get-chain-height-for-one-currency"}]},{"group":"Reference","icon":"book","pages":[{"title":"Maker API FAQ","sidebarTitle":"FAQ","href":"/api-reference/faq"},{"title":"Maker API Errors and Troubleshooting","sidebarTitle":"Troubleshooting","href":"/api-reference/troubleshooting"},{"title":"Maker API: Additional Resources","sidebarTitle":"Additional Resources","href":"/api-reference/additional-resources"}]}]},{"tab":"Wallet Engine","pages":[{"title":"Wallet Engine","href":"/wallet-engine/introduction"}]}],"global":{"anchors":[{"anchor":"Access Extension Beta","icon":"puzzle-piece","href":"https://kaleidoswap.com/products/extension/beta"},{"anchor":"Download Desktop App","icon":"download","href":"https://github.com/kaleidoswap/desktop-app/releases"},{"anchor":"Build with the SDK","icon":"code","href":"/sdk/installation"},{"anchor":"Website","icon":"globe","href":"https://kaleidoswap.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/kaleidoswap"}]}},{"language":"cn","navbar":{"links":[{"href":"/cn/sdk/installation","label":"构建"}],"primary":{"type":"button","label":"下载应用","href":"https://kaleidoswap.com/products"}},"tabs":[{"tab":"概览","pages":[{"title":"概览","href":"/cn/whats-kaleidoswap/introduction"}]},{"tab":"桌面应用","pages":[{"title":"桌面应用","href":"/cn/desktop-app/getting-started/introduction"}]},{"tab":"浏览器扩展","pages":[{"title":"浏览器扩展","href":"/cn/extensions/introduction"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/cn/sdk/introduction"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cn/cli/introduction"}]},{"tab":"AI 工具","pages":[{"title":"AI 工具","href":"/cn/ai-tools/introduction"}]},{"tab":"API 参考","groups":[{"group":"简介","icon":"flag","pages":[{"title":"总览","sidebarTitle":"总览","href":"/cn/api-reference/introduction"},{"title":"比特币交换 API:快速开始","sidebarTitle":"快速开始","href":"/cn/api-reference/getting-started"}]},{"group":"指南","icon":"book-open","pages":[{"title":"原子交换协议","sidebarTitle":"交换协议","href":"/cn/api-reference/swap-protocol"}]},{"group":"接口端点","icon":"code","pages":[{"title":"闪电通道订单 API","sidebarTitle":"通道订单","href":"/cn/api-reference/rgb-lsps1-apis"},{"title":"市场 API","href":"/cn/api-reference/market-apis"},{"title":"交换 API","href":"/cn/api-reference/swap-apis"},{"group":"Chain data","pages":[{"title":"Get fee estimates","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/fees","href":"/api-reference/chain-data/get-fee-estimates"},{"title":"Get chain heights","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/heights","href":"/api-reference/chain-data/get-chain-heights"},{"title":"Get fee estimate for one currency","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/{currency}/fee","href":"/api-reference/chain-data/get-fee-estimate-for-one-currency"},{"title":"Get chain height for one currency","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/chain/{currency}/height","href":"/api-reference/chain-data/get-chain-height-for-one-currency"}]},{"group":"Service","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/health","href":"/api-reference/service/health-check"},{"title":"Get maker info","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/info","href":"/api-reference/service/get-maker-info"},{"title":"Get Lightning nodes","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/nodes","href":"/api-reference/service/get-lightning-nodes"},{"title":"Get maker version","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/version","href":"/api-reference/service/get-maker-version"}]},{"group":"Lightning channels (LSPS1)","pages":[{"title":"Get channel options","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/lsps1/info","href":"/api-reference/lightning-channels-lsps1/get-channel-options"},{"title":"Order a channel","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/lsps1/order","href":"/api-reference/lightning-channels-lsps1/order-a-channel"},{"title":"Get a channel order","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/lsps1/order/{id}","href":"/api-reference/lightning-channels-lsps1/get-a-channel-order"}]},{"group":"Pairs and quotes","pages":[{"title":"Get a quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/quote","href":"/api-reference/pairs-and-quotes/get-a-quote"},{"title":"List pairs","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/{type}/pairs","href":"/api-reference/pairs-and-quotes/list-pairs"}]},{"group":"Atomic RGB swaps","pages":[{"title":"List atomic pairs","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/atomic/pairs","href":"/api-reference/atomic-rgb-swaps/list-atomic-pairs"},{"title":"Get an atomic quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/quote","href":"/api-reference/atomic-rgb-swaps/get-an-atomic-quote"},{"title":"Get atomic swap status","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/atomic/{id}","href":"/api-reference/atomic-rgb-swaps/get-atomic-swap-status"},{"title":"Complete the swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/{id}/complete","href":"/api-reference/atomic-rgb-swaps/complete-the-swap"},{"title":"Submit the request","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/atomic/{id}/request","href":"/api-reference/atomic-rgb-swaps/submit-the-request"}]},{"group":"Chain swaps","pages":[{"title":"Create a chain swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain","href":"/api-reference/chain-swaps/create-a-chain-swap"},{"title":"Cooperative claim of your lockup","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/claim","href":"/api-reference/chain-swaps/cooperative-claim-of-your-lockup"},{"title":"Get a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/chain/{id}/quote","href":"/api-reference/chain-swaps/get-a-re-quote"},{"title":"Accept a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/quote","href":"/api-reference/chain-swaps/accept-a-re-quote"},{"title":"Cooperative refund (chain)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/chain/{id}/refund","href":"/api-reference/chain-swaps/cooperative-refund-chain"},{"title":"Get the lockup transactions","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/chain/{id}/transactions","href":"/api-reference/chain-swaps/get-the-lockup-transactions"},{"title":"Accept or reject a re-quote","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/rate-decision","href":"/api-reference/chain-swaps/accept-or-reject-a-re-quote"}]},{"group":"Pay-through","pages":[{"title":"Create a pay-through order","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/pay","href":"/api-reference/pay-through/create-a-pay-through-order"}]},{"group":"Recovery","pages":[{"title":"Restore swaps","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/restore","href":"/api-reference/recovery/restore-swaps"},{"title":"Get the highest used index","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/restore/index","href":"/api-reference/recovery/get-the-highest-used-index"},{"title":"Request a recovery challenge","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/auth/challenge","href":"/api-reference/recovery/request-a-recovery-challenge"},{"title":"Recover swapAuth","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/{id}/auth/recover","href":"/api-reference/recovery/recover-swapauth"}]},{"group":"Reverse swaps","pages":[{"title":"Create a reverse swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse","href":"/api-reference/reverse-swaps/create-a-reverse-swap"},{"title":"Cooperative claim (reverse)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse/{id}/claim","href":"/api-reference/reverse-swaps/cooperative-claim-reverse"},{"title":"Abandon a reverse swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/reverse/{id}/refund","href":"/api-reference/reverse-swaps/abandon-a-reverse-swap"},{"title":"Get the lockup transaction","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/reverse/{id}/transaction","href":"/api-reference/reverse-swaps/get-the-lockup-transaction"},{"title":"Get the direct payment URI","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/reverse/{invoice}/bip21","href":"/api-reference/reverse-swaps/get-the-direct-payment-uri"}]},{"group":"Swap status","pages":[{"title":"Get several statuses","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/status","href":"/api-reference/swap-status/get-several-statuses"},{"title":"Get swap status","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/{id}","href":"/api-reference/swap-status/get-swap-status"},{"title":"Status stream (WebSocket)","description":"Upgrades to a WebSocket that streams status updates for the swaps you subscribe to. The envelope is Boltz-compatible:\n\n```json\n→ { \"op\": \"subscribe\", \"channel\": \"swap.update\", \"args\": [\"01J7Q...\"] }\n← { \"event\": \"subscribe\",\"channel\": \"swap.update\", \"args\": [\"01J7Q...\"],\n \"timestamp\": \"1716124800123\" }\n← { \"event\": \"update\", \"channel\": \"swap.update\",\n \"args\": [ { \"id\": \"01J7Q...\", \"status\": \"invoice.set\" } ],\n \"timestamp\": \"1716124800124\" }\n← { \"event\": \"update\", \"channel\": \"swap.update\",\n \"args\": [ { \"id\": \"01J7Q...\", \"status\": \"transaction.confirmed\" } ],\n \"timestamp\": \"1716124800456\" }\n→ { \"op\": \"unsubscribe\", \"channel\": \"swap.update\", \"args\": [\"01J7Q...\"] }\n→ { \"op\": \"ping\" }\n← { \"event\": \"pong\" }\n```","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/ws","href":"/api-reference/swap-status/status-stream-websocket"}]},{"group":"Submarine swaps","pages":[{"title":"Create a submarine swap","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine","href":"/api-reference/submarine-swaps/create-a-submarine-swap"},{"title":"Get the preimage","description":"The preimage the maker learned by paying your invoice: your proof of payment.","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/submarine/{id}/preimage","href":"/api-reference/submarine-swaps/get-the-preimage"},{"title":"Cooperative refund (submarine)","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/swap/submarine/{id}/refund","href":"/api-reference/submarine-swaps/cooperative-refund-submarine"},{"title":"Get the lockup transaction","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/swap/submarine/{id}/transaction","href":"/api-reference/submarine-swaps/get-the-lockup-transaction"}]}]},{"group":"参考","icon":"book","pages":[{"title":"比特币交换 API 常见问题","sidebarTitle":"常见问题","href":"/cn/api-reference/faq"},{"title":"交换 API 错误与故障排查","sidebarTitle":"故障排查","href":"/cn/api-reference/troubleshooting"},{"title":"比特币交换 API:更多资源","sidebarTitle":"更多资源","href":"/cn/api-reference/additional-resources"}]}]},{"tab":"钱包引擎","pages":[{"title":"钱包引擎","href":"/cn/wallet-engine/introduction"}]}],"global":{"anchors":[{"anchor":"体验扩展 Beta","icon":"puzzle-piece","href":"https://kaleidoswap.com/products/extension/beta"},{"anchor":"下载桌面应用","icon":"download","href":"https://github.com/kaleidoswap/desktop-app/releases"},{"anchor":"使用 SDK 构建","icon":"code","href":"/cn/sdk/installation"},{"anchor":"官网","icon":"globe","href":"https://kaleidoswap.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/kaleidoswap"}]}}]},"title":"Create a submarine swap - KaleidoSwap Documentation","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}