Use action=initiate to initiate the swap on the source chain. The create order endpoint returns chain-specific signing data — sign it and submit here. The relayer broadcasts the transaction on the user’s behalf, making the process gasless.
EVM
Solana
Starknet
The create order response includes typed_data with EIP-712 domain and message fields. Sign this using eth_signTypedData_v4.Supported on all EVM chains (Ethereum, Arbitrum, Base, etc.) and Tron.
An ECDSA signature generated by the initiator over an EIP-712 typed data message containing the redeemer address, timelock, amount, and secret hash from the create order endpoint.
Example
{ "signature": "0xEIP712SignatureHex..."}
The create order response includes versioned_tx_gasless — a base64-encoded versioned transaction. Deserialize it, sign it with the user’s wallet, then serialize the signed transaction back to base64.
The create order response includes typed_data with Starknet domain and message fields. Sign this typed data and submit the signature felt values as a comma-separated string.
Initiate the swap on the source chain. The request body is chain-specific — refer to the Initiate section above for EVM, Solana, and Starknet request formats.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Garden Finance Docs","description":"API and SDK for integrating native Bitcoin cross-chain swaps in dapps, wallets, and exchanges. Quickstarts, API reference, and contract docs inside.","colors":{"primary":"#e36492","light":"#f29Fcd","dark":"#e36492"},"logo":{"light":"https://mintcdn.com/garden-e60e7dd0/XPXywADb9NcDNBRh/logo/light.svg?fit=max\u0026auto=format\u0026n=XPXywADb9NcDNBRh\u0026q=85\u0026s=cd505087813ca2c17268a74c13bffdb2","dark":"https://mintcdn.com/garden-e60e7dd0/XPXywADb9NcDNBRh/logo/dark.svg?fit=max\u0026auto=format\u0026n=XPXywADb9NcDNBRh\u0026q=85\u0026s=999256e3c07dff814b2b35c20c719188"},"favicon":"https://mintcdn.com/garden-e60e7dd0/yXGsQh1bDIX0r6cd/favicon.svg?fit=max\u0026auto=format\u0026n=yXGsQh1bDIX0r6cd\u0026q=85\u0026s=5cc8115dab9b31f492dfedf485e84eba","navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"Support"}],"primary":{"type":"button","label":"Launch app","href":"https://app.garden.finance"}},"footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"Application","items":[{"label":"Swap","href":"https://app.garden.finance/swap"},{"label":"Stake","href":"https://app.garden.finance/stake"}]},{"header":"Resources","items":[{"label":"Blog","href":"https://garden.finance/blog"},{"label":"Docs","href":"https://garden.finance/docs"},{"label":"Audits","href":"https://github.com/catalogfi/audits"},{"label":"Media Kit","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"seo":{"metatags":{"canonical":"https://garden.finance/docs"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/gardenfi"},{"anchor":"Blog","icon":"newspaper","href":"https://garden.finance/blog"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/B7RczEFuJ5"}]},"languages":[{"language":"en","href":""},{"language":"es","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"Aplicación","items":[{"label":"Swap","href":"https://app.garden.finance/es/swap"},{"label":"Stake","href":"https://app.garden.finance/es/stake"}]},{"header":"Recursos","items":[{"label":"Blog","href":"https://garden.finance/es/blog"},{"label":"Docs","href":"https://garden.finance/docs/es"},{"label":"Auditorías","href":"https://github.com/catalogfi/audits"},{"label":"Kit de prensa","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"Soporte"}],"primary":{"type":"button","label":"Abrir app","href":"https://app.garden.finance/es"}},"href":"es"},{"language":"ru","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"Приложение","items":[{"label":"Swap","href":"https://app.garden.finance/ru/swap"},{"label":"Stake","href":"https://app.garden.finance/ru/stake"}]},{"header":"Ресурсы","items":[{"label":"Блог","href":"https://garden.finance/ru/blog"},{"label":"Документация","href":"https://garden.finance/docs/ru"},{"label":"Аудиты","href":"https://github.com/catalogfi/audits"},{"label":"Медиакит","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"Поддержка"}],"primary":{"type":"button","label":"Запустить приложение","href":"https://app.garden.finance/ru"}},"href":"ru"},{"language":"zh","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"应用","items":[{"label":"Swap","href":"https://app.garden.finance/zh/swap"},{"label":"Stake","href":"https://app.garden.finance/zh/stake"}]},{"header":"资源","items":[{"label":"博客","href":"https://garden.finance/zh/blog"},{"label":"文档","href":"https://garden.finance/docs/zh"},{"label":"审计","href":"https://github.com/catalogfi/audits"},{"label":"媒体资料包","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"支持"}],"primary":{"type":"button","label":"启动应用","href":"https://app.garden.finance/zh"}},"href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"garden-e60e7dd0","hasAudioNarration":false,"actualSubdomain":"garden-e60e7dd0","customDomains":["docs.garden.finance","api.garden.finance","testnet.api.garden.finance"],"gitSource":{"type":"github","owner":"hashiraio","repo":"garden-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6acdca0e342d3f9c71c65f4b","collectionId":"6c6c4232-60e6-46a6-a058-c2da2f596777","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6acdca0e342d3f9c71c65f4b"},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6acdca0e342d3f9c71c65f4b","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"en","tag":"Get Started","count":28},{"language":"es","tag":"Primeros pasos","count":22},{"language":"ru","tag":"Начало работы","count":22},{"language":"zh","tag":"入门","count":22},{"language":"en","tag":"API Reference","count":17},{"language":"en","tag":"Contracts","count":17},{"language":"en","tag":"Developers","count":16},{"language":"en","tag":"Fundamentals","count":13},{"language":"es","tag":"Fundamentos","count":13},{"language":"ru","tag":"Основы","count":13},{"language":"zh","tag":"基础知识","count":13},{"language":"en","tag":"Core Concepts","count":7},{"language":"en","tag":"Assets \u0026 Routes","count":6},{"language":"en","tag":"Orders","count":6},{"language":"en","tag":"SDK","count":5},{"language":"en","tag":"Benefits","count":5},{"language":"es","tag":"Ventajas","count":5},{"language":"es","tag":"Conceptos clave","count":5},{"language":"es","tag":"Gobernanza","count":5},{"language":"ru","tag":"Преимущества","count":5},{"language":"ru","tag":"Ключевые понятия","count":5},{"language":"ru","tag":"Управление","count":5},{"language":"zh","tag":"优势","count":5},{"language":"zh","tag":"核心概念","count":5},{"language":"zh","tag":"治理","count":5},{"language":"es","tag":"Recursos","count":3},{"language":"es","tag":"Guías","count":3},{"language":"ru","tag":"Ресурсы","count":3},{"language":"ru","tag":"Руководства","count":3},{"language":"zh","tag":"资源","count":3},{"language":"zh","tag":"指南","count":3},{"language":"es","tag":"Cómo funciona","count":2},{"language":"ru","tag":"Как это работает","count":2},{"language":"zh","tag":"工作原理","count":2},{"language":"es","tag":"Cumplimiento","count":1},{"language":"es","tag":"Inicio","count":1},{"language":"ru","tag":"Соответствие требованиям","count":1},{"language":"ru","tag":"Главная","count":1},{"language":"zh","tag":"合规","count":1},{"language":"zh","tag":"首页","count":1}]},"assistantConfig":{},"basePath":"/docs","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":[],"page":{"pagePath":"api-reference/endpoint/orders/patch","slug":"/api-reference/endpoint/orders/patch","pageMetadata":{"title":"Gasless","openapi":"PATCH /orders/{order}","version":1,"description":null,"href":"/api-reference/endpoint/orders/patch"},"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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Execute gasless Hashed Time Lock Contract (HTLC) actions on an existing swap order, such as initiate, redeem, refund, and instant refund.`}),`\n`,_jsx(Heading,{level:`2`,id:`initiate`,children:`Initiate`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`action=initiate`}),` to initiate the swap on the source chain. The `,_jsx(_components.a,{href:`/api-reference/endpoint/orders/create-order`,children:`create order endpoint`}),` returns chain-specific signing data — sign it and submit here. The relayer broadcasts the transaction on the user’s behalf, making the process gasless.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`EVM`,id:`evm`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/api-reference/endpoint/orders/create-order`,children:`create order`}),` response includes `,_jsx(_components.code,{children:`typed_data`}),` with EIP-712 domain and message fields. Sign this using `,_jsx(_components.code,{children:`eth_signTypedData_v4`}),`.`]}),_jsx(_components.p,{children:`Supported on all EVM chains (Ethereum, Arbitrum, Base, etc.) and Tron.`}),_jsx(ParamField,{body:`signature`,type:`string`,required:true,id:`param-signature`,children:_jsxs(_components.p,{children:[`An ECDSA signature generated by the initiator over an EIP-712 typed data message containing the redeemer address, timelock, amount, and secret hash from the `,_jsx(_components.a,{href:`/api-reference/endpoint/orders/create-order`,children:`create order endpoint`}),`.`]})}),_jsx(CodeBlock,{filename:`Example`,numberOfLines:`3`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xEIP712SignatureHex...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Solana`,id:`solana`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/api-reference/endpoint/orders/create-order`,children:`create order`}),` response includes `,_jsx(_components.code,{children:`versioned_tx_gasless`}),` — a base64-encoded versioned transaction. Deserialize it, sign it with the user’s wallet, then serialize the signed transaction back to base64.`]}),_jsx(ParamField,{body:`order_id`,type:`string`,required:true,id:`param-order-id`,children:_jsx(_components.p,{children:`The unique identifier for the order.`})}),_jsx(ParamField,{body:`serialized_tx`,type:`string`,required:true,id:`param-serialized-tx`,children:_jsx(_components.p,{children:`Base64-encoded signed Solana versioned transaction.`})}),_jsx(CodeBlock,{filename:`Example`,numberOfLines:`4`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003corder_id>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"serialized_tx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"base64EncodedSignedTransaction...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Starknet`,id:`starknet`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/api-reference/endpoint/orders/create-order`,children:`create order`}),` response includes `,_jsx(_components.code,{children:`typed_data`}),` with Starknet domain and message fields. Sign this typed data and submit the signature felt values as a comma-separated string.`]}),_jsx(ParamField,{body:`signature`,type:`string`,required:true,id:`param-signature-1`,children:_jsx(_components.p,{children:`A Starknet signature over the typed data message containing the HTLC initiation parameters. Felt values should be comma-separated.`})}),_jsx(CodeBlock,{filename:`Example`,numberOfLines:`3`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xfelt1,0xfelt2\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Want to enable gasless initiations for your users? Reach out to us on `,_jsx(_components.a,{href:`https://discord.gg/B7RczEFuJ5`,children:`Townhall`}),` and we’ll help you get set up.`]})})]})}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":"Gasless","openapi":"PATCH /orders/{order}","version":1,"description":null,"href":"/api-reference/endpoint/orders/patch"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Initiate","slug":"initiate","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Update swap by doing an action.","tags":["Swaps"],"parameters":["df8cdc3a-451f-47ee-937e-c9e62bed29c9","0d9994d3-713f-4c80-b5a3-764335954f61"],"requestBody":"3738bacc-a5a1-4c2c-b9fb-c28140335d7e","responses":{"200":"e37c7338-7ac5-4ede-85f2-548cb6369231"},"method":"patch","type":"path","servers":["831c37c5-0dd0-4ae9-a1f7-f98dc690cc8c"],"security":["a4efac30-fb4a-4f2d-aaf0-7e661b04d8b5"],"path":"/orders/{order}","baseUrlOptions":["https://{environment}.garden.finance/v2"],"title":"Update swap by doing an action.","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"df8cdc3a-451f-47ee-937e-c9e62bed29c9":{"in":"path","name":"id","required":true,"schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"0d9994d3-713f-4c80-b5a3-764335954f61":{"in":"query","name":"action","required":true,"description":"The HTLC action to execute on the order.","schema":{"type":"string","enum":["initiate","redeem","refund","instant-refund"],"isRequired":true,"description":"The HTLC action to execute on the order.","uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Initiate","description":"Initiate the swap on the source chain. The request body is chain-specific — refer to the **Initiate** section above for EVM, Solana, and Starknet request formats.","uniqueKey":"oneOf.0","typeLabel":"Initiate · object"},{"type":"object","title":"Redeem","required":["secret"],"properties":{"secret":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.secret","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"Redeem · object"},{"type":"object","title":"Refund","uniqueKey":"oneOf.2","typeLabel":"Refund · object"},{"type":"object","title":"Instant Refund","required":["signatures"],"properties":{"signatures":{"type":"array","description":"A Schnorr signature generated by the initiator over the instant refund hash obtained from the [instant refund hash endpoint](./get-instant-refund-hash). This signature represents the initiator’s partial spend authorization for the Taproot script controlling the initiator's UTXO. Submitting this signature allows the solver to later provide its own Schnorr signature to fully satisfy the Taproot instant refund leaf and broadcast the refund transaction instantly, without requiring further initiator interaction.","items":{"type":"string","uniqueKey":"oneOf.3.signatures.items.[INDEX]","typeLabel":"string"},"example":["0x1234567890123456789012345678901234567890123456789012345678901234"],"isRequired":true,"uniqueKey":"oneOf.3.signatures","typeLabel":"string[]"}},"uniqueKey":"oneOf.3","typeLabel":"Instant Refund · object"}],"uniqueKey":"","typeLabel":"Initiate · object | Redeem · object | Refund · object | Instant Refund · object"},"examples":{"Example":{"title":"Example","value":{}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"e37c7338-7ac5-4ede-85f2-548cb6369231":{"description":"Executed action successfully.","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"string","isRequired":true,"uniqueKey":"result","typeLabel":"string"},"status":{"type":"string","enum":["Ok","Error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"error":{"oneOf":[{"type":"string","uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.oneOf.1","typeLabel":"null"}],"uniqueKey":"error","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"result":"\u003cstring>","status":"Ok","error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a4efac30-fb4a-4f2d-aaf0-7e661b04d8b5":{"garden-app-id":{"type":"apiKey","name":"garden-app-id","in":"header","description":"If you do not yet have an app ID, please follow these [steps](/api-reference/setup).","scopes":[]}}},"servers":{"831c37c5-0dd0-4ae9-a1f7-f98dc690cc8c":{"url":"https://{environment}.garden.finance/v2","variables":{"environment":{"default":"api","enum":["api","testnet.api"]}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","name":"garden-app-id","in":"header","description":"If you do not yet have an app ID, please follow these [steps](/api-reference/setup).","scopes":[]},"schema":{"title":"garden-app-id","type":"string","description":"If you do not yet have an app ID, please follow these [steps](/api-reference/setup).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"garden-app-id","name":"garden-app-id"}],"title":"garden-app-id"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"garden-e60e7dd0","siteName":"Garden Finance Docs","title":"Gasless - Garden Finance Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoint/orders/patch","matchLevel":0},"es":{"href":"/es","matchLevel":4},"ru":{"href":"/ru","matchLevel":4},"zh":{"href":"/zh","matchLevel":4}}},"lastModified":"2026-10-13T06:05:14.020Z","originalFileLocation":"api-reference/endpoint/orders/patch.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=\"application-name\" content=\"Garden Finance Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_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=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Gasless - Garden Finance Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Garden Finance Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://garden.finance/docs/api-reference/endpoint/orders/patch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://garden-e60e7dd0.mintlify.app/_mintlify/api/og/v2?division=Orders\u0026amp;title=Gasless\u0026amp;theme=b7bf8057f7c2ebb4cba1594f\u0026amp;signature=d4fd5fe3f1e7f41325e62bf3341790e64c8085b984392aa63b683e23408f69b8\">\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=\"Gasless - Garden Finance Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://garden-e60e7dd0.mintlify.app/_mintlify/api/og/v2?division=Orders\u0026amp;title=Gasless\u0026amp;theme=b7bf8057f7c2ebb4cba1594f\u0026amp;signature=d4fd5fe3f1e7f41325e62bf3341790e64c8085b984392aa63b683e23408f69b8\">\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=\"/docs/mintlify-assets/_mintlify/favicons/garden-e60e7dd0/1wj8S5SbcVXWKL9b/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Garden Finance Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#e36492\">\u003clink data-mint-head rel=\"canonical\" href=\"https://garden.finance/docs/api-reference/endpoint/orders/patch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/orders/patch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://garden.finance/#organization\",\"name\":\"Garden Finance Docs\",\"url\":\"https://garden.finance\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/garden-e60e7dd0/XPXywADb9NcDNBRh/logo/light.svg?fit=max\u0026auto=format\u0026n=XPXywADb9NcDNBRh\u0026q=85\u0026s=cd505087813ca2c17268a74c13bffdb2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://garden.finance/docs#website\",\"name\":\"Garden Finance Docs\",\"url\":\"https://garden.finance/docs\",\"publisher\":{\"@id\":\"https://garden.finance/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch#webpage\",\"url\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch\",\"name\":\"Gasless\",\"dateModified\":\"2026-10-13T06:05:14.020Z\",\"isPartOf\":{\"@id\":\"https://garden.finance/docs#website\"},\"breadcrumb\":{\"@id\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orders\",\"item\":\"https://garden.finance/docs/api-reference/endpoint/get-quote\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gasless\",\"item\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch#apireference\",\"headline\":\"Gasless\",\"name\":\"Gasless\",\"url\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch\",\"mainEntityOfPage\":{\"@id\":\"https://garden.finance/docs/api-reference/endpoint/orders/patch#webpage\"},\"dateModified\":\"2026-10-13T06:05:14.020Z\",\"publisher\":{\"@id\":\"https://garden.finance/#organization\"},\"isPartOf\":{\"@id\":\"https://garden.finance/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Garden Finance Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Garden Finance Docs","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/gardenfi"},{"anchor":"Blog","icon":"newspaper","href":"https://garden.finance/blog"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/B7RczEFuJ5"}]},"languages":[{"language":"en","tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Get Started","pages":[{"title":"Get Started","href":"/home/about"}]},{"tab":"Developers","pages":[{"title":"Developers","href":"/developers/overview"}]},{"tab":"Contracts","pages":[{"title":"Contracts","href":"/contracts/overview"}]},{"tab":"API Reference","groups":[{"group":"Get Started","pages":[{"title":"Quickstart","href":"/api-reference/quickstart"}]},{"group":"Orders","pages":[{"title":"Swap Quote","openapi":"GET /quote","version":1,"href":"/api-reference/endpoint/get-quote"},{"title":"Order","openapi":"GET /orders/{order}","version":1,"href":"/api-reference/endpoint/orders/get-order-by-id"},{"title":"Orders","openapi":"GET /orders","version":1,"href":"/api-reference/endpoint/orders/get-orders"},{"title":"Create Order","openapi":"POST /orders","version":1,"href":"/api-reference/endpoint/orders/create-order"},{"title":"Instant Refund Hash","openapi":"GET /orders/{order}/instant-refund-hash","version":1,"description":null,"href":"/api-reference/endpoint/orders/get-instant-refund-hash"},{"title":"Gasless","openapi":"PATCH /orders/{order}","version":1,"href":"/api-reference/endpoint/orders/patch"}]},{"group":"Assets \u0026 Routes","pages":[{"title":"Supported Chains","openapi":"GET /chains","version":1,"description":null,"href":"/api-reference/endpoint/blockchain/get-chains"},{"title":"Supported Assets","openapi":"GET /assets","version":1,"href":"/api-reference/endpoint/blockchain/get-assets"},{"title":"Route Policy","openapi":"GET /policy","version":1,"href":"/api-reference/endpoint/blockchain/get-policy"},{"title":"Available Liquidity","openapi":"GET /liquidity","version":1,"href":"/api-reference/endpoint/blockchain/get-liquidity"},{"title":"Schema","openapi":"GET /schemas/{name}","version":1,"href":"/api-reference/endpoint/blockchain/get-schema"},{"title":"Supported Schemas","openapi":"GET /schemas","version":1,"href":"/api-reference/endpoint/blockchain/get-schemas"}]},{"group":"Monitoring","pages":[{"title":"Server Health","openapi":"GET /health","version":1,"href":"/api-reference/endpoint/get-health"},{"title":"Total Volume","openapi":"GET /volume","version":1,"href":"/api-reference/endpoint/get-volume"},{"title":"Total Fees","openapi":"GET /fees","version":1,"href":"/api-reference/endpoint/get-fees"}]},{"group":"Affiliate","pages":[{"title":"Earnings","openapi":"GET /apps/earnings","version":1,"href":"/api-reference/endpoint/affiliate/get-earnings"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"language":"es","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"Aplicación","items":[{"label":"Swap","href":"https://app.garden.finance/es/swap"},{"label":"Stake","href":"https://app.garden.finance/es/stake"}]},{"header":"Recursos","items":[{"label":"Blog","href":"https://garden.finance/es/blog"},{"label":"Docs","href":"https://garden.finance/docs/es"},{"label":"Auditorías","href":"https://github.com/catalogfi/audits"},{"label":"Kit de prensa","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"Soporte"}],"primary":{"type":"button","label":"Abrir app","href":"https://app.garden.finance/es"}},"pages":[{"title":"es","href":"/es"}]},{"language":"ru","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"Приложение","items":[{"label":"Swap","href":"https://app.garden.finance/ru/swap"},{"label":"Stake","href":"https://app.garden.finance/ru/stake"}]},{"header":"Ресурсы","items":[{"label":"Блог","href":"https://garden.finance/ru/blog"},{"label":"Документация","href":"https://garden.finance/docs/ru"},{"label":"Аудиты","href":"https://github.com/catalogfi/audits"},{"label":"Медиакит","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"Поддержка"}],"primary":{"type":"button","label":"Запустить приложение","href":"https://app.garden.finance/ru"}},"pages":[{"title":"ru","href":"/ru"}]},{"language":"zh","footer":{"socials":{"x":"https://x.com/gardenfi","github":"https://github.com/gardenfi","discord":"https://discord.gg/B7RczEFuJ5"},"links":[{"header":"应用","items":[{"label":"Swap","href":"https://app.garden.finance/zh/swap"},{"label":"Stake","href":"https://app.garden.finance/zh/stake"}]},{"header":"资源","items":[{"label":"博客","href":"https://garden.finance/zh/blog"},{"label":"文档","href":"https://garden.finance/docs/zh"},{"label":"审计","href":"https://github.com/catalogfi/audits"},{"label":"媒体资料包","href":"https://drive.google.com/drive/folders/1ZRAxs6jwhO6vLkadb9XOG7XqOQ4XLr0t?usp=sharing"}]}]},"navbar":{"links":[{"href":"https://discord.gg/B7RczEFuJ5","label":"支持"}],"primary":{"type":"button","label":"启动应用","href":"https://app.garden.finance/zh"}},"pages":[{"title":"zh","href":"/zh"}]}]},"title":"Gasless - Garden Finance Docs","buildId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","deploymentId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DBvOZtde.js","utils-BMzGkvGb.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BYhgN8Gl.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-qDMltnin.js","snippetPresets-CABPPIq4.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Bx9dgvF5.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-EwWVpM4w.js","shallow-vGbuQTai.js","getApiPlaygroundDisplay-DP2addym.js","CodeSnippet-BG6rB_-H.js","CodeSnippets-CFVdLBFC.js","Page-B-qdInYQ.js","getPastedJson-JGlMoKBJ.js","icon-BK_uyWxF.js","MethodPill-Du3sAVkF.js","DuplicateIcon-CMq42UID.js","createIcon-RdBrtBmo.js","DynamicMarkdown-B3juXLG8.js","SectionHeading-B--QsSCa.js","axios-vUo_bRtp.js","Markdown-B_bWWeh0.js","clsx-eUAxaTXI.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DMuJXOAm.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DeDUMY0v.js"]}