Encodes transaction data into a format suitable for broadcasting. This function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Meria","colors":{"primary":"#FF592C","light":"#FF592C","dark":"#FF592C"},"favicon":"favicon.svg","logo":{"light":"https://mintcdn.com/adamik/MdefKzRhxEedyRiN/logo/meria_black.svg?fit=max\u0026auto=format\u0026n=MdefKzRhxEedyRiN\u0026q=85\u0026s=d6a4306a682ac138a447ccd286943626","dark":"https://mintcdn.com/adamik/MdefKzRhxEedyRiN/logo/meria_white.svg?fit=max\u0026auto=format\u0026n=MdefKzRhxEedyRiN\u0026q=85\u0026s=e01fa40e9f0171461d65c9d6c3d97bb1","href":"https://meria.com"},"navbar":{"links":[{"label":"Reach out to Support","href":"https://discord.gg/gsZJR2JfMR"}],"primary":{"type":"button","label":"Get API Key","href":"https://dashboard.adamik.io"}},"search":{"prompt":"Search 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"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"adamik","hasAudioNarration":false,"actualSubdomain":"adamik","customDomains":["whitelabelled-staking-docs.adamik.io"],"gitSource":{"type":"github","owner":"g9ncue","repo":"docs-1","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9255874f093f560e51c24:success","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":15},{"language":"default","tag":"Introduction","count":14},{"language":"default","tag":"Guides and Tutorials","count":6},{"language":"default","tag":"Examples","count":5},{"language":"default","tag":"Transaction","count":5},{"language":"default","tag":"API Overview","count":4},{"language":"default","tag":"Chain","count":4},{"language":"default","tag":"Account","count":3},{"language":"default","tag":"Utils","count":2},{"language":"default","tag":"Tutorials","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"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 function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.","deprecated":null,"version":null,"openapi":"openapi.json post /api/{chainId}/transaction/encode","href":"/api-reference/transaction/encode-a-transaction","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Encodes transaction data into a format suitable for broadcasting. This function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.\"\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 function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.","deprecated":null,"version":null,"openapi":"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 function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.","parameters":["7fd36973-5b95-4832-9aee-6278a1b2ea08"],"requestBody":"fcb315f5-98dd-4934-8218-ab7d8d4400e8","responses":{"200":"2b3d0d93-f0d5-42b9-afbd-3c2892934c12"},"method":"post","type":"path","servers":["3874c212-d78b-4997-a100-faecdf3f7988"],"security":["d1b43cdd-13f2-406f-b2d0-55c18f461078"],"path":"/api/{chainId}/transaction/encode","baseUrlOptions":["https://api.adamik.io"],"title":"Encode a Transaction","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7fd36973-5b95-4832-9aee-6278a1b2ea08":{"in":"path","name":"chainId","schema":{"type":"string","enum":["algorand","cosmoshub","cosmoshub-testnet","osmosis","osmosis-testnet","celestia","celestia-testnet","dydx","axelar","ethereum","sepolia","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","neutron","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","mars-hub","provenance","quicksilver","saga","ux-chain","kava","starknet","babylon","babylon-testnet","monad-testnet","berachain","berachain-artio","cronos","world-chain"],"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.0.format","typeLabel":"enum\u003cstring>"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.1.format","typeLabel":"enum\u003cstring>"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.2.format","typeLabel":"enum\u003cstring>"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.3.format","typeLabel":"enum\u003cstring>"},"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":"Unstake","description":"Stop staking some funds","required":["mode","senderAddress","validatorAddress"],"properties":{"mode":{"type":"string","const":"unstake","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"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.validatorAddress","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.4.memo","typeLabel":"string"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.4.format","typeLabel":"enum\u003cstring>"},"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"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. Only required for Babylon staking at the moment (documentation will come soon).","uniqueKey":"transaction.data.oneOf.4.stakeId","typeLabel":"string"},"amount":{"type":"string","description":"Optional amount to use (always in smallest unit). Use either this or useMaxAmount.","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.","default":false,"uniqueKey":"transaction.data.oneOf.4.useMaxAmount","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.4","typeLabel":"Unstake · object"},{"type":"object","title":"Claim Rewards","description":"Retrieve rewards from staking","required":["mode","senderAddress","validatorAddress"],"properties":{"mode":{"type":"string","const":"claimRewards","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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.5.format","typeLabel":"enum\u003cstring>"},"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. Only required for Babylon staking at the moment (documentation will come soon).","uniqueKey":"transaction.data.oneOf.5.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.5.compound","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.5","typeLabel":"Claim Rewards · object"},{"type":"object","title":"Withdraw Unlocked Funds","description":"Only supported for Babylon staking at the moment (documentation will come soon).","required":["mode","senderPubKey","validatorAddress","stakeId"],"properties":{"mode":{"type":"string","const":"withdraw","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.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.6.senderPubKey","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.validatorAddress","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. Only required for Babylon staking at the moment (documentation will come soon).","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.stakeId","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.6.memo","typeLabel":"string"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.6.format","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.6","typeLabel":"Withdraw Unlocked Funds · object"},{"type":"object","title":"Register Stake","description":"Only supported for Babylon staking at the moment (documentation will come soon).","required":["mode","senderPubKey","senderForeignPubKey","senderAddress","proofOfPossession","amount","validatorPubKey","unsignedUnbondingTransaction","signedStakingTransaction","signedSlashingTransaction","signedUnbondingSlashingTransaction"],"properties":{"mode":{"type":"string","const":"registerStake","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.senderPubKey","typeLabel":"string"},"senderForeignPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.senderForeignPubKey","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.proofOfPossession","typeLabel":"string"},"amount":{"type":"string","description":"Staked amount on the foreign chain.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.amount","typeLabel":"string"},"validatorPubKey":{"type":"string","description":"Validator's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.unsignedUnbondingTransaction","typeLabel":"string"},"signedStakingTransaction":{"type":"string","description":"Signed staking transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedStakingTransaction","typeLabel":"string"},"signedSlashingTransaction":{"type":"string","description":"Signed slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedSlashingTransaction","typeLabel":"string"},"signedUnbondingSlashingTransaction":{"type":"string","description":"Signed unbonding slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedUnbondingSlashingTransaction","typeLabel":"string"},"memo":{"type":"string","description":"Optional free text field, that is supported for some chains.","uniqueKey":"transaction.data.oneOf.7.memo","typeLabel":"string"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.7.format","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.7","typeLabel":"Register Stake · object"}],"isRequired":true,"uniqueKey":"transaction.data","typeLabel":"Deploy Account · object | Transfer · object | Stake · object | Transfer Token · object | Unstake · object | Claim Rewards · object | Withdraw Unlocked Funds · object | Register Stake · 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":{"2b3d0d93-f0d5-42b9-afbd-3c2892934c12":{"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","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","neutron","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","mars-hub","provenance","quicksilver","saga","ux-chain","kava","starknet","babylon","babylon-testnet","monad-testnet","berachain","berachain-artio","cronos","world-chain"],"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.0.format","typeLabel":"enum\u003cstring>"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.1.format","typeLabel":"enum\u003cstring>"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.2.format","typeLabel":"enum\u003cstring>"},"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":"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.3.fees","typeLabel":"string"},"mode":{"type":"string","const":"stake","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.mode","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.senderAddress","typeLabel":"string"},"targetValidatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.targetValidatorAddress","typeLabel":"string"},"amount":{"type":"string","description":"Amount to use, either provided or computed by the API","isRequired":true,"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.","isRequired":true,"uniqueKey":"transaction.data.oneOf.3.useMaxAmount","typeLabel":"boolean"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.3.format","typeLabel":"enum\u003cstring>"},"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"},"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"},"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.3.sourceValidatorAddress","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.3","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.4.fees","typeLabel":"string"},"mode":{"type":"string","const":"unstake","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"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.4.validatorAddress","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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.4.format","typeLabel":"enum\u003cstring>"},"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"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. Only required for Babylon staking at the moment (documentation will come soon).","uniqueKey":"transaction.data.oneOf.4.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.4","typeLabel":"Unstake · object"},{"type":"object","title":"Claim Rewards","description":"Retrieve 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.5.fees","typeLabel":"string"},"mode":{"type":"string","const":"claimRewards","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"},"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.5.compound","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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.5.format","typeLabel":"enum\u003cstring>"},"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. Only required for Babylon staking at the moment (documentation will come soon).","uniqueKey":"transaction.data.oneOf.5.stakeId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.5","typeLabel":"Claim Rewards · object"},{"type":"object","title":"Withdraw Unlocked Funds","description":"Only supported for Babylon staking at the moment (documentation will come soon).","required":["mode","senderPubKey","validatorAddress","stakeId","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":"withdraw","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.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.6.senderPubKey","typeLabel":"string"},"validatorAddress":{"type":"string","description":"Address or ID of a validator","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.validatorAddress","typeLabel":"string"},"stakeId":{"type":"string","description":"Unique identifier of a staking position. Only required for Babylon staking at the moment (documentation will come soon).","isRequired":true,"uniqueKey":"transaction.data.oneOf.6.stakeId","typeLabel":"string"},"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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.6.format","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.6","typeLabel":"Withdraw Unlocked Funds · object"},{"type":"object","title":"Register Stake","description":"Only supported for Babylon staking at the moment (documentation will come soon).","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.7.fees","typeLabel":"string"},"mode":{"type":"string","const":"registerStake","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.senderPubKey","typeLabel":"string"},"senderForeignPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.senderForeignPubKey","typeLabel":"string"},"senderAddress":{"type":"string","description":"Address or ID of the sender account.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.proofOfPossession","typeLabel":"string"},"amount":{"type":"string","description":"Staked amount on the foreign chain.","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.amount","typeLabel":"string"},"stakerPubKey":{"type":"string","description":"Staker's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.stakerPubKey","typeLabel":"string"},"validatorPubKey":{"type":"string","description":"Validator's pubkey on the foreign chain. (hex)","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.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.7.unsignedUnbondingTransaction","typeLabel":"string"},"signedStakingTransaction":{"type":"string","description":"Signed staking transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedStakingTransaction","typeLabel":"string"},"signedSlashingTransaction":{"type":"string","description":"Signed slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedSlashingTransaction","typeLabel":"string"},"signedUnbondingSlashingTransaction":{"type":"string","description":"Signed unbonding slashing transaction on the foreign chain (hex).","isRequired":true,"uniqueKey":"transaction.data.oneOf.7.signedUnbondingSlashingTransaction","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"},"format":{"type":"string","enum":["json","hex"],"description":"Controls the format of the returned encoded transaction. DEPRECATED, will be reworked at some point.","uniqueKey":"transaction.data.oneOf.7.format","typeLabel":"enum\u003cstring>"},"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"}},"isRequired":true,"uniqueKey":"transaction.data.oneOf.7","typeLabel":"Register Stake · object"}],"isRequired":true,"uniqueKey":"transaction.data","typeLabel":"Deploy Account · object | Transfer · object | Transfer Token · object | Stake · object | Unstake · object | Claim Rewards · object | Withdraw Unlocked Funds · object | Register Stake · object"},"encoded":{"type":"string","isRequired":true,"uniqueKey":"transaction.encoded","typeLabel":"string"}},"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>","format":"json","params":"\u003cunknown>"},"encoded":"\u003cstring>"},"status":{"errors":[{"message":"\u003cstring>"}],"warnings":[{"message":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"d1b43cdd-13f2-406f-b2d0-55c18f461078":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","scopes":[]}}},"servers":{"3874c212-d78b-4997-a100-faecdf3f7988":{"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":"openapi.json"},"subdomain":"adamik","siteName":"Meria","title":"Adamik Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T06:46:26.096Z","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 function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Meria\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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/adamik/QqUrSjm5Vt6kIJWI/_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\u0026#x27;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=\"Meria\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://whitelabelled-staking-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\u0026#x27;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/adamik/QqUrSjm5Vt6kIJWI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Meria\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF592C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://whitelabelled-staking-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://whitelabelled-staking-docs.adamik.io/#organization\",\"name\":\"Meria\",\"url\":\"https://whitelabelled-staking-docs.adamik.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/adamik/MdefKzRhxEedyRiN/logo/meria_black.svg?fit=max\u0026auto=format\u0026n=MdefKzRhxEedyRiN\u0026q=85\u0026s=d6a4306a682ac138a447ccd286943626\"}},{\"@type\":\"WebSite\",\"@id\":\"https://whitelabelled-staking-docs.adamik.io#website\",\"name\":\"Meria\",\"url\":\"https://whitelabelled-staking-docs.adamik.io\",\"publisher\":{\"@id\":\"https://whitelabelled-staking-docs.adamik.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction#webpage\",\"url\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction\",\"name\":\"Encode a Transaction\",\"description\":\"Encodes transaction data into a format suitable for broadcasting. This function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.\",\"dateModified\":\"2026-01-07T06:46:26.096Z\",\"isPartOf\":{\"@id\":\"https://whitelabelled-staking-docs.adamik.io#website\"},\"breadcrumb\":{\"@id\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Transaction\",\"item\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/get-transaction-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Encode a Transaction\",\"item\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://whitelabelled-staking-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 function is pivotal for creating transactions that comply with the specific requirements of different blockchains. It also completes the input transaction with computed data, such as fees and max spendable amount, and performs some chain-specific validation checks on the transaction.\",\"url\":\"https://whitelabelled-staking-docs.adamik.io/api-reference/transaction/encode-a-transaction\",\"mainEntityOfPage\":{\"@id\":\"https://whitelabelled-staking-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\":\"2026-01-07T06:46:26.096Z\",\"publisher\":{\"@id\":\"https://whitelabelled-staking-docs.adamik.io/#organization\"},\"isPartOf\":{\"@id\":\"https://whitelabelled-staking-docs.adamik.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Meria\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Meria\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/transaction/encode-a-transaction.md","siteName":"Meria","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":"openapi.json get /api","href":"/api-reference/open-api-specification"}]},{"group":"Chain","pages":[{"title":"Get Supported Chains","deprecated":null,"version":null,"openapi":"openapi.json get /api/chains","href":"/api-reference/chain/get-supported-chains"},{"title":"Get Chain Details","deprecated":null,"version":null,"openapi":"openapi.json get /api/chains/{chainId}","href":"/api-reference/chain/get-chain-details"},{"title":"Get Token Details","deprecated":null,"version":null,"openapi":"openapi.json get /api/{chainId}/token/{tokenId}","href":"/api-reference/chain/get-token-details"},{"title":"Get Chain Validators","deprecated":null,"version":null,"openapi":"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":"openapi.json get /api/{chainId}/transaction/{transactionId}","href":"/api-reference/transaction/get-transaction-details"},{"title":"Encode a Transaction","deprecated":null,"version":null,"openapi":"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":"openapi.json post /api/{chainId}/transaction/validate","href":"/api-reference/transaction/validate-transaction"},{"title":"Broadcast Transaction","deprecated":null,"version":null,"openapi":"openapi.json post /api/{chainId}/transaction/broadcast","href":"/api-reference/transaction/broadcast-transaction"},{"title":"Broadcast Raw Transaction","deprecated":null,"version":null,"openapi":"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":"openapi.json post /api/{chainId}/address/encode","href":"/api-reference/utils/pubkey-to-address"},{"title":"Validate Address","deprecated":null,"version":null,"openapi":"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":"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":"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":"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"}]}]},"basePath":"","title":"Adamik Documentation","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js","Markdown-CwLx6PAg.js","clsx-C3kuh_dz.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CmKHfscc.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-U3mI6Ljh.js"]}