The base url we will use to construct the final login magic link and send to the user via email if this is a login (existing user). If the redirect_url is https://moonkey.fun/authenticate, final url user sees in email will be https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN. We will redirect to your app in this url and your app should handle and parse the token parameter and allow the user log in.
The base url we will use to construct the final login magic link and send to the user via email if this is a registration (new user). If the redirect_url is https://moonkey.fun/authenticate, final url user sees in email will be https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN. We will redirect to your app in this url and your app should handle and parse the token parameter and register the user.
Expiration time of the magic link in minutes for login (when an existing user is found) Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.
Expiration time of the magic link in minutes for registration (when a new user is created). Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.
Determines if the user should receive a magic token that will redirect to a MoonKey hosted verify token page instead of the redirect url specified by the App owner. If set to true, the user will receive an encrypted token and MoonKey will handle the token verification on behalf of the App in our hosted page.However, if set to false (by default), user will be redirected to the redirect url and the App must handle the token in magic link in their backend using the MoonKey secret api key.
Determines what kind of wallet login to perform, if we cannot find any wallets for a new or existing user, we will provision a wallet of the specified type for this user.
The main text in the SDI UI component which sits below the header text and above the email login input. The default text is: “Please enter your email address”
The session JWT token linked to this user’s account. Use this session token to authenticate and verify someone. You can either use the JWT or the session token but its a matter of preference. They will differ by the Authorization header syntax.
The session token linked to this user’s account. Use this session token to authenticate and verify someone. You can either the session token or the JWT but its a matter of preference. They will differ by the Authorization header syntax.
Any error that might occur from the SDK or API. This is helpful for doing debug during development and production.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"moonkey docs","colors":{"primary":"#7D00FF","light":"#8d60f0","dark":"#5C35B1"},"logo":{"light":"https://mintcdn.com/streambird-23/7SoXp5lRb42-tDXG/logo/moonkey-logo-light.svg?fit=max\u0026auto=format\u0026n=7SoXp5lRb42-tDXG\u0026q=85\u0026s=d79111a5ab7380e32858a62bc531ecfc","dark":"https://mintcdn.com/streambird-23/KaaakNPa1CnYmCK_/logo/moonkey-logo-dark.svg?fit=max\u0026auto=format\u0026n=KaaakNPa1CnYmCK_\u0026q=85\u0026s=c70dbe7c8b31c1b909d323ec37859637"},"favicon":"/favicon.png","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.moonkey.fun"}},"navbar":{"links":[]},"footer":{"socials":{"github":"https://github.com/moonkey","website":"https://moonkey.fun"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"streambird-23","hasAudioNarration":false,"actualSubdomain":"streambird-23","customDomains":["docs.streambird.io"],"gitSource":{"type":"github","owner":"tim-moonpay","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21a5c87676216effceffac","collectionId":"7c239a6a-5f04-43f3-aec7-14c261c32b26","schemaVersion":"v2"},"entitlements":{},"buildId":"6ae9157d2bff7601755cebb5:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API Reference","count":62},{"language":"default","tag":"Wallet as a Service","count":26},{"language":"default","tag":"Get Started","count":18},{"language":"default","tag":"Authentication","count":13},{"language":"default","tag":"Using Streambird authentication","count":12},{"language":"default","tag":"Using wallets","count":11},{"language":"default","tag":"Users","count":10},{"language":"default","tag":"Recipes","count":10},{"language":"default","tag":"Managed Wallets","count":9},{"language":"default","tag":"Sessions","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"sdks/javascript/react-sdk-reference","slug":"/sdks/javascript/react-sdk-reference","pageMetadata":{"title":"React SDK Reference","description":null,"href":"/sdks/javascript/react-sdk-reference"},"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={code:`code`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`props-parameters`,children:`props parameters`}),`\n`,_jsx(ParamField,{body:`publicToken`,type:`string`,required:true,id:`param-public-token`,children:_jsx(_components.p,{children:`Publishable API Key that identifies your App.`})}),`\n`,_jsx(ResponseField,{name:`config`,type:`MoonKeyClientProps Object`,id:`param-config`,children:_jsxs(Expandable,{title:`attributes`,defaultOpen:`true`,children:[_jsxs(ResponseField,{name:`emailMagicLink`,type:`EmailMagicLinkOptions Object`,id:`param-email-magic-link`,children:[_jsx(_components.p,{children:`This is the config for emailMagicLink and required if emailMagicLink is enabled in enabledProducts`}),_jsxs(Expandable,{title:`childen attributes`,children:[_jsx(ResponseField,{name:`loginRedirectUrl`,type:`string`,id:`param-login-redirect-url`,children:_jsxs(_components.p,{children:[`The base url we will use to construct the final login magic link and send to the user via email if this is a login (existing user). If the redirect_url is `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate`}),`, final url user sees in email will be `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN`}),`. We will redirect to your app in this url and your app should handle and parse the token parameter and allow the user log in.`]})}),_jsx(ResponseField,{name:`registrationRedirectUrl`,type:`string`,id:`param-registration-redirect-url`,children:_jsxs(_components.p,{children:[`The base url we will use to construct the final login magic link and send to the user via email if this is a registration (new user). If the redirect_url is `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate`}),`, final url user sees in email will be `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN`}),`. We will redirect to your app in this url and your app should handle and parse the token parameter and register the user.`]})}),_jsx(ResponseField,{name:`loginExpiresIn`,type:`integer`,id:`param-login-expires-in`,children:_jsx(_components.p,{children:`Expiration time of the magic link in minutes for login (when an existing user is found) Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.`})}),_jsx(ResponseField,{name:`registrationExpireIn`,type:`integer`,id:`param-registration-expire-in`,children:_jsx(_components.p,{children:`Expiration time of the magic link in minutes for registration (when a new user is created). Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.`})}),_jsx(ResponseField,{name:`requiresVerification`,type:`boolean`,id:`param-requires-verification`,children:_jsx(_components.p,{children:`Determines if verification for the authentication method (email, phone_number) is required before marking the user as active.`})}),_jsxs(ResponseField,{name:`autoVerify`,type:`boolean`,id:`param-auto-verify`,children:[_jsx(_components.p,{children:`Determines if the user should receive a magic token that will redirect to a MoonKey hosted verify token page instead of the redirect url specified by the App owner. If set to true, the user will receive an encrypted token and MoonKey will handle the token verification on behalf of the App in our hosted page.`}),_jsx(_components.p,{children:`However, if set to false (by default), user will be redirected to the redirect url and the App must handle the token in magic link in their backend using the MoonKey secret api key.`})]})]})]}),_jsxs(ResponseField,{name:`wallet`,type:`Web3NetworkConfig Object`,id:`param-wallet`,children:[_jsx(_components.p,{children:`Determines what kind of wallet login to perform, if we cannot find any wallets for a new or existing user, we will provision a wallet of the specified type for this user.`}),_jsxs(Expandable,{title:`children attributes`,children:[_jsx(ResponseField,{name:`walletType`,type:`string`,id:`param-wallet-type`,children:_jsxs(_components.p,{children:[`Determines what type of wallet to login to or provision on the fly if no wallet is found. Possible values: `,_jsx(_components.code,{children:`ETH`}),`, `,_jsx(_components.code,{children:`SOL`}),`.`]})}),_jsx(ResponseField,{name:`network`,type:`string`,id:`param-network`,children:_jsxs(_components.p,{children:[`Determines the RPC network to use (eg. `,_jsx(_components.code,{children:`mainnet`}),`, `,_jsx(_components.code,{children:`testnet`}),`, `,_jsx(_components.code,{children:`goerli`}),`, etc)`]})})]})]}),_jsxs(ResponseField,{name:`componentStyle`,type:`ComponentStyleBase`,id:`param-component-style`,children:[_jsx(_components.p,{children:`Custom styling for the login UI component`}),_jsxs(Expandable,{title:`children attributes`,children:[_jsx(ResponseField,{name:`width`,type:`integer`,default:`500`,id:`param-width`,children:_jsx(_components.p,{children:`The width of the SDK UI component`})}),_jsx(ResponseField,{name:`showHeaderText`,type:`boolean`,default:`true`,id:`param-show-header-text`,children:_jsx(_components.p,{children:`Determines whether or not to show the header text.`})}),_jsx(ResponseField,{name:`headerText`,type:`string`,id:`param-header-text`,children:_jsxs(_components.p,{children:[`The header text of the SDK UI component and the default text is `,_jsx(_components.code,{children:`Sign in or register`})]})}),_jsx(ResponseField,{name:`headerTextColor`,type:`string`,default:`#000000`,id:`param-header-text-color`,children:_jsxs(_components.p,{children:[`The color of the header text and the format is hex e.g. `,_jsx(_components.code,{children:`#00FFCC`})]})}),_jsx(ResponseField,{name:`bodyText`,type:`string`,id:`param-body-text`,children:_jsx(_components.p,{children:`The main text in the SDI UI component which sits below the header text and above the email login input. The default text is: “Please enter your email address”`})}),_jsx(ResponseField,{name:`bodyTextColor`,type:`string`,default:`#333333`,id:`param-body-text-color`,children:_jsxs(_components.p,{children:[`The color of the header text and the format is hex e.g. `,_jsx(_components.code,{children:`#000000`})]})}),_jsx(ResponseField,{name:`buttonTextColor`,type:`string`,default:`#FFFFFF`,id:`param-button-text-color`,children:_jsxs(_components.p,{children:[`The text color of the login button and the format is hex e.g. `,_jsx(_components.code,{children:`#33CC00`})]})}),_jsx(ResponseField,{name:`buttonColor`,type:`string`,default:`#00C475`,id:`param-button-color`,children:_jsxs(_components.p,{children:[`The background color of the login button and the format is hex e.g. `,_jsx(_components.code,{children:`#3C4D20`})]})}),_jsx(ResponseField,{name:`errMsgColor`,type:`string`,id:`param-err-msg-color`,children:_jsxs(_components.p,{children:[`The text color of the error messages and the format is hex e.g. `,_jsx(_components.code,{children:`#FF0033`})]})}),_jsx(ResponseField,{name:`showContainerBorder`,type:`boolean`,default:`true`,id:`param-show-container-border`,children:_jsx(_components.p,{children:`Whether or not to show the shadow border around the SDK UI component.`})}),_jsx(ResponseField,{name:`containerXAlignment`,type:`string`,default:`center`,id:`param-container-x-alignment`,children:_jsxs(_components.p,{children:[`Determine the position of the SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})}),_jsx(ResponseField,{name:`containerYAlignment`,type:`string`,default:`center`,id:`param-container-y-alignment`,children:_jsxs(_components.p,{children:[`Determine the position of the SDK UI component vertically. The values include `,_jsx(_components.code,{children:`top`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`bottom`})]})}),_jsx(ResponseField,{name:`bodyTextPosition`,type:`string`,default:`center`,id:`param-body-text-position`,children:_jsxs(_components.p,{children:[`Determine the position of the body text inside SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})}),_jsx(ResponseField,{name:`headerTextPosition`,type:`string`,default:`center`,id:`param-header-text-position`,children:_jsxs(_components.p,{children:[`Determine the position of the header text inside SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})})]})]})]})}),`\n`,_jsxs(ResponseField,{name:`callbacks`,type:`Object`,id:`param-callbacks`,children:[_jsx(_components.p,{children:`Custom event handler functions for different events triggered within the SDK.`}),_jsxs(Expandable,{title:`childen attributes`,defaultOpen:`true`,children:[_jsxs(ResponseField,{name:`onSuccess`,type:`function(data) => void`,id:`param-on-success`,children:[_jsx(_components.p,{children:`When there is a success event such as when magic link has been sent.`}),_jsx(Expandable,{title:`responses`,children:_jsxs(ResponseField,{name:`eventType`,type:`string`,id:`param-event-type`,children:[_jsxs(_components.p,{children:[`The type of event that has been triggered. For `,_jsx(_components.code,{children:`onSuccess(data)`}),` callback function, it will be `,_jsx(_components.code,{children:`EVENT_SUCCESS`}),`.`]}),_jsxs(Expandable,{title:`childen attributes`,children:[_jsx(ResponseField,{name:`publicAddress`,type:`string`,id:`param-public-address`,children:_jsx(_components.p,{children:`The public address of the wallet`})}),_jsx(ResponseField,{name:`sessionJwt`,type:`string`,id:`param-session-jwt`,children:_jsx(_components.p,{children:`The session JWT token linked to this user’s account. Use this session token to authenticate and verify someone. You can either use the JWT or the session token but its a matter of preference. They will differ by the Authorization header syntax.`})}),_jsx(ResponseField,{name:`sessionToken`,type:`string`,id:`param-session-token`,children:_jsx(_components.p,{children:`The session token linked to this user’s account. Use this session token to authenticate and verify someone. You can either the session token or the JWT but its a matter of preference. They will differ by the Authorization header syntax.`})}),_jsx(ResponseField,{name:`walletType`,type:`string`,id:`param-wallet-type-1`,children:_jsxs(_components.p,{children:[`The type of wallet that this account is linked to e.g. `,_jsx(_components.code,{children:`SOL`}),`, `,_jsx(_components.code,{children:`ETH`})]})})]})]})})]}),_jsx(ResponseField,{name:`onError`,type:`function(data) => void`,id:`param-on-error`,children:_jsx(_components.p,{children:`Any error that might occur from the SDK or API. This is helpful for doing debug during development and production.`})})]})]})]})}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":"React SDK Reference","description":null,"href":"/sdks/javascript/react-sdk-reference"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`React Example`,numberOfLines:`56`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`56`,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:`MoonKey`}),_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:` \"@streambird/streambird-react\"`}),_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:`ErrorData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SuccessData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`WalletType`}),_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:` '@streambird/streambird-js'`}),_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:` App`}),_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:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` streambirdConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` emailMagicLink:`}),_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:` loginRedirectUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'LOGIN_REDIRECT_URL_FROM_PORTAL_GOES_HERE'`}),_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:` registrationRedirectUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'REGISTRATION_REDIRECT_URL_FROM_PORTAL_GOES_HERE'`}),_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:` loginExpiresIn:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_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:` registrationExpireIn:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_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:` requiresVerification:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_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:` autoVerify:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`})]}),`\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:` componentStyle:`}),_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:` width:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_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:` showHeaderText:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_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:` headerText:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Sign in or register'`}),_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:` headerTextColor:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bodyText:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Please enter your email address'`}),_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:` bodyTextColor:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '#333333'`}),_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:` buttonTextColor:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '#FFFFFF'`}),_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:` buttonColor:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` errMsgColor:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` showContainerBorder:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_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:` containerXAlignment:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'center'`}),_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:` containerYAlignment:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'center'`}),_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:` bodyTextPosition:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'center'`}),_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:` headerTextPosition:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'center'`})]}),`\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:` wallet:`}),_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:` walletType:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ETH'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` network:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://goerli.infura.io/v3/INFURA_API_KEY'`})]}),`\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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handleCallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SuccessData`}),_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:`#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:`data`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ErrorData`}),_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:`#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:`data`}),_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\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"login\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`MoonKey`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` publicToken`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY_HERE\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_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:`streambirdConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` callbacks`}),_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:`handleCallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},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:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` App`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`OnSuccess Example`,numberOfLines:`12`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_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:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` eventType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`'EVENT_SUCCESS'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` eventData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` publicAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"xvPgUXBKTPUBrBdZWHajG17nWM59Zmx7s5NhXXXXXXX\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` sessionJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJhbGciOiJ...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` sessionToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TqXsQbXoTxKvjRAqVyLjrz8cRdQRM4enTUh9ixkoeClcgldtzs4LUxEB1XXXXXXX\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` walletType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SOL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` public_address`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"xvPgUXBKTPUBrBdZWHajG17nWM59Zmx7s5NhXXXXXXX\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// legacy field`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` session_token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TqXsQbXoTxKvjRAqVyLjrz8cRdQRM4enTUh9ixkoeClcgldtzs4LUxEB1XXXXXXX\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// legacy field`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` wallet_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SOL\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // legacy field`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`props-parameters`,children:`props parameters`}),`\n`,_jsx(ParamField,{body:`publicToken`,type:`string`,required:true,id:`param-public-token`,children:_jsx(_components.p,{children:`Publishable API Key that identifies your App.`})}),`\n`,_jsx(ResponseField,{name:`config`,type:`MoonKeyClientProps Object`,id:`param-config`,children:_jsxs(Expandable,{title:`attributes`,defaultOpen:`true`,children:[_jsxs(ResponseField,{name:`emailMagicLink`,type:`EmailMagicLinkOptions Object`,id:`param-email-magic-link`,children:[_jsx(_components.p,{children:`This is the config for emailMagicLink and required if emailMagicLink is enabled in enabledProducts`}),_jsxs(Expandable,{title:`childen attributes`,children:[_jsx(ResponseField,{name:`loginRedirectUrl`,type:`string`,id:`param-login-redirect-url`,children:_jsxs(_components.p,{children:[`The base url we will use to construct the final login magic link and send to the user via email if this is a login (existing user). If the redirect_url is `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate`}),`, final url user sees in email will be `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN`}),`. We will redirect to your app in this url and your app should handle and parse the token parameter and allow the user log in.`]})}),_jsx(ResponseField,{name:`registrationRedirectUrl`,type:`string`,id:`param-registration-redirect-url`,children:_jsxs(_components.p,{children:[`The base url we will use to construct the final login magic link and send to the user via email if this is a registration (new user). If the redirect_url is `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate`}),`, final url user sees in email will be `,_jsx(_components.code,{children:`https://moonkey.fun/authenticate?token=AUTOGENERATED_MAGIC_TOKEN`}),`. We will redirect to your app in this url and your app should handle and parse the token parameter and register the user.`]})}),_jsx(ResponseField,{name:`loginExpiresIn`,type:`integer`,id:`param-login-expires-in`,children:_jsx(_components.p,{children:`Expiration time of the magic link in minutes for login (when an existing user is found) Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.`})}),_jsx(ResponseField,{name:`registrationExpireIn`,type:`integer`,id:`param-registration-expire-in`,children:_jsx(_components.p,{children:`Expiration time of the magic link in minutes for registration (when a new user is created). Must be between 5 to 10080 minutes (7 days), defaults to 60 minutes.`})}),_jsx(ResponseField,{name:`requiresVerification`,type:`boolean`,id:`param-requires-verification`,children:_jsx(_components.p,{children:`Determines if verification for the authentication method (email, phone_number) is required before marking the user as active.`})}),_jsxs(ResponseField,{name:`autoVerify`,type:`boolean`,id:`param-auto-verify`,children:[_jsx(_components.p,{children:`Determines if the user should receive a magic token that will redirect to a MoonKey hosted verify token page instead of the redirect url specified by the App owner. If set to true, the user will receive an encrypted token and MoonKey will handle the token verification on behalf of the App in our hosted page.`}),_jsx(_components.p,{children:`However, if set to false (by default), user will be redirected to the redirect url and the App must handle the token in magic link in their backend using the MoonKey secret api key.`})]})]})]}),_jsxs(ResponseField,{name:`wallet`,type:`Web3NetworkConfig Object`,id:`param-wallet`,children:[_jsx(_components.p,{children:`Determines what kind of wallet login to perform, if we cannot find any wallets for a new or existing user, we will provision a wallet of the specified type for this user.`}),_jsxs(Expandable,{title:`children attributes`,children:[_jsx(ResponseField,{name:`walletType`,type:`string`,id:`param-wallet-type`,children:_jsxs(_components.p,{children:[`Determines what type of wallet to login to or provision on the fly if no wallet is found. Possible values: `,_jsx(_components.code,{children:`ETH`}),`, `,_jsx(_components.code,{children:`SOL`}),`.`]})}),_jsx(ResponseField,{name:`network`,type:`string`,id:`param-network`,children:_jsxs(_components.p,{children:[`Determines the RPC network to use (eg. `,_jsx(_components.code,{children:`mainnet`}),`, `,_jsx(_components.code,{children:`testnet`}),`, `,_jsx(_components.code,{children:`goerli`}),`, etc)`]})})]})]}),_jsxs(ResponseField,{name:`componentStyle`,type:`ComponentStyleBase`,id:`param-component-style`,children:[_jsx(_components.p,{children:`Custom styling for the login UI component`}),_jsxs(Expandable,{title:`children attributes`,children:[_jsx(ResponseField,{name:`width`,type:`integer`,default:`500`,id:`param-width`,children:_jsx(_components.p,{children:`The width of the SDK UI component`})}),_jsx(ResponseField,{name:`showHeaderText`,type:`boolean`,default:`true`,id:`param-show-header-text`,children:_jsx(_components.p,{children:`Determines whether or not to show the header text.`})}),_jsx(ResponseField,{name:`headerText`,type:`string`,id:`param-header-text`,children:_jsxs(_components.p,{children:[`The header text of the SDK UI component and the default text is `,_jsx(_components.code,{children:`Sign in or register`})]})}),_jsx(ResponseField,{name:`headerTextColor`,type:`string`,default:`#000000`,id:`param-header-text-color`,children:_jsxs(_components.p,{children:[`The color of the header text and the format is hex e.g. `,_jsx(_components.code,{children:`#00FFCC`})]})}),_jsx(ResponseField,{name:`bodyText`,type:`string`,id:`param-body-text`,children:_jsx(_components.p,{children:`The main text in the SDI UI component which sits below the header text and above the email login input. The default text is: “Please enter your email address”`})}),_jsx(ResponseField,{name:`bodyTextColor`,type:`string`,default:`#333333`,id:`param-body-text-color`,children:_jsxs(_components.p,{children:[`The color of the header text and the format is hex e.g. `,_jsx(_components.code,{children:`#000000`})]})}),_jsx(ResponseField,{name:`buttonTextColor`,type:`string`,default:`#FFFFFF`,id:`param-button-text-color`,children:_jsxs(_components.p,{children:[`The text color of the login button and the format is hex e.g. `,_jsx(_components.code,{children:`#33CC00`})]})}),_jsx(ResponseField,{name:`buttonColor`,type:`string`,default:`#00C475`,id:`param-button-color`,children:_jsxs(_components.p,{children:[`The background color of the login button and the format is hex e.g. `,_jsx(_components.code,{children:`#3C4D20`})]})}),_jsx(ResponseField,{name:`errMsgColor`,type:`string`,id:`param-err-msg-color`,children:_jsxs(_components.p,{children:[`The text color of the error messages and the format is hex e.g. `,_jsx(_components.code,{children:`#FF0033`})]})}),_jsx(ResponseField,{name:`showContainerBorder`,type:`boolean`,default:`true`,id:`param-show-container-border`,children:_jsx(_components.p,{children:`Whether or not to show the shadow border around the SDK UI component.`})}),_jsx(ResponseField,{name:`containerXAlignment`,type:`string`,default:`center`,id:`param-container-x-alignment`,children:_jsxs(_components.p,{children:[`Determine the position of the SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})}),_jsx(ResponseField,{name:`containerYAlignment`,type:`string`,default:`center`,id:`param-container-y-alignment`,children:_jsxs(_components.p,{children:[`Determine the position of the SDK UI component vertically. The values include `,_jsx(_components.code,{children:`top`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`bottom`})]})}),_jsx(ResponseField,{name:`bodyTextPosition`,type:`string`,default:`center`,id:`param-body-text-position`,children:_jsxs(_components.p,{children:[`Determine the position of the body text inside SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})}),_jsx(ResponseField,{name:`headerTextPosition`,type:`string`,default:`center`,id:`param-header-text-position`,children:_jsxs(_components.p,{children:[`Determine the position of the header text inside SDK UI component horizontally. The values include `,_jsx(_components.code,{children:`left`}),`, `,_jsx(_components.code,{children:`center`}),`, `,_jsx(_components.code,{children:`right`})]})})]})]})]})}),`\n`,_jsxs(ResponseField,{name:`callbacks`,type:`Object`,id:`param-callbacks`,children:[_jsx(_components.p,{children:`Custom event handler functions for different events triggered within the SDK.`}),_jsxs(Expandable,{title:`childen attributes`,defaultOpen:`true`,children:[_jsxs(ResponseField,{name:`onSuccess`,type:`function(data) => void`,id:`param-on-success`,children:[_jsx(_components.p,{children:`When there is a success event such as when magic link has been sent.`}),_jsx(Expandable,{title:`responses`,children:_jsxs(ResponseField,{name:`eventType`,type:`string`,id:`param-event-type`,children:[_jsxs(_components.p,{children:[`The type of event that has been triggered. For `,_jsx(_components.code,{children:`onSuccess(data)`}),` callback function, it will be `,_jsx(_components.code,{children:`EVENT_SUCCESS`}),`.`]}),_jsxs(Expandable,{title:`childen attributes`,children:[_jsx(ResponseField,{name:`publicAddress`,type:`string`,id:`param-public-address`,children:_jsx(_components.p,{children:`The public address of the wallet`})}),_jsx(ResponseField,{name:`sessionJwt`,type:`string`,id:`param-session-jwt`,children:_jsx(_components.p,{children:`The session JWT token linked to this user’s account. Use this session token to authenticate and verify someone. You can either use the JWT or the session token but its a matter of preference. They will differ by the Authorization header syntax.`})}),_jsx(ResponseField,{name:`sessionToken`,type:`string`,id:`param-session-token`,children:_jsx(_components.p,{children:`The session token linked to this user’s account. Use this session token to authenticate and verify someone. You can either the session token or the JWT but its a matter of preference. They will differ by the Authorization header syntax.`})}),_jsx(ResponseField,{name:`walletType`,type:`string`,id:`param-wallet-type-1`,children:_jsxs(_components.p,{children:[`The type of wallet that this account is linked to e.g. `,_jsx(_components.code,{children:`SOL`}),`, `,_jsx(_components.code,{children:`ETH`})]})})]})]})})]}),_jsx(ResponseField,{name:`onError`,type:`function(data) => void`,id:`param-on-error`,children:_jsx(_components.p,{children:`Any error that might occur from the SDK or API. This is helpful for doing debug during development and production.`})})]})]})]})}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":"React SDK Reference","description":null,"href":"/sdks/javascript/react-sdk-reference"}}}},"mdxExtracts":{"tableOfContents":[{"title":"props parameters","slug":"props-parameters","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"React Example","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"56\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">MoonKey\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"@streambird/streambird-react\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ErrorData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">SuccessData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">WalletType\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '@streambird/streambird-js'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> App\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> () \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">=>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> streambirdConfig\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> emailMagicLink:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> loginRedirectUrl:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'LOGIN_REDIRECT_URL_FROM_PORTAL_GOES_HERE'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> registrationRedirectUrl:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'REGISTRATION_REDIRECT_URL_FROM_PORTAL_GOES_HERE'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> loginExpiresIn:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> registrationExpireIn:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> requiresVerification:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> autoVerify:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> componentStyle:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> width:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 500\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> showHeaderText:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headerText:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Sign in or register'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headerTextColor:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ''\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> bodyText:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Please enter your email address'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> bodyTextColor:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '#333333'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> buttonTextColor:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '#FFFFFF'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> buttonColor:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ''\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> errMsgColor:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ''\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> showContainerBorder:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> containerXAlignment:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'center'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> containerYAlignment:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'center'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> bodyTextPosition:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'center'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headerTextPosition:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'center'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> wallet:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> walletType:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'ETH'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> network:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://goerli.infura.io/v3/INFURA_API_KEY'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> handleCallbacks\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> onSuccess\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\"> SuccessData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">=>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> onError\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\"> ErrorData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">=>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> return\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\"> \u0026#x3C;\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#569CD6\">div\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#9CDCFE\"> id\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"login\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\">>\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\"> \u0026#x3C;\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#4EC9B0\">MoonKey\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#9CDCFE\"> publicToken\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"YOUR_API_KEY_HERE\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#9CDCFE\"> config\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">streambirdConfig\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#9CDCFE\"> callbacks\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">handleCallbacks\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\"> />\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\"> \u0026#x3C;/\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#569CD6\">div\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#808080\">>\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> );\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">};\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">export\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> default\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> App\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"OnSuccess Example","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> eventType\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\">'EVENT_SUCCESS'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> eventData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> publicAddress\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"xvPgUXBKTPUBrBdZWHajG17nWM59Zmx7s5NhXXXXXXX\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> sessionJwt\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"eyJhbGciOiJ...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> sessionToken\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"TqXsQbXoTxKvjRAqVyLjrz8cRdQRM4enTUh9ixkoeClcgldtzs4LUxEB1XXXXXXX\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> walletType\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SOL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> public_address\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"xvPgUXBKTPUBrBdZWHajG17nWM59Zmx7s5NhXXXXXXX\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// legacy field\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> session_token\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"TqXsQbXoTxKvjRAqVyLjrz8cRdQRM4enTUh9ixkoeClcgldtzs4LUxEB1XXXXXXX\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// legacy field\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#82071E;--shiki-light-font-style:italic;--shiki-dark:#F44747;--shiki-dark-font-style:inherit\"> wallet_type\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SOL\"\u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"> // legacy field\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"subdomain":"streambird-23","siteName":"moonkey docs","title":"React SDK Reference - moonkey docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-11-13T22:50:01.007Z","originalFileLocation":"sdks/javascript/react-sdk-reference.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=\"moonkey 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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_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/streambird-23/ZyHtXE9VLNWbz3Rg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"React SDK Reference - moonkey docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"moonkey docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.streambird.io/sdks/javascript/react-sdk-reference\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://streambird-23.mintlify.app/_mintlify/api/og/v2?division=Documentation\u0026amp;title=React+SDK+Reference\u0026amp;theme=d508d8e3df2d6acae45c8112\u0026amp;signature=23a16a8d3713e5f00128f1dd136d02f3cf97150df1885feb43f3952f3c7be569\">\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=\"React SDK Reference - moonkey docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://streambird-23.mintlify.app/_mintlify/api/og/v2?division=Documentation\u0026amp;title=React+SDK+Reference\u0026amp;theme=d508d8e3df2d6acae45c8112\u0026amp;signature=23a16a8d3713e5f00128f1dd136d02f3cf97150df1885feb43f3952f3c7be569\">\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/streambird-23/ZyHtXE9VLNWbz3Rg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"moonkey docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7D00FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.streambird.io/sdks/javascript/react-sdk-reference\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdks/javascript/react-sdk-reference.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"moonkey docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"moonkey docs","nav":{"global":null,"tabs":[{"tab":"Get Started","groups":[{"group":"Main","pages":[{"title":"About MoonKey","href":"/get-started/about"},{"title":"Setup an account","href":"/get-started/setup-account"},{"title":"Choose your platform","href":"/get-started/platform-selection"},{"group":"Dashboard Configuration","pages":[{"title":"Dashboard","href":"/get-started/dashboard/overview"},{"title":"Create new app","href":"/get-started/dashboard/create-new-app"},{"title":"Configure login methods","href":"/get-started/dashboard/login-methods"},{"title":"Team member roles","href":"/get-started/dashboard/team-member-roles"}]}]},{"group":"Frontend SDKs","pages":[{"title":"Installation","href":"/get-started/frontend-sdks/react/installation"},{"title":"Setup","href":"/get-started/frontend-sdks/react/setup"},{"title":"Quickstart","href":"/get-started/frontend-sdks/react/quick-start"},{"title":"Features","href":"/get-started/frontend-sdks/react/features"},{"group":"Advance","pages":[{"title":"Configure EVM Networks","href":"/get-started/frontend-sdks/react/advance/configure-evm-networks"},{"title":"Configure Solana Networks","href":"/get-started/frontend-sdks/react/advance/configure-solana-networks"},{"title":"Automatic Wallet Creation","href":"/get-started/frontend-sdks/react/advance/automatic-wallet-creation"},{"title":"Configure Appearance","href":"/get-started/frontend-sdks/react/advance/configure-appearance"}]}]},{"group":"REST API","pages":[{"title":"Setup","href":"/get-started/rest-api/setup"},{"title":"Quickstart","href":"/get-started/rest-api/quick-start"}]},{"group":"Concepts and Resources","pages":[{"title":"Domain Whitelisting","href":"/get-started/domain-whitelisting"}]}]},{"tab":"Authentication","groups":[{"group":" ","pages":[{"title":"Overview","href":"/authentication/overview"}]},{"group":"Using Streambird authentication","pages":[{"group":"Authentication methods","pages":[{"title":"Email OTP","href":"/authentication/user-authentication/authentication-methods/email"},{"title":"OAuth (Social Login)","href":"/authentication/user-authentication/authentication-methods/oauth"}]},{"group":"Sessions","pages":[{"title":"Overview","href":"/authentication/user-authentication/sessions/overview"},{"title":"Session Management","href":"/authentication/user-authentication/sessions/session-management"},{"title":"Session Token vs JWT","href":"/authentication/user-authentication/sessions/session-token-vs-jwt"}]},{"title":"Authentication State","href":"/authentication/user-authentication/authentication-state"},{"title":"Access Tokens","href":"/authentication/user-authentication/access-tokens"},{"title":"Logging Users Out","href":"/authentication/user-authentication/signing-users-out"},{"group":"UI components","pages":[{"title":"Overview","href":"/authentication/user-authentication/ui-components/overview"},{"title":"Login","href":"/authentication/user-authentication/ui-components/login"},{"title":"Email OTP","href":"/authentication/user-authentication/ui-components/email-otp"}]},{"title":"Whitelabel","href":"/authentication/user-authentication/whitelabel"}]}]},{"tab":"Wallet as a Service","groups":[{"group":" ","pages":[{"title":"Wallets Overview","href":"/wallet-as-a-service/wallets-overview"},{"title":"Chain Support","href":"/wallet-as-a-service/chain-support"}]},{"group":"Embedded wallets","pages":[{"group":"Create a wallet","pages":[{"title":"Create a Wallet","href":"/wallet-as-a-service/embedded-wallets/create-a-wallet/overview"}]},{"group":"Get a wallet","pages":[{"title":"Get User Wallets","href":"/wallet-as-a-service/embedded-wallets/get-a-wallet/get-user-connected-wallets"}]},{"title":"Export a Wallet","href":"/wallet-as-a-service/embedded-wallets/export-a-wallet"}]},{"group":"Using wallets","pages":[{"group":"Ethereum","pages":[{"title":"Send Transaction","href":"/wallet-as-a-service/using-wallets/ethereum/send-transaction"},{"title":"Sign Transaction","href":"/wallet-as-a-service/using-wallets/ethereum/sign-transaction"},{"title":"Sign Message","href":"/wallet-as-a-service/using-wallets/ethereum/sign-message"},{"title":"Sign Typed Data","href":"/wallet-as-a-service/using-wallets/ethereum/sign-typed-data"},{"title":"Sign EIP-7702 Authorization","href":"/wallet-as-a-service/using-wallets/ethereum/sign-eip7702-authorization"},{"title":"Switch Chains","href":"/wallet-as-a-service/using-wallets/ethereum/switch-chains"},{"title":"Ethereum Provider","href":"/wallet-as-a-service/using-wallets/ethereum/ethereum-provider"}]},{"group":"Solana","pages":[{"title":"Sign Message","href":"/wallet-as-a-service/using-wallets/solana/sign-message"},{"title":"Send Transaction","href":"/wallet-as-a-service/using-wallets/solana/send-transaction"},{"title":"Sign Transaction","href":"/wallet-as-a-service/using-wallets/solana/sign-transaction"},{"title":"Solana Web3.js Integration","href":"/wallet-as-a-service/using-wallets/solana/solana-web3-js"}]}]},{"group":"UI components","pages":[{"title":"Overview","href":"/wallet-as-a-service/ui-components/overview"},{"title":"Sign Message","href":"/wallet-as-a-service/ui-components/sign-message"},{"title":"Sign Transaction","href":"/wallet-as-a-service/ui-components/sign-transaction"},{"title":"Send Transaction","href":"/wallet-as-a-service/ui-components/send-transaction"},{"title":"Export Key","href":"/wallet-as-a-service/ui-components/export-key"}]},{"group":"Funding","pages":[{"title":"Overview","href":"/wallet-as-a-service/funding/overview"},{"group":"Methods","pages":[{"title":"Card Payments","href":"/wallet-as-a-service/funding/methods/card"}]},{"title":"Configuration","href":"/wallet-as-a-service/funding/configure"},{"group":"Fund Wallet Types","pages":[{"title":"Ethereum","href":"/wallet-as-a-service/funding/fund-types/ethereum"},{"title":"Solana","href":"/wallet-as-a-service/funding/fund-types/solana"}]}]}]},{"tab":"Recipes","pages":[{"title":"Overview","href":"/recipes/overview"},{"group":"Wallets","pages":[{"title":"Complete Authentication Flow","href":"/recipes/wallets/complete-authentication-flow"},{"title":"Complete Dashboard with Wallet Operations","href":"/recipes/wallets/complete-dashboard-wallet-operations"},{"title":"Wallet Connection Status Indicator","href":"/recipes/wallets/wallet-connection-status-indicator"},{"title":"ERC-20 Token Transfer (Ethereum)","href":"/recipes/wallets/erc20-token-transfer-ethereum"},{"title":"NFT Minting (Ethereum)","href":"/recipes/wallets/nft-minting-etheruem"},{"title":"Multi-Step Transaction Flow","href":"/recipes/wallets/multi-step-transaction-flow"},{"title":"Solana Program Interaction","href":"/recipes/wallets/solana-program-interaction"},{"title":"Protected Routes with Authentication","href":"/recipes/wallets/protected-routes-with-authentication"}]},{"group":"Dashboard","pages":[{"title":"Customize your application","href":"/recipes/dashboard/customize"}]}]},{"tab":"API Reference","pages":[{"group":"API Reference","pages":[{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Managed Wallets","pages":[{"openapi":"post /v1/wallets/create","title":"Create Wallet","href":"/api-reference/managed-wallets/create-wallet"},{"openapi":"post /v1/wallets/balance","title":"Get Wallet Balance","href":"/api-reference/managed-wallets/get-wallet-balance"},{"openapi":"get /v1/wallets/{wallet_id}","title":"Get Wallet","href":"/api-reference/managed-wallets/get-wallet"},{"openapi":"get /v1/wallets/list","title":"List Wallet","href":"/api-reference/managed-wallets/list-wallet"},{"group":"Solana Wallets","pages":[{"title":"Solana Sign Transaction","api":"POST https://api.moonkey.fun/v1/wallets/{wallet_id}/rpc","href":"/api-reference/managed-wallets/solana/sign-transaction"},{"title":"Solana Sign Message","api":"POST https://api.moonkey.fun/v1/wallets/{wallet_id}/rpc","href":"/api-reference/managed-wallets/solana/sign-message"}]},{"group":"Ethereum Wallets","pages":[{"title":"Ethereum Sign Transaction","api":"POST https://api.moonkey.fun/v1/wallets/{wallet_id}/rpc","href":"/api-reference/managed-wallets/ethereum/sign-transaction"},{"title":"Ethereum Sign Message","api":"POST https://api.moonkey.fun/v1/wallets/{wallet_id}/rpc","href":"/api-reference/managed-wallets/ethereum/sign-message"},{"title":"Ethereum Sign EIP-7702 Authorization","api":"POST https://api.moonkey.fun/v1/wallets/{wallet_id}/rpc","href":"/api-reference/managed-wallets/ethereum/sign-7702-authorization"}]}]},{"group":"Wallet Import","pages":[{"openapi":"post /v1/wallets/import/begin","title":"Begin Wallet Import","href":"/api-reference/wallet-import/begin-wallet-import"},{"openapi":"post /v1/wallets/import","title":"Import Wallet","href":"/api-reference/wallet-import/import-wallet"}]},{"group":"Users","pages":[{"openapi":"post /v1/auth/users/create","title":"Create User","href":"/api-reference/users/create-user"},{"openapi":"post /v1/auth/users/search","title":"Search Users (beta)","href":"/api-reference/users/search-users-beta"},{"openapi":"get /v1/auth/users/{user_id}","title":"Get User","href":"/api-reference/users/get-user"},{"openapi":"put /v1/auth/users/{user_id}/update","title":"Update User","href":"/api-reference/users/update-user"},{"openapi":"delete /v1/auth/users/{user_id}/delete","title":"Delete User","href":"/api-reference/users/delete-user"},{"openapi":"delete /v1/auth/users/emails/{email_id}/delete","title":"Delete User Email","href":"/api-reference/users/delete-user-email"},{"openapi":"delete /v1/auth/users/phone_number/{phone_number_id}/delete","title":"Delete User Phone Number","href":"/api-reference/users/delete-user-phone-number"},{"openapi":"delete /v1/auth/users/wallets/{wallet_id}/delete","title":"Delete User Wallet","href":"/api-reference/users/delete-user-wallet"},{"openapi":"delete /v1/auth/users/webauthn_credentials/{webauthn_credential_id}/delete","title":"Delete User WebAuthn Credential","href":"/api-reference/users/delete-user-webauthn-credential"},{"openapi":"delete /v1/auth/users/totps/{totp_id}/delete","title":"Delete User TOTP","href":"/api-reference/users/delete-user-totp"}]},{"group":"OTPs","pages":[{"openapi":"post /v1/auth/otps/sms/login_or_create","title":"Login or Create User by SMS","href":"/api-reference/otps/login-or-create-user-by-sms"},{"openapi":"post /v1/auth/otps/sms/send","title":"Create SMS OTP","href":"/api-reference/otps/create-sms-otp"},{"openapi":"post /v1/auth/otps/email/login_or_create","title":"Login or Create User by Email OTP","href":"/api-reference/otps/login-or-create-user-by-email-otp"},{"openapi":"post /v1/auth/otps/email/send","title":"Create Email OTP","href":"/api-reference/otps/create-email-otp"},{"openapi":"post /v1/auth/otps/verify","title":"Verify OTP (One-time passcode)","href":"/api-reference/otps/verify-otp-one-time-passcode"}]},{"group":"OAuth","pages":[{"openapi":"get /v1/auth/oauth/google/begin","title":"Google","href":"/api-reference/oauth/google"},{"openapi":"get /v1/auth/oauth/apple/begin","title":"Apple","href":"/api-reference/oauth/apple"},{"openapi":"get /v1/auth/oauth/microsoft/begin","title":"Microsoft","href":"/api-reference/oauth/microsoft"},{"openapi":"get /v1/auth/oauth/discord/begin","title":"Discord","href":"/api-reference/oauth/discord"},{"openapi":"get /v1/auth/oauth/github/begin","title":"Github","href":"/api-reference/oauth/github"},{"openapi":"post /v1/auth/oauth/verify","title":"Verify Token","href":"/api-reference/oauth/verify-token"}]},{"group":"Sessions","pages":[{"openapi":"get /v1/auth/jwks/default","title":"GetJWKs","href":"/api-reference/sessions/getjwks"},{"openapi":"get /v1/auth/jwks/{app_id}","title":"GetJWKsByApp","href":"/api-reference/sessions/getjwksbyapp"},{"openapi":"get /v1/auth/sessions/list","title":"List Sessions","href":"/api-reference/sessions/list-sessions"},{"openapi":"post /v1/auth/sessions/verify","title":"Verify Session","href":"/api-reference/sessions/verify-session"},{"openapi":"delete /v1/auth/sessions/delete","title":"Delete Session","href":"/api-reference/sessions/delete-session"}]},{"group":"TOTP (Time-based one-time passcode)","pages":[{"openapi":"post /v1/auth/totps/create","title":"Create TOTP (beta)","href":"/api-reference/totp-time-based-one-time-passcode/create-totp-beta"},{"openapi":"post /v1/auth/totps/verify","title":"Verify TOTP (beta)","href":"/api-reference/totp-time-based-one-time-passcode/verify-totp-beta"},{"openapi":"post /v1/auth/totps/recovery_codes","title":"Get TOTP Recovery Codes (beta)","href":"/api-reference/totp-time-based-one-time-passcode/get-totp-recovery-codes-beta"},{"openapi":"post /v1/auth/totps/recovery","title":"TOTP Recovery (beta)","href":"/api-reference/totp-time-based-one-time-passcode/totp-recovery-beta"}]},{"group":"Wallets Login","pages":[{"openapi":"post /v1/auth/wallets/registrations/begin","title":"Begin Wallet Registration","href":"/api-reference/wallets-login/begin-wallet-registration"},{"openapi":"post /v1/auth/wallets/registrations/nonce","title":"Get Wallet Registration Nonce","href":"/api-reference/wallets-login/get-wallet-registration-nonce"},{"openapi":"post /v1/auth/wallets/verify","title":"Verify Wallet (beta)","href":"/api-reference/wallets-login/verify-wallet-beta"},{"openapi":"post /v1/auth/wallets/siwe/verify","title":"Verify Siwe Wallet Registration","href":"/api-reference/wallets-login/verify-siwe-wallet-registration"}]},{"group":"Passwords","pages":[{"openapi":"post /v1/auth/passwords/session/update","title":"Update Password by Session (Enterprise)","href":"/api-reference/passwords/update-password-by-session-enterprise"},{"openapi":"post /v1/auth/passwords/verify","title":"Verify Password (Enterprise)","href":"/api-reference/passwords/verify-password-enterprise"},{"openapi":"post /v1/auth/passwords/strength_check","title":"PasswordStrengthCheck (Enterprise)","href":"/api-reference/passwords/passwordstrengthcheck-enterprise"}]},{"group":"Transfers","pages":[{"openapi":"post /v1/transfers/create","title":"Create Transfer (beta)","href":"/api-reference/transfers/create-transfer-beta"},{"openapi":"post /v1/transfers/{transfer_id}/confirm","title":"Confirm Transfer (beta)","href":"/api-reference/transfers/confirm-transfer-beta"},{"openapi":"get /v1/transfers/{transfer_id}","title":"Get Transfer (beta)","href":"/api-reference/transfers/get-transfer-beta"},{"openapi":"get /v1/transfers/list","title":"List Transfer (beta)","href":"/api-reference/transfers/list-transfer-beta"}]},{"group":"WebAuthn","pages":[{"openapi":"post /v1/auth/webauthn/registrations/begin","title":"Initiate WebAuthn Registration (beta)","href":"/api-reference/webauthn/initiate-webauthn-registration-beta"},{"openapi":"post /v1/auth/webauthn/registrations/create","title":"Create WebAuthn Registration (beta)","href":"/api-reference/webauthn/create-webauthn-registration-beta"},{"openapi":"post /v1/auth/webauthn/authentication/begin","title":"Initiate WebAuthn Authentication (beta)","href":"/api-reference/webauthn/initiate-webauthn-authentication-beta"},{"openapi":"post /v1/auth/webauthn/verify","title":"Verify WebAuthn Authentication (beta)","href":"/api-reference/webauthn/verify-webauthn-authentication-beta"}]},{"group":"Magic Links (Deprecated)","pages":[{"openapi":"post /v1/auth/magic_links/email/login_or_create","title":"Login or Create User by Magic Link","href":"/api-reference/magic-links/login-or-create-user-by-magic-link"},{"openapi":"post /v1/auth/magic_links/email/invite","title":"Invite User by Magic Link","href":"/api-reference/magic-links/invite-user-by-magic-link"},{"openapi":"post /v1/auth/magic_links/create","title":"Create Embeddable Magic Link","href":"/api-reference/magic-links/create-embeddable-magic-link"},{"openapi":"post /v1/auth/magic_links/verify","title":"Verify Token","href":"/api-reference/magic-links/verify-token"}]}]}]},"basePath":"","title":"React SDK Reference - moonkey docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["2b790eda92"],"chunks":["ApiExamples-C0lapOpP.js","utils-ME8dDnLe.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","cloneDeep-izs3Hzxb.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js"]}