If you need more control over the chain interactions than the included chain adapters provider, you can also implement your own or extend an existing one.
Implementing and using your own chain adapters can lead to a loss of funds if implemented incorrectly. Please make sure to test your adapter on a testnet thoroughly before using it with real funds.
All you need to implement your own chain adapter is to implement the ChainAdapter type exported by the SDK. You can find a list of the required properties in the chain adapters overview. It would like something like this:
If you only want to tweak a specific aspect of an existing chain adapter, you could simply take one as base and only re-implement some specific functions. Example:
From provider
import { getEvmChainAdapterFromProvider } from '@rhino.fi/sdk/adapters/evm'import type { ChainAdapter } from '@rhino.fi/sdk'const evmChainAdapter = getEvmChainAdapterFromProvider( provider, chainConfig)const customEvmChainAdapter: ChainAdapter = { ...chainAdapter, handleDeposit: (args) => { // Your custom bridge deposit function }}
Please check this section for guidance on how to interact with the Rhino bridge contracts if you plan on implementing a custom bridge deposit function.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"rhino.fi - Docs","colors":{"primary":"#EC6530","light":"#FFAE6E","dark":"#EC6530"},"logo":{"light":"https://mintcdn.com/rhinofi/HGZOBv0k7QrdOe9G/logo/light.svg?fit=max\u0026auto=format\u0026n=HGZOBv0k7QrdOe9G\u0026q=85\u0026s=f00220627b114f0d5385756ccb61f55e","dark":"https://mintcdn.com/rhinofi/HGZOBv0k7QrdOe9G/logo/dark.svg?fit=max\u0026auto=format\u0026n=HGZOBv0k7QrdOe9G\u0026q=85\u0026s=6c233cf6099c635a00dcdb3643ea41cf"},"favicon":"https://mintcdn.com/rhinofi/HGZOBv0k7QrdOe9G/favicon.png?fit=max\u0026auto=format\u0026n=HGZOBv0k7QrdOe9G\u0026q=85\u0026s=32cac0eb60b5a965cb7308ad1eafefe8","api":{"mdx":{"server":"https://api.rhino.fi/bridge"}},"navbar":{"links":[{"href":"https://go.crisp.chat/chat/embed/?website_id=598d8062-c46b-40e7-a7cd-0bf2061390a5","label":"Support"}],"primary":{"type":"button","label":"Talk to the team","href":"https://rhino.fi/contact"}},"footer":{"socials":{"x":"https://x.com/rhinofi","github":"https://github.com/rhinofi"}},"fonts":{"family":"Geist"},"integrations":{"heap":{"appId":"3649556247"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Rhino.fi Console","icon":"code","href":"https://console.rhino.fi"},{"anchor":"Website","icon":"globe","href":"https://rhino.fi/"},{"anchor":"Blog","icon":"newspaper","href":"https://rhino.fi/blog/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rhinofi","hasAudioNarration":false,"actualSubdomain":"rhinofi","customDomains":["docs.rhino.fi"],"gitSource":{"type":"github","owner":"rhinofi","repo":"rhino-public-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af1c8ebf1b49434fa8a1da4","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Guides","count":55},{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"SDK","count":18},{"language":"default","tag":"Get Started","count":13},{"language":"default","tag":"Bridge \u0026 swap endpoints","count":13},{"language":"default","tag":"SDA endpoints","count":9},{"language":"default","tag":"depositAddresses","count":9},{"language":"default","tag":"Chain Adapters","count":8},{"language":"default","tag":"API Integration","count":7},{"language":"default","tag":"Extensions","count":7}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"sdk/chain-adapters/custom-chain-adapters","slug":"/sdk/chain-adapters/custom-chain-adapters","pageMetadata":{"title":"Custom chain adapters","description":null,"href":"/sdk/chain-adapters/custom-chain-adapters"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If you need more control over the chain interactions than the included chain adapters provider, you can also implement your own or extend an existing one.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Implementing and using your own chain adapters can lead to a loss of funds if implemented incorrectly. Please make sure to test your adapter on a testnet thoroughly before using it with real funds.`})}),`\n`,_jsx(Heading,{level:`2`,id:`implementing-your-own-custom-chain-adapter`,children:`Implementing your own custom chain adapter`}),`\n`,_jsxs(_components.p,{children:[`All you need to implement your own chain adapter is to implement the `,_jsx(_components.code,{children:`ChainAdapter`}),` type exported by the SDK. You can find a list of the required properties in the `,_jsx(_components.a,{href:`/sdk/chain-adapters/overview`,children:`chain adapters overview`}),`. It would like something like this:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ChainAdapter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@rhino.fi/sdk'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` customEvmChainAdapter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ChainAdapter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` networkId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getApprovalAmount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handleTokenApproval`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handleDeposit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getTokenBalance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getAllTokenBalances`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`extending-an-existing-chain-adapter`,children:`Extending an existing chain adapter`}),`\n`,_jsx(_components.p,{children:`If you only want to tweak a specific aspect of an existing chain adapter, you could simply take one as base and only re-implement some specific functions. Example:`}),`\n`,_jsx(CodeBlock,{filename:`From provider`,numberOfLines:`14`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`getEvmChainAdapterFromProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@rhino.fi/sdk/adapters/evm'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ChainAdapter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@rhino.fi/sdk'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` evmChainAdapter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getEvmChainAdapterFromProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chainConfig`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` customEvmChainAdapter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ChainAdapter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chainAdapter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handleDeposit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Your custom bridge deposit function`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Please check `,_jsx(_components.a,{href:`/contracts/contract-examples`,children:`this section`}),` for guidance on how to interact with the Rhino bridge contracts if you plan on implementing a custom bridge deposit function.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Custom chain adapters","description":null,"href":"/sdk/chain-adapters/custom-chain-adapters"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Implementing your own custom chain adapter","slug":"implementing-your-own-custom-chain-adapter","depth":2,"children":[]},{"title":"Extending an existing chain adapter","slug":"extending-an-existing-chain-adapter","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rhinofi","siteName":"rhino.fi - Docs","title":"Custom chain adapters - rhino.fi - Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T12:18:07.192Z","originalFileLocation":"sdk/chain-adapters/custom-chain-adapters.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=\"application-name\" content=\"rhino.fi - Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_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/rhinofi/PNn_yjvIpiQYKdTH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom chain adapters - rhino.fi - Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"rhino.fi - Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rhinofi.mintlify.site/_mintlify/api/og/v2?division=Chain+Adapters\u0026amp;title=Custom+chain+adapters\u0026amp;theme=484fc511abe23cc78a1d37b7\u0026amp;signature=0309cdc07f2abf609e6badaece8503e269a7822a143792692385b58c667caf76\">\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=\"Custom chain adapters - rhino.fi - Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rhinofi.mintlify.site/_mintlify/api/og/v2?division=Chain+Adapters\u0026amp;title=Custom+chain+adapters\u0026amp;theme=484fc511abe23cc78a1d37b7\u0026amp;signature=0309cdc07f2abf609e6badaece8503e269a7822a143792692385b58c667caf76\">\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/rhinofi/PNn_yjvIpiQYKdTH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"rhino.fi - Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EC6530\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/chain-adapters/custom-chain-adapters.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.rhino.fi/#organization\",\"name\":\"rhino.fi - Docs\",\"url\":\"https://docs.rhino.fi\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rhinofi/HGZOBv0k7QrdOe9G/logo/light.svg?fit=max\u0026auto=format\u0026n=HGZOBv0k7QrdOe9G\u0026q=85\u0026s=f00220627b114f0d5385756ccb61f55e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.rhino.fi#website\",\"name\":\"rhino.fi - Docs\",\"url\":\"https://docs.rhino.fi\",\"publisher\":{\"@id\":\"https://docs.rhino.fi/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters#webpage\",\"url\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters\",\"name\":\"Custom chain adapters\",\"dateModified\":\"2026-10-22T12:18:07.192Z\",\"isPartOf\":{\"@id\":\"https://docs.rhino.fi#website\"},\"breadcrumb\":{\"@id\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDK\",\"item\":\"https://docs.rhino.fi/sdk/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chain Adapters\",\"item\":\"https://docs.rhino.fi/sdk/chain-adapters/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Custom chain adapters\",\"item\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters#article\",\"headline\":\"Custom chain adapters\",\"name\":\"Custom chain adapters\",\"url\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters\",\"mainEntityOfPage\":{\"@id\":\"https://docs.rhino.fi/sdk/chain-adapters/custom-chain-adapters#webpage\"},\"dateModified\":\"2026-10-22T12:18:07.192Z\",\"publisher\":{\"@id\":\"https://docs.rhino.fi/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.rhino.fi#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"rhino.fi - Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"rhino.fi - Docs","nav":{"global":{"anchors":[{"anchor":"Rhino.fi Console","icon":"code","href":"https://console.rhino.fi"},{"anchor":"Website","icon":"globe","href":"https://rhino.fi/"},{"anchor":"Blog","icon":"newspaper","href":"https://rhino.fi/blog/"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Get Started","pages":[{"title":"Get Started","sidebarTitle":"Overview","href":"/get-started/introduction"},{"title":"What is Rhino.fi?","href":"/get-started/what-is-rhino"},{"title":"Fees","href":"/get-started/fees-and-limits"},{"title":"Limits ","href":"/get-started/limits"},{"title":"Rhino Console","href":"/get-started/rhino-console"},{"group":"Extensions","pages":[{"title":"Extensions","href":"/get-started/extensions"},{"title":"Enhanced Compliance \u0026 Risk Management","href":"/get-started/extensions/enhanced-compliance"},{"title":"Automated Actions","href":"/get-started/extensions/automated-onchain-actions"},{"title":"1:1 Stablecoin Settlement","href":"/get-started/extensions/stablecoin-swaps"},{"title":"Advanced Fee \u0026 Limit Management","href":"/get-started/extensions/advanced-fee-management"},{"title":"Custom Chain \u0026 Token Support","href":"/get-started/extensions/custom-chain-token-support"},{"title":"Tron, Solana and Bitcoin Access","href":"/get-started/extensions/tron-access"}]},{"title":"Supported Networks and Assets","href":"/get-started/supported-chains"}]},{"group":"SDK","pages":[{"title":"Quickstart","href":"/sdk/quickstart"},{"title":"Smart Deposit Addresses","href":"/sdk/smart-deposits"},{"group":"Bridging","pages":[{"title":"Bridge","href":"/sdk/bridge-functions/bridge"},{"title":"Prepare bridge","href":"/sdk/bridge-functions/prepare-bridge"},{"title":"Bridge and swap","href":"/sdk/bridge-and-swap"},{"title":"Bridge API","href":"/sdk/bridge-api"},{"title":"Interacting with Stellar","href":"/interacting-with-stellar"},{"title":"Interacting with Bitcoin","href":"/interacting-with-bitcoin"}]},{"title":"Concepts","href":"/sdk/concepts"},{"title":"Token Prices","href":"/sdk/token-prices"},{"group":"Chain Adapters","pages":[{"title":"Chain Adapters Overview","href":"/sdk/chain-adapters/overview"},{"title":"EVM Chain Adapter","href":"/sdk/chain-adapters/evm-chains"},{"title":"Solana Chain Adapter","href":"/sdk/chain-adapters/solana"},{"title":"Starknet Chain Adapter","href":"/sdk/chain-adapters/starknet"},{"title":"Ton Chain Adapter","href":"/sdk/chain-adapters/ton"},{"title":"Tron Chain Adapter","href":"/sdk/chain-adapters/tron"},{"title":"Paradex Chain Adapter","description":null,"href":"/sdk/chain-adapters/paradex"},{"title":"Custom chain adapters","href":"/sdk/chain-adapters/custom-chain-adapters"}]}]},{"group":"Migration guides","pages":[{"title":"To SDK version 1.x","description":"Learn how to upgrade your code to version 1.x if you have been using a 0.x version of the SDK before.","href":"/migration-guides/to-1x"},{"title":"From API to SDK","href":"/migration-guides/from-api"}]},{"group":"Webhook","pages":[{"group":"Setup","pages":[{"title":"Server setup","href":"/webhook/endpoint-setup"},{"title":"Subscribe to webhooks","href":"/webhook/subscribe"},{"title":"Verify signature","href":"/webhook/verify-webhook-signature"},{"title":"Get missed events","href":"/webhook/get-missed-events"}]},{"title":"Events List","href":"/webhook/events-list"}]},{"group":"API Integration","pages":[{"title":"Overview","href":"/api-integration/introduction"},{"title":"Authentication","href":"/api-integration/authentication"},{"title":"Core concepts","href":"/api-integration/core-concepts"},{"title":"Smart Deposit Addresses","href":"/api-integration/smart-deposits"},{"title":"Bridge transfers","href":"/api-integration/bridge"},{"title":"Track transactions","href":"/api-integration/status-history"},{"title":"Go-live checklist","href":"/api-integration/go-live"}]},{"group":"Smart Contracts","pages":[{"title":"Overview","href":"/contracts/contract-examples"},{"group":"Direct Integration","pages":[{"title":"EVM (Ethereum / L2s)","href":"/contracts/evm"},{"title":"Solana Contracts","href":"/contracts/solana"},{"title":"Starknet Contracts","href":"/contracts/starknet"},{"title":"TON Contracts","href":"/contracts/ton"},{"title":"TRON Contracts","href":"/contracts/tron"}]}]},{"group":"Widgets","pages":[{"title":"iframe Widget","href":"/widget/widget"},{"title":"iframe SDA Widget","href":"/widget/sda-widget"}]},{"group":"General information","pages":[{"title":"Contract addresses","href":"/general/contract-addresses"},{"title":"Status page","href":"/general/status-page"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Custom chain adapters - rhino.fi - Docs","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}