Connect your Sui dapp to Phantom by requesting user permission to share their public key.
Sui support has been deprecated.
Once an application has detected the provider, it can then request to connect to Phantom. This connection request will prompt the user for permission to share their public key, indicating that they are willing to interact further. Users must approve a connection request before the app can make additional requests such as signing a message or sending a transaction.Once permission is established for the first time, the web application’s domain will be whitelisted for future connection requests. After a connection is established, it is possible for the user to terminate the connection from the Phantom settings UI.
The recommended and easiest way to connect to Phantom is by calling window.phantom.sui.requestAccount().
const provider = getProvider(); // see "Detecting the Provider"try { const resp = await provider.requestAccount(); console.log(resp.publicKey.toString());} catch (err) { // { code: 4001, message: 'User rejected the request.' }}
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Phantom developer documentation","description":"Phantom is a crypto wallet that can be used to manage digital assets and access decentralized apps on multiple blockchains.","colors":{"primary":"#AB9FF2","light":"#AB9FF2","dark":"#AB9FF2"},"logo":{"light":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-light.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=e900bab5ae2cffa45148551c3678ce46","dark":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-dark.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=eff6d20e74e8315e9c4a8deb0cf9da15"},"favicon":"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/favicon.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=c951a8095deaeea8c05a37884471cede","background":{"color":{"dark":"#202020"}},"navbar":{"links":[{"href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform","label":"Support"}],"primary":{"type":"button","label":"Download Phantom","href":"https://phantom.app/download"}},"footer":{"socials":{"website":"https://phantom.com","github":"https://github.com/phantom"}},"errors":{"404":{"redirect":false,"title":"Page Not Found","description":"The page you're looking for may have been moved, renamed, or doesn't exist. Here are some helpful resources:\n\n\u003cCardGroup cols={2}>\n \u003cCard title=\"Introduction\" icon=\"book-open\" href=\"/introduction\">\n Start here to learn about Phantom wallet integration\n \u003c/Card>\n \u003cCard title=\"Phantom Connect\" icon=\"link\" href=\"/phantom-connect\">\n Enable users to connect using Social Login or browser extension\n \u003c/Card>\n \u003cCard title=\"SDK Overview\" icon=\"code\" href=\"/wallet-sdks-overview\">\n Choose the right SDK for your application\n \u003c/Card>\n \u003cCard title=\"FAQ\" icon=\"circle-question\" href=\"/resources/faq\">\n Find answers to common questions\n \u003c/Card>\n \u003cCard title=\"Support\" icon=\"life-ring\" href=\"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform\">\n Get help from our developer support team\n \u003c/Card>\n\u003c/CardGroup>"}},"contextual":{"options":["claude","copy","view","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Announcements","icon":"telegram","href":"https://t.me/+R0vUw_QWSO9lNjlh"},{"anchor":"Support","icon":"life-ring","href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform"},{"anchor":"GitHub","icon":"github","href":"https://github.com/phantom"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"phantom-e50e2e68","hasAudioNarration":false,"actualSubdomain":"phantom-e50e2e68","customDomains":["docs.phantom.com"],"gitSource":{"type":"github","owner":"phantom","repo":"docs-v2","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED","enabled":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af1b6ce6ed814e4b8ee43ab","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Developer tools and resources","count":79},{"language":"default","tag":"Traditional Provider","count":37},{"language":"default","tag":"Phantom Connect SDKs","count":23},{"language":"default","tag":"Recipes","count":23},{"language":"default","tag":"EVM networks","count":19},{"language":"default","tag":"Mobile Deep Links","count":16},{"language":"default","tag":"Provider API Reference","count":14},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Overview","count":9},{"language":"default","tag":"Phantom Portal","count":8}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sui/establishing-a-connection","slug":"/sui/establishing-a-connection","pageMetadata":{"title":"Establish a connection","description":"Connect your Sui dapp to Phantom by requesting user permission to share their public key.","href":"/sui/establishing-a-connection"},"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: \"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsx(_components.p,{children:_jsx(_components.strong,{children:`Sui support has been deprecated.`})})}),`\n`,_jsxs(_components.p,{children:[`Once an application has detected the provider, it can then request to connect to Phantom. This connection request will prompt the user for permission to share their public key, indicating that they are willing to interact further. Users must approve a connection request before the app can make additional requests such as `,_jsx(_components.a,{href:`/sui/signing-a-message`,children:`signing a message`}),` or `,_jsx(_components.a,{href:`/sui/sending-a-transaction`,children:`sending a transaction`}),`.`]}),`\n`,_jsx(_components.p,{children:`Once permission is established for the first time, the web application’s domain will be whitelisted for future connection requests. After a connection is established, it is possible for the user to terminate the connection from the Phantom settings UI.`}),`\n`,_jsx(Heading,{level:`2`,id:`connect`,children:`Connect`}),`\n`,_jsxs(_components.p,{children:[`The recommended and easiest way to connect to Phantom is by calling `,_jsx(_components.code,{children:`window.phantom.sui.requestAccount()`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_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:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// see \"Detecting the Provider\"`})]}),`\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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` resp`}),_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:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`requestAccount`}),_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:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resp`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_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:`err`}),_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:` // { code: 4001, message: 'User rejected the request.' }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\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":"Establish a connection","description":"Connect your Sui dapp to Phantom by requesting user permission to share their public key.","href":"/sui/establishing-a-connection"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Connect","slug":"connect","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/phantom-e50e2e68/f7f937fb83d93950/analytics.js"],"subdomain":"phantom-e50e2e68","siteName":"Phantom developer documentation","title":"Establish a connection - Phantom developer documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-24T06:24:07.735Z","originalFileLocation":"sui/establishing-a-connection.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=\"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Establish a connection - Phantom developer documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.phantom.com/sui/establishing-a-connection\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://phantom-e50e2e68.mintlify.site/_mintlify/api/og/v2?division=Sui\u0026amp;title=Establish+a+connection\u0026amp;description=Connect+your+Sui+dapp+to+Phantom+by+requesting+user+permission+to+share+their+public+key.\u0026amp;theme=5265053dc1d774e2df120e48\u0026amp;signature=c89d1056305c1563b83880d7476ea88ad8ec94a6451f69eca0f6b4d31b62b8b4\">\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=\"Establish a connection - Phantom developer documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://phantom-e50e2e68.mintlify.site/_mintlify/api/og/v2?division=Sui\u0026amp;title=Establish+a+connection\u0026amp;description=Connect+your+Sui+dapp+to+Phantom+by+requesting+user+permission+to+share+their+public+key.\u0026amp;theme=5265053dc1d774e2df120e48\u0026amp;signature=c89d1056305c1563b83880d7476ea88ad8ec94a6451f69eca0f6b4d31b62b8b4\">\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/phantom-e50e2e68/AbWha2SN5Sn1jyjl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Phantom developer documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#AB9FF2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.phantom.com/sui/establishing-a-connection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sui/establishing-a-connection.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.phantom.com/#organization\",\"name\":\"Phantom developer documentation\",\"url\":\"https://docs.phantom.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/phantom-e50e2e68/tU9g5MXFXgx4l6Em/logo/phantom-light.svg?fit=max\u0026auto=format\u0026n=tU9g5MXFXgx4l6Em\u0026q=85\u0026s=e900bab5ae2cffa45148551c3678ce46\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.phantom.com#website\",\"name\":\"Phantom developer documentation\",\"url\":\"https://docs.phantom.com\",\"publisher\":{\"@id\":\"https://docs.phantom.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.phantom.com/sui/establishing-a-connection#webpage\",\"url\":\"https://docs.phantom.com/sui/establishing-a-connection\",\"name\":\"Establish a connection\",\"description\":\"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\",\"dateModified\":\"2026-09-24T06:24:07.735Z\",\"isPartOf\":{\"@id\":\"https://docs.phantom.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.phantom.com/sui/establishing-a-connection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.phantom.com/sui/establishing-a-connection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Traditional Provider\",\"item\":\"https://docs.phantom.com/solana/integrating-phantom\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sui\",\"item\":\"https://docs.phantom.com/sui/getting-started-with-sui\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Establish a connection\",\"item\":\"https://docs.phantom.com/sui/establishing-a-connection\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.phantom.com/sui/establishing-a-connection#article\",\"headline\":\"Establish a connection\",\"name\":\"Establish a connection\",\"description\":\"Connect your Sui dapp to Phantom by requesting user permission to share their public key.\",\"url\":\"https://docs.phantom.com/sui/establishing-a-connection\",\"mainEntityOfPage\":{\"@id\":\"https://docs.phantom.com/sui/establishing-a-connection#webpage\"},\"dateModified\":\"2026-09-24T06:24:07.735Z\",\"publisher\":{\"@id\":\"https://docs.phantom.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.phantom.com#website\"}}]}\u003c/script>","agentPointerHref":"/sui/establishing-a-connection.md","siteName":"Phantom developer documentation","nav":{"global":{"anchors":[{"anchor":"Announcements","icon":"telegram","href":"https://t.me/+R0vUw_QWSO9lNjlh"},{"anchor":"Support","icon":"life-ring","href":"https://docs.google.com/forms/d/e/1FAIpQLSeHWETFkEJbHQCF-lnl1AHmVQPuyfC0HbnxjDjIp6VYV1sBZQ/viewform"},{"anchor":"GitHub","icon":"github","href":"https://github.com/phantom"}]},"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/introduction"}]},{"tab":"Phantom MCP server","pages":[{"title":"Phantom MCP server","href":"/phantom-mcp-server"}]},{"tab":"Phantom CLI","pages":[{"title":"Phantom CLI","href":"/phantom-cli"}]},{"tab":"Phantom Connect SDKs","pages":[{"title":"Phantom Connect SDKs","href":"/wallet-sdks-overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes"}]},{"tab":"Developer tools and resources","groups":[{"group":"Overview","pages":[{"title":"Developer tools and resources","href":"/developer-powertools/overview"}]},{"group":"Developer tools","icon":"wrench","pages":[{"title":"AI-assisted development","href":"/developer-powertools/ai-tools"},{"title":"Phantom Cursor plugin","href":"/resources/cursor-plugin"},{"title":"Cursor AI prompts","href":"/resources/cursor-prompts"},{"title":"Phantom Connect SDK MCP server","href":"/resources/mcp-server"}]},{"group":"Security and validation","icon":"shield","pages":[{"title":"Domain and transaction warnings","href":"/developer-powertools/domain-and-transaction-warnings"},{"title":"Transaction Validation","href":"/developer-powertools/lighthouse"},{"title":"Token pages","href":"/developer-powertools/token-pages"},{"title":"Sign-In-With (SIW) standards","href":"/developer-powertools/signing-a-message"},{"title":"Shortcuts","href":"/developer-powertools/shortcuts"}]},{"group":"Solana features","icon":"bolt","pages":[{"title":"Solana priority fees","href":"/developer-powertools/solana-priority-fees"},{"title":"Solana Versioned Transactions","href":"/developer-powertools/solana-versioned-transactions"},{"title":"Wallet Standard","href":"/developer-powertools/wallet-standard"},{"title":"Solana Token Extensions (Token22)","href":"/developer-powertools/solana-token-extensions-token22"}]},{"group":"Testing and debugging","icon":"bug","pages":[{"title":"Testnet mode","href":"/developer-powertools/testnet-mode"},{"title":"Mobile web debugging","href":"/developer-powertools/mobile-web-debugging"}]},{"group":"Best practices","icon":"star","pages":[{"title":"Go-live checklist","href":"/best-practices/launching-a-dapp"},{"title":"Display apps within dialogs","href":"/best-practices/displaying-your-app"},{"group":"Token display and verification","pages":[{"title":"Display tokens on Solana","href":"/best-practices/tokens/token-display"},{"title":"Fungibles","href":"/best-practices/tokens/home-tab-fungibles"},{"title":"NFTs and semi-fungibles","href":"/best-practices/tokens/collectibles-nfts-and-semi-fungibles"},{"title":"Supported media types","href":"/best-practices/tokens/supported-media-types"},{"title":"Make your token appear as verified","href":"/best-practices/tokens/token-verification"}]}]},{"group":"Resources","icon":"book-open","pages":[{"title":"FAQ","href":"/resources/faq"},{"title":"Demo apps","href":"/resources/sandbox"},{"title":"Logos and assets","href":"/resources/assets"}]},{"group":"Traditional Provider","icon":"puzzle-piece","pages":[{"group":"Solana","pages":[{"title":"Get started with Solana","href":"/solana/integrating-phantom"},{"title":"Detect the provider","href":"/solana/detecting-the-provider"},{"title":"Establish a connection","href":"/solana/establishing-a-connection"},{"title":"Sign a message","href":"/solana/signing-a-message"},{"title":"Send a legacy transaction","href":"/solana/sending-a-transaction"},{"title":"Send a versioned transaction","href":"/solana/sending-a-transaction-1"},{"title":"Error messages and codes","href":"/solana/errors"}]},{"group":"EVM networks","pages":[{"title":"Get started with EVM networks","href":"/ethereum-monad-testnet-base-and-polygon/getting-started"},{"title":"Detect the provider","href":"/ethereum-monad-testnet-base-and-polygon/detecting-the-provider"},{"title":"Establish a connection","href":"/ethereum-monad-testnet-base-and-polygon/establishing-a-connection"},{"title":"Sign a message","href":"/ethereum-monad-testnet-base-and-polygon/signing-a-message"},{"title":"Send a transaction","href":"/ethereum-monad-testnet-base-and-polygon/sending-a-transaction"},{"group":"Provider API Reference","pages":[{"title":"Provider API reference","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/README"},{"group":"Methods","pages":[{"title":"Methods","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/methods/README"},{"title":"request","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/methods/request"},{"title":"isConnected","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/methods/isconnected"}]},{"group":"Events","pages":[{"title":"Events","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/events/README"},{"title":"Connect","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/events/connect"},{"title":"Disconnect","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/events/disconnect"},{"title":"Accounts changed","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/events/accounts-changed"},{"title":"Chain changed","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/events/chain-changed"}]},{"group":"Properties","pages":[{"title":"Properties","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/properties/README"},{"title":"isPhantom","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/properties/isphantom"},{"title":"chainId","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/properties/chainid"},{"title":"selectedAddress","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/properties/selectedaddress"},{"title":"networkVersion","href":"/ethereum-monad-testnet-base-and-polygon/provider-api-reference/properties/networkversion"}]}]}]},{"group":"Bitcoin","tag":"Deprecated","pages":[{"title":"Get started with Bitcoin","href":"/bitcoin/integrating-phantom"},{"title":"Detect the provider","href":"/bitcoin/detecting-the-provider"},{"title":"Establish a connection","href":"/bitcoin/establishing-a-connection"},{"title":"Sign a message","href":"/bitcoin/signing-a-message"},{"title":"Send a transaction","href":"/bitcoin/sending-a-transaction"},{"title":"Provider API reference","href":"/bitcoin/provider-api-reference"}]},{"group":"Sui","tag":"Deprecated","pages":[{"title":"Get started with Sui","href":"/sui/getting-started-with-sui"},{"title":"Detect the provider","description":"Check for the Phantom provider object to detect if the wallet extension is installed for Sui dapps.","href":"/sui/detecting-the-provider"},{"title":"Establish a connection","href":"/sui/establishing-a-connection"},{"title":"Sign a message","description":"Request Sui message signatures from users through Phantom to verify address ownership without fees.","href":"/sui/signing-a-message"},{"title":"Send a transaction","href":"/sui/sending-a-transaction"}]}]},{"group":"Mobile Deep Links","icon":"mobile","pages":[{"title":"Phantom deep links","href":"/phantom-deeplinks/deeplinks-ios-and-android"},{"title":"Handle sessions","href":"/phantom-deeplinks/handling-sessions"},{"title":"Specifying redirects","href":"/phantom-deeplinks/specifying-redirects"},{"title":"Encryption","href":"/phantom-deeplinks/encryption"},{"title":"Limitations","href":"/phantom-deeplinks/limitations"},{"group":"Provider Methods","pages":[{"title":"Provider methods","href":"/phantom-deeplinks/provider-methods/README"},{"title":"Connect","href":"/phantom-deeplinks/provider-methods/connect"},{"title":"Disconnect","href":"/phantom-deeplinks/provider-methods/disconnect"},{"title":"SignAndSendTransaction (deprecated)","href":"/phantom-deeplinks/provider-methods/signandsendtransaction"},{"title":"SignTransaction","href":"/phantom-deeplinks/provider-methods/signtransaction"},{"title":"SignAllTransactions","href":"/phantom-deeplinks/provider-methods/signalltransactions"},{"title":"SignMessage","href":"/phantom-deeplinks/provider-methods/signmessage"}]},{"group":"Other Methods","pages":[{"title":"Other methods","href":"/phantom-deeplinks/other-methods/README"},{"title":"Browse","href":"/phantom-deeplinks/other-methods/browse"},{"title":"Fungible","href":"/phantom-deeplinks/other-methods/fungible"},{"title":"Swap","href":"/phantom-deeplinks/other-methods/swap"}]}]}]}]},"basePath":"","title":"Establish a connection - Phantom developer documentation","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":[],"chunks":[]}