The Solana Mobile Wallet Adapter (MWA) is a library that allows apps to connect to mobile Solana wallets. This guide will walk you through the steps to integrate MWA into your Privy app.
That’s it! Your Privy app is now set up to connect to Solana wallets using the Solana Mobile Wallet Adapter. You can now use Privy’s wallet connection and transaction signing features with Solana wallets that support MWA.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Privy Docs","colors":{"primary":"#010110","light":"#FFFFFF"},"logo":{"light":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-light.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=bd297b680ace8a13db4d9ce977f93180","dark":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-dark.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=24d83970695ab19a1803a2eb00dbea4e"},"favicon":"https://mintcdn.com/privy-c2af3412/YByWVKlFbSpnpSJG/favicon.png?fit=max\u0026auto=format\u0026n=YByWVKlFbSpnpSJG\u0026q=85\u0026s=ee4038168ea586e5f72041e5e2a1f5c8","api":{"openapi":{"source":"https://api.staging.privy.io/v1/openapi.json"},"playground":{"display":"interactive"},"examples":{"languages":["curl","java","javascript","php","go"]},"mdx":{"server":"https://api.privy.io"}},"background":{"color":{"light":"#FFFFFF","dark":"#010110"}},"navbar":{"links":[{"href":"https://demo.privy.io","label":"Demo"},{"href":"https://privy.io/slack","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.privy.io"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Privy Docs","og:image":"https://assets.privy.io/docs-og.png","twitter:title":"Privy Docs","twitter:card":"summary_large_image","twitter:image":"https://assets.privy.io/docs-og.png"},"organization":{"id":"https://www.privy.io/#organization","name":"Privy","url":"https://www.privy.io","logo":"https://assets.privy.io/docs-og.png","sameAs":["https://x.com/privy_io","https://github.com/privy-io"]}},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-WV9MVTB3"}},"contextual":{"options":["claude","chatgpt","cursor","vscode","mcp","copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"privy-c2af3412","hasAudioNarration":false,"actualSubdomain":"privy-c2af3412","customDomains":["docs.privy.io"],"gitSource":{"type":"github","owner":"privy-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4e553b20d11886a4cce74","collectionId":"53384d6e-0531-4740-9e51-f6740a7e4bf4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4e553b20d11886a4cce74"},"feedback":{"issues":true,"thumbs":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4e553b20d11886a4cce74","clientVersion":"0.0.4039","searchFilterCounts":[{"language":"default","tag":"Wallets","count":282},{"language":"default","tag":"API reference","count":239},{"language":"default","tag":"Recipes","count":139},{"language":"default","tag":"All recipes","count":138},{"language":"default","tag":"Identity","count":130},{"language":"default","tag":"Signatures and transactions","count":90},{"language":"default","tag":"Basics","count":86},{"language":"default","tag":"Users","count":82},{"language":"default","tag":"Financial flows","count":79},{"language":"default","tag":"Controls","count":76}]},"assistantConfig":{},"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":"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":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/privy-c2af3412/4e67a2a256ed8221/style.css"}],"page":{"pagePath":"recipes/solana/adding-solana-mwa","slug":"/recipes/solana/adding-solana-mwa","pageMetadata":{"title":"Integrating Solana mobile wallet adapter","description":null,"href":"/recipes/solana/adding-solana-mwa"},"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},{Card,CardGroup,CodeBlock,Heading,Note,View}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!View)_missingMdxReference(`View`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Solana Mobile Wallet Adapter (MWA) is a library that allows apps to connect to mobile Solana wallets. This guide will walk you through the steps to integrate MWA into your Privy app.`}),`\n`,_jsxs(View,{title:`React`,icon:`react`,id:`react`,children:[_jsx(Heading,{level:`2`,id:`resources`,children:`Resources`}),_jsx(CardGroup,{cols:1,children:_jsx(Card,{title:`Privy Solana setup`,icon:`wallet`,href:`/basics/react/setup#solana`,arrow:true,children:_jsx(_components.p,{children:`Learn how to set up Solana in your React app with Privy.`})})}),_jsx(Heading,{level:`2`,id:`install-dependencies`,children:`Install dependencies`}),_jsx(_components.p,{children:`Install the required dependencies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @solana-mobile/wallet-standard-mobile`})]}),`\n`]})})}),_jsx(Heading,{level:`2`,id:`register-the-mwa-adapter`,children:`Register the MWA adapter`}),_jsx(_components.p,{children:`In your app’s root component, register the MWA adapter with Privy.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,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:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` createDefaultAuthorizationCache`}),_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:` createDefaultChainSelector`}),_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:` createDefaultWalletNotFoundHandler`}),_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:` registerMwa`})}),`\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:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@solana-mobile/wallet-standard-mobile'`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`registerMwa`}),_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:` appIdentity:`}),_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:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'My app'`}),_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:` uri:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://myapp.io'`}),_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:` icon:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'relative/path/to/icon.png'`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // resolves to https://myapp.io/relative/path/to/icon.png`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authorizationCache:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDefaultAuthorizationCache`}),_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:` chains:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'solana:mainnet'`}),_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:` chainSelector:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDefaultChainSelector`}),_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:` onWalletNotFound:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDefaultWalletNotFoundHandler`}),_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`,_jsxs(View,{title:`React Native`,icon:`react`,id:`react-native`,children:[_jsx(Note,{children:_jsx(_components.p,{children:`Solana Mobile Wallet Adapter is only supported on Android devices.`})}),_jsx(Heading,{level:`2`,id:`resources-2`,children:`Resources`}),_jsx(CardGroup,{cols:1,children:_jsx(Card,{title:`Mobile Wallet Adapter documentation`,icon:`wallet`,href:`https://docs.solanamobile.com/react-native/using_mobile_wallet_adapter#add-dependencies`,arrow:true,children:_jsx(_components.p,{children:`Official documentation for integrating Solana Mobile Wallet Adapter in React Native apps.`})})}),_jsx(Heading,{level:`2`,id:`install-dependencies-2`,children:`Install dependencies`}),_jsx(_components.p,{children:`Install the required dependencies:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @solana-mobile/mobile-wallet-adapter-protocol-web3js`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @solana-mobile/mobile-wallet-adapter-protocol`})]}),`\n`]})})}),_jsx(Heading,{level:`2`,id:`create-a-mwa-session`,children:`Create a MWA session`}),_jsxs(_components.p,{children:[`In order to connect and log in users with MWA wallets, you need to create a MWA session by calling the `,_jsx(_components.code,{children:`transact`}),` and `,_jsx(_components.code,{children:`authorize`}),` methods from the `,_jsx(_components.code,{children:`@solana-mobile/mobile-wallet-adapter-protocol-web3js`}),` package, you’ll then need to log in the user with Privy using the `,_jsx(_components.code,{children:`useLoginWithSiws`}),` hook.`]}),_jsx(_components.p,{children:`You can do this in a custom login button component.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`59`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`59`,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:`transact`}),_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:` '@solana-mobile/mobile-wallet-adapter-protocol-web3js'`}),_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\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useLoginWithSiws`}),_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:` '@privy-io/expo'`}),_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\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`toByteArray`}),_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:` 'react-native-quick-base64'`}),_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\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PublicKey`}),_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:` '@solana/web3.js'`}),_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\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Buffer`}),_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:` 'buffer'`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` MwaLoginButton`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`generateMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`login`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useLoginWithSiws`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` handleLogin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_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\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` transact`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`wallet`}),_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:` // 1. Create a MWA session`})}),`\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:` authorizationResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`authorize`}),_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:` chain:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'mainnet-beta'`}),_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:` identity:`}),_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:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'My app'`}),_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:` uri:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://myapp.io'`}),_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:` icon:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://myapp.io/icon.png'`})]}),`\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`,_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:` desiredAccount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authorizationResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 2. Convert base64 address to base58 (Privy expects base58)`})}),`\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:` addressBytes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` toByteArray`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`desiredAccount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address`}),_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:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` publicKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` PublicKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`addressBytes`}),_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:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` base58Address`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` publicKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toBase58`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 3. Generate a Privy SIWS message for the wallet address`})}),`\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:` siwsMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateMessage`}),_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:` wallet:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` base58Address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Use base58 for Privy`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` from:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`domain:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'com.myapp.app'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`uri:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://myapp.io'`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 4. Convert the SIWS message to Uint8Array for signing`})}),`\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:` encodedSiwsMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TextEncoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`siwsMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 5. Request user to sign the SIWS message with their wallet`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`signatureBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`signMessages`}),_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:` addresses:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`desiredAccount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Use base64 for MWA`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payloads:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`encodedSiwsMessage`}),_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`,_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:` signatureBase64`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signatureBytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'base64'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 6. Authenticate with Privy using the signed message`})}),`\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:` user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` login`}),_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:` signature:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signatureBase64`}),_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:` message:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` siwsMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`})]}),`\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\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mwaResult:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user`}),_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`,_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:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Login failed'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Login with MWA\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onPress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handleLogin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},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(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),_jsxs(_components.p,{children:[`You can now use MWA wallets within your app. For more information on how to sign and send transactions using MWA wallets, refer to the `,_jsx(_components.a,{href:`https://docs.solanamobile.com/react-native/using_mobile_wallet_adapter#signing-and-sending-a-transaction`,children:`Solana Mobile Wallet Adapter guide`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`conclusion`,children:`Conclusion`}),`\n`,_jsxs(_components.p,{children:[`That’s it! Your Privy app is now set up to connect to Solana wallets using the Solana Mobile Wallet Adapter. You can now use Privy’s `,_jsx(_components.a,{href:`/wallets/connectors/usage/connecting-external-wallets`,children:`wallet connection`}),` and `,_jsx(_components.a,{href:`/wallets/using-wallets/solana/sign-a-message`,children:`transaction signing`}),` features with Solana wallets that support MWA.`]})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Integrating Solana mobile wallet adapter","description":null,"href":"/recipes/solana/adding-solana-mwa"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Resources","slug":"resources","depth":2,"children":[],"viewId":"React"},{"title":"Install dependencies","slug":"install-dependencies","depth":2,"children":[],"viewId":"React"},{"title":"Register the MWA adapter","slug":"register-the-mwa-adapter","depth":2,"children":[],"viewId":"React"},{"title":"Resources","slug":"resources-2","depth":2,"children":[],"viewId":"React Native"},{"title":"Install dependencies","slug":"install-dependencies-2","depth":2,"children":[],"viewId":"React Native"},{"title":"Create a MWA session","slug":"create-a-mwa-session","depth":2,"children":[],"viewId":"React Native"},{"title":"Next steps","slug":"next-steps","depth":2,"children":[],"viewId":"React Native"},{"title":"Conclusion","slug":"conclusion","depth":2,"children":[]}],"multiViewItems":[{"title":"React","content":"","icon":"react","id":"react","active":true},{"title":"React Native","content":"","icon":"react","id":"react-native","active":false}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/privy-c2af3412/9a6cfa36ced76db0/welcome.js","/_mintlify/custom/privy-c2af3412/1af79d46bd64cd8b/fullstory.js","/_mintlify/custom/privy-c2af3412/e4d91321024fde21/recipes/recipes-search.js","/_mintlify/custom/privy-c2af3412/d31c5451398ab22c/check-links.js"],"subdomain":"privy-c2af3412","siteName":"Privy Docs","title":"Integrating Solana mobile wallet adapter - Privy Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T18:43:58.212Z","originalFileLocation":"recipes/solana/adding-solana-mwa.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=\"Privy 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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_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/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Integrating Solana mobile wallet adapter - Privy Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Privy Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.privy.io/recipes/solana/adding-solana-mwa\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.privy.io/docs-og.png\">\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=\"Privy Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.privy.io/docs-og.png\">\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/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#010110\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.privy.io/recipes/solana/adding-solana-mwa\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/recipes/solana/adding-solana-mwa.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.privy.io/#organization\",\"name\":\"Privy\",\"url\":\"https://www.privy.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets.privy.io/docs-og.png\"},\"sameAs\":[\"https://x.com/privy_io\",\"https://github.com/privy-io\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.privy.io#website\",\"name\":\"Privy Docs\",\"url\":\"https://docs.privy.io\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa#webpage\",\"url\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa\",\"name\":\"Integrating Solana mobile wallet adapter\",\"dateModified\":\"2026-10-30T18:43:58.212Z\",\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"All recipes\",\"item\":\"https://docs.privy.io/recipes/authentication/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"External wallets\",\"item\":\"https://docs.privy.io/recipes/react/wallet-list-configurations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Integrating Solana mobile wallet adapter\",\"item\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa#article\",\"headline\":\"Integrating Solana mobile wallet adapter\",\"name\":\"Integrating Solana mobile wallet adapter\",\"url\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa\",\"mainEntityOfPage\":{\"@id\":\"https://docs.privy.io/recipes/solana/adding-solana-mwa#webpage\"},\"image\":\"https://assets.privy.io/docs-og.png\",\"dateModified\":\"2026-10-30T18:43:58.212Z\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"}}]}\u003c/script>","siteName":"Privy Docs","nav":{"global":null,"tabs":[{"tab":"Basics","pages":[{"title":"Basics","href":"/basics/get-started/about"}]},{"tab":"Wallets","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/wallets/overview"}]},{"item":"Embedded wallets","pages":[{"title":"Embedded wallets","href":"/wallets/overview/embedded"}]},{"item":"Organization wallets","pages":[{"title":"Organization wallets","href":"/organizations/overview"}]},{"item":"External wallets","pages":[{"title":"External wallets","href":"/wallets/connectors/overview"}]},{"item":"Signatures and transactions","pages":[{"title":"Signatures and transactions","href":"/wallets/signatures-and-transactions"}]},{"item":"Balances and webhooks","pages":[{"title":"Balances and webhooks","href":"/wallets/gas-and-asset-management/assets/overview"}]},{"item":"Gas and fee management","pages":[{"title":"Gas and fee management","href":"/wallets/gas-and-asset-management/gas/overview"}]}],"pages":[{"title":"Wallets","href":"/wallets/overview"}]},{"tab":"Financial flows","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/financial-flows/overview"}]},{"item":"Deposits","pages":[{"title":"Deposits","href":"/financial-flows/deposits/overview"}]},{"item":"Payouts","pages":[{"title":"Payouts","href":"/financial-flows/payouts/overview"}]},{"item":"Earn","pages":[{"title":"Earn","href":"/wallets/actions/earn/overview"}]},{"item":"Cards","pages":[{"title":"Cards","href":"/financial-flows/cards/overview"}]},{"item":"Trade","pages":[{"title":"Trade","href":"/wallets/actions/swap/overview"}]},{"item":"Monetization","pages":[{"title":"Monetization","href":"/financial-flows/monetization"}]},{"item":"Treasury management","pages":[{"title":"Treasury management","href":"/treasury-management/overview"}]},{"item":"Private transactions","pages":[{"title":"Private transactions","href":"/financial-flows/private-transactions"}]}],"pages":[{"title":"Financial flows","href":"/financial-flows/overview"}]},{"tab":"Controls and policies","menu":[{"item":"Controls","pages":[{"title":"Controls","href":"/controls/overview"}]},{"item":"Policies","pages":[{"title":"Policies","href":"/controls/policies/overview"}]},{"item":"Manual approvals","pages":[{"title":"Manual approvals","href":"/controls/dashboard/overview"}]}],"pages":[{"title":"Controls and policies","href":"/controls/overview"}]},{"tab":"Identity","menu":[{"item":"Authentication","pages":[{"title":"Authentication","href":"/authentication/overview"}]},{"item":"Users","pages":[{"title":"Users","href":"/user-management/users/overview"}]},{"item":"KYC and KYB","pages":[{"title":"KYC and KYB","href":"/kyc-kyb/overview"}]}],"pages":[{"title":"Identity","href":"/authentication/overview"}]},{"tab":"Security","pages":[{"title":"Security","href":"/security/overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","sidebarTitle":"Overview","mode":"wide","href":"/recipes/overview"},{"group":"All recipes","pages":[{"group":"Authentication","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Authentication","href":"/recipes/authentication/overview"},{"title":"Setting up SMS or WhatsApp login","href":"/recipes/dashboard/login-methods/sms-whatsapp"},{"title":"Guest accounts","href":"/recipes/react/guest-accounts"},{"title":"Login with Apple","href":"/recipes/swift/apple"},{"title":"Login with Farcaster","href":"/recipes/farcaster/login"},{"title":"Login with Lens","href":"/recipes/lens"},{"title":"Use tokens from OAuth providers","href":"/recipes/react/oauth-tokens"},{"title":"Migrating embedded wallets from Alchemy to Privy","href":"/recipes/migrating-embedded-wallets-from-alchemy"},{"title":"Migrating JWT authentication from Alchemy to Privy","href":"/recipes/migrating-jwt-authentication-from-alchemy"},{"title":"Using Supabase as an authentication provider","href":"/recipes/authentication/using-supabase-for-custom-auth"},{"title":"Worldcoin mini app SIWE with Privy","href":"/recipes/react/worldcoin-siwe-guide"},{"title":"Chrome extension authentication","href":"/recipes/react/chrome-extension"},{"title":"Mocking tokens for testing","href":"/recipes/mock-jwt"},{"title":"Configure cookies","href":"/recipes/react/cookies"},{"title":null,"href":"/recipes/using-test-accounts"},{"title":"Migrating sign in with Apple users for an Apple team transfer","href":"/recipes/apple-team-migration"}]},{"group":"Wallet infrastructure","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Wallet infrastructure","href":"/recipes/wallet-infrastructure/overview"},{"title":"Hierarchical deterministic (HD) wallets","href":"/recipes/hd-wallets"},{"title":"Pregenerating wallets","href":"/recipes/pregenerate-wallets"},{"sidebarTitle":"Agentic wallets","title":"Agentic wallets","href":"/recipes/agent-integrations/agentic-wallets"},{"title":"Server-side user wallets","href":"/recipes/wallets/server-side-user-wallets"},{"title":"Enabling users or servers to execute transactions","href":"/recipes/wallets/user-and-server-signers"},{"title":"Using passkeys with wallets","href":"/recipes/passkey-server-wallets"},{"title":"Policy-based MFA","href":"/recipes/policy-based-mfa"},{"title":"Using stateful policies with Privy","href":"/recipes/using-stateful-policies"},{"title":"Migrating wallets from on-device to TEEs","href":"/recipes/tee-wallet-migration-guide"},{"title":"Tier 1 wallet integration","href":"/recipes/tier-1-wallet-integration"},{"title":"Tier 2 wallet integration","href":"/recipes/tier-2-wallet-integration"},{"title":"Custom account abstraction implementation","href":"/recipes/account-abstraction/custom-implementation"},{"title":"Storing smart account addresses","href":"/recipes/account-abstraction/address"},{"title":"Integrating smart accounts with wagmi","href":"/recipes/account-abstraction/wagmi"},{"title":"Create a smart wallet on iOS and Android","href":"/recipes/account-abstraction/native-mobile"},{"title":"2-of-2 quorum: user and server as co-signers","href":"/recipes/wallets/two-of-two-server-in-the-loop"}]},{"group":"Account funding","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Account funding","href":"/recipes/account-funding/overview"},{"title":"Stripe embedded onramp","href":"/recipes/stripe-embedded-onramp"},{"title":"Using Privy and Due for on/off ramping","href":"/recipes/due-on-off-ramp"},{"title":"Onramping to MXNB with Juno","href":"/recipes/bitso-mxnb-onramp"}]},{"group":"Transactions \u0026 signing","expanded":false,"pages":[{"group":"EVM","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"EVM transactions and signing","href":"/recipes/evm/overview"},{"title":"Sending OUSD (or other ERC-20s)","href":"/recipes/send-ousd"},{"title":"Sending USDC (or other ERC-20s)","href":"/recipes/send-usdc"},{"title":"Sending batch transactions","href":"/recipes/batch-transactions"},{"title":"Speeding up transactions on EVM chains","href":"/recipes/speeding-up-transactions"},{"sidebarTitle":"Flashblocks","title":"Using Flashblocks with Privy","href":"/recipes/evm/flashblocks"},{"title":"Integrating with EIP-7702","href":"/recipes/react/eip-7702"},{"title":"ERC-1271 signatures","href":"/recipes/evm/erc-1271-signatures"}]},{"group":"Solana","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Solana transactions and signing","href":"/recipes/solana/overview"},{"title":"Getting started with Privy and Solana","href":"/recipes/solana/getting-started-with-privy-and-solana"},{"title":"Sending a SOL transaction","href":"/recipes/solana/send-sol"},{"title":"Sending SPL tokens","href":"/recipes/solana/send-spl-tokens"}]},{"group":"Bitcoin","expanded":false,"pages":[{"title":"Using Spark BTC with Privy wallets","href":"/recipes/spark-btc-guide"}]}]},{"group":"Gas sponsorship","expanded":false,"pages":[{"title":"Custom gas sponsorship rate limits","href":"/recipes/gas-sponsorship-rate-limits"},{"title":"Integrating OneBalance","href":"/recipes/one-balance"},{"title":"Sponsor gas on Tron with Transatron","sidebarTitle":"Sponsor gas on Tron with Transatron","href":"/recipes/tron/transatron"}]},{"group":"Treasury","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Treasury","href":"/recipes/wallets/treasury-overview"},{"sidebarTitle":"Treasury","title":"Treasury setup","href":"/recipes/wallets/wallet-infrastructure"},{"sidebarTitle":"Execution wallets","title":"Execution wallets","href":"/recipes/wallets/execution-wallets"}]},{"group":"Swaps","expanded":false,"pages":[{"title":"Swapping crypto using Privy and 0x","href":"/recipes/swap-with-0x"},{"title":"Swapping crypto using Privy and Bebop","href":"/recipes/evm/bebop-swap-guide"}]},{"group":"Payments","expanded":false,"pages":[{"title":"Pay with WalletConnect pay","href":"/recipes/walletconnect-pay"},{"title":"Bridge cards","href":"/recipes/bridge-cards"},{"title":"Send to Africa with Zuba","href":"/recipes/send-to-africa"},{"title":"Accept stablecoin payments with automatic fiat conversion","href":"/recipes/stablecoin-payments-bridge-stripe"}]},{"group":"Trading","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Trading","href":"/recipes/trading/overview"},{"title":"Polymarket builder codes","href":"/recipes/polymarket-guide"},{"title":"Trading apps resource page","href":"/recipes/trading-apps-homepage"},{"sidebarTitle":"Server-side access","title":"Enabling server-side access to user wallets","href":"/recipes/wallets/session-signer-use-cases/server-side-access"},{"title":"Bankr Twitter bot guide","href":"/recipes/agent-integrations/bankr-bot-guide"},{"title":"Building a Telegram trading bot","href":"/recipes/telegram-bot"},{"sidebarTitle":"Limit orders","title":"Using signers to execute limit orders with wallets","href":"/recipes/wallets/session-signer-use-cases/limit-orders"},{"title":"Trade on Lighter","href":"/recipes/lighter-guide"}]},{"group":"External wallets","expanded":false,"pages":[{"title":"Wallet list configuration recipes","sidebarTitle":"Wallet list recipes","href":"/recipes/react/wallet-list-configurations"},{"title":"Configuring external connectors","href":"/recipes/react/configuring-external-connectors"},{"title":"Using Solana standard wallets","description":"A comprehensive guide to integrating and using Solana standard wallets in your application","href":"/recipes/solana/standard-wallets"},{"title":"Integrating Solana mobile wallet adapter","href":"/recipes/solana/adding-solana-mwa"}]},{"group":"Tempo","pages":[{"title":"Overview","description":"Overview of integrating Tempo with Privy for stablecoin transactions and digital payments.","href":"/recipes/tempo/overview"},{"title":"Using Tempo with Privy","href":"/recipes/tempo/send-transactions"}]},{"group":"Hyperliquid","expanded":false,"pages":[{"title":"Quickstart","href":"/recipes/hyperliquid-guide"},{"title":"Agent wallets","href":"/recipes/hyperliquid/agents-and-subaccounts"},{"title":"Executing trades","href":"/recipes/hyperliquid/trading-patterns"},{"title":"Policies","href":"/recipes/hyperliquid/policies-and-offline-actions"},{"title":"HyperEVM","href":"/recipes/hyperliquid/hyperevm"},{"group":"Advanced","expanded":false,"pages":[{"title":"Client-side SDKs","href":"/recipes/hyperliquid/client-side-usage"},{"title":"Subaccounts","href":"/recipes/hyperliquid/subaccounts"},{"title":"Builder codes","href":"/recipes/hyperliquid/builder-codes"}]}]},{"group":"Earn and borrow","expanded":false,"pages":[{"title":"Overview","href":"/recipes/yield/overview"},{"title":"Reading Earn vault totals onchain","sidebarTitle":"Earn totals onchain","href":"/recipes/yield/earn-onchain-totals"},{"sidebarTitle":"Aave","title":"Integrating Aave with Privy","href":"/recipes/yield/aave-guide"},{"sidebarTitle":"Ethena","title":"Integrating Ethena with Privy","href":"/recipes/yield/ethena-guide"},{"sidebarTitle":"Sky savings","title":"Integrating Sky savings with Privy","href":"/recipes/yield/sky-savings-guide"},{"sidebarTitle":"Kamino","title":"Integrating Kamino with Privy","href":"/recipes/yield/kamino-guide"},{"sidebarTitle":"Pods","title":"Integrating Pods with Privy","href":"/recipes/yield/pods-guide"},{"sidebarTitle":"Yield.xyz AgentKit","title":"Using Privy server wallets with yield.xyz AgentKit","href":"/recipes/yield/yield-agentkit-guide"},{"sidebarTitle":"Ground","title":"Integrating Ground gtokens with Privy","href":"/recipes/yield/ground-guide"},{"title":"Borrow with Morpho","sidebarTitle":"Borrow with Morpho","href":"/recipes/yield/morpho-borrow"},{"sidebarTitle":"Dolomite USD1 markets","title":"Earn yield with markets powered by Dolomite","href":"/recipes/community/dolomite-guide"}]},{"group":"AI \u0026 agents","expanded":false,"pages":[{"title":"Overview","href":"/recipes/agent-integrations/overview"},{"sidebarTitle":"Agent CLI","title":"Agent CLI","href":"/recipes/agent-integrations/agent-cli"},{"sidebarTitle":"Agent wallet access via CLI/MCP/Skills","title":"Authorized wallet access for self-hosted agents","href":"/recipes/agent-integrations/agent-authorization"},{"sidebarTitle":"AI robo-advisor agent","title":"Build a robo-advisor with Hermes agents and Robinhood chain","href":"/recipes/agent-integrations/robo-advisor-agent"},{"title":"Machine Payments Protocol (MPP)","href":"/recipes/agent-integrations/mpp"},{"title":"x402","href":"/recipes/agent-integrations/x402"},{"title":"Sanctions screening for x402 payments","href":"/recipes/agent-integrations/x402-sanctions-screening"},{"title":"Amazon Bedrock AgentCore","href":"/recipes/agent-integrations/agentcore-payments"},{"title":"OpenClaw agentic wallets","href":"/recipes/agent-integrations/openclaw-agentic-wallets"},{"title":"Privy Agent on auto.exchange","href":"/recipes/agent-integrations/auto-exchange-privy-agent"},{"title":"Virtuals EconomyOS with Privy wallets","sidebarTitle":"Virtuals EconomyOS","href":"/recipes/agent-integrations/virtuals-economyos"}]},{"group":"Social \u0026 mini apps","expanded":false,"pages":[{"title":"Build World mini apps with Privy","href":"/recipes/world/mini-apps"},{"title":"Building a Farcaster mini app","href":"/recipes/farcaster/mini-apps"},{"title":"Writing to Farcaster","href":"/recipes/farcaster/writes"}]},{"group":"UI customization and whitelabeling","expanded":false,"pages":[{"title":"Configuring wallet confirmation modals","href":"/recipes/react/manage-wallet-UIs"},{"title":"Whitelabel","href":"/recipes/react/whitelabel"},{"title":"Setting a system theme for the Privy modal","href":"/recipes/system-theme"}]},{"group":"Dashboard","expanded":false,"pages":[{"title":"Configure account transfer","href":"/recipes/dashboard/account-transfer"},{"title":"Recovering assets from a dashboard wallet","href":"/recipes/dashboard/recovering-assets"},{"title":"Bot traffic mitigation","href":"/recipes/dashboard/preventing-bots"},{"title":"Configure allowed URLs","href":"/recipes/dashboard/allowed-domains"},{"title":"Configure allowed OAuth redirect URLs","href":"/recipes/react/allowed-oauth-redirects"},{"title":"Managing your allowlist with Airtable","href":"/recipes/dashboard/airtable"},{"title":"Customize your application","href":"/recipes/dashboard/customization"},{"title":"Single sign-on","href":"/basics/get-started/dashboard/sso"}]},{"group":"Data","expanded":false,"pages":[{"title":"Analyze Privy data with Stripe","href":"/recipes/data/stripe"}]},{"group":"Mobile","expanded":false,"pages":[{"title":"Exporting wallet keys from mobile apps","href":"/recipes/mobile-key-export"},{"title":"Mobile SDK breadcrumbs","href":"/recipes/mobile-breadcrumbs"},{"title":"Handle account transfer in your mobile app","href":"/recipes/mobile-account-transfer"},{"title":"Read auth state from a background process","href":"/recipes/swift/background-auth-state"},{"title":"Deeplinking Solana wallets in React Native applications","href":"/recipes/react-native/deeplinking-wallets"},{"title":null,"href":"/recipes/react-native/clearing-state-on-fresh-installs"},{"title":"Require MFA on every app session","href":"/recipes/react-native/mfa-on-app-session"},{"title":"OAuth with Capacitor","href":"/recipes/capacitor-oauth"}]},{"group":"Ecosystem","expanded":false,"pages":[{"title":null,"href":"/recipes/ecosystem/abstract-global-wallet"}]},{"group":"Integrations","expanded":false,"pages":[{"title":"Integrating the Base app","href":"/recipes/react/external-wallets/base-app"},{"sidebarTitle":"Base sub accounts","title":"Using Base sub accounts","href":"/recipes/react/external-wallets/base-sub-accounts"},{"title":"Integrating Base builder codes","href":"/recipes/evm/base-builder-codes"}]},{"group":"Tooling","expanded":false,"pages":[{"title":"Using the vanilla JavaScript SDK","href":"/recipes/core-js"},{"title":"Integrating Flashbots protect","href":"/recipes/flashbots-protect"},{"title":"Integrating with tRPC","href":"/recipes/trpc"},{"title":"Optimize your setup","href":"/recipes/dashboard/optimizing"}]},{"group":"Community written guides","expanded":false,"pages":[{"title":"Getting started with Privy and TON (Vite + React)","href":"/recipes/community/ton-vite-react"},{"title":"Swapping crypto using Privy and Omniston","href":"/recipes/community/ton-omniston-swap"}]}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Integrating Solana mobile wallet adapter - Privy Docs","buildId":"dpl_77Hw7ZuAABM8E3WMbYAf2ohQCr3v","deploymentId":"dpl_77Hw7ZuAABM8E3WMbYAf2ohQCr3v","dynamics":[],"chunks":[]}