Runs an end-to-end Li.Fi bridge or swap in a single call.
Function Signature
public func tradeAsset(params: LifiTradeAssetParams) async throws -> LifiTradeAssetResult
DescriptionExecutes a complete Li.Fi bridge or swap: discovers routes, selects one, then for each step builds the transaction, signs and broadcasts it, waits for on-chain confirmation, and polls Li.Fi until that step reaches a terminal state before moving to the next.Steps run sequentially. Signing and confirmation for each step happen on that step’s own chain, resolved from the step itself, so a multi-chain route is handled without the caller switching networks.Confirmation is strict — every step must confirm on-chain before the next begins. A revert or a confirmation timeout aborts the trade and throws. There is no optimistic fallback.Unlike the React Native and Web SDKs, there is no second options argument. The signer and confirmation hooks are injected when the Lifi instance is constructed, and Portal wires both automatically.ParametersLifiTradeAssetParams:
Parameter
Type
Required
Description
fromChain
String
Yes
Source chain, CAIP-2 ("eip155:8453").
toChain
String
Yes
Destination chain, CAIP-2.
fromToken
String
Yes
Source token contract address or symbol.
toToken
String
Yes
Destination token contract address or symbol.
amount
String
Yes
Amount in the token’s base units, as an integer string.
fromAddress
String?
No, but pass it
Sending wallet address. Forwarded to Li.Fi as given; the SDK does not resolve it for you.
toAddress
String?
No
Receiving wallet address. Falls back to fromAddress.
routeIndex
Int?
No
Which discovered route to execute. Default 0.
onProgress
LifiProgressHandler?
No
Callback fired at each stage of execution.
Omitting fromAddress means routes are quoted without a sender while the transaction is still signed by your Portal wallet, so the quote may not match what executes. Pass it explicitly.
ReturnsLifiTradeAssetResult:
Property
Type
Description
hashes
[String]
One transaction hash per executed step, in execution order.
steps
[LifiStep]
The enriched steps that were executed, with transactionRequest populated.
route
LifiRoute
The route that was selected and executed.
ThrowsThrows LifiTradeAssetError:
Case
When
missingSigner
No signing closure on the Lifi instance. Cannot occur on portal.trading.lifi.
missingConfirmation
No confirmation closure on the Lifi instance. Cannot occur on portal.trading.lifi.
noRoutesFound
Li.Fi returned no routes for the requested trade.
routeIndexOutOfBounds
routeIndex is negative or beyond the number of discovered routes.
routeHasNoSteps
The selected route contains no steps.
missingTransactionRequest
A step came back without a transaction request to sign.
invalidTransactionRequest
A step’s transaction request was malformed.
transactionConfirmationFailed(String)
The step’s transaction reverted on-chain. Carries the transaction hash.
transactionConfirmationTimedOut(String)
Confirmation could not be determined before timing out. Carries the transaction hash.
lifiTransferFailed(String)
Li.Fi reported a FAILED terminal state.
pollTimeout
Status polling exceeded the configured timeout.
Also throws CancellationError if the surrounding Task is cancelled. In that case no .failed progress event is emitted — handle cancellation separately from failure.Example Usage
import PortalSwiftdo { let fromAddress = try await portal.getAddress("eip155:8453") let result = try await portal.trading.lifi.tradeAsset( params: LifiTradeAssetParams( fromChain: "eip155:8453", toChain: "eip155:42161", fromToken: "ETH", toToken: "USDC", amount: "1000000000000", fromAddress: fromAddress, onProgress: { status, data in print("[Li.Fi] \(status.rawValue) \(data.txHash ?? "")") } ) ) print("Hashes: \(result.hashes)") print("Executed steps: \(result.steps.count)")} catch let LifiTradeAssetError.transactionConfirmationFailed(txHash) { print("Transaction reverted on-chain: \(txHash)")} catch { print("tradeAsset failed: \(error)")}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Portal","description":"Portal is a key management platform for stablecoin companies. Create wallets, send and receive funds on-chain - all in a day.","colors":{"primary":"#5a86fa","light":"#789CFA","dark":"#3E71F8"},"logo":{"light":"https://mintcdn.com/portal-003221ec/GSEv3FWt9xT6P4p5/logo/light.svg?fit=max\u0026auto=format\u0026n=GSEv3FWt9xT6P4p5\u0026q=85\u0026s=589c25ed9717a63807caa49ef88b9541","dark":"https://mintcdn.com/portal-003221ec/GSEv3FWt9xT6P4p5/logo/dark.svg?fit=max\u0026auto=format\u0026n=GSEv3FWt9xT6P4p5\u0026q=85\u0026s=60a15ea88f068be82954514cc71f558c","href":"https://docs.portalhq.io"},"favicon":"https://mintcdn.com/portal-003221ec/8nhTiKJyGlrD5CbB/favicon.png?fit=max\u0026auto=format\u0026n=8nhTiKJyGlrD5CbB\u0026q=85\u0026s=2bbda68250f65a434b3f9eb0fe709ac1","navbar":{"links":[{"href":"mailto:support@portalhq.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.portalhq.io"}},"footer":{"socials":{"x":"https://twitter.com/portal_hq","github":"https://github.com/portal-hq","linkedin":"https://www.linkedin.com/company/portal-labs-inc"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/portal-hq"},{"anchor":"Blog","icon":"newspaper","href":"https://www.portalhq.io/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"portal-003221ec","hasAudioNarration":false,"actualSubdomain":"portal-003221ec","customDomains":["docs.portalhq.io"],"gitSource":{"type":"github","owner":"portal-hq","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeb9ffe7d3e0e4d340c6d5c","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Documentation","count":394},{"language":"default","tag":"SDKs","count":294},{"language":"default","tag":"API Reference","count":271},{"language":"default","tag":"Client API","count":209},{"language":"default","tag":"Guide","count":164},{"language":"default","tag":"Reference","count":139},{"language":"default","tag":"Flutter","count":99},{"language":"default","tag":"iOS","count":91},{"language":"default","tag":"Due","count":56},{"language":"default","tag":"Resources","count":47}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sdks/ios/reference/lifitradeasset","slug":"/sdks/ios/reference/lifitradeasset","pageMetadata":{"title":"tradeAsset","description":"Runs an end-to-end Li.Fi bridge or swap in a single call.","href":"/sdks/ios/reference/lifitradeasset"},"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: \"Runs an end-to-end Li.Fi bridge or swap in a single call.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Function Signature`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`swift`,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:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` tradeAsset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: LifiTradeAssetParams) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` throws`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LifiTradeAssetResult`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Description`})}),`\n`,_jsx(_components.p,{children:`Executes a complete Li.Fi bridge or swap: discovers routes, selects one, then for each step builds the transaction, signs and broadcasts it, waits for on-chain confirmation, and polls Li.Fi until that step reaches a terminal state before moving to the next.`}),`\n`,_jsxs(_components.p,{children:[`Steps run `,_jsx(_components.strong,{children:`sequentially`}),`. Signing and confirmation for each step happen on that step’s own chain, resolved from the step itself, so a multi-chain route is handled without the caller switching networks.`]}),`\n`,_jsx(_components.p,{children:`Confirmation is strict — every step must confirm on-chain before the next begins. A revert or a confirmation timeout aborts the trade and throws. There is no optimistic fallback.`}),`\n`,_jsxs(_components.p,{children:[`Unlike the React Native and Web SDKs, there is no second options argument. The signer and confirmation hooks are injected when the `,_jsx(_components.code,{children:`Lifi`}),` instance is constructed, and `,_jsx(_components.code,{children:`Portal`}),` wires both automatically.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`LifiTradeAssetParams`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fromChain`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Source chain, CAIP-2 (`,_jsx(_components.code,{children:`\"eip155:8453\"`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`toChain`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Destination chain, CAIP-2.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fromToken`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Source token contract address or symbol.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`toToken`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Destination token contract address or symbol.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Amount in the token’s base units, as an integer string.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fromAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String?`})}),_jsx(_components.td,{children:`No, but pass it`}),_jsx(_components.td,{children:`Sending wallet address. Forwarded to Li.Fi as given; the SDK does not resolve it for you.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`toAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String?`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Receiving wallet address. Falls back to `,_jsx(_components.code,{children:`fromAddress`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`routeIndex`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Int?`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Which discovered route to execute. Default `,_jsx(_components.code,{children:`0`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onProgress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`LifiProgressHandler?`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Callback fired at each stage of execution.`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Omitting `,_jsx(_components.code,{children:`fromAddress`}),` means routes are quoted without a sender while the transaction is still signed by your Portal wallet, so the quote may not match what executes. Pass it explicitly.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`LifiTradeAssetResult`})}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Property`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`hashes`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`[String]`})}),_jsx(_components.td,{children:`One transaction hash per executed step, in execution order.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`steps`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`[LifiStep]`})}),_jsxs(_components.td,{children:[`The enriched steps that were executed, with `,_jsx(_components.code,{children:`transactionRequest`}),` populated.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`route`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`LifiRoute`})}),_jsx(_components.td,{children:`The route that was selected and executed.`})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Throws`})}),`\n`,_jsxs(_components.p,{children:[`Throws `,_jsx(_components.code,{children:`LifiTradeAssetError`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Case`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`missingSigner`})}),_jsxs(_components.td,{children:[`No signing closure on the `,_jsx(_components.code,{children:`Lifi`}),` instance. Cannot occur on `,_jsx(_components.code,{children:`portal.trading.lifi`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`missingConfirmation`})}),_jsxs(_components.td,{children:[`No confirmation closure on the `,_jsx(_components.code,{children:`Lifi`}),` instance. Cannot occur on `,_jsx(_components.code,{children:`portal.trading.lifi`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`noRoutesFound`})}),_jsx(_components.td,{children:`Li.Fi returned no routes for the requested trade.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`routeIndexOutOfBounds`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`routeIndex`}),` is negative or beyond the number of discovered routes.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`routeHasNoSteps`})}),_jsx(_components.td,{children:`The selected route contains no steps.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`missingTransactionRequest`})}),_jsx(_components.td,{children:`A step came back without a transaction request to sign.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalidTransactionRequest`})}),_jsx(_components.td,{children:`A step’s transaction request was malformed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transactionConfirmationFailed(String)`})}),_jsx(_components.td,{children:`The step’s transaction reverted on-chain. Carries the transaction hash.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transactionConfirmationTimedOut(String)`})}),_jsx(_components.td,{children:`Confirmation could not be determined before timing out. Carries the transaction hash.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lifiTransferFailed(String)`})}),_jsxs(_components.td,{children:[`Li.Fi reported a `,_jsx(_components.code,{children:`FAILED`}),` terminal state.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pollTimeout`})}),_jsx(_components.td,{children:`Status polling exceeded the configured timeout.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Also throws `,_jsx(_components.code,{children:`CancellationError`}),` if the surrounding `,_jsx(_components.code,{children:`Task`}),` is cancelled. In that case `,_jsxs(_components.strong,{children:[`no `,_jsx(_components.code,{children:`.failed`}),` progress event is emitted`]}),` — handle cancellation separately from failure.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example Usage`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`swift`,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:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PortalSwift`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`do`}),_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\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fromAddress `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` portal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`getAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eip155:8453\"`}),_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:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` portal.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`trading`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`lifi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`tradeAsset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`LifiTradeAssetParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` fromChain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eip155:8453\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` toChain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eip155:42161\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` fromToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ETH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` toToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USDC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` amount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1000000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` fromAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: fromAddress,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` onProgress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { status, data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[Li.Fi] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`status.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`rawValue`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` \\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`data.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`txHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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`,_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hashes: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`result.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hashes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Executed steps: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`result.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`steps`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`count`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LifiTradeAssetError.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`transactionConfirmationFailed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(txHash) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Transaction reverted on-chain: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`txHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tradeAsset failed: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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(_components.p,{children:_jsx(_components.strong,{children:`Related Documentation`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/sdks/ios/guide/lifi`,children:`Bridge \u0026 Swap with Li.Fi`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/sdks/ios/reference/lifipollstatus`,children:`pollStatus`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/integrations/Trading/lifi`,children:`Li.Fi Integration`})}),`\n`]})]})}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":"tradeAsset","description":"Runs an end-to-end Li.Fi bridge or swap in a single call.","href":"/sdks/ios/reference/lifitradeasset"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"portal-003221ec","siteName":"Portal","title":"tradeAsset - Portal","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-30T17:05:16.548Z","originalFileLocation":"sdks/ios/reference/lifitradeasset.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=\"Runs an end-to-end Li.Fi bridge or swap in a single call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Portal\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_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/portal-003221ec/V8g2PPGq3WmDlhV8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"tradeAsset - Portal\">\u003cmeta data-mint-head property=\"og:description\" content=\"Runs an end-to-end Li.Fi bridge or swap in a single call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Portal\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://portal-003221ec.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=tradeAsset\u0026amp;description=Runs+an+end-to-end+Li.Fi+bridge+or+swap+in+a+single+call.\u0026amp;theme=d1692d6d2d4391f288b08827\u0026amp;signature=0546545e63f45fc00762f26f75d2016838a20dd72d888f74e3d9b70c7b64fdc1\">\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=\"tradeAsset - Portal\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Runs an end-to-end Li.Fi bridge or swap in a single call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://portal-003221ec.mintlify.site/_mintlify/api/og/v2?division=Reference\u0026amp;title=tradeAsset\u0026amp;description=Runs+an+end-to-end+Li.Fi+bridge+or+swap+in+a+single+call.\u0026amp;theme=d1692d6d2d4391f288b08827\u0026amp;signature=0546545e63f45fc00762f26f75d2016838a20dd72d888f74e3d9b70c7b64fdc1\">\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/portal-003221ec/V8g2PPGq3WmDlhV8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Portal\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5a86fa\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdks/ios/reference/lifitradeasset.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.portalhq.io/#organization\",\"name\":\"Portal\",\"url\":\"https://docs.portalhq.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/portal-003221ec/GSEv3FWt9xT6P4p5/logo/light.svg?fit=max\u0026auto=format\u0026n=GSEv3FWt9xT6P4p5\u0026q=85\u0026s=589c25ed9717a63807caa49ef88b9541\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.portalhq.io#website\",\"name\":\"Portal\",\"url\":\"https://docs.portalhq.io\",\"publisher\":{\"@id\":\"https://docs.portalhq.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset#webpage\",\"url\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset\",\"name\":\"tradeAsset\",\"description\":\"Runs an end-to-end Li.Fi bridge or swap in a single call.\",\"dateModified\":\"2026-07-30T17:05:16.548Z\",\"isPartOf\":{\"@id\":\"https://docs.portalhq.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDKs\",\"item\":\"https://docs.portalhq.io/sdks/web/guide/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"iOS\",\"item\":\"https://docs.portalhq.io/sdks/ios/guide/getting-started\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Reference\",\"item\":\"https://docs.portalhq.io/sdks/ios/reference/availablerecoverymethods\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"tradeAsset\",\"item\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset#article\",\"headline\":\"tradeAsset\",\"name\":\"tradeAsset\",\"description\":\"Runs an end-to-end Li.Fi bridge or swap in a single call.\",\"url\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset\",\"mainEntityOfPage\":{\"@id\":\"https://docs.portalhq.io/sdks/ios/reference/lifitradeasset#webpage\"},\"dateModified\":\"2026-07-30T17:05:16.548Z\",\"publisher\":{\"@id\":\"https://docs.portalhq.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.portalhq.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Portal\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Portal","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/portal-hq"},{"anchor":"Blog","icon":"newspaper","href":"https://www.portalhq.io/blog"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":""},{"title":"SDK Quickstart","href":"/sdks/quickstart"},{"title":"API Quickstart","href":"/apis/quickstart"}]},{"group":"SDKs","pages":[{"group":"Web","pages":[{"title":"Getting Started","href":"/sdks/web/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a wallet","href":"/sdks/web/guide/create-a-wallet"},{"title":"Send tokens","href":"/sdks/web/guide/send-tokens"},{"title":"Sign a transaction","href":"/sdks/web/guide/sign-a-transaction"},{"title":"Idempotency keys","href":"/sdks/web/guide/idempotency-keys"},{"title":"Simulate a transaction","href":"/sdks/web/guide/simulate-a-transaction"},{"title":"Back up a wallet","href":"/sdks/web/guide/back-up-a-wallet"},{"title":"Recover a wallet","href":"/sdks/web/guide/recover-a-wallet"},{"title":"Cross-device sessions","href":"/sdks/web/guide/cross-device-sessions"},{"title":"Manage wallet lifecycle states","href":"/sdks/web/guide/manage-wallet-lifecycle-states"},{"title":"Handle storage loss","href":"/sdks/web/guide/handle-storage-loss"},{"title":"Web authentication methods","href":"/sdks/web/guide/web-authentication-methods"},{"title":"Client Auth","href":"/sdks/web/guide/client-auth"},{"title":"Add custom signature hooks","href":"/sdks/web/guide/add-custom-signature-hooks"},{"title":"MPC progress callbacks","href":"/sdks/web/guide/mpc-progress-callbacks"},{"title":"Portal API methods","href":"/sdks/web/guide/portal-api-methods"},{"title":"Configure a custom subdomain","href":"/sdks/web/guide/configure-a-custom-subdomain"},{"title":"Security model","href":"/sdks/web/guide/security-model"},{"title":"Logging Configuration","href":"/sdks/web/guide/logging"},{"title":"Feature flags","href":"/sdks/web/guide/feature-flags"},{"title":"Eject a wallet","href":"/sdks/web/guide/eject-a-wallet"},{"title":"Using the EIP-1193 Provider","href":"/sdks/web/guide/using-the-eip-1193-provider"},{"title":"Enhance your wallet security with Blockaid","href":"/sdks/web/guide/blockaid"},{"title":"Security Scanning with Hypernative","href":"/sdks/web/guide/hypernative"},{"title":"Swap Tokens with 0x","href":"/sdks/web/guide/zero-x"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/sdks/web/guide/lifi"},{"title":"Noah virtual accounts and payouts","href":"/sdks/web/guide/noah"},{"title":"Meld buy, sell, and transfer","href":"/sdks/web/guide/meld"},{"title":"Earn with Yield.xyz","href":"/sdks/web/guide/yield-xyz"},{"title":"Lend and borrow with Yield.xyz","href":"/sdks/web/guide/yield-xyz-borrow"},{"title":"Trade perps with Yield.xyz","href":"/sdks/web/guide/yield-xyz-perps"},{"title":"Upgrading to EIP-7702","href":"/sdks/web/guide/evm-account-type"},{"title":"Manage Token Delegations","href":"/sdks/web/guide/delegations"},{"title":"Batch user operations","href":"/sdks/web/guide/batch-user-operations"}]},{"title":"Reference","href":"/sdks/web/reference"}]},{"group":"Android","pages":[{"title":"Getting Started","href":"/sdks/android/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a wallet","href":"/sdks/android/guide/create-a-wallet"},{"title":"Get wallet addresses","href":"/sdks/android/guide/get-wallet-addresses"},{"title":"Send tokens","href":"/sdks/android/guide/send-tokens"},{"title":"Sign a transaction","href":"/sdks/android/guide/sign-a-transaction"},{"title":"Idempotency keys","href":"/sdks/android/guide/idempotency-keys"},{"title":"Evaluate a transaction","href":"/sdks/android/guide/evaluate-a-transaction"},{"title":"Back up a wallet","href":"/sdks/android/guide/back-up-a-wallet"},{"title":"Recover a wallet","href":"/sdks/android/guide/recover-a-wallet"},{"title":"Cross-device sessions","href":"/sdks/android/guide/cross-device-sessions"},{"title":"Manage wallet lifecycle states","href":"/sdks/android/guide/manage-wallet-lifecycle-states"},{"title":"Client Auth","href":"/sdks/android/guide/client-auth"},{"title":"Connect with WalletConnect","href":"/sdks/android/guide/connect-with-walletconnect"},{"title":"Build a WebView","href":"/sdks/android/guide/build-a-webview"},{"title":"Perform swaps","href":"/sdks/android/guide/perform-swaps"},{"title":"Add custom signature hooks","href":"/sdks/android/guide/add-custom-signature-hooks"},{"title":"MPC progress callbacks","href":"/sdks/android/guide/mpc-progress-callbacks"},{"title":"Portal API methods","href":"/sdks/android/guide/portal-api-methods"},{"title":"Eject a wallet","href":"/sdks/android/guide/eject-a-wallet"},{"title":"Enhance your wallets' security with Blockaid","href":"/sdks/android/guide/blockaid"},{"title":"Enhance your wallets' security with Hypernative","href":"/sdks/android/guide/hypernative"},{"title":"Swap Tokens with 0x","href":"/sdks/android/guide/zerox"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/sdks/android/guide/lifi"},{"title":"Earn with Yield.xyz","href":"/sdks/android/guide/yield-xyz"},{"title":"Manage Token Delegations","href":"/sdks/android/guide/delegations"},{"title":"Upgrading to EIP-7702","href":"/sdks/android/guide/evm-account-type"},{"title":"Error handling","href":"/sdks/android/guide/error-handling"},{"title":"Feature Flags","href":"/sdks/android/guide/feature-flags"},{"title":"Configure log level","href":"/sdks/android/guide/configure-log-level"},{"title":"Noah virtual accounts and payouts","href":"/sdks/android/guide/noah"},{"title":"Request tracing","href":"/sdks/android/guide/request-tracing"}]},{"title":"Reference","href":"/sdks/android/reference"}]},{"group":"iOS","pages":[{"title":"Getting Started","href":"/sdks/ios/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a wallet","href":"/sdks/ios/guide/create-a-wallet"},{"title":"Send tokens","href":"/sdks/ios/guide/send-tokens"},{"title":"Sign a transaction","href":"/sdks/ios/guide/sign-a-transaction"},{"title":"Idempotency keys","href":"/sdks/ios/guide/idempotency-keys"},{"title":"Evaluate a transaction","href":"/sdks/ios/guide/evaluate-a-transaction"},{"title":"Back up a wallet","href":"/sdks/ios/guide/back-up-a-wallet"},{"title":"Recover a wallet","href":"/sdks/ios/guide/recover-a-wallet"},{"title":"Cross-device sessions","href":"/sdks/ios/guide/cross-device-sessions"},{"title":"Manage wallet lifecycle states","href":"/sdks/ios/guide/manage-wallet-lifecycle-states"},{"title":"Client Auth","href":"/sdks/ios/guide/client-auth"},{"title":"Connect with WalletConnect","href":"/sdks/ios/guide/connect-with-walletconnect"},{"title":"Build a WebView","href":"/sdks/ios/guide/build-a-webview"},{"title":"Perform swaps (Deprecated)","href":"/sdks/ios/guide/perform-swaps"},{"title":"Add custom signature hooks","href":"/sdks/ios/guide/add-custom-signature-hooks"},{"title":"MPC progress callbacks","href":"/sdks/ios/guide/mpc-progress-callbacks"},{"title":"Portal API methods","href":"/sdks/ios/guide/portal-api-methods"},{"title":"Manage ERC20 tokens","href":"/sdks/ios/guide/manage-erc20-tokens"},{"title":"Eject a wallet","href":"/sdks/ios/guide/eject-a-wallet"},{"title":"Troubleshooting tips","href":"/sdks/ios/guide/troubleshooting-tips"},{"title":"Feature Flags","href":"/sdks/ios/guide/feature-flags"},{"title":"Configure log level","href":"/sdks/ios/guide/configure-log-level"},{"title":"Earn with Yield.xyz","href":"/sdks/ios/guide/yield-xyz"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/sdks/ios/guide/lifi"},{"title":"Swap Tokens with 0x","href":"/sdks/ios/guide/zerox"},{"title":"Enhance your wallets' security with Hypernative","href":"/sdks/ios/guide/hypernative"},{"title":"Enhance your wallets' security with Blockaid","href":"/sdks/ios/guide/blockaid"},{"title":"Manage Token Delegations","href":"/sdks/ios/guide/delegations"},{"title":"Upgrading to EIP-7702","href":"/sdks/ios/guide/evm-account-type"},{"title":"Noah virtual accounts and payouts","href":"/sdks/ios/guide/noah"},{"title":"Request tracing","href":"/sdks/ios/guide/request-tracing"}]},{"group":"Reference","pages":[{"title":"availableRecoveryMethods","href":"/sdks/ios/reference/availablerecoverymethods"},{"title":"backupWallet","href":"/sdks/ios/reference/backupwallet"},{"title":"buildEip155Transaction","href":"/sdks/ios/reference/buildeip155transaction"},{"title":"buildSolanaTransaction","href":"/sdks/ios/reference/buildsolanatransaction"},{"title":"clearSession","href":"/sdks/ios/reference/clearsession"},{"title":"createWallet","href":"/sdks/ios/reference/createwallet"},{"title":"approveAndSubmit","href":"/sdks/ios/reference/delegationsapproveandsubmit"},{"title":"revokeAndSubmit","href":"/sdks/ios/reference/delegationsrevokeandsubmit"},{"title":"setSignAndSendTransaction","href":"/sdks/ios/reference/delegationssetsignandsendtransaction"},{"title":"transferAndSubmit","href":"/sdks/ios/reference/delegationstransferandsubmit"},{"title":"doesWalletExist","href":"/sdks/ios/reference/doeswalletexist"},{"title":"ejectPrivateKeys","href":"/sdks/ios/reference/ejectprivatekeys"},{"title":"evaluateTransaction","href":"/sdks/ios/reference/evaluatetransaction"},{"title":"FirebaseStorage","href":"/sdks/ios/reference/firebasestorage"},{"title":"gDriveSignOut","href":"/sdks/ios/reference/gdrivesignout"},{"title":"generateIdempotencyKey","href":"/sdks/ios/reference/generateidempotencykey"},{"title":"generateTraceId","href":"/sdks/ios/reference/generatetraceid"},{"title":"getAddresses / getAddress","href":"/sdks/ios/reference/getaddresses"},{"title":"getAssets","href":"/sdks/ios/reference/getassets"},{"title":"getBalances","href":"/sdks/ios/reference/getbalances"},{"title":"getNftAssets","href":"/sdks/ios/reference/getnftassets"},{"title":"getTransactions","href":"/sdks/ios/reference/gettransactions"},{"title":"getWalletCapabilities","href":"/sdks/ios/reference/getwalletcapabilities"},{"title":"isWalletBackedUp","href":"/sdks/ios/reference/iswalletbackedup"},{"title":"isWalletOnDevice","href":"/sdks/ios/reference/iswalletondevice"},{"title":"isWalletRecoverable","href":"/sdks/ios/reference/iswalletrecoverable"},{"title":"pollStatus","description":"Polls Li.Fi for the status of a transfer until it reaches a terminal state.","href":"/sdks/ios/reference/lifipollstatus"},{"title":"tradeAsset","href":"/sdks/ios/reference/lifitradeasset"},{"title":"getPaymentMethods","description":"Lists the stored Noah payment methods for the current customer.","href":"/sdks/ios/reference/noahgetpaymentmethods"},{"title":"getPayoutChannelForm","href":"/sdks/ios/reference/noahgetpayoutchannelform"},{"title":"getPayoutChannels","href":"/sdks/ios/reference/noahgetpayoutchannels"},{"title":"getPayoutCountries","href":"/sdks/ios/reference/noahgetpayoutcountries"},{"title":"getPayoutQuote","href":"/sdks/ios/reference/noahgetpayoutquote"},{"title":"initiateKyc","href":"/sdks/ios/reference/noahinitiatekyc"},{"title":"initiatePayin","href":"/sdks/ios/reference/noahinitiatepayin"},{"title":"initiatePayout","href":"/sdks/ios/reference/noahinitiatepayout"},{"title":"simulatePayin","href":"/sdks/ios/reference/noahsimulatepayin"},{"title":"onSessionInvalidated","href":"/sdks/ios/reference/onsessioninvalidated"},{"title":"PortalAuth","href":"/sdks/ios/reference/portalauth"},{"title":"clearPersistedSession","href":"/sdks/ios/reference/portalauthclearpersistedsession"},{"title":"getMethods","href":"/sdks/ios/reference/portalauthgetmethods"},{"title":"handleRedirect","href":"/sdks/ios/reference/portalauthhandleredirect"},{"title":"loginWithApple","href":"/sdks/ios/reference/portalauthloginwithapple"},{"title":"loginWithGoogle","href":"/sdks/ios/reference/portalauthloginwithgoogle"},{"title":"restoreSession","href":"/sdks/ios/reference/portalauthrestoresession"},{"title":"sendMagicLink","href":"/sdks/ios/reference/portalauthsendmagiclink"},{"title":"signInWithApple","href":"/sdks/ios/reference/portalauthsigninwithapple"},{"title":"signInWithGoogle","href":"/sdks/ios/reference/portalauthsigninwithgoogle"},{"title":"verifyTotp","href":"/sdks/ios/reference/portalauthverifytotp"},{"title":"recoverWallet","href":"/sdks/ios/reference/recoverwallet"},{"title":"registerBackupMethod","href":"/sdks/ios/reference/registerbackupmethod"},{"title":"sendSol","href":"/sdks/ios/reference/sendsol"},{"title":"setGDriveConfiguration","href":"/sdks/ios/reference/setgdriveconfiguration"},{"title":"setLogLevel","href":"/sdks/ios/reference/setloglevel"},{"title":"setPasskeyAuthenticationAnchor","href":"/sdks/ios/reference/setpasskeyauthenticationanchor"},{"title":"setPasskeyConfiguration","href":"/sdks/ios/reference/setpasskeyconfiguration"},{"title":"setPassword","href":"/sdks/ios/reference/setpassword"},{"title":"deposit","href":"/sdks/ios/reference/yielddeposit"},{"title":"getValidators","href":"/sdks/ios/reference/yieldgetvalidators"},{"title":"withdraw","href":"/sdks/ios/reference/yieldwithdraw"}]}]},{"group":"React Native","pages":[{"title":"Getting Started","href":"/sdks/react-native/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a wallet","href":"/sdks/react-native/guide/create-a-wallet"},{"title":"Send tokens","href":"/sdks/react-native/guide/send-tokens"},{"title":"Sign a transaction","href":"/sdks/react-native/guide/sign-a-transaction"},{"title":"Idempotency keys","href":"/sdks/react-native/guide/idempotency-keys"},{"title":"Evaluate a transaction","href":"/sdks/react-native/guide/evaluate-a-transaction"},{"title":"Back up a wallet","href":"/sdks/react-native/guide/back-up-a-wallet"},{"title":"Recover a wallet","href":"/sdks/react-native/guide/recover-a-wallet"},{"title":"Cross-device sessions","href":"/sdks/react-native/guide/cross-device-sessions"},{"title":"Manage wallet lifecycle states","href":"/sdks/react-native/guide/manage-wallet-lifecycle-states"},{"title":"Client Auth","href":"/sdks/react-native/guide/client-auth"},{"title":"Connect with WalletConnect","href":"/sdks/react-native/guide/connect-with-walletconnect"},{"title":"Build a WebView","href":"/sdks/react-native/guide/build-a-webview"},{"title":"Perform swaps","href":"/sdks/react-native/guide/perform-swaps"},{"title":"Add custom signature hooks","href":"/sdks/react-native/guide/add-custom-signature-hooks"},{"title":"MPC progress callbacks","href":"/sdks/react-native/guide/mpc-progress-callbacks"},{"title":"Portal API methods","href":"/sdks/react-native/guide/portal-api-methods"},{"title":"Logging Configuration","href":"/sdks/react-native/guide/logging"},{"title":"Feature flags","href":"/sdks/react-native/guide/feature-flags"},{"title":"Eject a wallet","href":"/sdks/react-native/guide/eject-a-wallet"},{"title":"Manage Token Delegations","href":"/sdks/react-native/guide/delegations"},{"title":"Upgrading to EIP-7702","href":"/sdks/react-native/guide/evm-account-type"},{"title":"Enhance your wallets' security with Blockaid","href":"/sdks/react-native/guide/blockaid"},{"title":"Enhance your wallets' security with Hypernative","href":"/sdks/react-native/guide/hypernative"},{"title":"Swap Tokens with 0x","href":"/sdks/react-native/guide/zerox"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/sdks/react-native/guide/lifi"},{"title":"Noah virtual accounts and payouts","href":"/sdks/react-native/guide/noah"},{"title":"Meld buy, sell, and transfer","href":"/sdks/react-native/guide/meld"},{"title":"Earn with Yield.xyz","href":"/sdks/react-native/guide/yield-xyz"},{"title":"Lend and borrow with Yield.xyz","href":"/sdks/react-native/guide/yield-xyz-borrow"},{"title":"Trade perps with Yield.xyz","href":"/sdks/react-native/guide/yield-xyz-perps"},{"title":"Batch user operations","href":"/sdks/react-native/guide/batch-user-operations"}]},{"group":"Reference","pages":[{"title":"@portal-hq/core","href":"/sdks/react-native/reference/core"},{"title":"@portal-hq/firebase-storage","href":"/sdks/react-native/reference/firebase-storage"},{"title":"@portal-hq/gdrive-storage","href":"/sdks/react-native/reference/gdrive-storage"},{"title":"@portal-hq/icloud-storage","href":"/sdks/react-native/reference/icloud-storage"},{"title":"@portal-hq/keychain","href":"/sdks/react-native/reference/keychain"}]}]},{"group":"Flutter","pages":[{"title":"Getting Started","href":"/sdks/flutter/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a wallet","href":"/sdks/flutter/guide/create-a-wallet"},{"title":"Send tokens","href":"/sdks/flutter/guide/send-tokens"},{"title":"Sign a transaction","href":"/sdks/flutter/guide/sign-a-transaction"},{"title":"Idempotency keys","href":"/sdks/flutter/guide/idempotency-keys"},{"title":"Sign a user operation","href":"/sdks/flutter/guide/sign-a-user-operation"},{"title":"Evaluate a transaction","href":"/sdks/flutter/guide/evaluate-a-transaction"},{"title":"Back up a wallet","href":"/sdks/flutter/guide/back-up-a-wallet"},{"title":"Recover a wallet","href":"/sdks/flutter/guide/recover-a-wallet"},{"title":"Client Auth","href":"/sdks/flutter/guide/client-auth"},{"title":"Perform swaps","href":"/sdks/flutter/guide/perform-swaps"},{"title":"Eject a wallet","href":"/sdks/flutter/guide/eject-a-wallet"},{"title":"Earn with Yield.xyz","href":"/sdks/flutter/guide/yield-xyz"},{"title":"Manage Token Delegations","href":"/sdks/flutter/guide/delegations"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/sdks/flutter/guide/lifi"},{"title":"Swap Tokens with 0x","href":"/sdks/flutter/guide/zerox"},{"title":"Noah virtual accounts and payouts","href":"/sdks/flutter/guide/noah"},{"title":"Upgrading to EIP-7702","href":"/sdks/flutter/guide/evm-account-type"},{"title":"Enhance your wallets' security with Blockaid","href":"/sdks/flutter/guide/blockaid"},{"title":"Enhance your wallets' security with Hypernative","href":"/sdks/flutter/guide/hypernative"},{"title":"Subscribe to Portal events","href":"/sdks/flutter/guide/events"},{"title":"Configure log level","href":"/sdks/flutter/guide/configure-log-level"},{"title":"Feature flags","href":"/sdks/flutter/guide/feature-flags"}]},{"group":"Native Platform Channels","pages":[{"title":"Native Platform Channels (iOS)","href":"/sdks/flutter/guide/ios"},{"title":"Native Platform Channels (Android)","href":"/sdks/flutter/guide/android"}]},{"group":"Reference","pages":[{"title":"createWallet","href":"/sdks/flutter/reference/createwallet"},{"title":"backupWallet","href":"/sdks/flutter/reference/backupwallet"},{"title":"recoverWallet","href":"/sdks/flutter/reference/recoverwallet"},{"title":"getAddresses / getAddress","href":"/sdks/flutter/reference/getaddresses"},{"title":"sendAsset","href":"/sdks/flutter/reference/sendasset"},{"title":"sendTransaction","href":"/sdks/flutter/reference/sendtransaction"},{"title":"buildEip155Transaction","href":"/sdks/flutter/reference/buildeip155transaction"},{"title":"buildSolanaTransaction","href":"/sdks/flutter/reference/buildsolanatransaction"},{"title":"buildBitcoinP2wpkhTransaction","href":"/sdks/flutter/reference/buildbitcoinp2wpkhtransaction"},{"title":"broadcastBitcoinP2wpkhTransaction","href":"/sdks/flutter/reference/broadcastbitcoinp2wpkhtransaction"},{"title":"signMessage","href":"/sdks/flutter/reference/signmessage"},{"title":"signTypedData","href":"/sdks/flutter/reference/signtypeddata"},{"title":"rawSign","href":"/sdks/flutter/reference/rawsign"},{"title":"request","href":"/sdks/flutter/reference/request"},{"title":"generateIdempotencyKey","href":"/sdks/flutter/reference/generateidempotencykey"},{"title":"eth_signUserOperation","href":"/sdks/flutter/reference/eth_signuseroperation"},{"title":"swap","href":"/sdks/flutter/reference/swap"},{"title":"evaluateTransaction","href":"/sdks/flutter/reference/evaluatetransaction"},{"title":"ejectPrivateKeys","href":"/sdks/flutter/reference/ejectprivatekeys"},{"title":"getAssets","href":"/sdks/flutter/reference/getassets"},{"title":"getBalances","href":"/sdks/flutter/reference/getbalances"},{"title":"getNftAssets","href":"/sdks/flutter/reference/getnftassets"},{"title":"getTransactions","href":"/sdks/flutter/reference/gettransactions"},{"title":"getTransactionDetails","href":"/sdks/flutter/reference/gettransactiondetails"},{"title":"doesWalletExist","href":"/sdks/flutter/reference/doeswalletexist"},{"title":"isWalletBackedUp","href":"/sdks/flutter/reference/iswalletbackedup"},{"title":"isWalletOnDevice","href":"/sdks/flutter/reference/iswalletondevice"},{"title":"isWalletRecoverable","href":"/sdks/flutter/reference/iswalletrecoverable"},{"title":"availableRecoveryMethods","href":"/sdks/flutter/reference/availablerecoverymethods"},{"title":"setPassword","href":"/sdks/flutter/reference/setpassword"},{"title":"setLogLevel","href":"/sdks/flutter/reference/setloglevel"},{"title":"configureGoogleStorage","href":"/sdks/flutter/reference/configuregooglestorage"},{"title":"configurePasskeyStorage","href":"/sdks/flutter/reference/configurepasskeystorage"},{"title":"configureICloudStorage","href":"/sdks/flutter/reference/configureicloud"},{"title":"configureFirebaseStorage","href":"/sdks/flutter/reference/configurefirebasestorage"},{"title":"receiveTestnetAsset","href":"/sdks/flutter/reference/receivetestnetasset"},{"title":"getClient","href":"/sdks/flutter/reference/getclient"},{"title":"deleteKeychain","href":"/sdks/flutter/reference/deletekeychain"},{"title":"PortalAuth","href":"/sdks/flutter/reference/portalauth"},{"title":"configure","href":"/sdks/flutter/reference/portalauthconfigure"},{"title":"getMethods","href":"/sdks/flutter/reference/portalauthgetmethods"},{"title":"sendMagicLink","href":"/sdks/flutter/reference/portalauthsendmagiclink"},{"title":"loginWithGoogle","href":"/sdks/flutter/reference/portalauthloginwithgoogle"},{"title":"loginWithApple","href":"/sdks/flutter/reference/portalauthloginwithapple"},{"title":"handleRedirect","href":"/sdks/flutter/reference/portalauthhandleredirect"},{"title":"verifyTotp","href":"/sdks/flutter/reference/portalauthverifytotp"},{"title":"restoreSession","href":"/sdks/flutter/reference/portalauthrestoresession"},{"title":"clearPersistedSession","href":"/sdks/flutter/reference/portalauthclearpersistedsession"},{"title":"clearSession","href":"/sdks/flutter/reference/clearsession"},{"title":"onSessionInvalidated","href":"/sdks/flutter/reference/onsessioninvalidated"},{"title":"delegations.approve","href":"/sdks/flutter/reference/delegations-approve"},{"title":"delegations.revoke","href":"/sdks/flutter/reference/delegations-revoke"},{"title":"delegations.getStatus","href":"/sdks/flutter/reference/delegations-getstatus"},{"title":"delegations.transferFrom","href":"/sdks/flutter/reference/delegations-transferfrom"},{"title":"delegations.approveAndSubmit","href":"/sdks/flutter/reference/delegations-approveandsubmit"},{"title":"delegations.revokeAndSubmit","href":"/sdks/flutter/reference/delegations-revokeandsubmit"},{"title":"delegations.transferAndSubmit","href":"/sdks/flutter/reference/delegations-transferandsubmit"},{"title":"ramps.noah.getPaymentMethods","href":"/sdks/flutter/reference/noah-getpaymentmethods"},{"title":"ramps.noah.getPayoutChannelForm","href":"/sdks/flutter/reference/noah-getpayoutchannelform"},{"title":"ramps.noah.getPayoutChannels","href":"/sdks/flutter/reference/noah-getpayoutchannels"},{"title":"ramps.noah.getPayoutCountries","href":"/sdks/flutter/reference/noah-getpayoutcountries"},{"title":"ramps.noah.getPayoutQuote","href":"/sdks/flutter/reference/noah-getpayoutquote"},{"title":"ramps.noah.initiateKyc","href":"/sdks/flutter/reference/noah-initiatekyc"},{"title":"ramps.noah.initiatePayin","href":"/sdks/flutter/reference/noah-initiatepayin"},{"title":"ramps.noah.initiatePayout","href":"/sdks/flutter/reference/noah-initiatepayout"},{"title":"ramps.noah.simulatePayin","href":"/sdks/flutter/reference/noah-simulatepayin"},{"title":"yieldIntegrations.yieldxyz.discover","href":"/sdks/flutter/reference/yield-discover"},{"title":"yieldIntegrations.yieldxyz.enter","href":"/sdks/flutter/reference/yield-enter"},{"title":"yieldIntegrations.yieldxyz.exit","href":"/sdks/flutter/reference/yield-exit"},{"title":"yieldIntegrations.yieldxyz.manage","href":"/sdks/flutter/reference/yield-manage"},{"title":"yieldIntegrations.yieldxyz.getBalances","href":"/sdks/flutter/reference/yield-getbalances"},{"title":"yieldIntegrations.yieldxyz.getHistoricalActions","href":"/sdks/flutter/reference/yield-gethistoricalactions"},{"title":"yieldIntegrations.yieldxyz.getTransaction","href":"/sdks/flutter/reference/yield-gettransaction"},{"title":"yieldIntegrations.yieldxyz.track","href":"/sdks/flutter/reference/yield-track"}]}]}]},{"group":"APIs","pages":[{"group":"Enclave MPC API","pages":[{"title":"Getting Started","href":"/apis/enclave-mpc/guide/getting-started"},{"group":"Guide","pages":[{"title":"Create a client","href":"/apis/enclave-mpc/guide/create-a-client"},{"title":null,"href":"/apis/enclave-mpc/guide/create-a-wallet"},{"title":"Send tokens","href":"/apis/enclave-mpc/guide/send-tokens"},{"title":"Sign Ethereum transactions","href":"/apis/enclave-mpc/guide/sign-ethereum-transactions"},{"title":"Sign Solana transactions","href":"/apis/enclave-mpc/guide/sign-solana-transactions"},{"title":"Sign Stellar transactions","href":"/apis/enclave-mpc/guide/sign-stellar-transactions"},{"title":"Sign Tron transactions","href":"/apis/enclave-mpc/guide/sign-tron-transactions"},{"title":"Concurrent Transactions","href":"/apis/enclave-mpc/guide/concurrent-transactions"},{"title":"Presignatures","href":"/apis/enclave-mpc/guide/presignatures"},{"title":"Back up a wallet","href":"/apis/enclave-mpc/guide/backup"},{"title":null,"href":"/apis/enclave-mpc/guide/eject-a-wallet"},{"title":"Manage Token Delegations","href":"/apis/enclave-mpc/guide/delegations"},{"title":"Earn with Yield.xyz","href":"/apis/enclave-mpc/guide/yield-xyz"},{"title":"Lend and borrow with Yield.xyz","href":"/apis/enclave-mpc/guide/yield-xyz-borrow"},{"title":"Trade perps with Yield.xyz","href":"/apis/enclave-mpc/guide/yield-xyz-perps"},{"title":"Bridge \u0026 Swap with Li.Fi","href":"/apis/enclave-mpc/guide/lifi"},{"title":"Move USDC with CCTP","href":"/apis/enclave-mpc/guide/cctp"},{"title":"Cross-Chain Swap with 0x","href":"/apis/enclave-mpc/guide/zerox-cross-chain"}]},{"title":"API Reference","href":"/apis/enclave-mpc/api-reference-link"}]},{"group":"Client API","pages":[{"title":"API Reference","href":"/apis/client/api-reference-link"}]},{"group":"Authentication API","pages":[{"title":"API Reference","href":"/apis/authentication/api-reference-link"}]},{"group":"Custodian API","pages":[{"title":"API Reference","href":"/apis/custodian/api-reference-link"}]},{"group":"Reseller API","pages":[{"title":"Getting Started","href":"/apis/reseller/guide/getting-started"},{"title":"API Reference","href":"/apis/reseller/api-reference-link"}]}]},{"group":"Integrations","pages":[{"title":"Integrations Overview","href":"/integrations/index"},{"group":"On / Off Ramp","pages":[{"group":"Due","pages":[{"title":"Overview","href":"/integrations/On-Off-Ramp/due"},{"title":"KYC onboarding","href":"/integrations/On-Off-Ramp/due-kyc"},{"title":"Payins","href":"/integrations/On-Off-Ramp/due-payins"},{"title":"Payouts","href":"/integrations/On-Off-Ramp/due-payouts"},{"title":"Virtual accounts","href":"/integrations/On-Off-Ramp/due-virtual-accounts"},{"title":"Application fees","href":"/integrations/On-Off-Ramp/due-fees"},{"title":"Webhooks","href":"/integrations/On-Off-Ramp/due-webhooks"}]},{"group":"Noah","pages":[{"title":"Overview","href":"/integrations/On-Off-Ramp/noah"},{"title":"KYC Onboarding","href":"/integrations/On-Off-Ramp/noah-kyc"},{"title":"Payins","href":"/integrations/On-Off-Ramp/noah-payins"},{"title":"Payouts","href":"/integrations/On-Off-Ramp/noah-payouts"},{"title":"Webhooks","href":"/integrations/On-Off-Ramp/noah-webhooks"}]},{"group":"Meld","pages":[{"title":"Overview","href":"/integrations/On-Off-Ramp/meld"},{"title":"White-Label API","href":"/integrations/On-Off-Ramp/meld-widget"},{"title":"Webhooks","href":"/integrations/On-Off-Ramp/meld-webhooks"}]}]},{"group":"Security","pages":[{"title":"Blockaid","href":"/integrations/Security/blockaid"},{"title":"Hypernative","href":"/integrations/Security/hypernative"}]},{"group":"Trading","pages":[{"title":"Agg by Snag","href":"/integrations/Trading/agg"},{"title":"0x","href":"/integrations/Trading/zerox"},{"title":"Li.Fi","href":"/integrations/Trading/lifi"},{"title":"CCTP","href":"/integrations/Trading/cctp"}]},{"group":"Yield","pages":[{"title":"Yield.xyz","href":"/integrations/Yield/yield-xyz"},{"title":"Yield.xyz Borrow","href":"/integrations/Yield/yield-xyz-borrow"},{"title":"Yield.xyz Perps","href":"/integrations/Yield/yield-xyz-perps"}]}]},{"group":"Resources","pages":[{"title":"Chain support","href":"/resources/blockchain-support"},{"title":"API Keys","href":"/resources/api-keys"},{"group":"Core Concepts","pages":[{"title":"Portal's MPC architecture","href":"/resources/portals-mpc-architecture"},{"title":"Wallet lifecycle","href":"/resources/wallet-lifecycle"},{"group":"Backup Options","pages":[{"title":"GDrive","href":"/resources/backup-options/gdrive"},{"title":"iCloud","href":"/resources/backup-options/icloud"},{"title":"Passkey + Enclave","href":"/resources/backup-options/passkey-+-enclave"},{"title":"Password/PIN","href":"/resources/backup-options/password-pin"},{"title":"Firebase Auth Backup","href":"/resources/backup-options/firebase-byo-auth"}]},{"title":"Rate Limits","href":"/resources/rate-limits"},{"title":"Idempotency Keys","href":"/resources/idempotency-keys"},{"title":"Error Codes","href":"/resources/error-codes"}]},{"group":"Authentication","pages":[{"title":"Overview","href":"/resources/authentication/overview"},{"title":"Enable authentication","href":"/resources/authentication/enable-authentication"},{"title":"Redirect URLs","href":"/resources/authentication/redirect-urls"},{"title":"Email magic links","href":"/resources/authentication/email-magic-links"},{"title":"Google OAuth","href":"/resources/authentication/google-oauth"},{"title":"Apple OAuth","href":"/resources/authentication/apple-oauth"},{"title":"Two-factor authentication","href":"/resources/authentication/two-factor-authentication"},{"title":"End users","href":"/resources/authentication/end-users"}]},{"group":"Security","pages":[{"title":"Security","href":"/resources/security"},{"title":"Single Sign-On (SSO)","href":"/resources/single-sign-on"},{"title":"Eject","href":"/resources/eject"},{"title":"Security firewall","href":"/resources/firewall"},{"title":"Policies","href":"/resources/policies"}]},{"group":"Additional Features","pages":[{"title":"Account abstraction","href":"/resources/account-abstraction"},{"title":"Agentic wallets","href":"/resources/agentic-wallets"},{"title":"Delegations","href":"/resources/delegations"},{"title":"Fee collectors","href":"/resources/fee-collectors"},{"title":"Presignatures","href":"/resources/presignatures"},{"title":"Pre-Generated Wallets","href":"/resources/pre-generated-wallets"},{"title":"Upgrading to EIP-7702","href":"/resources/evmAccountType"},{"title":"WalletConnect metadata","href":"/resources/walletconnect-metadata"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/resources/webhooks"},{"group":"Flow control hooks","pages":[{"title":"Flow control hooks","href":"/resources/flow-control-hooks/overview"},{"title":"Set up flow control hooks","href":"/resources/flow-control-hooks/set-up"}]},{"group":"Informational webhooks","pages":[{"title":"Informational webhooks","href":"/resources/informational-webhooks/overview"},{"title":"Set up informational webhooks","href":"/resources/informational-webhooks/set-up"},{"title":"Informational webhook events","href":"/resources/informational-webhooks/events"}]}]},{"group":"Additional Resources","pages":[{"title":"Going to Production","href":"/resources/going-to-production"},{"title":"Testnet faucets","href":"/resources/testnet-faucets"},{"title":"Chain ID formatting","href":"/resources/chain-id-formatting"},{"title":"RPC endpoints","href":"/resources/rpc-endpoints"},{"title":"Glossary","href":"/resources/glossary"},{"group":"Migration Guides","pages":[{"title":"Migrating from legacy Solana webhook events","href":"/resources/migrating-from-solana-legacy-webhooks"}]}]},{"group":"Hackathon Hub","pages":[{"title":"Overview","href":"/resources/hackathon-hub"},{"group":"Hackathons","pages":[{"title":"Mobil3 Hackathon","href":"/resources/hackathons/mobil3"}]}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/apis/api-reference-overview"}]}]},"basePath":"","title":"tradeAsset - Portal","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}