Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains.
It performs several important functions:
Validates the transaction data against chain-specific rules
Computes and adds necessary transaction parameters (fees, gas, nonce)
Calculates the maximum spendable amount when requested
Returns the raw data and transaction hash in the appropriate format for signing
The response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Adamik","colors":{"primary":"#4261F4","light":"#4261F4","dark":"#4261F4"},"favicon":"Adamik_symbol_flat_blue.svg","logo":{"light":"https://mintcdn.com/adamiksas/YkY6Yhgmc8Rl2xni/logo/blue.svg?fit=max\u0026auto=format\u0026n=YkY6Yhgmc8Rl2xni\u0026q=85\u0026s=c8c34c5b216ccb9520ff3961f5b729bf","dark":"https://mintcdn.com/adamiksas/YkY6Yhgmc8Rl2xni/logo/dark.svg?fit=max\u0026auto=format\u0026n=YkY6Yhgmc8Rl2xni\u0026q=85\u0026s=caa20a59df53bcb3c1a1cb1beed6196a","href":"https://adamik.io"},"navbar":{"links":[{"label":"Discord Support","href":"https://discord.gg/gsZJR2JfMR"}],"primary":{"type":"button","label":"Get API Key","href":"https://dashboard.adamik.io"}},"search":{"prompt":"Search Adamik docs..."},"seo":{"metatags":{"og:image":"https://adamik-public-media.s3.eu-north-1.amazonaws.com/Social+Media/bandeau.svg","og:title":"Adamik Documentation","og:description":"Streamline blockchain integration with Adamik’s powerful API tools. Access comprehensive guides, resources, and support to unlock seamless multichain connectivity. Fast, reliable, and easy to use — everything you need in one place."},"indexing":"navigable"},"footer":{"socials":{"x":"https://twitter.com/adamik_io","github":"https://github.com/AdamikHQ","linkedin":"https://www.linkedin.com/company/adamik/","discord":"https://discord.gg/gsZJR2JfMR"}},"integrations":{"gtm":{"tagId":"GTM-PDZKXGD6"},"hotjar":{"hjid":"5204260","hjsv":"6"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"adamiksas","hasAudioNarration":false,"actualSubdomain":"adamiksas","customDomains":["docs.adamik.io"],"gitSource":{"type":"github","owner":"adamikhq","repo":"adamik-documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e62db8c65e77d6677a16","collectionId":"deca475b-bc87-4515-bdae-4c05f116a690","schemaVersion":"v2"},"feedback":{"thumbs":true,"issues":true},"entitlements":{},"buildId":"6a21e62db8c65e77d6677a16:success","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"Introduction","count":17},{"language":"default","tag":"API Reference","count":15},{"language":"default","tag":"Guides and Tutorials","count":10},{"language":"default","tag":"Examples","count":5},{"language":"default","tag":"Transaction","count":5},{"language":"default","tag":"Chain","count":4},{"language":"default","tag":"API Overview","count":3},{"language":"default","tag":"Tutorials","count":3},{"language":"default","tag":"Account","count":3},{"language":"default","tag":"Signer Examples","count":2}]},"assistantConfig":{},"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":"snippets/styles.css","content":"body{font-family:Arial,sans-serif;background-color:#1e1e1e;color:#fff}table{width:100%;border-collapse:collapse;margin:20px 0}td,th{text-align:center;border:1px solid #333;padding:20px 12px;vertical-align:middle}td{padding:12px}td:first-child{text-align:left;padding-left:12px}td.checkmark{color:green}td.cross{color:#a00}td,th{width:150px}.cell-content{display:flex;justify-content:center;align-items:center;height:100%}td a{color:#007bff;text-decoration:none}td a:hover{text-decoration:underline}.description-column{width:50%}"}],"page":{"pagePath":"api-reference/transaction/encode-a-transaction","slug":"/api-reference/transaction/encode-a-transaction","pageMetadata":{"title":"Encode a Transaction","description":"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains.\n\nIt performs several important functions:\n\n1. **Validates** the transaction data against chain-specific rules\n2. **Computes and adds** necessary transaction parameters (fees, gas, nonce)\n3. **Calculates** the maximum spendable amount when requested\n4. **Returns** the raw data and transaction hash in the appropriate format for signing\n\nThe response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/encode","href":"/api-reference/transaction/encode-a-transaction","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"It performs several important functions:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Validates\"\n }), \" the transaction data against chain-specific rules\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Computes and adds\"\n }), \" necessary transaction parameters (fees, gas, nonce)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Calculates\"\n }), \" the maximum spendable amount when requested\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Returns\"\n }), \" the raw data and transaction hash in the appropriate format for signing\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"The response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.\"\n })]\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":"Encode a Transaction","description":"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains.\n\nIt performs several important functions:\n\n1. **Validates** the transaction data against chain-specific rules\n2. **Computes and adds** necessary transaction parameters (fees, gas, nonce)\n3. **Calculates** the maximum spendable amount when requested\n4. **Returns** the raw data and transaction hash in the appropriate format for signing\n\nThe response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/encode","href":"/api-reference/transaction/encode-a-transaction","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Transaction"],"summary":"Encode a Transaction","description":"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains.\n\nIt performs several important functions:\n\n1. **Validates** the transaction data against chain-specific rules\n2. **Computes and adds** necessary transaction parameters (fees, gas, nonce)\n3. **Calculates** the maximum spendable amount when requested\n4. **Returns** the raw data and transaction hash in the appropriate format for signing\n\nThe response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.","parameters":["0e23d587-30c1-41a7-b792-051dde3e071b"],"requestBody":"a929dfaf-afdc-4fef-82f4-7cfcd01d2f3d","responses":{"200":"6cb499d7-4de4-46c3-a024-d89349ed7dcb"},"method":"post","type":"path","servers":["0643b805-9e00-4b0b-be35-a5fe13c17688"],"security":["89552511-4817-479c-9ace-cbb49815cb06"],"path":"/api/{chainId}/transaction/encode","baseUrlOptions":["https://api.adamik.io"],"title":"Encode a Transaction","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"0e23d587-30c1-41a7-b792-051dde3e071b":{"in":"path","name":"chainId","schema":{"type":"string","enum":["algorand","cosmoshub","cosmoshub-testnet","osmosis","osmosis-testnet","celestia","celestia-testnet","dydx","axelar","ethereum","sepolia","hoodi","holesky","zksync","zksync-sepolia","injective-evm-testnet","base","base-sepolia","optimism","optimism-sepolia","arbitrum","arbitrum-sepolia","bitcoin","bitcoin-testnet","bitcoin-signet","polygon","polygon-amoy","bsc","bsc-testnet","linea","linea-sepolia","avalanche","avalanche-fuji","gnosis","gnosis-chiado","moonbeam","moonriver","moonbase","fantom","mantle","litecoin","dogecoin","ton","chiliz","chiliz-testnet","injective","akash","band","dymension","kyve","terra2","stargaze","tron","evmos","irisnet","juno","lum-network","omniflix","sei","medibloc","passage","quasar","seda","sommelier","shentu","stride","chihuahua","bitsong","persistence","comdex","fetch-ai","humans-ai","ki","likecoin","provenance","quicksilver","saga","kava","starknet","starknet-sepolia","babylon","babylon-testnet","monad-testnet","berachain","berachain-bepolia","cronos","world-chain","world-chain-sepolia","hyperliquid","solana","aptos","aptos-testnet","stellar","stellar-testnet"],"isRequired":true,"uniqueKey":"","typeLabel":"enum\u003cstring>"},"required":true}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","title":"Deploy Account","description":"Deploy a smart contract wallet account","required":["mode","senderPubKey"],"properties":{"mode":{"type":"string","const":"deployAccount","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.mode","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.senderPubKey","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.0.memo","typeLabel":"string"},"contractType":{"type":"string","enum":["argentx"],"description":"Provider of the account contract. Only ArgentX is supported at the moment.","default":"argentx","uniqueKey":"transaction.data.oneOf.0.contractType","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.0","typeLabel":"Deploy Account · object"},{"type":"object","title":"Transfer","description":"Transfer chain native coins","required":["mode","senderAddress","recipientAddress"],"properties":{"mode":{"type":"string","const":"transfer","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.senderAddress","typeLabel":"string"},"recipientAddress":{"type":"string","description":"Address or ID of the recipient account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.recipientAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.1.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.1.senderPubKey","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.1.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","default":false,"uniqueKey":"transaction.data.oneOf.1.useMaxAmount","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.1","typeLabel":"Transfer · object"},{"type":"object","title":"Stake","description":"Put some funds at stake","required":["mode","senderAddress","targetValidatorAddress"],"properties":{"mode":{"type":"string","const":"stake","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.senderAddress","typeLabel":"string"},"targetValidatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.targetValidatorAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.2.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.2.senderPubKey","typeLabel":"string"},"sourceValidatorAddress":{"type":"string","description":"Address or ID of a validator. Can be used to move staking funds from this validator instead of the sender's balance, if supported by the chain.","uniqueKey":"transaction.data.oneOf.2.sourceValidatorAddress","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.2.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","default":false,"uniqueKey":"transaction.data.oneOf.2.useMaxAmount","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.2","typeLabel":"Stake · object"},{"type":"object","title":"Transfer Token","description":"Transfer chain tokens","required":["mode","tokenId","senderAddress","recipientAddress"],"properties":{"mode":{"type":"string","const":"transferToken","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.mode","typeLabel":"string"},"tokenId":{"type":"string","description":"Unique ID of the token to transfer (e.g contract address for EVM chains)","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.tokenId","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.senderAddress","typeLabel":"string"},"recipientAddress":{"type":"string","description":"Address or ID of the recipient account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.recipientAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.3.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.3.senderPubKey","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.3.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","default":false,"uniqueKey":"transaction.data.oneOf.3.useMaxAmount","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.3","typeLabel":"Transfer Token · object"},{"type":"object","title":"Enable Token","description":"Enable an address to hold a token","required":["mode","tokenId","senderAddress"],"properties":{"mode":{"type":"string","const":"enableToken","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.mode","typeLabel":"string"},"tokenId":{"type":"string","description":"Unique ID of the token to transfer (e.g contract address for EVM chains)","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.tokenId","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.senderAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.4.memo","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.4","typeLabel":"Enable Token · object"},{"type":"object","title":"Unstake","description":"Stop staking some funds","required":["mode","senderAddress","validatorAddress"],"properties":{"mode":{"type":"string","const":"unstake","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.validatorAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.5.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.5.senderPubKey","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.5.stakeId","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.5.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","default":false,"uniqueKey":"transaction.data.oneOf.5.useMaxAmount","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.5","typeLabel":"Unstake · object"},{"type":"object","title":"Claim Rewards","description":"Retrieve pending rewards from staking","required":["mode","senderAddress","validatorAddress"],"properties":{"mode":{"type":"string","const":"claimRewards","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.validatorAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.6.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.6.senderPubKey","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.6.stakeId","typeLabel":"string"},"compound":{"type":"boolean","description":"When available for the chain, controls whether staking rewards are cashed or added to the staked funds.","default":false,"uniqueKey":"transaction.data.oneOf.6.compound","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.6","typeLabel":"Claim Rewards · object"},{"type":"object","title":"Withdraw Unlocked Funds","description":"Move funds back from staking to your available balance","required":["mode","senderAddress","validatorAddress"],"properties":{"mode":{"type":"string","const":"withdraw","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.validatorAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.7.memo","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.7.senderPubKey","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.7.amount","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.7.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.7","typeLabel":"Withdraw Unlocked Funds · object"},{"type":"object","title":"Register Stake","description":"Only supported for Babylon staking at the moment. See documentation: https://docs.adamik.io/guides/tutorials/babylon-with-adamik","required":["mode","senderPubKey","senderForeignPubKey","senderAddress","proofOfPossession","amount","validatorPubKey","unsignedUnbondingTransaction","signedStakingTransaction","signedSlashingTransaction","signedUnbondingSlashingTransaction"],"properties":{"mode":{"type":"string","const":"registerStake","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.mode","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderPubKey","typeLabel":"string"},"senderForeignPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderForeignPubKey","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderAddress","typeLabel":"string"},"proofOfPossession":{"type":"string","description":"staker's address on this chain, signed with the foreign chain's signer. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.proofOfPossession","typeLabel":"string"},"amount":{"type":"string","description":"Staked amount on the foreign chain.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.amount","typeLabel":"string"},"validatorPubKey":{"type":"string","description":"Validator's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.validatorPubKey","typeLabel":"string"},"unsignedUnbondingTransaction":{"type":"string","description":"Unsigned unbonding transaction on the foreign chain (as provided in the response of the encode request for the stake transaction).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.unsignedUnbondingTransaction","typeLabel":"string"},"signedStakingTransaction":{"type":"string","description":"Signed staking transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedStakingTransaction","typeLabel":"string"},"signedSlashingTransaction":{"type":"string","description":"Signed slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedSlashingTransaction","typeLabel":"string"},"signedUnbondingSlashingTransaction":{"type":"string","description":"Signed unbonding slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedUnbondingSlashingTransaction","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.8.memo","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.8","typeLabel":"Register Stake · object"},{"type":"object","title":"Convert from an asset to another","description":"Allows to convert from an asset (native or token) to another one, either on the same or on a different chain. The API determines whether swap and/or bridge operations are required.","required":["mode","from","to","includeFees"],"properties":{"mode":{"type":"string","const":"convertAsset","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.mode","typeLabel":"string"},"from":{"type":"object","properties":{"amount":{"type":"string","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.from.amount","typeLabel":"string"},"tokenId":{"type":"string","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.from.tokenId","typeLabel":"string"},"address":{"type":"string","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.from.address","typeLabel":"string"}},"required":["amount","tokenId","address"],"isRequired":true,"uniqueKey":"transaction.data.oneOf.9.from","typeLabel":"object"},"to":{"type":"object","properties":{"tokenId":{"type":"string","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.to.tokenId","typeLabel":"string"},"address":{"type":"string","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.to.address","typeLabel":"string"},"amount":{"type":"string","uniqueKey":"transaction.data.oneOf.9.to.amount","typeLabel":"string"},"chainId":{"type":"string","enum":["aptos","aptos-testnet","algorand","ethereum","sepolia","holesky","hoodi","zksync","zksync-sepolia","injective-evm-testnet","base","base-sepolia","optimism","optimism-sepolia","arbitrum","arbitrum-sepolia","polygon","polygon-amoy","bsc","bsc-testnet","linea","linea-sepolia","avalanche","avalanche-fuji","gnosis","gnosis-chiado","moonbeam","moonriver","moonbase","fantom","mantle","chiliz","chiliz-testnet","ton","tron","rootstock","rootstock-testnet","bitcoin","bitcoin-testnet","bitcoin-signet","litecoin","dogecoin","starknet","starknet-sepolia","monad-testnet","bitsong","chihuahua","seda","persistence","comdex","humans-ai","ki","provenance","quicksilver","saga","kava","sei","fetch-ai","cosmoshub","osmosis","celestia","dydx","axelar","evmos","irisnet","juno","lum-network","omniflix","medibloc","passage","quasar","sommelier","shentu","stride","terra2","akash","dymension","band","stargaze","kyve","likecoin","osmosis-testnet","celestia-testnet","cosmoshub-testnet","injective","babylon","babylon-testnet","berachain","berachain-bepolia","cronos","world-chain","world-chain-sepolia","hyperliquid","solana","stellar","stellar-testnet"],"uniqueKey":"transaction.data.oneOf.9.to.chainId","typeLabel":"enum\u003cstring>"}},"required":["tokenId","address"],"isRequired":true,"uniqueKey":"transaction.data.oneOf.9.to","typeLabel":"object"},"includeFees":{"type":"boolean","isRequired":true,"uniqueKey":"transaction.data.oneOf.9.includeFees","typeLabel":"boolean"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.9.memo","typeLabel":"string"},"slippage":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"transaction.data.oneOf.9.slippage","typeLabel":"number"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.9","typeLabel":"Convert from an asset to another · object"}],"isRequired":true,"uniqueKey":"transaction.data","typeLabel":"Deploy Account · object | Transfer · object | Stake · object | Transfer Token · object | Enable Token · object | Unstake · object | Claim Rewards · object | Withdraw Unlocked Funds · object | Register Stake · object | Convert from an asset to another · object"}},"required":["data"],"isRequired":true,"uniqueKey":"transaction","typeLabel":"object"}},"required":["transaction"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"transaction":{"data":{"mode":"deployAccount","senderPubKey":"\u003cstring>","memo":"\u003cstring>","contractType":"argentx"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"6cb499d7-4de4-46c3-a024-d89349ed7dcb":{"description":"Returns the transaction data encoded into a blockchain-specific format, ready for broadcasting.","content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"string","enum":["algorand","cosmoshub","cosmoshub-testnet","osmosis","osmosis-testnet","celestia","celestia-testnet","dydx","axelar","ethereum","sepolia","hoodi","holesky","zksync","zksync-sepolia","injective-evm-testnet","base","base-sepolia","optimism","optimism-sepolia","arbitrum","arbitrum-sepolia","bitcoin","bitcoin-testnet","bitcoin-signet","polygon","polygon-amoy","bsc","bsc-testnet","linea","linea-sepolia","avalanche","avalanche-fuji","gnosis","gnosis-chiado","moonbeam","moonriver","moonbase","fantom","mantle","litecoin","dogecoin","ton","chiliz","chiliz-testnet","injective","akash","band","dymension","kyve","terra2","stargaze","tron","evmos","irisnet","juno","lum-network","omniflix","sei","medibloc","passage","quasar","seda","sommelier","shentu","stride","chihuahua","bitsong","persistence","comdex","fetch-ai","humans-ai","ki","likecoin","provenance","quicksilver","saga","kava","starknet","starknet-sepolia","babylon","babylon-testnet","monad-testnet","berachain","berachain-bepolia","cronos","world-chain","world-chain-sepolia","hyperliquid","solana","aptos","aptos-testnet","stellar","stellar-testnet"],"isRequired":true,"uniqueKey":"chainId","typeLabel":"enum\u003cstring>"},"transaction":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","title":"Deploy Account","description":"Deploy a smart contract wallet account","required":["mode","senderPubKey","contractType","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.fees","typeLabel":"string"},"mode":{"type":"string","const":"deployAccount","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.mode","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.senderPubKey","typeLabel":"string"},"contractType":{"type":"string","enum":["argentx"],"description":"Provider of the account contract. Only ArgentX is supported at the moment.","isRequired":true,"uniqueKey":"transaction.data.oneOf.0.contractType","typeLabel":"enum\u003cstring>"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.0.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.0.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.0.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.0.params","typeLabel":"any"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.0","typeLabel":"Deploy Account · object"},{"type":"object","title":"Transfer","description":"Transfer chain native coins","required":["mode","senderAddress","recipientAddress","amount","useMaxAmount","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.fees","typeLabel":"string"},"mode":{"type":"string","const":"transfer","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.senderAddress","typeLabel":"string"},"recipientAddress":{"type":"string","description":"Address or ID of the recipient account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.recipientAddress","typeLabel":"string"},"amount":{"type":"string","description":"Amount to use, either provided or computed by the API","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","isRequired":true,"uniqueKey":"transaction.data.oneOf.1.useMaxAmount","typeLabel":"boolean"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.1.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.1.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.1.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.1.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.1.senderPubKey","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.1","typeLabel":"Transfer · object"},{"type":"object","title":"Transfer Token","description":"Transfer chain tokens","required":["mode","tokenId","senderAddress","recipientAddress","amount","useMaxAmount","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.fees","typeLabel":"string"},"mode":{"type":"string","const":"transferToken","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.mode","typeLabel":"string"},"tokenId":{"type":"string","description":"Unique ID of the token to transfer (e.g contract address for EVM chains)","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.tokenId","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.senderAddress","typeLabel":"string"},"recipientAddress":{"type":"string","description":"Address or ID of the recipient account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.recipientAddress","typeLabel":"string"},"amount":{"type":"string","description":"Amount to use, either provided or computed by the API","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","isRequired":true,"uniqueKey":"transaction.data.oneOf.2.useMaxAmount","typeLabel":"boolean"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.2.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.2.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.2.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.2.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.2.senderPubKey","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.2","typeLabel":"Transfer Token · object"},{"type":"object","title":"Enable Token","description":"Enable an address to hold a token","required":["mode","tokenId","senderAddress","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.fees","typeLabel":"string"},"mode":{"type":"string","const":"enableToken","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.mode","typeLabel":"string"},"tokenId":{"type":"string","description":"Unique ID of the token to transfer (e.g contract address for EVM chains)","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.tokenId","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.senderAddress","typeLabel":"string"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.3.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.3.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.3.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.3.params","typeLabel":"any"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.3","typeLabel":"Enable Token · object"},{"type":"object","title":"Stake","description":"Put some funds at stake","required":["mode","senderAddress","targetValidatorAddress","amount","useMaxAmount","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.fees","typeLabel":"string"},"mode":{"type":"string","const":"stake","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.senderAddress","typeLabel":"string"},"targetValidatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.targetValidatorAddress","typeLabel":"string"},"amount":{"type":"string","description":"Amount to use, either provided or computed by the API","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.useMaxAmount","typeLabel":"boolean"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.4.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.4.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.4.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.4.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.4.senderPubKey","typeLabel":"string"},"sourceValidatorAddress":{"type":"string","description":"Address or ID of a validator. Can be used to move staking funds from this validator, if supported by the chain.","uniqueKey":"transaction.data.oneOf.4.sourceValidatorAddress","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.4","typeLabel":"Stake · object"},{"type":"object","title":"Unstake","description":"Stop staking some funds","required":["mode","senderAddress","validatorAddress","amount","useMaxAmount","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.fees","typeLabel":"string"},"mode":{"type":"string","const":"unstake","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.validatorAddress","typeLabel":"string"},"amount":{"type":"string","description":"Amount to use, either provided or computed by the API","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.amount","typeLabel":"string"},"useMaxAmount":{"type":"boolean","description":"Option to let the API compute the amount to use all available funds. Either use this or provide amount.","isRequired":true,"uniqueKey":"transaction.data.oneOf.5.useMaxAmount","typeLabel":"boolean"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.5.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.5.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.5.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.5.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.5.senderPubKey","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.5.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.5","typeLabel":"Unstake · object"},{"type":"object","title":"Claim Rewards","description":"Retrieve pending rewards from staking","required":["mode","senderAddress","validatorAddress","compound","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.fees","typeLabel":"string"},"mode":{"type":"string","const":"claimRewards","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.validatorAddress","typeLabel":"string"},"compound":{"type":"boolean","description":"When available for the chain, controls whether staking rewards are cashed or added to the staked funds.","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.compound","typeLabel":"boolean"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.6.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.6.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.6.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.6.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.6.senderPubKey","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.6.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.6","typeLabel":"Claim Rewards · object"},{"type":"object","title":"Withdraw Unlocked Funds","description":"Move funds back from staking to your available balance","required":["mode","senderAddress","validatorAddress","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.fees","typeLabel":"string"},"mode":{"type":"string","const":"withdraw","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.senderAddress","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.validatorAddress","typeLabel":"string"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.7.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.7.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.7.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.7.params","typeLabel":"any"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","uniqueKey":"transaction.data.oneOf.7.senderPubKey","typeLabel":"string"},"amount":{"type":"integer","format":"int64","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","uniqueKey":"transaction.data.oneOf.7.amount","typeLabel":"integer\u003cint64>"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. If provided in the account state data, it must be provided back in the transaction data when encoding a staking transaction.","uniqueKey":"transaction.data.oneOf.7.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.7","typeLabel":"Withdraw Unlocked Funds · object"},{"type":"object","title":"Register Stake","description":"Only supported for Babylon staking at the moment. See documentation: https://docs.adamik.io/guides/tutorials/babylon-with-adamik","required":["mode","senderPubKey","senderForeignPubKey","senderAddress","proofOfPossession","amount","stakerPubKey","validatorPubKey","unsignedUnbondingTransaction","signedStakingTransaction","signedSlashingTransaction","signedUnbondingSlashingTransaction","fees"],"properties":{"fees":{"type":"string","description":"Transaction fees computed by the API.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.fees","typeLabel":"string"},"mode":{"type":"string","const":"registerStake","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.mode","typeLabel":"string"},"senderPubKey":{"type":"string","description":"Public key of the sender account, required in some situations. It is advised to provide it by default if you can.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderPubKey","typeLabel":"string"},"senderForeignPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderForeignPubKey","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.senderAddress","typeLabel":"string"},"proofOfPossession":{"type":"string","description":"staker's address on this chain, signed with the foreign chain's signer. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.proofOfPossession","typeLabel":"string"},"amount":{"type":"string","description":"Staked amount on the foreign chain.","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.amount","typeLabel":"string"},"stakerPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.stakerPubKey","typeLabel":"string"},"validatorPubKey":{"type":"string","description":"Validator's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.validatorPubKey","typeLabel":"string"},"unsignedUnbondingTransaction":{"type":"string","description":"Unsigned unbonding transaction on the foreign chain (as provided in the response of the encode request for the stake transaction).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.unsignedUnbondingTransaction","typeLabel":"string"},"signedStakingTransaction":{"type":"string","description":"Signed staking transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedStakingTransaction","typeLabel":"string"},"signedSlashingTransaction":{"type":"string","description":"Signed slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedSlashingTransaction","typeLabel":"string"},"signedUnbondingSlashingTransaction":{"type":"string","description":"Signed unbonding slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.8.signedUnbondingSlashingTransaction","typeLabel":"string"},"gas":{"type":"string","description":"Transaction gas computed by the API, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.8.gas","typeLabel":"string"},"nonce":{"type":"string","description":"Transaction sequence number, when relevant for the chain.","uniqueKey":"transaction.data.oneOf.8.nonce","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.8.memo","typeLabel":"string"},"params":{"description":"Some additional chain-specific context computed by the API. If provided by the encode endpoint, it must be provided back as-is to the broadcast endpoint.","uniqueKey":"transaction.data.oneOf.8.params","typeLabel":"any"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.8","typeLabel":"Register Stake · object"}],"isRequired":true,"uniqueKey":"transaction.data","typeLabel":"Deploy Account · object | Transfer · object | Transfer Token · object | Enable Token · object | Stake · object | Unstake · object | Claim Rewards · object | Withdraw Unlocked Funds · object | Register Stake · object"},"encoded":{"type":"array","items":{"type":"object","properties":{"hash":{"type":"object","properties":{"format":{"type":"string","enum":["sha256","keccak256","sha512_256","pedersen"],"isRequired":true,"uniqueKey":"transaction.encoded.items.[INDEX].hash.format","typeLabel":"enum\u003cstring>"},"value":{"type":"string","isRequired":true,"uniqueKey":"transaction.encoded.items.[INDEX].hash.value","typeLabel":"string"}},"required":["format","value"],"description":"The transaction hash that needs to be signed. The format field indicates the hash function used to determine the hash value (e.g., KECCAK256 for EVM chains, SHA256 for Bitcoin, etc.).","uniqueKey":"transaction.encoded.items.[INDEX].hash","typeLabel":"object"},"raw":{"type":"object","properties":{"format":{"type":"string","enum":["RLP","WALLET_CONNECT","SIGNDOC_DIRECT","SIGNDOC_DIRECT_JSON","SIGNDOC_AMINO","SIGNDOC_AMINO_JSON","BOC","RAW_TRANSACTION","MSGPACK","PSBT","BCS","BORSH","XDR"],"isRequired":true,"uniqueKey":"transaction.encoded.items.[INDEX].raw.format","typeLabel":"enum\u003cstring>"},"value":{"type":"string","isRequired":true,"uniqueKey":"transaction.encoded.items.[INDEX].raw.value","typeLabel":"string"}},"required":["format","value"],"description":"The raw transaction data in a chain-specific format. The format field indicates the encoding format used to represent the transaction data (e.g., RLP for EVM chains, PSBT for Bitcoin, etc.).","uniqueKey":"transaction.encoded.items.[INDEX].raw","typeLabel":"object"}},"uniqueKey":"transaction.encoded.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"transaction.encoded","typeLabel":"object[]"}},"required":["data","encoded"],"isRequired":true,"uniqueKey":"transaction","typeLabel":"object"},"status":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"status.errors.items.[INDEX].message","typeLabel":"string"}},"required":["message"],"uniqueKey":"status.errors.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"status.errors","typeLabel":"object[]"},"warnings":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"status.warnings.items.[INDEX].message","typeLabel":"string"}},"required":["message"],"uniqueKey":"status.warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"status.warnings","typeLabel":"object[]"}},"required":["errors","warnings"],"isRequired":true,"uniqueKey":"status","typeLabel":"object"}},"required":["chainId","transaction","status"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"chainId":"algorand","transaction":{"data":{"fees":"\u003cstring>","mode":"deployAccount","senderPubKey":"\u003cstring>","contractType":"argentx","gas":"\u003cstring>","nonce":"\u003cstring>","memo":"\u003cstring>","params":"\u003cunknown>"},"encoded":[{"hash":{"format":"sha256","value":"\u003cstring>"},"raw":{"format":"RLP","value":"\u003cstring>"}}]},"status":{"errors":[{"message":"\u003cstring>"}],"warnings":[{"message":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"89552511-4817-479c-9ace-cbb49815cb06":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","scopes":[]}}},"servers":{"0643b805-9e00-4b0b-be35-a5fe13c17688":{"url":"https://api.adamik.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"Authorization","scopes":[]},"schema":{"title":"Authorization","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"https://api.adamik.io/openapi.json"},"subdomain":"adamiksas","siteName":"Adamik","title":"Adamik Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-10-14T07:25:51.859Z","originalFileLocation":"api-reference/transaction/encode-a-transaction.mdx"},"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=\"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains. It performs several important functions: 1. Validates the transaction data against chain-specific rules 2. Computes and adds necessary transaction parameters (fees, gas, nonce) 3. Calculates the maximum spendable amount when requested 4. Returns the raw data and transaction hash in the appropriate format for signing The response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Adamik\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_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/adamiksas/4Yt1_currL5yPrgJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Adamik Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Streamline blockchain integration with Adamik’s powerful API tools. Access comprehensive guides, resources, and support to unlock seamless multichain connectivity. Fast, reliable, and easy to use — everything you need in one place.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Adamik\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://adamik-public-media.s3.eu-north-1.amazonaws.com/Social+Media/bandeau.svg\">\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=\"Adamik Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Streamline blockchain integration with Adamik’s powerful API tools. Access comprehensive guides, resources, and support to unlock seamless multichain connectivity. Fast, reliable, and easy to use — everything you need in one place.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://adamik-public-media.s3.eu-north-1.amazonaws.com/Social+Media/bandeau.svg\">\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/adamiksas/4Yt1_currL5yPrgJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Adamik\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4261F4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/transaction/encode-a-transaction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.adamik.io/#organization\",\"name\":\"Adamik\",\"url\":\"https://docs.adamik.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/adamiksas/YkY6Yhgmc8Rl2xni/logo/blue.svg?fit=max\u0026auto=format\u0026n=YkY6Yhgmc8Rl2xni\u0026q=85\u0026s=c8c34c5b216ccb9520ff3961f5b729bf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.adamik.io#website\",\"name\":\"Adamik\",\"url\":\"https://docs.adamik.io\",\"publisher\":{\"@id\":\"https://docs.adamik.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction#webpage\",\"url\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction\",\"name\":\"Encode a Transaction\",\"description\":\"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains. It performs several important functions: 1. Validates the transaction data against chain-specific rules 2. Computes and adds necessary transaction parameters (fees, gas, nonce) 3. Calculates the maximum spendable amount when requested 4. Returns the raw data and transaction hash in the appropriate format for signing The response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.\",\"dateModified\":\"2025-10-14T07:25:51.859Z\",\"isPartOf\":{\"@id\":\"https://docs.adamik.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Transaction\",\"item\":\"https://docs.adamik.io/api-reference/transaction/get-transaction-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Encode a Transaction\",\"item\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction#apireference\",\"headline\":\"Encode a Transaction\",\"name\":\"Encode a Transaction\",\"description\":\"Encodes transaction data into a format suitable for broadcasting. This endpoint is pivotal for creating transactions that comply with the specific requirements of different blockchains. It performs several important functions: 1. Validates the transaction data against chain-specific rules 2. Computes and adds necessary transaction parameters (fees, gas, nonce) 3. Calculates the maximum spendable amount when requested 4. Returns the raw data and transaction hash in the appropriate format for signing The response includes both the transaction hash (which needs to be signed) and the raw transaction data in a chain-specific format.\",\"url\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction\",\"mainEntityOfPage\":{\"@id\":\"https://docs.adamik.io/api-reference/transaction/encode-a-transaction#webpage\"},\"image\":\"https://adamik-public-media.s3.eu-north-1.amazonaws.com/Social+Media/bandeau.svg\",\"dateModified\":\"2025-10-14T07:25:51.859Z\",\"publisher\":{\"@id\":\"https://docs.adamik.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.adamik.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Adamik\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Adamik","nav":{"global":null,"anchors":[{"anchor":"Introduction","icon":"house","pages":[{"title":"Introduction","href":"/get_started/welcome"}]},{"anchor":"API Reference","icon":"code","groups":[{"group":"","pages":[{"title":"Open API Specification","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api","href":"/api-reference/open-api-specification"}]},{"group":"Chain","pages":[{"title":"Get Supported Chains","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/chains","href":"/api-reference/chain/get-supported-chains"},{"title":"Get Chain Details","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/chains/{chainId}","href":"/api-reference/chain/get-chain-details"},{"title":"Get Token Details","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/token/{tokenId}","href":"/api-reference/chain/get-token-details"},{"title":"Get Chain Validators","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/validators","href":"/api-reference/chain/get-chain-validators"}]},{"group":"Transaction","pages":[{"title":"Get Transaction Details","description":"Retrieves detailed information about a specific transaction for a blockchain network, identified by chain ID and transaction ID.","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/transaction/{transactionId}","href":"/api-reference/transaction/get-transaction-details"},{"title":"Encode a Transaction","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/encode","href":"/api-reference/transaction/encode-a-transaction"},{"title":"Validate Transaction","description":"Validates a transaction's format and checks it against the blockchain's current state for potential errors or warnings. This pre-validation is critical for ensuring transaction success rates and for debugging transaction issues.","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/validate","href":"/api-reference/transaction/validate-transaction"},{"title":"Broadcast Transaction","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/broadcast","href":"/api-reference/transaction/broadcast-transaction"},{"title":"Broadcast Raw Transaction","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/transaction/broadcast/raw","href":"/api-reference/transaction/broadcast-raw-transaction"}]},{"group":"Utils","pages":[{"title":"Pubkey to Address","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/address/encode","href":"/api-reference/utils/pubkey-to-address"},{"title":"Validate Address","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json post /api/{chainId}/address/validate","href":"/api-reference/utils/validate-address"}]},{"group":"Account","pages":[{"title":"Get Account State (Balances)","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/account/{accountId}/state","href":"/api-reference/account/get-account-state-balances"},{"title":"Get Account Tokens (paginated)","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/account/{accountId}/state/tokens","href":"/api-reference/account/get-account-tokens-paginated"},{"title":"Get Account History","deprecated":null,"version":null,"openapi":"https://api.adamik.io/openapi.json get /api/{chainId}/account/{accountId}/history","href":"/api-reference/account/get-account-history"}]}]},{"anchor":"Guides and Tutorials","icon":"book","pages":[{"title":"Guides and Tutorials","href":"/guides/e2e-examples/using-Adamik-API-with-Ethereum"}]}]},"title":"Adamik Documentation","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}