diff --git a/docs.json b/docs.json index f1b0d1de..64d25774 100644 --- a/docs.json +++ b/docs.json @@ -8,12 +8,7 @@ "dark": "#050a0b" }, "contextual": { - "options": [ - "copy", - "view", - "chatgpt", - "claude" - ] + "options": ["copy", "view", "chatgpt", "claude"] }, "favicon": "/favicon.svg", "navigation": { @@ -207,10 +202,7 @@ }, { "group": "Cookbook", - "pages": [ - "cookbook/morpho", - "cookbook/aave" - ] + "pages": ["cookbook/morpho", "cookbook/aave"] } ] }, @@ -396,66 +388,65 @@ { "group": "SDK reference", "pages": [ - "generated-docs/formatted/core/turnkey-client-add-oauth-provider", - "generated-docs/formatted/core/turnkey-client-add-passkey", - "generated-docs/formatted/core/turnkey-client-clear-all-sessions", - "generated-docs/formatted/core/turnkey-client-clear-session", - "generated-docs/formatted/core/turnkey-client-clear-unused-key-pairs", - "generated-docs/formatted/core/turnkey-client-complete-oauth", - "generated-docs/formatted/core/turnkey-client-complete-otp", - "generated-docs/formatted/core/turnkey-client-connect-wallet-account", - "generated-docs/formatted/core/turnkey-client-constructor", - "generated-docs/formatted/core/turnkey-client-create-api-key-pair", - "generated-docs/formatted/core/turnkey-client-create-passkey", - "generated-docs/formatted/core/turnkey-client-create-wallet", - "generated-docs/formatted/core/turnkey-client-create-wallet-accounts", - "generated-docs/formatted/core/turnkey-client-delete-sub-organization", - "generated-docs/formatted/core/turnkey-client-disconnect-wallet-account", - "generated-docs/formatted/core/turnkey-client-export-private-key", - "generated-docs/formatted/core/turnkey-client-export-wallet", - "generated-docs/formatted/core/turnkey-client-export-wallet-account", - "generated-docs/formatted/core/turnkey-client-fetch-user", - "generated-docs/formatted/core/turnkey-client-fetch-wallet-accounts", - "generated-docs/formatted/core/turnkey-client-fetch-wallets", - "generated-docs/formatted/core/turnkey-client-get-active-session-key", - "generated-docs/formatted/core/turnkey-client-get-all-sessions", - "generated-docs/formatted/core/turnkey-client-get-proxy-auth-config", - "generated-docs/formatted/core/turnkey-client-get-session", - "generated-docs/formatted/core/turnkey-client-get-wallet-providers", - "generated-docs/formatted/core/turnkey-client-import-private-key", - "generated-docs/formatted/core/turnkey-client-import-wallet", - "generated-docs/formatted/core/turnkey-client-init", - "generated-docs/formatted/core/turnkey-client-init-otp", - "generated-docs/formatted/core/turnkey-client-login-or-signup-with-wallet", - "generated-docs/formatted/core/turnkey-client-login-with-oauth", - "generated-docs/formatted/core/turnkey-client-login-with-otp", - "generated-docs/formatted/core/turnkey-client-login-with-passkey", - "generated-docs/formatted/core/turnkey-client-login-with-wallet", - "generated-docs/formatted/core/turnkey-client-logout", - "generated-docs/formatted/core/turnkey-client-refresh-session", - "generated-docs/formatted/core/turnkey-client-remove-oauth-providers", - "generated-docs/formatted/core/turnkey-client-remove-passkeys", - "generated-docs/formatted/core/turnkey-client-remove-user-email", - "generated-docs/formatted/core/turnkey-client-remove-user-phone-number", - "generated-docs/formatted/core/turnkey-client-set-active-session", - "generated-docs/formatted/core/turnkey-client-sign-and-send-transaction", - "generated-docs/formatted/core/turnkey-client-sign-message", - "generated-docs/formatted/core/turnkey-client-sign-transaction", - "generated-docs/formatted/core/turnkey-client-sign-up-with-oauth", - "generated-docs/formatted/core/turnkey-client-sign-up-with-otp", - "generated-docs/formatted/core/turnkey-client-sign-up-with-passkey", - "generated-docs/formatted/core/turnkey-client-sign-up-with-wallet", - "generated-docs/formatted/core/turnkey-client-store-session", - "generated-docs/formatted/core/turnkey-client-switch-wallet-provider-chain", - "generated-docs/formatted/core/turnkey-client-update-user-email", - "generated-docs/formatted/core/turnkey-client-update-user-name", - "generated-docs/formatted/core/turnkey-client-update-user-phone-number", - "generated-docs/formatted/core/turnkey-client-verify-otp", - "generated-docs/formatted/core/turnkey-client-switch-wallet-account-chain", - "generated-docs/formatted/core/turnkey-client-fetch-private-keys", - "generated-docs/formatted/core/turnkey-client-fetch-or-create-p256-api-key-user", - "generated-docs/formatted/core/turnkey-client-fetch-or-create-policies", - "generated-docs/formatted/core/turnkey-client-fetch-wallet-providers" + "generated-docs/core/turnkey-client-add-oauth-provider", + "generated-docs/core/turnkey-client-add-passkey", + "generated-docs/core/turnkey-client-clear-all-sessions", + "generated-docs/core/turnkey-client-clear-session", + "generated-docs/core/turnkey-client-clear-unused-key-pairs", + "generated-docs/core/turnkey-client-complete-oauth", + "generated-docs/core/turnkey-client-complete-otp", + "generated-docs/core/turnkey-client-connect-wallet-account", + "generated-docs/core/turnkey-client-constructor", + "generated-docs/core/turnkey-client-create-api-key-pair", + "generated-docs/core/turnkey-client-create-passkey", + "generated-docs/core/turnkey-client-create-wallet", + "generated-docs/core/turnkey-client-create-wallet-accounts", + "generated-docs/core/turnkey-client-delete-sub-organization", + "generated-docs/core/turnkey-client-disconnect-wallet-account", + "generated-docs/core/turnkey-client-export-private-key", + "generated-docs/core/turnkey-client-export-wallet", + "generated-docs/core/turnkey-client-export-wallet-account", + "generated-docs/core/turnkey-client-fetch-boot-proof-for-app-proof", + "generated-docs/core/turnkey-client-fetch-or-create-p256-api-key-user", + "generated-docs/core/turnkey-client-fetch-or-create-policies", + "generated-docs/core/turnkey-client-fetch-private-keys", + "generated-docs/core/turnkey-client-fetch-user", + "generated-docs/core/turnkey-client-fetch-wallet-accounts", + "generated-docs/core/turnkey-client-fetch-wallet-providers", + "generated-docs/core/turnkey-client-fetch-wallets", + "generated-docs/core/turnkey-client-get-active-session-key", + "generated-docs/core/turnkey-client-get-all-sessions", + "generated-docs/core/turnkey-client-get-proxy-auth-config", + "generated-docs/core/turnkey-client-get-session", + "generated-docs/core/turnkey-client-import-private-key", + "generated-docs/core/turnkey-client-import-wallet", + "generated-docs/core/turnkey-client-init", + "generated-docs/core/turnkey-client-init-otp", + "generated-docs/core/turnkey-client-login-or-signup-with-wallet", + "generated-docs/core/turnkey-client-login-with-oauth", + "generated-docs/core/turnkey-client-login-with-otp", + "generated-docs/core/turnkey-client-login-with-passkey", + "generated-docs/core/turnkey-client-login-with-wallet", + "generated-docs/core/turnkey-client-logout", + "generated-docs/core/turnkey-client-refresh-session", + "generated-docs/core/turnkey-client-remove-oauth-providers", + "generated-docs/core/turnkey-client-remove-passkeys", + "generated-docs/core/turnkey-client-remove-user-email", + "generated-docs/core/turnkey-client-remove-user-phone-number", + "generated-docs/core/turnkey-client-set-active-session", + "generated-docs/core/turnkey-client-sign-and-send-transaction", + "generated-docs/core/turnkey-client-sign-message", + "generated-docs/core/turnkey-client-sign-transaction", + "generated-docs/core/turnkey-client-sign-up-with-oauth", + "generated-docs/core/turnkey-client-sign-up-with-otp", + "generated-docs/core/turnkey-client-sign-up-with-passkey", + "generated-docs/core/turnkey-client-sign-up-with-wallet", + "generated-docs/core/turnkey-client-store-session", + "generated-docs/core/turnkey-client-switch-wallet-account-chain", + "generated-docs/core/turnkey-client-update-user-email", + "generated-docs/core/turnkey-client-update-user-name", + "generated-docs/core/turnkey-client-update-user-phone-number", + "generated-docs/core/turnkey-client-verify-otp" ] } ] diff --git a/generated-docs/formatted/core/turnkey-client-add-oauth-provider.mdx b/generated-docs/core/turnkey-client-add-oauth-provider.mdx similarity index 84% rename from generated-docs/formatted/core/turnkey-client-add-oauth-provider.mdx rename to generated-docs/core/turnkey-client-add-oauth-provider.mdx index ea642a37..ceb2ac42 100644 --- a/generated-docs/formatted/core/turnkey-client-add-oauth-provider.mdx +++ b/generated-docs/core/turnkey-client-add-oauth-provider.mdx @@ -20,14 +20,17 @@ Adds an OAuth provider to the user.

Package: core

-

Defined in: core.ts:2982

+

Defined in: __clients__/core.ts:3135

- + OIDC token for the OAuth provider. + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). name of the OAuth provider to add (e.g., "Google", "Apple"). diff --git a/generated-docs/formatted/core/turnkey-client-add-passkey.mdx b/generated-docs/core/turnkey-client-add-passkey.mdx similarity index 84% rename from generated-docs/formatted/core/turnkey-client-add-passkey.mdx rename to generated-docs/core/turnkey-client-add-passkey.mdx index f931d475..ae9e3673 100644 --- a/generated-docs/formatted/core/turnkey-client-add-passkey.mdx +++ b/generated-docs/core/turnkey-client-add-passkey.mdx @@ -19,17 +19,20 @@ Adds a new passkey authenticator for the user.

Package: core

-

Defined in: core.ts:3141

+

Defined in: __clients__/core.ts:3311

- + display name of the passkey (defaults to the value of `name`). name of the passkey (defaults to "Turnkey Passkey-`timestamp`"). + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-clear-all-sessions.mdx b/generated-docs/core/turnkey-client-clear-all-sessions.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-clear-all-sessions.mdx rename to generated-docs/core/turnkey-client-clear-all-sessions.mdx index e6f822c4..61278fbf 100644 --- a/generated-docs/formatted/core/turnkey-client-clear-all-sessions.mdx +++ b/generated-docs/core/turnkey-client-clear-all-sessions.mdx @@ -18,7 +18,7 @@ Clears all sessions and resets the active session state.

Package: core

-

Defined in: core.ts:3844

+

Defined in: __clients__/core.ts:4080

diff --git a/generated-docs/formatted/core/turnkey-client-clear-session.mdx b/generated-docs/core/turnkey-client-clear-session.mdx similarity index 89% rename from generated-docs/formatted/core/turnkey-client-clear-session.mdx rename to generated-docs/core/turnkey-client-clear-session.mdx index 718e4fa3..b571d384 100644 --- a/generated-docs/formatted/core/turnkey-client-clear-session.mdx +++ b/generated-docs/core/turnkey-client-clear-session.mdx @@ -18,11 +18,11 @@ Clears the session associated with the specified session key, or the active sess

Package: core

-

Defined in: core.ts:3811

+

Defined in: __clients__/core.ts:4047

- + session key to clear the session under (defaults to the default session key). diff --git a/generated-docs/formatted/core/turnkey-client-clear-unused-key-pairs.mdx b/generated-docs/core/turnkey-client-clear-unused-key-pairs.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-clear-unused-key-pairs.mdx rename to generated-docs/core/turnkey-client-clear-unused-key-pairs.mdx index 1b0441c3..49cf7941 100644 --- a/generated-docs/formatted/core/turnkey-client-clear-unused-key-pairs.mdx +++ b/generated-docs/core/turnkey-client-clear-unused-key-pairs.mdx @@ -18,7 +18,7 @@ Clears any unused API key pairs from persistent storage.

Package: core

-

Defined in: core.ts:4073

+

Defined in: __clients__/core.ts:4305

diff --git a/generated-docs/formatted/core/turnkey-client-complete-oauth.mdx b/generated-docs/core/turnkey-client-complete-oauth.mdx similarity index 54% rename from generated-docs/formatted/core/turnkey-client-complete-oauth.mdx rename to generated-docs/core/turnkey-client-complete-oauth.mdx index b6687bd4..187a59ae 100644 --- a/generated-docs/formatted/core/turnkey-client-complete-oauth.mdx +++ b/generated-docs/core/turnkey-client-complete-oauth.mdx @@ -19,15 +19,55 @@ Completes the OAuth authentication flow by either signing up or logging in the u

Package: core

-

Defined in: core.ts:1528

+

Defined in: __clients__/core.ts:1557

- + parameters for sub-organization creation (e.g., authenticators, user metadata). + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + flag to invalidate existing sessions for the user. diff --git a/generated-docs/formatted/core/turnkey-client-complete-otp.mdx b/generated-docs/core/turnkey-client-complete-otp.mdx similarity index 57% rename from generated-docs/formatted/core/turnkey-client-complete-otp.mdx rename to generated-docs/core/turnkey-client-complete-otp.mdx index f432a09e..3260f02c 100644 --- a/generated-docs/formatted/core/turnkey-client-complete-otp.mdx +++ b/generated-docs/core/turnkey-client-complete-otp.mdx @@ -19,11 +19,11 @@ Completes the OTP authentication flow by verifying the OTP code and then either

Package: core

-

Defined in: core.ts:1432

+

Defined in: __clients__/core.ts:1468

- + contact information for the user (e.g., email address or phone number). @@ -31,6 +31,46 @@ contact information for the user (e.g., email address or phone number). parameters for sub-organization creation (e.g., authenticators, user metadata). + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + flag to invalidate existing sessions for the user. diff --git a/generated-docs/formatted/core/turnkey-client-connect-wallet-account.mdx b/generated-docs/core/turnkey-client-connect-wallet-account.mdx similarity index 76% rename from generated-docs/formatted/core/turnkey-client-connect-wallet-account.mdx rename to generated-docs/core/turnkey-client-connect-wallet-account.mdx index 5bca3d85..03fc5ec3 100644 --- a/generated-docs/formatted/core/turnkey-client-connect-wallet-account.mdx +++ b/generated-docs/core/turnkey-client-connect-wallet-account.mdx @@ -15,7 +15,7 @@ Connects the specified wallet account.

Package: core

-

Defined in: core.ts:561

+

Defined in: __clients__/core.ts:606

@@ -26,6 +26,6 @@ Connects the specified wallet account. A successful response returns the following fields: - - A promise that resolves once the wallet account is connected. + + A promise that resolves with the connected wallet's address. diff --git a/generated-docs/core/turnkey-client-constructor.mdx b/generated-docs/core/turnkey-client-constructor.mdx new file mode 100644 index 00000000..78632f11 --- /dev/null +++ b/generated-docs/core/turnkey-client-constructor.mdx @@ -0,0 +1,109 @@ +--- +title: "constructor()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + +

Package: core

+ +

Defined in: __clients__/core.ts:163

+ + + + + + +base URL for the Turnkey API. + + +ID for the auth proxy configuration. + + +URL for the auth proxy. + + +ID of the organization. + + +configuration for the passkey stamper. + + + +list of credentials to pass. Defaults to empty. + + +optional extensions. Defaults to empty. + + +The RPID ("Relying Party ID") for your app. This is automatically determined in web environments based on the current hostname. See https://github.com/f-23/react-native-passkey?tab=readme-ov-file#configuration to set this up for react-native. + + +name for the Relying Party (RP). This is used in the passkey creation flow on mobile. + + +timeout value in milliseconds. Defaults to 5 minutes. + + +override for UV flag. Defaults to "preferred". + + +option to force platform passkeys on native platforms. + + +option to force security passkeys on native platforms. + + + +configuration for the wallet manager. + + + +chains to support in the wallet manager. + + + + + + + + + + + + + + +features to enable in the wallet manager. + + + + + + +configuration for WalletConnect. + + + + + + + + + + + + + + + + + + + + + + +A successful response returns the following fields: + + diff --git a/generated-docs/formatted/core/turnkey-client-create-api-key-pair.mdx b/generated-docs/core/turnkey-client-create-api-key-pair.mdx similarity index 91% rename from generated-docs/formatted/core/turnkey-client-create-api-key-pair.mdx rename to generated-docs/core/turnkey-client-create-api-key-pair.mdx index 2ef4a90d..14e6ab18 100644 --- a/generated-docs/formatted/core/turnkey-client-create-api-key-pair.mdx +++ b/generated-docs/core/turnkey-client-create-api-key-pair.mdx @@ -19,11 +19,11 @@ Creates a new API key pair and returns the public key.

Package: core

-

Defined in: core.ts:4125

+

Defined in: __clients__/core.ts:4357

- + An externally generated key pair (either a CryptoKeyPair or an object with publicKey/privateKey strings) to use instead of generating a new one. diff --git a/generated-docs/formatted/core/turnkey-client-create-passkey.mdx b/generated-docs/core/turnkey-client-create-passkey.mdx similarity index 67% rename from generated-docs/formatted/core/turnkey-client-create-passkey.mdx rename to generated-docs/core/turnkey-client-create-passkey.mdx index 4adf5a45..d41a7861 100644 --- a/generated-docs/formatted/core/turnkey-client-create-passkey.mdx +++ b/generated-docs/core/turnkey-client-create-passkey.mdx @@ -17,20 +17,17 @@ Creates a new passkey authenticator for the user.

Package: core

-

Defined in: core.ts:193

+

Defined in: __clients__/core.ts:233

- + challenge string to use for passkey registration. If not provided, a new challenge will be generated. display name for the passkey (defaults to a generated name based on the current timestamp). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). @@ -38,12 +35,14 @@ parameter to stamp the request with a specific stamper (StamperType.Passkey, Sta A successful response returns the following fields: - - A promise that resolves to an object containing: - - attestation: attestation object returned from the passkey creation process. - - encodedChallenge: encoded challenge string used for passkey registration. + + A promise that resolves to CreatePasskeyResult - - + +attestation object returned from the passkey creation process + + +encoded challenge string used for passkey registration + diff --git a/generated-docs/formatted/core/turnkey-client-create-wallet-accounts.mdx b/generated-docs/core/turnkey-client-create-wallet-accounts.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-create-wallet-accounts.mdx rename to generated-docs/core/turnkey-client-create-wallet-accounts.mdx index d416e7ff..7e84ddf6 100644 --- a/generated-docs/formatted/core/turnkey-client-create-wallet-accounts.mdx +++ b/generated-docs/core/turnkey-client-create-wallet-accounts.mdx @@ -20,11 +20,11 @@ Creates new accounts in the specified wallet.

Package: core

-

Defined in: core.ts:3343

+

Defined in: __clients__/core.ts:3519

- + An array of account parameters or address formats to create in the wallet. diff --git a/generated-docs/formatted/core/turnkey-client-create-wallet.mdx b/generated-docs/core/turnkey-client-create-wallet.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-create-wallet.mdx rename to generated-docs/core/turnkey-client-create-wallet.mdx index ce7e6c71..94a06659 100644 --- a/generated-docs/formatted/core/turnkey-client-create-wallet.mdx +++ b/generated-docs/core/turnkey-client-create-wallet.mdx @@ -21,11 +21,11 @@ Creates a new wallet for sub-organization.

Package: core

-

Defined in: core.ts:3270

+

Defined in: __clients__/core.ts:3441

- + array of account parameters or address formats to create in the wallet. diff --git a/generated-docs/formatted/core/turnkey-client-delete-sub-organization.mdx b/generated-docs/core/turnkey-client-delete-sub-organization.mdx similarity index 82% rename from generated-docs/formatted/core/turnkey-client-delete-sub-organization.mdx rename to generated-docs/core/turnkey-client-delete-sub-organization.mdx index 93258e93..abcd41dc 100644 --- a/generated-docs/formatted/core/turnkey-client-delete-sub-organization.mdx +++ b/generated-docs/core/turnkey-client-delete-sub-organization.mdx @@ -19,14 +19,17 @@ Deletes the current sub-organization (sub-org) for the active session.

Package: core

-

Defined in: core.ts:3737

+

Defined in: __clients__/core.ts:3973

- + flag to delete the sub-organization without requiring all wallets to be exported first (defaults to false). + + +organization ID to delete a specific sub-organization (defaults to the current session's organizationId). parameter to stamp the request with a specific stamper. diff --git a/generated-docs/formatted/core/turnkey-client-disconnect-wallet-account.mdx b/generated-docs/core/turnkey-client-disconnect-wallet-account.mdx similarity index 90% rename from generated-docs/formatted/core/turnkey-client-disconnect-wallet-account.mdx rename to generated-docs/core/turnkey-client-disconnect-wallet-account.mdx index 3c9a3866..5201192a 100644 --- a/generated-docs/formatted/core/turnkey-client-disconnect-wallet-account.mdx +++ b/generated-docs/core/turnkey-client-disconnect-wallet-account.mdx @@ -15,7 +15,7 @@ Disconnects the specified wallet account.

Package: core

-

Defined in: core.ts:588

+

Defined in: __clients__/core.ts:637

diff --git a/generated-docs/formatted/core/turnkey-client-export-private-key.mdx b/generated-docs/core/turnkey-client-export-private-key.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-export-private-key.mdx rename to generated-docs/core/turnkey-client-export-private-key.mdx index f49d6f9e..86d9d444 100644 --- a/generated-docs/formatted/core/turnkey-client-export-private-key.mdx +++ b/generated-docs/core/turnkey-client-export-private-key.mdx @@ -19,11 +19,11 @@ Exports a private key as an encrypted bundle.

Package: core

-

Defined in: core.ts:3476

+

Defined in: __clients__/core.ts:3668

- + organization ID to export the private key under a specific sub diff --git a/generated-docs/formatted/core/turnkey-client-export-wallet-account.mdx b/generated-docs/core/turnkey-client-export-wallet-account.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-export-wallet-account.mdx rename to generated-docs/core/turnkey-client-export-wallet-account.mdx index c7c5d807..4203c749 100644 --- a/generated-docs/formatted/core/turnkey-client-export-wallet-account.mdx +++ b/generated-docs/core/turnkey-client-export-wallet-account.mdx @@ -19,11 +19,11 @@ Exports a wallet account as an encrypted bundle.

Package: core

-

Defined in: core.ts:3532

+

Defined in: __clients__/core.ts:3733

- + address of the wallet account to export. diff --git a/generated-docs/formatted/core/turnkey-client-export-wallet.mdx b/generated-docs/core/turnkey-client-export-wallet.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-export-wallet.mdx rename to generated-docs/core/turnkey-client-export-wallet.mdx index 90240566..69c8b709 100644 --- a/generated-docs/formatted/core/turnkey-client-export-wallet.mdx +++ b/generated-docs/core/turnkey-client-export-wallet.mdx @@ -20,11 +20,11 @@ Exports a wallet as an encrypted bundle.

Package: core

-

Defined in: core.ts:3420

+

Defined in: __clients__/core.ts:3605

- + organization ID to export the wallet under a specific sub-organization (walletId must be associated with the sub-organization). diff --git a/generated-docs/core/turnkey-client-fetch-boot-proof-for-app-proof.mdx b/generated-docs/core/turnkey-client-fetch-boot-proof-for-app-proof.mdx new file mode 100644 index 00000000..1f44ed38 --- /dev/null +++ b/generated-docs/core/turnkey-client-fetch-boot-proof-for-app-proof.mdx @@ -0,0 +1,44 @@ +--- +title: "fetchBootProofForAppProof()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Fetches the boot proof for a given app proof. + +
    +
  • This function is idempotent: multiple calls with the same ``app proof`` will always return the boot proof.
  • +
  • Attempts to find the boot proof for the given app proof.
  • +
  • If a boot proof is found, it is returned as is.
  • +
  • If no boot proof is found, an error is thrown.
  • +
+ +

Package: core

+ +

Defined in: __clients__/core.ts:4434

+ + + + + + +the app proof for which the boot proof is being fetched. + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + + +parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). + + + + + +A successful response returns the following fields: + + + A promise that resolves to the v1BootProof associated with the given app proof. + diff --git a/generated-docs/formatted/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx b/generated-docs/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx similarity index 69% rename from generated-docs/formatted/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx rename to generated-docs/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx index 06a63355..0d28dce5 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx +++ b/generated-docs/core/turnkey-client-fetch-or-create-p256-api-key-user.mdx @@ -18,23 +18,25 @@ Fetches an existing user by P-256 API key public key, or creates a new one if no

Package: core

-

Defined in: core.ts:2460

+

Defined in: __clients__/core.ts:2573

- + - -optional API key name to assign if creating a new API key (defaults to `public-key-user-${publicKey}`). - - -optional username to assign if creating a new user (defaults to `"Public Key User"`). - + + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + the P-256 public key to use for lookup and creation. + + +parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-fetch-or-create-policies.mdx b/generated-docs/core/turnkey-client-fetch-or-create-policies.mdx similarity index 69% rename from generated-docs/formatted/core/turnkey-client-fetch-or-create-policies.mdx rename to generated-docs/core/turnkey-client-fetch-or-create-policies.mdx index db0fc9c2..c19844ef 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-or-create-policies.mdx +++ b/generated-docs/core/turnkey-client-fetch-or-create-policies.mdx @@ -18,14 +18,20 @@ Fetches each requested policy if it exists, or creates it if it does not.

Package: core

-

Defined in: core.ts:2580

+

Defined in: __clients__/core.ts:2707

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + the list of policies to fetch or create. + + +parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). @@ -33,7 +39,7 @@ the list of policies to fetch or create. A successful response returns the following fields: - + A promise that resolves to an array of objects, each containing: - `policyId`: the unique identifier of the policy. - `policyName`: human-readable name of the policy. diff --git a/generated-docs/formatted/core/turnkey-client-fetch-private-keys.mdx b/generated-docs/core/turnkey-client-fetch-private-keys.mdx similarity index 76% rename from generated-docs/formatted/core/turnkey-client-fetch-private-keys.mdx rename to generated-docs/core/turnkey-client-fetch-private-keys.mdx index 27450767..ea50fe21 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-private-keys.mdx +++ b/generated-docs/core/turnkey-client-fetch-private-keys.mdx @@ -16,12 +16,15 @@ Fetches all private keys for the current user.

Package: core

-

Defined in: core.ts:2059

+

Defined in: __clients__/core.ts:2135

- + + +organization ID to target (defaults to the session's organization ID). + parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-fetch-user.mdx b/generated-docs/core/turnkey-client-fetch-user.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-fetch-user.mdx rename to generated-docs/core/turnkey-client-fetch-user.mdx index 8487ab92..70de5f8d 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-user.mdx +++ b/generated-docs/core/turnkey-client-fetch-user.mdx @@ -19,11 +19,11 @@ Fetches the user details for the current session or a specified user.

Package: core

-

Defined in: core.ts:2399

+

Defined in: __clients__/core.ts:2507

- + organization ID to specify the sub-organization (defaults to the current session's organizationId). diff --git a/generated-docs/formatted/core/turnkey-client-fetch-wallet-accounts.mdx b/generated-docs/core/turnkey-client-fetch-wallet-accounts.mdx similarity index 81% rename from generated-docs/formatted/core/turnkey-client-fetch-wallet-accounts.mdx rename to generated-docs/core/turnkey-client-fetch-wallet-accounts.mdx index ff9c9333..31f94d2d 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-wallet-accounts.mdx +++ b/generated-docs/core/turnkey-client-fetch-wallet-accounts.mdx @@ -19,17 +19,23 @@ Fetches all accounts for a specific wallet, including both embedded and connecte

Package: core

-

Defined in: core.ts:1890

+

Defined in: __clients__/core.ts:1949

- + + +organization ID to target (defaults to the session's organization ID). + pagination options for embedded wallets. parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). + + +user ID to target (defaults to the session's user ID). wallet for which to fetch accounts. diff --git a/generated-docs/formatted/core/turnkey-client-fetch-wallet-providers.mdx b/generated-docs/core/turnkey-client-fetch-wallet-providers.mdx similarity index 91% rename from generated-docs/formatted/core/turnkey-client-fetch-wallet-providers.mdx rename to generated-docs/core/turnkey-client-fetch-wallet-providers.mdx index a5b658c0..88bf8c75 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-wallet-providers.mdx +++ b/generated-docs/core/turnkey-client-fetch-wallet-providers.mdx @@ -16,7 +16,7 @@ Retrieves wallet providers from the initialized wallet manager.

Package: core

-

Defined in: core.ts:533

+

Defined in: __clients__/core.ts:578

diff --git a/generated-docs/formatted/core/turnkey-client-fetch-wallets.mdx b/generated-docs/core/turnkey-client-fetch-wallets.mdx similarity index 70% rename from generated-docs/formatted/core/turnkey-client-fetch-wallets.mdx rename to generated-docs/core/turnkey-client-fetch-wallets.mdx index 6cc3f511..49c5010e 100644 --- a/generated-docs/formatted/core/turnkey-client-fetch-wallets.mdx +++ b/generated-docs/core/turnkey-client-fetch-wallets.mdx @@ -19,14 +19,23 @@ Fetches all wallets for the current user, including both embedded and connected

Package: core

-

Defined in: core.ts:1771

+

Defined in: __clients__/core.ts:1791

- + + +if true, fetches only connected wallets; if false or undefined, fetches both embedded and connected wallets. + + +organization ID to target (defaults to the session's organization ID). + parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). + + +user ID to target (defaults to the session's user ID). array of wallet providers to use for fetching wallets. diff --git a/generated-docs/formatted/core/turnkey-client-get-active-session-key.mdx b/generated-docs/core/turnkey-client-get-active-session-key.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-get-active-session-key.mdx rename to generated-docs/core/turnkey-client-get-active-session-key.mdx index e5c08fa8..4491ca31 100644 --- a/generated-docs/formatted/core/turnkey-client-get-active-session-key.mdx +++ b/generated-docs/core/turnkey-client-get-active-session-key.mdx @@ -18,7 +18,7 @@ Retrieves the active session key currently set in persistent storage.

Package: core

-

Defined in: core.ts:4050

+

Defined in: __clients__/core.ts:4282

diff --git a/generated-docs/formatted/core/turnkey-client-get-all-sessions.mdx b/generated-docs/core/turnkey-client-get-all-sessions.mdx similarity index 92% rename from generated-docs/formatted/core/turnkey-client-get-all-sessions.mdx rename to generated-docs/core/turnkey-client-get-all-sessions.mdx index ae2e1066..3f2f3227 100644 --- a/generated-docs/formatted/core/turnkey-client-get-all-sessions.mdx +++ b/generated-docs/core/turnkey-client-get-all-sessions.mdx @@ -18,7 +18,7 @@ Retrieves all sessions stored in persistent storage.

Package: core

-

Defined in: core.ts:3991

+

Defined in: __clients__/core.ts:4223

diff --git a/generated-docs/formatted/core/turnkey-client-get-proxy-auth-config.mdx b/generated-docs/core/turnkey-client-get-proxy-auth-config.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-get-proxy-auth-config.mdx rename to generated-docs/core/turnkey-client-get-proxy-auth-config.mdx index 0b0bd8e8..afce09cb 100644 --- a/generated-docs/formatted/core/turnkey-client-get-proxy-auth-config.mdx +++ b/generated-docs/core/turnkey-client-get-proxy-auth-config.mdx @@ -22,7 +22,7 @@ including supported authentication methods, OAuth providers, and any custom prox

Package: core

-

Defined in: core.ts:4168

+

Defined in: __clients__/core.ts:4399

diff --git a/generated-docs/formatted/core/turnkey-client-get-session.mdx b/generated-docs/core/turnkey-client-get-session.mdx similarity index 89% rename from generated-docs/formatted/core/turnkey-client-get-session.mdx rename to generated-docs/core/turnkey-client-get-session.mdx index a90e6c42..10c8e4ed 100644 --- a/generated-docs/formatted/core/turnkey-client-get-session.mdx +++ b/generated-docs/core/turnkey-client-get-session.mdx @@ -17,11 +17,11 @@ Retrieves the session associated with the specified session key, or the active s

Package: core

-

Defined in: core.ts:3964

+

Defined in: __clients__/core.ts:4196

- + session key to retrieve a specific session (defaults to the current active session key). diff --git a/generated-docs/formatted/core/turnkey-client-import-private-key.mdx b/generated-docs/core/turnkey-client-import-private-key.mdx similarity index 85% rename from generated-docs/formatted/core/turnkey-client-import-private-key.mdx rename to generated-docs/core/turnkey-client-import-private-key.mdx index 414e34e4..b703136f 100644 --- a/generated-docs/formatted/core/turnkey-client-import-private-key.mdx +++ b/generated-docs/core/turnkey-client-import-private-key.mdx @@ -21,11 +21,11 @@ Imports a private key from an encrypted bundle.

Package: core

-

Defined in: core.ts:3663

+

Defined in: __clients__/core.ts:3889

- + @@ -33,6 +33,9 @@ the cryptographic curve used to generate a given private key encrypted bundle containing the private key key material and metadata. + + +organization ID to import the private key under a specific sub-organization (private key will be associated with the sub-organization). name of the private key to create upon import. diff --git a/generated-docs/formatted/core/turnkey-client-import-wallet.mdx b/generated-docs/core/turnkey-client-import-wallet.mdx similarity index 85% rename from generated-docs/formatted/core/turnkey-client-import-wallet.mdx rename to generated-docs/core/turnkey-client-import-wallet.mdx index 8e2a915a..ff6dc281 100644 --- a/generated-docs/formatted/core/turnkey-client-import-wallet.mdx +++ b/generated-docs/core/turnkey-client-import-wallet.mdx @@ -20,17 +20,20 @@ Imports a wallet from an encrypted bundle.

Package: core

-

Defined in: core.ts:3589

+

Defined in: __clients__/core.ts:3800

- + array of account parameters to create in the imported wallet (defaults to standard Ethereum and Solana accounts). encrypted bundle containing the wallet seed phrase and metadata. + + +organization ID to import the wallet under a specific sub-organization (wallet will be associated with the sub-organization). parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-init-otp.mdx b/generated-docs/core/turnkey-client-init-otp.mdx similarity index 89% rename from generated-docs/formatted/core/turnkey-client-init-otp.mdx rename to generated-docs/core/turnkey-client-init-otp.mdx index 6db72431..656810ad 100644 --- a/generated-docs/formatted/core/turnkey-client-init-otp.mdx +++ b/generated-docs/core/turnkey-client-init-otp.mdx @@ -17,11 +17,11 @@ Initializes the OTP process by sending an OTP code to the provided contact.

Package: core

-

Defined in: core.ts:1154

+

Defined in: __clients__/core.ts:1203

- + contact information for the user (e.g., email address or phone number). diff --git a/generated-docs/formatted/core/turnkey-client-init.mdx b/generated-docs/core/turnkey-client-init.mdx similarity index 83% rename from generated-docs/formatted/core/turnkey-client-init.mdx rename to generated-docs/core/turnkey-client-init.mdx index 62995f84..99ec949a 100644 --- a/generated-docs/formatted/core/turnkey-client-init.mdx +++ b/generated-docs/core/turnkey-client-init.mdx @@ -7,7 +7,7 @@ import { NestedParam } from "/snippets/nested-param.mdx";

Package: core

-

Defined in: core.ts:138

+

Defined in: __clients__/core.ts:181

diff --git a/generated-docs/formatted/core/turnkey-client-login-or-signup-with-wallet.mdx b/generated-docs/core/turnkey-client-login-or-signup-with-wallet.mdx similarity index 52% rename from generated-docs/formatted/core/turnkey-client-login-or-signup-with-wallet.mdx rename to generated-docs/core/turnkey-client-login-or-signup-with-wallet.mdx index e1172209..5ad9ce16 100644 --- a/generated-docs/formatted/core/turnkey-client-login-or-signup-with-wallet.mdx +++ b/generated-docs/core/turnkey-client-login-or-signup-with-wallet.mdx @@ -20,15 +20,55 @@ Logs in an existing user or signs up a new user using a wallet, creating a new s

Package: core

-

Defined in: core.ts:939

+

Defined in: __clients__/core.ts:984

- + optional parameters for creating a sub-organization (e.g., authenticators, user metadata). + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + session expiration time in seconds (defaults to the configured default). diff --git a/generated-docs/formatted/core/turnkey-client-login-with-oauth.mdx b/generated-docs/core/turnkey-client-login-with-oauth.mdx similarity index 91% rename from generated-docs/formatted/core/turnkey-client-login-with-oauth.mdx rename to generated-docs/core/turnkey-client-login-with-oauth.mdx index a4644588..ad8a0abc 100644 --- a/generated-docs/formatted/core/turnkey-client-login-with-oauth.mdx +++ b/generated-docs/core/turnkey-client-login-with-oauth.mdx @@ -18,11 +18,11 @@ Logs in a user using OAuth authentication.

Package: core

-

Defined in: core.ts:1612

+

Defined in: __clients__/core.ts:1636

- + flag to invalidate existing sessions for the user. diff --git a/generated-docs/formatted/core/turnkey-client-login-with-otp.mdx b/generated-docs/core/turnkey-client-login-with-otp.mdx similarity index 83% rename from generated-docs/formatted/core/turnkey-client-login-with-otp.mdx rename to generated-docs/core/turnkey-client-login-with-otp.mdx index 378d5581..45017f01 100644 --- a/generated-docs/formatted/core/turnkey-client-login-with-otp.mdx +++ b/generated-docs/core/turnkey-client-login-with-otp.mdx @@ -19,14 +19,17 @@ Logs in a user using an OTP verification token.

Package: core

-

Defined in: core.ts:1271

+

Defined in: __clients__/core.ts:1313

- + flag to invalidate existing session for the user. + + +optional organization ID to target (defaults to the verified subOrg ID linked to the verification token contact). public key to use for authentication. If not provided, a new key pair will be generated. diff --git a/generated-docs/formatted/core/turnkey-client-login-with-passkey.mdx b/generated-docs/core/turnkey-client-login-with-passkey.mdx similarity index 83% rename from generated-docs/formatted/core/turnkey-client-login-with-passkey.mdx rename to generated-docs/core/turnkey-client-login-with-passkey.mdx index 5cc23be9..51c7fca4 100644 --- a/generated-docs/formatted/core/turnkey-client-login-with-passkey.mdx +++ b/generated-docs/core/turnkey-client-login-with-passkey.mdx @@ -19,14 +19,17 @@ Logs in a user using a passkey, optionally specifying the public key, session ke

Package: core

-

Defined in: core.ts:319

+

Defined in: __clients__/core.ts:367

- + session expiration time in seconds (defaults to the configured default). + + +organization ID to target (defaults to the session's organization ID or the parent organization ID). public key to use for authentication. If not provided, a new key pair will be generated. diff --git a/generated-docs/formatted/core/turnkey-client-login-with-wallet.mdx b/generated-docs/core/turnkey-client-login-with-wallet.mdx similarity index 84% rename from generated-docs/formatted/core/turnkey-client-login-with-wallet.mdx rename to generated-docs/core/turnkey-client-login-with-wallet.mdx index 3ea62d5a..2411112b 100644 --- a/generated-docs/formatted/core/turnkey-client-login-with-wallet.mdx +++ b/generated-docs/core/turnkey-client-login-with-wallet.mdx @@ -19,14 +19,17 @@ Logs in a user using the specified wallet provider.

Package: core

-

Defined in: core.ts:697

+

Defined in: __clients__/core.ts:745

- + optional session expiration time in seconds (defaults to the configured default). + + +organization ID to target (defaults to the session's organization ID or the parent organization ID). optional public key to associate with the session (generated if not provided). diff --git a/generated-docs/formatted/core/turnkey-client-logout.mdx b/generated-docs/core/turnkey-client-logout.mdx similarity index 88% rename from generated-docs/formatted/core/turnkey-client-logout.mdx rename to generated-docs/core/turnkey-client-logout.mdx index 6a1e7e89..d2904257 100644 --- a/generated-docs/formatted/core/turnkey-client-logout.mdx +++ b/generated-docs/core/turnkey-client-logout.mdx @@ -17,11 +17,11 @@ Logs out the current client session.

Package: core

-

Defined in: core.ts:272

+

Defined in: __clients__/core.ts:319

- + session key to specify which session to log out from (defaults to the active session). diff --git a/generated-docs/formatted/core/turnkey-client-refresh-session.mdx b/generated-docs/core/turnkey-client-refresh-session.mdx similarity index 93% rename from generated-docs/formatted/core/turnkey-client-refresh-session.mdx rename to generated-docs/core/turnkey-client-refresh-session.mdx index 507f2ab1..c9b32cbd 100644 --- a/generated-docs/formatted/core/turnkey-client-refresh-session.mdx +++ b/generated-docs/core/turnkey-client-refresh-session.mdx @@ -20,11 +20,11 @@ Refreshes the session associated with the specified session key, or the active s

Package: core

-

Defined in: core.ts:3878

+

Defined in: __clients__/core.ts:4114

- + expiration time in seconds for the refreshed session (defaults to the configured default). diff --git a/generated-docs/formatted/core/turnkey-client-remove-oauth-providers.mdx b/generated-docs/core/turnkey-client-remove-oauth-providers.mdx similarity index 82% rename from generated-docs/formatted/core/turnkey-client-remove-oauth-providers.mdx rename to generated-docs/core/turnkey-client-remove-oauth-providers.mdx index 17fd01b5..4d2ae7cc 100644 --- a/generated-docs/formatted/core/turnkey-client-remove-oauth-providers.mdx +++ b/generated-docs/core/turnkey-client-remove-oauth-providers.mdx @@ -19,12 +19,15 @@ Removes a list of OAuth providers from the user.

Package: core

-

Defined in: core.ts:3087

+

Defined in: __clients__/core.ts:3252

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + IDs of the OAuth providers to remove. diff --git a/generated-docs/formatted/core/turnkey-client-remove-passkeys.mdx b/generated-docs/core/turnkey-client-remove-passkeys.mdx similarity index 83% rename from generated-docs/formatted/core/turnkey-client-remove-passkeys.mdx rename to generated-docs/core/turnkey-client-remove-passkeys.mdx index 6bc428b2..0bcd4046 100644 --- a/generated-docs/formatted/core/turnkey-client-remove-passkeys.mdx +++ b/generated-docs/core/turnkey-client-remove-passkeys.mdx @@ -19,14 +19,17 @@ Removes passkeys (authenticator) from the user.

Package: core

-

Defined in: core.ts:3212

+

Defined in: __clients__/core.ts:3381

- + IDs of the authenticators (passkeys) to remove. + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-remove-user-email.mdx b/generated-docs/core/turnkey-client-remove-user-email.mdx similarity index 80% rename from generated-docs/formatted/core/turnkey-client-remove-user-email.mdx rename to generated-docs/core/turnkey-client-remove-user-email.mdx index 25a72618..26676f45 100644 --- a/generated-docs/formatted/core/turnkey-client-remove-user-email.mdx +++ b/generated-docs/core/turnkey-client-remove-user-email.mdx @@ -18,12 +18,15 @@ Removes the user's email address.

Package: core

-

Defined in: core.ts:2762

+

Defined in: __clients__/core.ts:2900

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-remove-user-phone-number.mdx b/generated-docs/core/turnkey-client-remove-user-phone-number.mdx similarity index 80% rename from generated-docs/formatted/core/turnkey-client-remove-user-phone-number.mdx rename to generated-docs/core/turnkey-client-remove-user-phone-number.mdx index 1a7e5bb9..0b978ba7 100644 --- a/generated-docs/formatted/core/turnkey-client-remove-user-phone-number.mdx +++ b/generated-docs/core/turnkey-client-remove-user-phone-number.mdx @@ -18,12 +18,15 @@ Removes the user's phone number.

Package: core

-

Defined in: core.ts:2871

+

Defined in: __clients__/core.ts:3017

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-set-active-session.mdx b/generated-docs/core/turnkey-client-set-active-session.mdx similarity index 88% rename from generated-docs/formatted/core/turnkey-client-set-active-session.mdx rename to generated-docs/core/turnkey-client-set-active-session.mdx index 826b5771..2ed25f8e 100644 --- a/generated-docs/formatted/core/turnkey-client-set-active-session.mdx +++ b/generated-docs/core/turnkey-client-set-active-session.mdx @@ -18,11 +18,11 @@ Sets the active session to the specified session key.

Package: core

-

Defined in: core.ts:4026

+

Defined in: __clients__/core.ts:4258

- + session key to set as the active session. diff --git a/generated-docs/core/turnkey-client-sign-and-send-transaction.mdx b/generated-docs/core/turnkey-client-sign-and-send-transaction.mdx new file mode 100644 index 00000000..a21b3acc --- /dev/null +++ b/generated-docs/core/turnkey-client-sign-and-send-transaction.mdx @@ -0,0 +1,65 @@ +--- +title: "signAndSendTransaction()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Signs and broadcasts a transaction using the specified wallet account. + +Behavior differs depending on the type of wallet: + +
    +
  • **Connected wallets**
  • +
  • *Ethereum*: delegates to the wallet’s native ``signAndSendTransaction`` method.
  • +
  • Does **not** require an ``rpcUrl`` (the wallet handles broadcasting).
  • +
  • *Solana*: signs the transaction locally with the connected wallet, but requires an ``rpcUrl`` to broadcast it.
  • +
  • Other chains: not supported; will throw an error.
  • +
+ +
    +
  • **Embedded wallets**
  • +
  • Signs the transaction using the Turnkey API.
  • +
  • Requires an ``rpcUrl`` to broadcast the signed transaction, since Turnkey does not broadcast directly.
  • +
  • Broadcasts the transaction using a JSON-RPC client and returns the resulting transaction hash/signature.
  • +
  • Optionally allows stamping with a specific stamper (``StamperType.Passkey``, ``StamperType.ApiKey``, or ``StamperType.Wallet``).
  • +
+ +

Package: core

+ +

Defined in: __clients__/core.ts:2404

+ + + + + + +**Only for Turnkey embedded wallets**: organization ID to target (defaults to the session's organization ID). + + +JSON-RPC endpoint used for broadcasting (required for Solana connected wallets and all embedded wallets). + + +optional stamper to use when signing (`StamperType.Passkey`, `StamperType.ApiKey`, or `StamperType.Wallet`). + + +type of transaction (e.g., `"TRANSACTION_TYPE_SOLANA"`, `"TRANSACTION_TYPE_ETHEREUM"`). + + +unsigned transaction data as a serialized + string in the canonical encoding for the given `transactionType`. + + +wallet account to use for signing and broadcasting. + + + + + +A successful response returns the following fields: + + + A promise that resolves to a transaction signature or hash. + diff --git a/generated-docs/core/turnkey-client-sign-message.mdx b/generated-docs/core/turnkey-client-sign-message.mdx new file mode 100644 index 00000000..f777b9ca --- /dev/null +++ b/generated-docs/core/turnkey-client-sign-message.mdx @@ -0,0 +1,89 @@ +--- +title: "signMessage()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Signs a message using the specified wallet account. + +Behavior differs depending on the wallet type: + +
    +
  • **Connected wallets**
  • +
  • Delegates signing to the wallet provider’s native signing method.
  • +
  • *Ethereum*: signatures always follow [EIP-191](https://eips.ethereum.org/EIPS/eip-191).
  • +
  • The wallet automatically prefixes messages with
  • +
+ +``"\x19Ethereum Signed Message:\n" + message length`` before signing. + +
    +
  • As a result, these signatures cannot be used as raw transaction signatures or broadcast on-chain.
  • +
  • If ``addEthereumPrefix`` is set to ``false``, an error is thrown because connected Ethereum wallets always prefix.
  • +
  • *Other chains*: follows the native connected wallet behavior.
  • +
+ +
    +
  • **Embedded wallets**
  • +
  • Uses the Turnkey API to sign the message directly.
  • +
  • Supports optional ``addEthereumPrefix``:
  • +
  • If ``true`` (default for Ethereum), the message is prefixed before signing.
  • +
  • If ``false``, the raw message is signed without any prefix.
  • +
+ +Additional details: + +
    +
  • Automatically handles encoding and hashing based on the wallet account’s address format,
  • +
+ +unless explicitly overridden. + +
    +
  • Optionally allows stamping with a specific stamper
  • +
+ +(``StamperType.Passkey``, ``StamperType.ApiKey``, or ``StamperType.Wallet``). + +

Package: core

+ +

Defined in: __clients__/core.ts:2214

+ + + + + + +whether to prefix the message with Ethereum’s + `"\x19Ethereum Signed Message:\n"` string (default: `true` for Ethereum). + + +override for payload encoding (defaults to the encoding appropriate for the address format). + + +override for hash function (defaults to the function appropriate for the address format). + + +plaintext (UTF-8) message to sign. + + +organization ID to target (defaults to the session's organization ID). + + +optional stamper for the signing request. + + +wallet account to use for signing. + + + + + +A successful response returns the following fields: + + + A promise that resolves to a `v1SignRawPayloadResult` containing the signature and metadata. + diff --git a/generated-docs/core/turnkey-client-sign-transaction.mdx b/generated-docs/core/turnkey-client-sign-transaction.mdx new file mode 100644 index 00000000..315635e4 --- /dev/null +++ b/generated-docs/core/turnkey-client-sign-transaction.mdx @@ -0,0 +1,60 @@ +--- +title: "signTransaction()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Signs a transaction using the specified wallet account. + +Behavior differs depending on the type of wallet: + +
    +
  • **Connected wallets**
  • +
  • Ethereum: does not support raw transaction signing. Calling this function will throw an error instructing you to use ``signAndSendTransaction`` instead.
  • +
  • Solana: supports raw transaction signing via the connected wallet provider.
  • +
  • Other chains: not supported; will throw an error.
  • +
+ +
    +
  • **Embedded wallets**
  • +
  • Delegates signing to the Turnkey API, which returns the signed transaction.
  • +
  • Supports all Turnkey-supported transaction types (e.g., Ethereum, Solana, Tron).
  • +
  • Optionally allows stamping with a specific stamper (``StamperType.Passkey``, ``StamperType.ApiKey``, or ``StamperType.Wallet``).
  • +
+ +

Package: core

+ +

Defined in: __clients__/core.ts:2323

+ + + + + + +organization ID to target (defaults to the session's organization ID). + + +stamper to use for signing (`StamperType.Passkey`, `StamperType.ApiKey`, or `StamperType.Wallet`). + + +type of transaction (e.g., "TRANSACTION_TYPE_ETHEREUM", "TRANSACTION_TYPE_SOLANA", "TRANSACTION_TYPE_TRON"). + + +unsigned transaction data as a serialized + string in the canonical encoding for the given `transactionType`. + + +wallet account to use for signing. + + + + + +A successful response returns the following fields: + + + A promise that resolves to the signed transaction string. + diff --git a/generated-docs/core/turnkey-client-sign-up-with-oauth.mdx b/generated-docs/core/turnkey-client-sign-up-with-oauth.mdx new file mode 100644 index 00000000..2fa612f4 --- /dev/null +++ b/generated-docs/core/turnkey-client-sign-up-with-oauth.mdx @@ -0,0 +1,91 @@ +--- +title: "signUpWithOauth()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Signs up a user using OAuth authentication. + +
    +
  • This function creates a new sub-organization for the user using the provided OIDC token, public key, and provider name.
  • +
  • Handles the full OAuth sign-up flow, including sub-organization creation and session management.
  • +
  • Optionally accepts additional sub-organization creation parameters and a custom session key.
  • +
  • After successful sign-up, automatically logs in the user and returns a signed JWT session token.
  • +
+ +

Package: core

+ +

Defined in: __clients__/core.ts:1727

+ + + + + + +parameters for sub-organization creation (e.g., authenticators, user metadata). + + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + + +OIDC token received after successful authentication with the OAuth provider. + + +name of the OAuth provider (e.g., "Google", "Apple"). + + +public key to associate with the new sub-organization. + + +session key to use for session creation (defaults to the default session key). + + + + + +A successful response returns the following fields: + + + A promise that resolves to a BaseAuthResult, which includes: + - `sessionToken`: the signed JWT session token. + diff --git a/generated-docs/formatted/core/turnkey-client-sign-up-with-otp.mdx b/generated-docs/core/turnkey-client-sign-up-with-otp.mdx similarity index 52% rename from generated-docs/formatted/core/turnkey-client-sign-up-with-otp.mdx rename to generated-docs/core/turnkey-client-sign-up-with-otp.mdx index 624a5e8e..7cc75ef2 100644 --- a/generated-docs/formatted/core/turnkey-client-sign-up-with-otp.mdx +++ b/generated-docs/core/turnkey-client-sign-up-with-otp.mdx @@ -19,11 +19,11 @@ Signs up a user using an OTP verification token.

Package: core

-

Defined in: core.ts:1356

+

Defined in: __clients__/core.ts:1397

- + contact information for the user (e.g., email address or phone number). @@ -31,6 +31,46 @@ contact information for the user (e.g., email address or phone number). parameters for creating a sub-organization (e.g., authenticators, user metadata). + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + flag to invalidate existing session for the user. diff --git a/generated-docs/formatted/core/turnkey-client-sign-up-with-passkey.mdx b/generated-docs/core/turnkey-client-sign-up-with-passkey.mdx similarity index 50% rename from generated-docs/formatted/core/turnkey-client-sign-up-with-passkey.mdx rename to generated-docs/core/turnkey-client-sign-up-with-passkey.mdx index a3387129..cb92048e 100644 --- a/generated-docs/formatted/core/turnkey-client-sign-up-with-passkey.mdx +++ b/generated-docs/core/turnkey-client-sign-up-with-passkey.mdx @@ -19,11 +19,11 @@ Signs up a user using a passkey, creating a new sub-organization and session.

Package: core

-

Defined in: core.ts:412

+

Defined in: __clients__/core.ts:460

- + challenge string to use for passkey registration. If not provided, a new challenge will be generated. @@ -31,8 +31,51 @@ challenge string to use for passkey registration. If not provided, a new challen parameters for creating a sub-organization (e.g., authenticators, user metadata). + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + session expiration time in seconds (defaults to the configured default). + + +organization ID to target (defaults to the session's organization ID or the parent organization ID). display name for the passkey (defaults to a generated name based on the current timestamp). diff --git a/generated-docs/core/turnkey-client-sign-up-with-wallet.mdx b/generated-docs/core/turnkey-client-sign-up-with-wallet.mdx new file mode 100644 index 00000000..7aca88d8 --- /dev/null +++ b/generated-docs/core/turnkey-client-sign-up-with-wallet.mdx @@ -0,0 +1,90 @@ +--- +title: "signUpWithWallet()" +--- + +import { H3Bordered } from "/snippets/h3-bordered.mdx"; +import { NestedParam } from "/snippets/nested-param.mdx"; + + + +Signs up a user using a wallet, creating a new sub-organization and session. + +
    +
  • This function creates a new wallet authenticator and uses it to register a new sub-organization for the user.
  • +
  • Handles both wallet authentication and sub-organization creation in a single flow.
  • +
  • Optionally accepts additional sub-organization parameters, a custom session key, and a custom session expiration.
  • +
  • Automatically generates additional API key pairs for authentication and session management.
  • +
  • Stores the resulting session token under the specified session key, or the default session key if not provided, and manages cleanup of unused key pairs.
  • +
+ +

Package: core

+ +

Defined in: __clients__/core.ts:844

+ + + + + + +parameters for creating a sub-organization (e.g., authenticators, user metadata). + + + +list of api keys + + +list of authenticators + + +custom wallets to create during sub-org creation time + + + +list of wallet accounts to create + + +name of the wallet created + + + +list of oauth providers + + +name of the sub-organization + + +email of the user + + +name of the user + + +phone number of the user + + +tag of the user + + +verification token if email or phone number is provided + + + +session expiration time in seconds (defaults to the configured default). + + +session key to use for storing the session (defaults to the default session key). + + +wallet provider to use for authentication. + + + + + +A successful response returns the following fields: + + + A promise that resolves to a WalletAuthResult, which includes: + - `sessionToken`: the signed JWT session token. + - `address`: the authenticated wallet address. + diff --git a/generated-docs/formatted/core/turnkey-client-store-session.mdx b/generated-docs/core/turnkey-client-store-session.mdx similarity index 91% rename from generated-docs/formatted/core/turnkey-client-store-session.mdx rename to generated-docs/core/turnkey-client-store-session.mdx index e4468624..61511191 100644 --- a/generated-docs/formatted/core/turnkey-client-store-session.mdx +++ b/generated-docs/core/turnkey-client-store-session.mdx @@ -19,11 +19,11 @@ Stores a session token and updates the session associated with the specified ses

Package: core

-

Defined in: core.ts:3778

+

Defined in: __clients__/core.ts:4017

- + session key to store the session under (defaults to the default session key). diff --git a/generated-docs/formatted/core/turnkey-client-switch-wallet-account-chain.mdx b/generated-docs/core/turnkey-client-switch-wallet-account-chain.mdx similarity index 90% rename from generated-docs/formatted/core/turnkey-client-switch-wallet-account-chain.mdx rename to generated-docs/core/turnkey-client-switch-wallet-account-chain.mdx index d759307b..2c5b77fc 100644 --- a/generated-docs/formatted/core/turnkey-client-switch-wallet-account-chain.mdx +++ b/generated-docs/core/turnkey-client-switch-wallet-account-chain.mdx @@ -18,11 +18,11 @@ Switches the wallet provider associated with a given wallet account to a differe

Package: core

-

Defined in: core.ts:625

+

Defined in: __clients__/core.ts:674

- + The target chain, specified as a chain ID string or a SwitchableChain object. diff --git a/generated-docs/formatted/core/turnkey-client-update-user-email.mdx b/generated-docs/core/turnkey-client-update-user-email.mdx similarity index 84% rename from generated-docs/formatted/core/turnkey-client-update-user-email.mdx rename to generated-docs/core/turnkey-client-update-user-email.mdx index 06c31f0d..caeb538a 100644 --- a/generated-docs/formatted/core/turnkey-client-update-user-email.mdx +++ b/generated-docs/core/turnkey-client-update-user-email.mdx @@ -19,14 +19,17 @@ Updates the user's email address.

Package: core

-

Defined in: core.ts:2693

+

Defined in: __clients__/core.ts:2831

- + new email address to set for the user. + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-update-user-name.mdx b/generated-docs/core/turnkey-client-update-user-name.mdx similarity index 81% rename from generated-docs/formatted/core/turnkey-client-update-user-name.mdx rename to generated-docs/core/turnkey-client-update-user-name.mdx index 0d3f33bd..f81d2c2d 100644 --- a/generated-docs/formatted/core/turnkey-client-update-user-name.mdx +++ b/generated-docs/core/turnkey-client-update-user-name.mdx @@ -19,12 +19,15 @@ Updates the user's name.

Package: core

-

Defined in: core.ts:2924

+

Defined in: __clients__/core.ts:3075

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). diff --git a/generated-docs/formatted/core/turnkey-client-update-user-phone-number.mdx b/generated-docs/core/turnkey-client-update-user-phone-number.mdx similarity index 84% rename from generated-docs/formatted/core/turnkey-client-update-user-phone-number.mdx rename to generated-docs/core/turnkey-client-update-user-phone-number.mdx index e0d67780..468b45a4 100644 --- a/generated-docs/formatted/core/turnkey-client-update-user-phone-number.mdx +++ b/generated-docs/core/turnkey-client-update-user-phone-number.mdx @@ -19,12 +19,15 @@ Updates the user's phone number.

Package: core

-

Defined in: core.ts:2815

+

Defined in: __clients__/core.ts:2957

- + + +organization ID to specify the sub-organization (defaults to the current session's organizationId). + new phone number to set for the user. diff --git a/generated-docs/formatted/core/turnkey-client-verify-otp.mdx b/generated-docs/core/turnkey-client-verify-otp.mdx similarity index 90% rename from generated-docs/formatted/core/turnkey-client-verify-otp.mdx rename to generated-docs/core/turnkey-client-verify-otp.mdx index 036dc33c..2ac2caea 100644 --- a/generated-docs/formatted/core/turnkey-client-verify-otp.mdx +++ b/generated-docs/core/turnkey-client-verify-otp.mdx @@ -18,11 +18,11 @@ Verifies the OTP code sent to the user.

Package: core

-

Defined in: core.ts:1202

+

Defined in: __clients__/core.ts:1248

- + contact information for the user (e.g., email address or phone number). @@ -42,7 +42,7 @@ type of OTP being verified (OtpType.Email or OtpType.Sms). A successful response returns the following fields: - + A promise that resolves to an object containing: - subOrganizationId: sub-organization ID if the contact is already associated with a sub-organization, or an empty string if not. - verificationToken: verification token to be used for login or sign-up. diff --git a/generated-docs/formatted/core/turnkey-client-constructor.mdx b/generated-docs/formatted/core/turnkey-client-constructor.mdx deleted file mode 100644 index bf2e23b2..00000000 --- a/generated-docs/formatted/core/turnkey-client-constructor.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "constructor()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: core

- -

Defined in: core.ts:120

- - - - - - - - - - - - -A successful response returns the following fields: - - diff --git a/generated-docs/formatted/core/turnkey-client-get-wallet-providers.mdx b/generated-docs/formatted/core/turnkey-client-get-wallet-providers.mdx deleted file mode 100644 index dd8a7c5f..00000000 --- a/generated-docs/formatted/core/turnkey-client-get-wallet-providers.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "fetchWalletProviders()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Retrieves wallet providers from the initialized wallet manager. - -
    -
  • Optionally filters providers by the specified blockchain chain.
  • -
  • Throws an error if the wallet manager is not initialized.
  • -
- -

Package: core

- -

Defined in: core.ts:531

- - - - - optional blockchain chain to filter the returned providers. - - - -A successful response returns the following fields: - - - A promise that resolves to an array of wallet providers. - diff --git a/generated-docs/formatted/core/turnkey-client-sign-and-send-transaction.mdx b/generated-docs/formatted/core/turnkey-client-sign-and-send-transaction.mdx deleted file mode 100644 index 91061e2d..00000000 --- a/generated-docs/formatted/core/turnkey-client-sign-and-send-transaction.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "signAndSendTransaction()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Signs and broadcasts a transaction using the specified wallet account. - -
    -
  • For **connected wallets**:
  • -
  • Calls the wallet’s native ``signAndSendTransaction`` method.
  • -
  • Does **not** require an ``rpcUrl``.
  • -
- -
    -
  • For **embedded wallets**:
  • -
  • Signs the transaction using the Turnkey API.
  • -
  • Requires an ``rpcUrl`` to broadcast the transaction.
  • -
  • Broadcasts the transaction using a JSON-RPC client.
  • -
- -

Package: core

- -

Defined in: core.ts:2294

- - - - - - -required for embedded wallets to broadcast the signed transaction. - - -optional stamper to tag the signing request. - - -transaction type (e.g., "TRANSACTION_TYPE_SOLANA"). - - -unsigned transaction (serialized string). - - -wallet account to use for signing and sending. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a transaction signature or hash. - diff --git a/generated-docs/formatted/core/turnkey-client-sign-message.mdx b/generated-docs/formatted/core/turnkey-client-sign-message.mdx deleted file mode 100644 index 3c222334..00000000 --- a/generated-docs/formatted/core/turnkey-client-sign-message.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "signMessage()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Signs a message using the specified wallet account. - -
    -
  • Supports both embedded and connected wallets.
  • -
  • For **connected wallets**:
  • -
  • Delegates signing to the wallet provider’s native signing method.
  • -
  • **Important:** For Ethereum wallets (e.g., MetaMask), signatures follow [EIP-191](https://eips.ethereum.org/EIPS/eip-191).
  • -
- -The message is automatically prefixed with ``"\x19Ethereum Signed Message:\n" + message length`` before signing. As a result, this signature **cannot be used as a raw transaction signature** or broadcast on-chain. - -
    -
  • For **embedded wallets**, uses the Turnkey API to sign the message directly.
  • -
  • Automatically handles message encoding and hashing based on the wallet account’s address format,
  • -
- -unless explicitly overridden. - -

Package: core

- -

Defined in: core.ts:2123

- - - - - - -whether to prefix the message with Ethereum's `"\x19Ethereum Signed Message:\n"` string. - - If `true` (default for Ethereum), the message is prefixed before signing. - - If `false`: - - Connected wallets will throw an error because they always prefix automatically. - - Embedded wallets will sign the raw message without any prefix. - - -override for the payload encoding (defaults to the encoding appropriate for the address type). - - -override for the hash function (defaults to the hash function appropriate for the address type). - - -message to sign. - - -stamper to tag the signing request (e.g., Passkey, ApiKey, or Wallet). - - -wallet account to use for signing. - - - - - -A successful response returns the following fields: - - - A promise resolving to a `v1SignRawPayloadResult` containing the signature and metadata. - diff --git a/generated-docs/formatted/core/turnkey-client-sign-transaction.mdx b/generated-docs/formatted/core/turnkey-client-sign-transaction.mdx deleted file mode 100644 index 74e92974..00000000 --- a/generated-docs/formatted/core/turnkey-client-sign-transaction.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "signTransaction()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Signs a transaction using the specified wallet account. - -
    -
  • This function signs a blockchain transaction using the provided wallet address and transaction data.
  • -
  • Supports all Turnkey-supported blockchain networks (e.g., Ethereum, Solana, Tron).
  • -
  • Automatically determines the appropriate signing method based on the transaction type.
  • -
  • Delegates signing to the Turnkey API, which returns the signed transaction and related metadata.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- -

Package: core

- -

Defined in: core.ts:2221

- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -type of transaction (e.g., "TRANSACTION_TYPE_ETHEREUM", "TRANSACTION_TYPE_SOLANA", "TRANSACTION_TYPE_TRON"). - - -unsigned transaction data (serialized as a string) to be signed. - - -wallet account to use for signing the transaction. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `TSignTransactionResponse` object containing the signed transaction and any additional signing metadata. - diff --git a/generated-docs/formatted/core/turnkey-client-sign-up-with-oauth.mdx b/generated-docs/formatted/core/turnkey-client-sign-up-with-oauth.mdx deleted file mode 100644 index 68d1d112..00000000 --- a/generated-docs/formatted/core/turnkey-client-sign-up-with-oauth.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "signUpWithOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Signs up a user using OAuth authentication. - -
    -
  • This function creates a new sub-organization for the user using the provided OIDC token, public key, and provider name.
  • -
  • Handles the full OAuth sign-up flow, including sub-organization creation and session management.
  • -
  • Optionally accepts additional sub-organization creation parameters and a custom session key.
  • -
  • After successful sign-up, automatically logs in the user and returns a signed JWT session token.
  • -
- -

Package: core

- -

Defined in: core.ts:1706

- - - - - - -parameters for sub-organization creation (e.g., authenticators, user metadata). - - -OIDC token received after successful authentication with the OAuth provider. - - -name of the OAuth provider (e.g., "Google", "Apple"). - - -public key to associate with the new sub-organization. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a BaseAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - diff --git a/generated-docs/formatted/core/turnkey-client-sign-up-with-wallet.mdx b/generated-docs/formatted/core/turnkey-client-sign-up-with-wallet.mdx deleted file mode 100644 index 35cb096e..00000000 --- a/generated-docs/formatted/core/turnkey-client-sign-up-with-wallet.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "signUpWithWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Signs up a user using a wallet, creating a new sub-organization and session. - -
    -
  • This function creates a new wallet authenticator and uses it to register a new sub-organization for the user.
  • -
  • Handles both wallet authentication and sub-organization creation in a single flow.
  • -
  • Optionally accepts additional sub-organization parameters, a custom session key, and a custom session expiration.
  • -
  • Automatically generates additional API key pairs for authentication and session management.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided, and manages cleanup of unused key pairs.
  • -
- -

Package: core

- -

Defined in: core.ts:797

- - - - - - -parameters for creating a sub-organization (e.g., authenticators, user metadata). - - -session expiration time in seconds (defaults to the configured default). - - -session key to use for storing the session (defaults to the default session key). - - -wallet provider to use for authentication. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a WalletAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - - `address`: the authenticated wallet address. - diff --git a/generated-docs/formatted/core/turnkey-client-switch-wallet-provider-chain.mdx b/generated-docs/formatted/core/turnkey-client-switch-wallet-provider-chain.mdx deleted file mode 100644 index a2c45099..00000000 --- a/generated-docs/formatted/core/turnkey-client-switch-wallet-provider-chain.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "switchWalletProviderChain()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - - - -Switches the specified wallet provider to a different blockchain chain. - -
    -
  • Requires the wallet manager and its connector to be initialized.
  • -
  • The wallet provider must have at least one connected address.
  • -
  • Does nothing if the wallet provider is already on the desired chain.
  • -
- -

Package: core

- -

Defined in: core.ts:589

- - - - - wallet provider to switch. - - - - target chain as a chain ID string or SwitchableChain object. - - - -A successful response returns the following fields: - - - A promise that resolves once the chain switch is complete. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-add-oauth-provider.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-add-oauth-provider.mdx deleted file mode 100644 index 94fd0e43..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-add-oauth-provider.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "addOauthProvider()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Adds an OAuth provider to the user. - -
    -
  • This function adds an OAuth provider (e.g., Google, Apple) to the user account.
  • -
  • If a userId is provided, it adds the provider for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically checks if an account already exists for the provided OIDC token and prevents duplicate associations.
  • -
  • If the user's email is not set or not verified, attempts to update and verify the email using the email from the OIDC token.
  • -
  • Handles session management and error reporting for the add provider flow.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -OIDC token for the OAuth provider. - - -name of the OAuth provider to add (e.g., "Google", "Apple"). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to add the provider for a specific user (defaults to current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of provider IDs associated with the user. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-add-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-add-passkey.mdx deleted file mode 100644 index 246e4332..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-add-passkey.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "addPasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Adds a new passkey authenticator for the user. - -
    -
  • This function prompts the user to create a new passkey (WebAuthn/FIDO2) and adds it as an authenticator for the user.
  • -
  • Handles both web and React Native environments, automatically selecting the appropriate passkey creation flow.
  • -
  • If a userId is provided, the passkey is added for that specific user; otherwise, it uses the current session's userId.
  • -
  • The passkey's name and display name can be customized; if not provided, defaults are generated.
  • -
  • The resulting passkey attestation and challenge are registered with Turnkey as a new authenticator.
  • -
- - - - - - -display name of the passkey (defaults to the value of `name`). - - -name of the passkey (defaults to "Turnkey Passkey-`timestamp`"). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to add the passkey for a specific user (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of authenticator IDs for the newly added passkey(s). - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-all-sessions.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-clear-all-sessions.mdx deleted file mode 100644 index af10a823..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-all-sessions.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "clearAllSessions()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Clears all sessions and resets the active session state. - -
    -
  • This function removes all session data from the client and persistent storage, including all associated key pairs.
  • -
  • Iterates through all stored session keys, clearing each session and deleting its corresponding API key pair.
  • -
  • After clearing, there will be no active session, and all session-related data will be removed from local storage.
  • -
  • Throws an error if no sessions exist or if there is an error during the clearing process.
  • -
- - - -

No parameters.

- - -A successful response returns the following fields: - - - A promise that resolves when all sessions are successfully cleared. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-session.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-clear-session.mdx deleted file mode 100644 index 010b2d1e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-session.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "clearSession()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Clears the session associated with the specified session key, or the active session by default. - -
    -
  • This function deletes the session and its associated key pair from storage.
  • -
  • If a sessionKey is provided, it will clear the session under that key; otherwise, it will clear the default (active) session.
  • -
  • Removes the session data from local storage and deletes the corresponding API key pair from the key store.
  • -
  • Throws an error if the session does not exist or if there is an error during the clearing process.
  • -
- - - - - - -session key to clear the session under (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the session is successfully cleared. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-unused-key-pairs.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-clear-unused-key-pairs.mdx deleted file mode 100644 index 9fbbc560..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-clear-unused-key-pairs.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "clearUnusedKeyPairs()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Clears any unused API key pairs from persistent storage. - -
    -
  • This function scans all API key pairs stored in indexedDB and removes any key pairs that are not associated with a session in persistent storage.
  • -
  • Ensures that only key pairs referenced by existing sessions are retained, preventing orphaned or stale key pairs from accumulating.
  • -
  • Iterates through all stored session keys and builds a map of in-use public keys, then deletes any key pairs not present in this map.
  • -
  • Intended to be called after session changes (e.g., login, logout, session replacement) to keep key storage clean and secure.
  • -
- - - -

No parameters.

- - -A successful response returns the following fields: - - - A promise that resolves when all unused key pairs are successfully cleared. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-complete-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-complete-oauth.mdx deleted file mode 100644 index ffb58ba8..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-complete-oauth.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "completeOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Completes the OAuth authentication flow by either signing up or logging in the user, depending on whether a sub-organization already exists for the provided OIDC token. - -
    -
  • This function first checks if there is an existing sub-organization associated with the OIDC token.
  • -
  • If a sub-organization exists, it proceeds with the OAuth login flow.
  • -
  • If no sub-organization exists, it creates a new sub-organization and completes the sign-up flow.
  • -
  • Optionally accepts a custom OAuth provider name, session key, and additional sub-organization creation parameters.
  • -
  • Handles session storage and management, and supports invalidating existing sessions if specified.
  • -
- - - - - - -parameters for sub-organization creation (e.g., authenticators, user metadata). - - -flag to invalidate existing sessions for the user. - - -OIDC token received after successful authentication with the OAuth provider. - - -name of the OAuth provider (defaults to a generated name with a timestamp). - - -public key to use for authentication. Must be generated prior to calling this function, this is because the OIDC nonce has to be set to `sha256(publicKey)`. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an object containing: - - `sessionToken`: the signed JWT session token. - - `action`: whether the flow resulted in a login or signup (AuthAction). - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-complete-otp.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-complete-otp.mdx deleted file mode 100644 index adc96fe6..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-complete-otp.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "completeOtp()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Completes the OTP authentication flow by verifying the OTP code and then either signing up or logging in the user. - -
    -
  • This function first verifies the OTP code for the provided contact and OTP type.
  • -
  • If the contact is not associated with an existing sub-organization, it will automatically create a new sub-organization and complete the sign-up flow.
  • -
  • If the contact is already associated with a sub-organization, it will complete the login flow.
  • -
  • Supports passing a custom public key for authentication, invalidating existing session, specifying a session key, and providing additional sub-organization creation parameters.
  • -
  • Handles both email and SMS OTP types.
  • -
- - - - - - -contact information for the user (e.g., email address or phone number). - - -parameters for sub-organization creation (e.g., authenticators, user metadata). - - -flag to invalidate existing sessions for the user. - - -OTP code entered by the user. - - -ID of the OTP to complete (returned from `initOtp`). - - -type of OTP being completed (OtpType.Email or OtpType.Sms). - - -public key to use for authentication. If not provided, a new key pair may be generated. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an object containing: - - `sessionToken`: the signed JWT session token. - - `verificationToken`: the OTP verification token. - - `action`: whether the flow resulted in a login or signup (AuthAction). - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-connect-wallet-account.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-connect-wallet-account.mdx deleted file mode 100644 index b5a1361f..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-connect-wallet-account.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "connectWalletAccount()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Connects the specified wallet account. - -
    -
  • Requires the wallet manager and its connector to be initialized.
  • -
- - - - - wallet provider to connect. - - - -A successful response returns the following fields: - - - A promise that resolves once the wallet account is connected. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-create-api-key-pair.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-create-api-key-pair.mdx deleted file mode 100644 index 0644b6db..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-create-api-key-pair.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "createApiKeyPair()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Creates a new API key pair and returns the public key. - -
    -
  • This function generates a new API key pair and stores it in the underlying key store (IndexedDB).
  • -
  • If an external key pair is provided, it will use that key pair for creation instead of generating a new one.
  • -
  • If ``storeOverride`` is set to true, the generated or provided public key will be set as the override key in the API key stamper, making it the active key for subsequent signing operations.
  • -
  • Ensures the API key stamper is initialized before proceeding.
  • -
  • Handles both native CryptoKeyPair objects and raw key material.
  • -
- - - - - - -An externally generated key pair (either a CryptoKeyPair or an object with publicKey/privateKey strings) to use instead of generating a new one. - - -If true, sets the generated or provided public key as the override key in the API key stamper (defaults to false). -@returnparams.s A promise that resolves to the public key of the created or provided API key pair as a string. - - - - - -A successful response returns the following fields: - - - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-create-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-create-passkey.mdx deleted file mode 100644 index d727e116..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-create-passkey.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "createPasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Creates a new passkey authenticator for the user. - -
    -
  • This function generates a new passkey attestation and challenge, suitable for registration with the user's device.
  • -
  • Handles both web and React Native environments, automatically selecting the appropriate passkey creation flow.
  • -
  • The resulting attestation and challenge can be used to register the passkey with Turnkey.
  • -
- - - - - - -challenge string to use for passkey registration. If not provided, a new challenge will be generated. - - -display name for the passkey (defaults to a generated name based on the current timestamp). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an object containing: - - attestation: attestation object returned from the passkey creation process. - - encodedChallenge: encoded challenge string used for passkey registration. - - - - - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet-accounts.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet-accounts.mdx deleted file mode 100644 index 6615a8e8..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet-accounts.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "createWalletAccounts()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Creates new accounts in the specified wallet. - -
    -
  • This function creates new wallet accounts based on the provided account parameters or address formats.
  • -
  • If a walletId is provided, it creates the accounts in that specific wallet; otherwise, it uses the current session's wallet.
  • -
  • If a list of address formats is provided, it will create accounts in the wallet based on those formats, automatically determining the next available path indexes to avoid duplicates with existing accounts.
  • -
  • If account parameters are provided, they are used directly for account creation.
  • -
  • Automatically queries existing wallet accounts to prevent duplicate account creation for the same address format and path.
  • -
  • Supports stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -An array of account parameters or address formats to create in the wallet. - - -organization ID to create the accounts under a specific organization (walletId must be associated with the sub-organization). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -ID of the wallet to create accounts in. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of addresses for the newly created accounts. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet.mdx deleted file mode 100644 index fe9d7d0d..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-create-wallet.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "createWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Creates a new wallet for sub-organization. - -
    -
  • This function creates a new wallet for the current sub-organization.
  • -
  • If an organizationId is provided, the wallet will be created under that specific sub-organization; otherwise, it uses the current session's organizationId.
  • -
  • If a list of address formats is provided, accounts will be created in the wallet based on those formats (starting from path index 0).
  • -
  • If a list of account parameters is provided, those accounts will be created in the wallet.
  • -
  • If no accounts or address formats are provided, default Ethereum and Solana accounts will be created.
  • -
  • Optionally allows specifying the mnemonic length for the wallet seed phrase (defaults to 12).
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -array of account parameters or address formats to create in the wallet. - - -mnemonic length for the wallet seed phrase (defaults to 12). - - -organization ID to create the wallet under a specific sub-organization (defaults to the current session's organizationId). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -name of the wallet to create. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the ID of the newly created wallet. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-delete-sub-organization.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-delete-sub-organization.mdx deleted file mode 100644 index 46481361..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-delete-sub-organization.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "deleteSubOrganization()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Deletes the current sub-organization (sub-org) for the active session. - -
    -
  • This function deletes the sub-organization associated with the current active session.
  • -
  • By default, the deletion will fail if any wallets associated with the sub-organization have not been exported.
  • -
  • If ``deleteWithoutExport`` is set to true, the sub-organization will be deleted even if its wallets have not been exported (potentially resulting in loss of access to those wallets).
  • -
  • Requires an active session; otherwise, an error is thrown.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -flag to delete the sub-organization without requiring all wallets to be exported first (defaults to false). - - -parameter to stamp the request with a specific stamper. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `TDeleteSubOrganizationResponse` object containing the result of the deletion. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-disconnect-wallet-account.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-disconnect-wallet-account.mdx deleted file mode 100644 index e24f08cc..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-disconnect-wallet-account.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "disconnectWalletAccount()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Disconnects the specified wallet account. - -
    -
  • Requires the wallet manager and its connector to be initialized.
  • -
- - - - - wallet provider to disconnect. - - - -A successful response returns the following fields: - - - A promise that resolves once the wallet account is disconnected. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-export-private-key.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-export-private-key.mdx deleted file mode 100644 index 71ace17a..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-export-private-key.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "exportPrivateKey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Exports a private key as an encrypted bundle. - -
    -
  • This function exports the specified private key as an encrypted bundle, suitable for backup or transfer.
  • -
  • The exported bundle contains the private key's key material, encrypted to the provided target public key.
  • -
  • If a targetPublicKey is provided, the bundle will be encrypted to that public key; otherwise, an error will be thrown.
  • -
  • If an organizationId is provided, the private key will be exported under that sub-organization; otherwise, the current session's organizationId is used.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -organization ID to export the private key under a specific sub - - -ID of the private key to export. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -public key to encrypt the bundle to (required). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an `ExportBundle` object containing the encrypted private key and metadata. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet-account.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet-account.mdx deleted file mode 100644 index 3a2c492c..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet-account.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "exportWalletAccount()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Exports a wallet account as an encrypted bundle. - -
    -
  • This function exports the specified wallet account as an encrypted bundle, suitable for backup or transfer.
  • -
  • The exported bundle contains the wallet account's key material, encrypted to the provided target public key.
  • -
  • If a targetPublicKey is provided, the bundle will be encrypted to that public key; otherwise, an error will be thrown.
  • -
  • If an organizationId is provided, the wallet account will be exported under that sub-organization; otherwise, the current session's organizationId is used.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -address of the wallet account to export. - - -organization ID to export the wallet account under a specific sub-organization. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -public key to encrypt the bundle to. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an `ExportBundle` object containing the encrypted wallet account and metadata. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet.mdx deleted file mode 100644 index e41ec767..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-export-wallet.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "exportWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Exports a wallet as an encrypted bundle. - -
    -
  • This function exports the specified wallet and its accounts as an encrypted bundle, suitable for backup or transfer.
  • -
  • The exported bundle contains the wallet's seed phrase, encrypted to the provided target public key.
  • -
  • If a targetPublicKey is provided, the bundle will be encrypted to that public key; otherwise, an error will be thrown.
  • -
  • If an organizationId is provided, the wallet will be exported under that sub-organization; otherwise, the current session's organizationId is used.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
  • The exported bundle can later be imported using the ``importWallet`` method.
  • -
- - - - - - -organization ID to export the wallet under a specific sub-organization (walletId must be associated with the sub-organization). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -public key to encrypt the bundle to (required). - - -ID of the wallet to export. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an `ExportBundle` object containing the encrypted wallet seed phrase and metadata. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-p256-api-key-user.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-p256-api-key-user.mdx deleted file mode 100644 index 03a5c247..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-p256-api-key-user.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "fetchOrCreateP256ApiKeyUser()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches an existing user by P-256 API key public key, or creates a new one if none exists. - -
    -
  • This function is idempotent: multiple calls with the same ``publicKey`` will always return the same user.
  • -
  • Attempts to find a user whose API keys include the given P-256 public key.
  • -
  • If a matching user is found, it is returned as-is.
  • -
  • If no matching user is found, a new user is created with the given public key as a P-256 API key.
  • -
- - - - - - - - -optional API key name to assign if creating a new API key (defaults to `public-key-user-${publicKey}`). - - -optional username to assign if creating a new user (defaults to `"Public Key User"`). - - - -the P-256 public key to use for lookup and creation. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the existing or newly created v1User. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-policies.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-policies.mdx deleted file mode 100644 index 065d95a3..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-or-create-policies.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "fetchOrCreatePolicies()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches each requested policy if it exists, or creates it if it does not. - -
    -
  • This function is idempotent: multiple calls with the same policies will not create duplicates.
  • -
  • For every policy in the request:
  • -
  • If it already exists, it is returned with its ``policyId``.
  • -
  • If it does not exist, it is created and returned with its new ``policyId``.
  • -
- - - - - - -the list of policies to fetch or create. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of objects, each containing: - - `policyId`: the unique identifier of the policy. - - `policyName`: human-readable name of the policy. - - `effect`: the instruction to DENY or ALLOW an activity. - - `condition`: (optional) the condition expression that triggers the effect. - - `consensus`: (optional) the consensus expression that triggers the effect. - - `notes`: (optional) developer notes or description for the policy. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-private-keys.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-private-keys.mdx deleted file mode 100644 index 7c50be64..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-private-keys.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "fetchPrivateKeys()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches all private keys for the current user. - -
    -
  • Retrieves private keys from the Turnkey API.
  • -
  • Supports stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of `v1PrivateKey` objects. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-user.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-user.mdx deleted file mode 100644 index 93fd8d43..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-user.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "fetchUser()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches the user details for the current session or a specified user. - -
    -
  • Retrieves user details from the Turnkey API using the provided userId and organizationId, or defaults to those from the active session.
  • -
  • If no userId is provided, the userId from the current session is used.
  • -
  • If no organizationId is provided, the organizationId from the current session is used.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
  • Ensures that an active session exists before making the request.
  • -
- - - - - - -organization ID to specify the sub-organization (defaults to the current session's organizationId). - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to fetch specific user details (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `v1User` object containing the user details. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-accounts.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-accounts.mdx deleted file mode 100644 index e6c574b0..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-accounts.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "fetchWalletAccounts()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches all accounts for a specific wallet, including both embedded and connected wallet accounts. - -
    -
  • For embedded wallets, retrieves accounts from the Turnkey API, supporting pagination (defaults to the first page with a limit of 100 accounts).
  • -
  • For connected wallets (e.g., browser extensions or external providers), constructs account objects for each connected address from the provided or discovered wallet providers.
  • -
  • Automatically determines the account type and populates relevant fields such as address, curve, and signing capability.
  • -
  • Optionally allows filtering by a specific set of wallet providers and supports custom pagination options.
  • -
  • Supports stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -pagination options for embedded wallets. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -wallet for which to fetch accounts. - - -list of wallet providers to filter by (used for connected wallets). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of `v1WalletAccount` objects. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-providers.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-providers.mdx deleted file mode 100644 index 02191683..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallet-providers.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "fetchWalletProviders()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Retrieves wallet providers from the initialized wallet manager. - -
    -
  • Optionally filters providers by the specified blockchain chain.
  • -
  • Throws an error if the wallet manager is not initialized.
  • -
- - - - - optional blockchain chain to filter the returned providers. - - - -A successful response returns the following fields: - - - A promise that resolves to an array of wallet providers. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallets.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallets.mdx deleted file mode 100644 index 05143d3a..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-fetch-wallets.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "fetchWallets()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches all wallets for the current user, including both embedded and connected wallets. - -
    -
  • Retrieves all wallets associated with the organizationId from the current active session.
  • -
  • For each embedded wallet, automatically fetches and attaches all associated wallet accounts.
  • -
  • For connected wallets (e.g., browser extensions or external providers), groups providers by wallet name and attaches all connected accounts.
  • -
  • Returns both embedded and connected wallets in a single array, each with their respective accounts populated.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -array of wallet providers to use for fetching wallets. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of `Wallet` objects. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-get-active-session-key.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-get-active-session-key.mdx deleted file mode 100644 index 1a985ae1..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-get-active-session-key.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "getActiveSessionKey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Retrieves the active session key currently set in persistent storage. - -
    -
  • This function fetches the session key that is currently marked as active in the client's persistent storage.
  • -
  • The active session key determines which session is used for all session-dependent operations.
  • -
  • If no active session key is set, returns ``undefined``.
  • -
  • Useful for determining which session is currently in use, especially when managing multiple sessions.
  • -
- - - -

No parameters.

- - -A successful response returns the following fields: - - - A promise that resolves to the active session key as a string, or `undefined` if no active session is set. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-get-all-sessions.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-get-all-sessions.mdx deleted file mode 100644 index 88c2d283..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-get-all-sessions.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "getAllSessions()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Retrieves all sessions stored in persistent storage. - -
    -
  • This function fetches all session objects currently stored by the client, including those that are not active.
  • -
  • Returns a record mapping each session key to its corresponding ``Session`` object.
  • -
  • Useful for session management, auditing, or displaying all available sessions to the user.
  • -
  • Automatically skips any session keys that do not have a valid session object.
  • -
- - - -

No parameters.

- - -A successful response returns the following fields: - - - A promise that resolves to a record of session keys and their corresponding `Session` objects, or `undefined` if no sessions exist. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-get-proxy-auth-config.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-get-proxy-auth-config.mdx deleted file mode 100644 index 13032c47..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-get-proxy-auth-config.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "getProxyAuthConfig()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Fetches the WalletKit proxy authentication configuration from the auth proxy. - -
    -
  • This function makes a request to the Turnkey auth proxy to retrieve the current WalletKit configuration,
  • -
- -including supported authentication methods, OAuth providers, and any custom proxy settings. - -
    -
  • Useful for dynamically configuring the client UI or authentication flows based on the proxy's capabilities.
  • -
  • Ensures that the client is aware of the latest proxy-side configuration, which may affect available login/signup options.
  • -
- - - -

No parameters.

- - -A successful response returns the following fields: - - - A promise that resolves to a `ProxyTGetWalletKitConfigResponse` object containing the proxy authentication configuration. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-get-session.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-get-session.mdx deleted file mode 100644 index 0020e2ef..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-get-session.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "getSession()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Retrieves the session associated with the specified session key, or the active session by default. - -
    -
  • This function retrieves the session object from storage, using the provided session key or, if not specified, the current active session key.
  • -
  • If no session key is provided and there is no active session, it returns undefined.
  • -
  • Returns the session details, including public key, organization ID, user ID, and expiration.
  • -
- - - - - - -session key to retrieve a specific session (defaults to the current active session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `Session` object containing the session details, or undefined if not found. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-get-wallet-providers.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-get-wallet-providers.mdx deleted file mode 100644 index 02191683..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-get-wallet-providers.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "fetchWalletProviders()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Retrieves wallet providers from the initialized wallet manager. - -
    -
  • Optionally filters providers by the specified blockchain chain.
  • -
  • Throws an error if the wallet manager is not initialized.
  • -
- - - - - optional blockchain chain to filter the returned providers. - - - -A successful response returns the following fields: - - - A promise that resolves to an array of wallet providers. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-email.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-email.mdx deleted file mode 100644 index ee6e6a35..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-email.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "handleAddEmail()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:516

- - - -Handles the add user email flow. - -
    -
  • This function opens a modal with the UpdateEmail component, using a modified title and flow for adding and verifying the user's email address.
  • -
  • If an email is provided, it will immediately send an OTP request to the user and display the OTP verification modal.
  • -
  • Supports both manual entry and pre-filled email addresses, as well as custom modal titles and subtitles.
  • -
  • Uses the addEmailContinue helper to manage the OTP flow, verification, and update logic.
  • -
  • After successful verification and update, the user details state is refreshed and an optional success page can be shown.
  • -
  • Supports customizing the duration of the success page after update.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -parameter to specify the new email address. - - -subtitle for the modal. - - -duration (in ms) for the success page after update (default: 0, no success page). - - -title for the modal (defaults to "Connect an email" if the user does not have an email). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user that was changed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-oauth-provider.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-oauth-provider.mdx deleted file mode 100644 index 05f4f669..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-oauth-provider.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "handleAddOauthProvider()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:568

- - - -Handles the addition of an OAuth provider for the user. - -
    -
  • This function opens a modal-driven flow for linking a new OAuth provider (Google, Apple, or Facebook) to the user's account.
  • -
  • It supports all enabled OAuth providers as defined in the configuration and dynamically triggers the appropriate OAuth flow.
  • -
  • Uses the handleGoogleOauth, handleAppleOauth, and handleFacebookOauth functions to initiate the provider-specific OAuth authentication process.
  • -
  • After successful authentication, the provider is linked to the user's account and a success page is shown.
  • -
  • Automatically refreshes the user details state after linking to ensure the latest provider list is available in the provider.
  • -
  • Optionally allows specifying the stamper to use for the addition (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -The name of the OAuth provider to add (OAuthProviders.GOOGLE, OAuthProviders.APPLE, OAuthProviders.FACEBOOK). - - -parameter to specify the stamper to use for the addition (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-passkey.mdx deleted file mode 100644 index b5ea753b..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-passkey.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "handleAddPasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:621

- - - -Handles the addition of a passkey (authenticator) for the user. - -
    -
  • This function opens a modal-driven flow for adding a new passkey authenticator (WebAuthn/FIDO2) to the user's account.
  • -
  • If a ``name`` or ``displayName`` is provided, those will be used for the passkey metadata; otherwise, defaults are generated based on the website and timestamp.
  • -
  • The passkey is created and linked to the specified user (by ``userId``) or the current session's user if not provided.
  • -
  • After successful addition, a success page is shown for the specified duration (or skipped if ``successPageDuration`` is 0).
  • -
  • Supports stamping the request with a specific stamper (``StamperType.Passkey``, ``StamperType.ApiKey``, or ``StamperType.Wallet``) for granular authentication control.
  • -
  • Automatically refreshes the user details state after successful addition to ensure the latest authenticators list is available in the provider.
  • -
  • Handles all error cases and throws a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -display name for the passkey (shown to the user in the UI). - - -internal name for the passkey (for backend or developer reference). - - -parameter to stamp the request with a specific stamper (`StamperType.Passkey`, `StamperType.ApiKey`, or `StamperType.Wallet`). - - -duration (in ms) for the success page after addition (default: 0, no success page). - - -user ID to add the passkey for a specific user (defaults to current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the user's updated passkeys. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-phone-number.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-phone-number.mdx deleted file mode 100644 index e686ceee..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-add-phone-number.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "handleAddPhoneNumber()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:543

- - - -Handles the add phone number flow. - -
    -
  • This function opens a modal with the UpdatePhoneNumber component for adding and verifying the user's phone number.
  • -
  • If a phone number is provided, it will immediately send an OTP request to the user and display the OTP verification modal.
  • -
  • Supports both manual entry and pre-filled phone numbers, as well as custom modal titles and subtitles.
  • -
  • Uses the addPhoneNumberContinue helper to manage the OTP flow, verification, and update logic.
  • -
  • After successful verification and update, the user details state is refreshed and an optional success page can be shown.
  • -
  • Supports customizing the duration of the success page after update.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -parameter to specify the formatted phone number. - - -parameter to specify the new phone number. - - -subtitle for the modal. - - -duration (in ms) for the success page after update (default: 0, no success page). - - -title for the modal. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user that was changed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-apple-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-apple-oauth.mdx deleted file mode 100644 index a8e58b8e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-apple-oauth.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "handleAppleOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:247

- - - -Handles the Apple OAuth flow. - -
    -
  • This function initiates the Apple OAuth flow by either redirecting the user to the Apple authorization page or opening it in a popup window.
  • -
  • The flow type is determined by the ``openInPage`` parameter: if true, the current page is redirected; if false (default), a popup window is used.
  • -
  • Generates a new ephemeral API key pair and uses its public key as the nonce for the OAuth request, ensuring cryptographic binding of the session.
  • -
  • Constructs the Apple OAuth URL with all required parameters, including client ID, redirect URI, response type, response mode, nonce, and state.
  • -
  • The ``state`` parameter includes the provider, flow type, public key, and any additional state parameters for tracking or custom logic.
  • -
  • If ``openInPage`` is true, the function redirects and returns a promise that resolves on redirect or times out after 5 minutes.
  • -
  • If ``openInPage`` is false, a popup window is opened and the function returns a promise that resolves when the flow completes, or rejects if the window is closed or times out.
  • -
  • On successful authentication, the function either calls the provided ``onOauthSuccess`` callback, triggers the ``onOauthRedirect`` callback from provider callbacks, or completes the OAuth flow internally by calling ``completeOauth``.
  • -
  • Handles all error cases, including missing configuration, popup failures, and timeouts, and throws a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -Additional key-value pairs to include in the OAuth state parameter for custom tracking or logic. - - -The Apple Client ID to use (defaults to the client ID from configuration). - - -Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`). - -onOauthSuccess params: -- oidcToken: The OIDC token received from the OAuth flow. -- providerName: The name of the OAuth provider ("apple"). - - -Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-connect-external-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-connect-external-wallet.mdx deleted file mode 100644 index 0dd4fdf8..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-connect-external-wallet.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "handleConnectExternalWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:704

- - - -Handles the connecting of an external wallet account to the user's Turnkey account. - -
    -
  • This function opens a modal with the ConnectWalletModal component, allowing the user to select and connect an external wallet provider (such as MetaMask, Phantom, etc.).
  • -
  • It fetches the list of available wallet providers (for all supported chains) and passes them to the modal for user selection.
  • -
  • After a successful wallet connection, the provider state is refreshed to include the newly connected wallet account.
  • -
  • Optionally, a success page is shown for the specified duration after connecting (default: 2000ms).
  • -
  • Supports both Ethereum and Solana wallet providers, and can be extended to additional chains as supported by Turnkey.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes if the client is not initialized or no active session is found.
  • -
- - - - - - -duration (in ms) for the success page after connecting (default: 2000ms). - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-discord-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-discord-oauth.mdx deleted file mode 100644 index b45f45b5..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-discord-oauth.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "handleDiscordOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:140

- - - -Handles the Discord OAuth 2.0 flow. - -
    -
  • This function initiates the OAuth 2.0 PKCE flow with Discord by redirecting the user to the Discord authorization page or opening it in a popup window.
  • -
  • It supports both "popup" and "redirect" flows, determined by the ``openInPage`` parameter.
  • -
  • Generates a new ephemeral API key pair and uses its public key as part of the state and a cryptographic nonce to bind the OAuth session.
  • -
  • Creates a PKCE verifier/challenge pair, storing the verifier in ``sessionStorage`` for later use in the token exchange.
  • -
  • Constructs the Discord OAuth URL with all required parameters, including client ID, redirect URI, response type, scope, PKCE code challenge, nonce, and state.
  • -
  • The ``state`` parameter encodes the provider name, flow type, ephemeral public key, and any additional key-value pairs provided in ``additionalState``.
  • -
  • If ``openInPage`` is true, the current page is redirected to the OAuth URL and the function returns a promise that resolves on redirect or rejects after 5 minutes if no redirect occurs.
  • -
  • If ``openInPage`` is false, a popup window is opened for the OAuth flow, and the function returns a promise that resolves when the OAuth code is captured or rejects if the popup is closed or times out.
  • -
  • On receiving an authorization code, the function exchanges it for an OIDC token via the Turnkey proxy (``proxyOAuth2Authenticate``) using the PKCE verifier, redirect URI, and nonce.
  • -
  • On successful authentication, the function either calls the provided ``onOauthSuccess`` callback, triggers the ``onOauthRedirect`` callback from provider callbacks, or completes the OAuth flow internally by calling ``completeOauth``.
  • -
  • Handles error cases such as missing configuration, popup failures, missing PKCE verifier, or Turnkey proxy failures, throwing a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -Additional key-value pairs to include in the OAuth state parameter for tracking or custom logic. - - -The Discord Client ID to use (defaults to the client ID from configuration). - - -Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`). - -onOauthSuccess params: -- oidcToken: The OIDC token issued by Turnkey after exchanging the auth code. -- providerName: The name of the OAuth provider ("discord"). - - -Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-private-key.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-private-key.mdx deleted file mode 100644 index b9a33736..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-private-key.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "handleExportPrivateKey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:336

- - - -handles the export private key flow. - -
    -
  • This function opens a modal with the ExportComponent for exporting a private key.
  • -
  • Uses Turnkey's export iframe flow to securely export private key material.
  • -
  • The export process encrypts the exported bundle to a target public key, which is generated and managed inside the iframe for maximum security.
  • -
  • A request is made to the Turnkey API to export the private key, encrypted to the target public key.
  • -
  • The resulting export bundle is injected into the iframe, where it is decrypted and displayed to the user.
  • -
  • If a custom iframe URL is used, a target public key can be provided explicitly.
  • -
  • Hexadecimal and Solana address formats are supported for wallet account exports - defaulting to Hexadecimal if not specified.
  • -
  • Optionally allows specifying the stamper to use for the export (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • The modal-driven UI ensures the user is guided through the export process and can securely retrieve their exported material.
  • -
- - - - - - -The format of the private key to export (KeyFormat.Hexadecimal or KeyFormat.Solana). - - -The ID of the private key to export. - - -The stamper to use for the export (Passkey, ApiKey, or Wallet). - - -The target public key to encrypt the export bundle to (required for custom iframe flows). - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet-account.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet-account.mdx deleted file mode 100644 index 7dd3a648..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet-account.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "handleExportWalletAccount()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:364

- - - -Handles the export wallet account flow. - -
    -
  • This function opens a modal with the ExportComponent for exporting a wallet account.
  • -
  • Uses Turnkey's export iframe flow to securely export wallet account material.
  • -
  • The export process encrypts the exported bundle to a target public key, which is generated and managed inside the iframe for maximum security.
  • -
  • A request is made to the Turnkey API to export the wallet account, encrypted to the target public key.
  • -
  • The resulting export bundle is injected into the iframe, where it is decrypted and displayed to the user.
  • -
  • If a custom iframe URL is used, a target public key can be provided explicitly.
  • -
  • Hexadecimal and Solana address formats are supported for wallet account exports - defaulting to Hexadecimal if not specified.
  • -
  • Optionally allows specifying the stamper to use for the export (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • The modal-driven UI ensures the user is guided through the export process and can securely retrieve their exported material.
  • -
- - - - - - -The address of the wallet account to export. - - -The format of the address to export (KeyFormat.Hexadecimal or KeyFormat.Solana). - - -The stamper to use for the export (Passkey, ApiKey, or Wallet). - - -The target public key to encrypt the export bundle to (required for custom iframe flows). - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet.mdx deleted file mode 100644 index 7f7e275f..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "handleExportWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:311

- - - -Handles the export wallet flow. - -
    -
  • This function opens a modal with the ExportComponent for exporting a wallet.
  • -
  • Uses Turnkey's export iframe flow to securely export wallet material.
  • -
  • The export process encrypts the exported bundle to a target public key, which is generated and managed inside the iframe for maximum security.
  • -
  • A request is made to the Turnkey API to export the wallet, encrypted to the target public key.
  • -
  • The resulting export bundle is injected into the iframe, where it is decrypted and displayed to the user.
  • -
  • If a custom iframe URL is used, a target public key can be provided explicitly.
  • -
  • Optionally allows specifying the stamper to use for the export (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • The modal-driven UI ensures the user is guided through the export process and can securely retrieve their exported material.
  • -
- - - - - - -The stamper to use for the export (Passkey, ApiKey, or Wallet). - - -The target public key to encrypt the export bundle to (required for custom iframe flows). - - -The ID of the wallet to export. - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-facebook-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-facebook-oauth.mdx deleted file mode 100644 index f7ad6ae1..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-facebook-oauth.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "handleFacebookOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:283

- - - -Handles the Facebook OAuth flow. - -
    -
  • This function initiates the Facebook OAuth flow by either redirecting the user to the Facebook authorization page or opening it in a popup window.
  • -
  • The flow type is determined by the ``openInPage`` parameter: if true, the current page is redirected; if false (default), a popup window is used.
  • -
  • Generates a new ephemeral API key pair and uses its public key as the nonce for the OAuth request, ensuring cryptographic binding of the session.
  • -
  • Uses PKCE (Proof Key for Code Exchange) for enhanced security, generating a code verifier and challenge for the Facebook OAuth flow.
  • -
  • Constructs the Facebook OAuth URL with all required parameters, including client ID, redirect URI, response type, code challenge, nonce, and state.
  • -
  • The ``state`` parameter includes the provider, flow type, public key, and any additional state parameters for tracking or custom logic.
  • -
  • If ``openInPage`` is true, the function redirects and returns a promise that resolves on redirect or times out after 5 minutes.
  • -
  • If ``openInPage`` is false, a popup window is opened and the function returns a promise that resolves when the flow completes, or rejects if the window is closed or times out.
  • -
  • On successful authentication, the function either calls the provided ``onOauthSuccess`` callback, triggers the ``onOauthRedirect`` callback from provider callbacks, or completes the OAuth flow internally by calling ``completeOauth``.
  • -
  • Handles all error cases, including missing configuration, popup failures, and timeouts, and throws a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -Additional key-value pairs to include in the OAuth state parameter for custom tracking or logic. - - -The Facebook Client ID to use (defaults to the client ID from configuration). - - -Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`). - -onOauthSuccess params: -- oidcToken: The OIDC token received from the OAuth flow. -- providerName: The name of the OAuth provider ("facebook"). - - -Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-google-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-google-oauth.mdx deleted file mode 100644 index 7d163c1c..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-google-oauth.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "handleGoogleOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:212

- - - -Handles the Google OAuth flow. - -
    -
  • This function initiates the Google OAuth flow by redirecting the user to the Google authorization page or opening it in a popup window.
  • -
  • It supports both "popup" and "redirect" flows, determined by the ``openInPage`` parameter.
  • -
  • Generates a new ephemeral API key pair and uses its public key as the nonce for the OAuth request, ensuring cryptographic binding of the session.
  • -
  • Constructs the Google OAuth URL with all required parameters, including client ID, redirect URI, response type, scope, nonce, and state.
  • -
  • The ``state`` parameter includes the provider, flow type, public key, and any additional state parameters for tracking or custom logic.
  • -
  • If ``openInPage`` is true, the current page is redirected to the Google OAuth URL and the function returns a promise that resolves on redirect or times out after 5 minutes.
  • -
  • If ``openInPage`` is false, a popup window is opened for the OAuth flow, and the function returns a promise that resolves when the flow completes or rejects if the window is closed or times out.
  • -
  • On successful authentication, the function either calls the provided ``onOauthSuccess`` callback, triggers the ``onOauthRedirect`` callback from provider callbacks, or completes the OAuth flow internally by calling ``completeOauth``.
  • -
  • Handles all error cases, including missing configuration, popup failures, and timeouts, and throws a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -Additional key-value pairs to include in the OAuth state parameter for custom tracking or logic. - - -The Google Client ID to use (defaults to the client ID from configuration). - - -Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`). - -onOauthSuccess params: -- oidcToken: The OIDC token received from the OAuth flow. -- providerName: The name of the OAuth provider ("google"). - - -Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-private-key.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-private-key.mdx deleted file mode 100644 index 0de4d7b1..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-private-key.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "handleImportPrivateKey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:410

- - - -Handles the import private key flow. - -
    -
  • This function opens a modal with the ImportComponent for importing a private key.
  • -
  • Supports importing private keys using an encrypted bundle.
  • -
  • Address formats (v1AddressFormat[]) and curve (v1Curve) must be specified based on the type of private key the user will import.
  • -
  • Supports customizing the duration of the success page shown after a successful import.
  • -
  • Allows specifying the stamper to use for the import (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • Ensures the imported private key is added to the user's wallet list and the provider state is refreshed.
  • -
- - - - - - -array of address formats (v1AddressFormat[]) that the private key supports (Eg: "ADDRESS_FORMAT_ETHEREUM" for Ethereum, "ADDRESS_FORMAT_SOLANA" for Solana). - - -curve type (v1Curve) for the private key (Eg: "CURVE_SECP256K1" for Ethereum, "CURVE_ED25519" for Solana). - - -parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet). - - -duration (in ms) for the success page after import (default: 0, no success page). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the new private key's ID. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-wallet.mdx deleted file mode 100644 index e1f128b5..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-wallet.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "handleImportWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:387

- - - -Handles the import wallet flow. - -
    -
  • This function opens a modal with the ImportComponent for importing a wallet.
  • -
  • Supports importing wallets using an encrypted bundle, with optional default accounts or custom account parameters.
  • -
  • Allows users to specify default wallet accounts (address formats or account params) to pre-fill the import form.
  • -
  • Supports customizing the duration of the success page shown after a successful import.
  • -
  • Allows specifying the stamper to use for the import (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • Ensures the imported wallet is added to the user's wallet list and the provider state is refreshed.
  • -
- - - - - - -array of default wallet accounts (v1AddressFormat[] or v1WalletAccountParams[]) to pre-fill the import form. - - -parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet). - - -duration (in ms) for the success page after import (default: 0, no success page). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the new wallet's ID. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-login.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-login.mdx deleted file mode 100644 index 134ca45e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-login.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "handleLogin()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:111

- - - -Handles the login or sign-up flow. - -
    -
  • This function opens a modal with the AuthComponent, allowing the user to log in or sign up using any enabled authentication method (Passkey, Wallet, OTP, or OAuth).
  • -
  • It automatically determines available authentication methods based on the current provider configuration and proxy settings.
  • -
  • The modal-driven flow guides the user through the appropriate authentication steps, including social login if enabled.
  • -
  • After successful authentication, the provider state is updated and all relevant session, user, and wallet data are refreshed.
  • -
  • This function is typically used to trigger authentication from a UI button or navigation event.
  • -
- - - - - - -Optional session key to resume an existing session or pre-fill session details in the login modal. - - - - - -A successful response returns the following fields: - - - A void promise. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-oauth-provider.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-oauth-provider.mdx deleted file mode 100644 index 2d32dba9..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-oauth-provider.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "handleRemoveOauthProvider()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:593

- - - -Handles the removal of an OAuth provider. - -
    -
  • This function opens a modal with the RemoveOAuthProvider component, allowing the user to confirm and remove an OAuth provider (such as Google, Apple, or Facebook) from their account.
  • -
  • It supports specifying the provider ID to remove, as well as optional modal title and subtitle for custom UI messaging.
  • -
  • After successful removal, the user details state is refreshed to reflect the updated list of linked OAuth providers.
  • -
  • Optionally, a callback can be provided to handle successful removal, receiving the updated list of provider IDs.
  • -
  • Supports customizing the duration of the success page shown after removal.
  • -
  • Allows specifying the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -The ID of the OAuth provider to remove (as found in the user's provider list). - - -parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -subtitle for the modal. - - -duration (in ms) for the success page after removal (default: 0, no success page). - - -title for the modal. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of provider IDs that were removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-passkey.mdx deleted file mode 100644 index f359cb79..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-passkey.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "handleRemovePasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:649

- - - -Handles the removal of a passkey (authenticator) for the user. - -
    -
  • This function opens a modal with the RemovePasskey component, allowing the user to confirm and remove a passkey authenticator from their account.
  • -
  • It supports specifying the authenticator ID to remove, as well as optional modal title and subtitle for custom UI messaging.
  • -
  • After successful removal, the user details state is refreshed to reflect the updated list of authenticators.
  • -
  • Supports customizing the duration of the success page shown after removal.
  • -
  • Allows specifying the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -The ID of the authenticator (passkey) to remove. - - -parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -subtitle for the modal. - - -duration (in ms) for the success page after removal (default: 0, no success page). - - -title for the modal. - - -user ID to remove the passkey for a specific user (defaults to current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of authenticator IDs that were removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-email.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-email.mdx deleted file mode 100644 index 055b2f4d..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-email.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "handleRemoveUserEmail()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:717

- - - -Handles the removal of a user's email address from their Turnkey account. - -
    -
  • This function opens a modal with the RemoveUserEmail component, allowing the user to confirm and remove their email address.
  • -
- - - - - - -parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -duration (in ms) for the success page after removal (default: 0, no success page). - - -The user ID to remove the email for (defaults to current session's userId). - - - - - -A successful response returns the following fields: - - - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-phone-number.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-phone-number.mdx deleted file mode 100644 index a9205b6f..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-remove-user-phone-number.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "handleRemoveUserPhoneNumber()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:732

- - - -Handles the removal of a user's phone number from their Turnkey account. - -
    -
  • This function opens a modal with the RemoveUserPhoneNumber component, allowing the user to confirm and remove their phone number.
  • -
- - - - - - -parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -duration (in ms) for the success page after removal (default: 0, no success page). - - -The user ID to remove the phone number for (defaults to current session's userId). - - - - - -A successful response returns the following fields: - - - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-sign-message.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-sign-message.mdx deleted file mode 100644 index 1d4478f4..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-sign-message.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "handleSignMessage()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:678

- - - -Handles the signing of a message by displaying a modal for user interaction. - -
    -
  • This function opens a modal with the SignMessageModal component, prompting the user to review and approve the message signing request.
  • -
  • Supports signing with any wallet account managed by Turnkey, including externally connected wallets.
  • -
  • Allows for optional overrides of the encoding and hash function used for the payload, enabling advanced use cases or compatibility with specific blockchains.
  • -
  • Optionally displays a subtext in the modal for additional context or instructions to the user.
  • -
  • Returns a promise that resolves to a ``v1SignRawPayloadResult`` object containing the signed message, signature, and metadata.
  • -
- - - - - - -whether to add the Ethereum prefix to the message (default: false). - - -encoding for the payload (defaults to the proper encoding for the account type). - - -hash function to use (defaults to the appropriate function for the account type). - - -The message to sign. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -subtext to display in the modal. - - -duration in seconds to display the success page after signing. - - -The wallet account to use for signing. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `v1SignRawPayloadResult` object containing the signed message. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-email.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-email.mdx deleted file mode 100644 index 6dffe3cb..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-email.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "handleUpdateUserEmail()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:436

- - - -Handles the update user name flow. - -
    -
  • This function opens a modal with the UpdateUserName component for updating and verifying the user's name.
  • -
  • If a userName is provided, it will directly update the user name without showing the modal.
  • -
  • Uses updateUserName under the hood to perform the update and automatically refreshes the user details state after a successful update.
  • -
  • Optionally displays a success page after the update, with customizable duration.
  • -
  • Supports passing a custom title and subtitle for the modal UI.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - - -subtitle for the modal. - - -duration (in ms) for the success page after update (default: 0, no success page). - - -title for the modal. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user that was changed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-name.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-name.mdx deleted file mode 100644 index d63aa151..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-name.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "handleUpdateUserName()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:490

- - - -Handles the update user email flow. - -
    -
  • This function opens a modal with the UpdateEmail component for updating and verifying the user's email address.
  • -
  • If an email is provided, it will immediately send an OTP request to the user and display the OTP verification modal.
  • -
  • Supports both manual entry and pre-filled email addresses, as well as custom modal titles and subtitles.
  • -
  • Uses the updateEmailContinue helper to manage the OTP flow, verification, and update logic.
  • -
  • After successful verification and update, the user details state is refreshed and an optional success page can be shown.
  • -
  • Supports customizing the duration of the success page after update.
  • -
  • Handles all error cases and throws a TurnkeyError with appropriate error codes.
  • -
- - - - - - -parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -subtitle for the modal. - - -duration (in ms) for the success page after update (default: 0, no success page). - - -title for the modal. - - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user that was changed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-phone-number.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-phone-number.mdx deleted file mode 100644 index 6df0de8e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-update-user-phone-number.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "handleUpdateUserPhoneNumber()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:463

- - - -Handles the update user phone number flow. - -
    -
  • This function opens a modal with the UpdatePhoneNumber component for updating and verifying the user's phone number.
  • -
  • If a phoneNumber is provided, it will directly send an OTP request to the user and display the OTP verification modal.
  • -
  • Supports both manual entry and pre-filled phone numbers, as well as custom modal titles and subtitles.
  • -
  • Uses the updatePhoneNumberContinue helper to manage the OTP flow, verification, and update logic.
  • -
  • After successful verification and update, the user details state is refreshed and an optional success page can be shown.
  • -
  • Supports customizing the duration of the success page after update.
  • -
  • Throws a TurnkeyError if the client is not initialized, no active session is found, SMS OTP is not enabled, or if there is an error updating the phone number.
  • -
- - - - - - -parameter to specify the formatted phone number. - - -parameter to specify the new phone number. - - -subtitle for the modal. - - -duration for the success page (default: 0, no success page). - - -title for the modal. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user that was changed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-xoauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-handle-xoauth.mdx deleted file mode 100644 index 5ae149ce..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-handle-xoauth.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "handleXOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:177

- - - -Handles the Twitter (X) OAuth 2.0 flow. - -
    -
  • This function initiates the OAuth 2.0 PKCE flow with Twitter (X) by redirecting the user to the X authorization page or opening it in a popup window.
  • -
  • It supports both "popup" and "redirect" flows, determined by the ``openInPage`` parameter.
  • -
  • Generates a new ephemeral API key pair and uses its public key as part of the state and a cryptographic nonce to bind the OAuth session.
  • -
  • Creates a PKCE verifier/challenge pair, storing the verifier in ``sessionStorage`` for later use in the token exchange.
  • -
  • Constructs the Twitter (X) OAuth URL with all required parameters, including client ID, redirect URI, response type, scope, PKCE code challenge, nonce, and state.
  • -
  • The ``state`` parameter encodes the provider name, flow type, ephemeral public key, and any additional key-value pairs provided in ``additionalState``.
  • -
  • If ``openInPage`` is true, the current page is redirected to the OAuth URL and the function returns a promise that resolves on redirect or rejects after 5 minutes if no redirect occurs.
  • -
  • If ``openInPage`` is false, a popup window is opened for the OAuth flow, and the function returns a promise that resolves when the OAuth code is captured or rejects if the popup is closed or times out.
  • -
  • On receiving an authorization code, the function exchanges it for an OIDC token via the Turnkey proxy (``proxyOAuth2Authenticate``) using the PKCE verifier, redirect URI, and nonce.
  • -
  • On successful authentication, the function either calls the provided ``onOauthSuccess`` callback, triggers the ``onOauthRedirect`` callback from provider callbacks, or completes the OAuth flow internally by calling ``completeOauth``.
  • -
  • Handles error cases such as missing configuration, popup failures, missing PKCE verifier, or Turnkey proxy failures, throwing a ``TurnkeyError`` with appropriate error codes.
  • -
- - - - - - -Additional key-value pairs to include in the OAuth state parameter for tracking or custom logic. - - -The Twitter (X) Client ID to use (defaults to the client ID from configuration). - - -Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`). - -onOauthSuccess params: -- oidcToken: The OIDC token issued by Turnkey after exchanging the auth code. -- providerName: The name of the OAuth provider ("twitter"). - - -Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-import-private-key.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-import-private-key.mdx deleted file mode 100644 index 642b2251..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-import-private-key.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "importPrivateKey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Imports a private key from an encrypted bundle. - -
    -
  • This function imports a private key using the provided encrypted bundle.
  • -
  • If a userId is provided, the private key will be imported for that specific user; otherwise, it uses the current session's userId.
  • -
  • Requires address formats to
  • -
  • Automatically infers the cryptographic curve used to generate the private key based on the address format (can be optionally overriden if needed).
  • -
  • The encrypted bundle MUST be encrypted to ensure security.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - - -the cryptographic curve used to generate a given private key - - -encrypted bundle containing the private key key material and metadata. - - -name of the private key to create upon import. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to import the wallet for a specific user (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the ID of the imported wallet. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-import-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-import-wallet.mdx deleted file mode 100644 index a63a6d65..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-import-wallet.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "importWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Imports a wallet from an encrypted bundle. - -
    -
  • This function imports a wallet using the provided encrypted bundle and creates accounts based on the provided parameters.
  • -
  • If a userId is provided, the wallet will be imported for that specific user; otherwise, it uses the current session's userId.
  • -
  • If an accounts array is provided, those accounts will be created in the imported wallet; otherwise, default Ethereum and Solana accounts will be created.
  • -
  • The encrypted bundle MUST be encrypted to
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -array of account parameters to create in the imported wallet (defaults to standard Ethereum and Solana accounts). - - -encrypted bundle containing the wallet seed phrase and metadata. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to import the wallet for a specific user (defaults to the current session's userId). - - -name of the wallet to create upon import. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the ID of the imported wallet. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-init-otp.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-init-otp.mdx deleted file mode 100644 index 957459a0..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-init-otp.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "initOtp()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Initializes the OTP process by sending an OTP code to the provided contact. - -
    -
  • This function initiates the OTP flow by sending a one-time password (OTP) code to the user's contact information (email address or phone number) via the auth proxy.
  • -
  • Supports both email and SMS OTP types.
  • -
  • Returns an OTP ID that is required for subsequent OTP verification.
  • -
- - - - - - -contact information for the user (e.g., email address or phone number). - - -type of OTP to initialize (OtpType.Email or OtpType.Sms). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the OTP ID required for verification. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-login-or-signup-with-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-login-or-signup-with-wallet.mdx deleted file mode 100644 index 1459fd5f..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-login-or-signup-with-wallet.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "loginOrSignupWithWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs in an existing user or signs up a new user using a wallet, creating a new sub-organization if needed. - -
    -
  • This function attempts to log in the user by stamping a login request with the provided wallet.
  • -
  • If the wallet’s public key is not associated with an existing sub-organization, a new one is created.
  • -
  • Handles both wallet authentication and sub-organization creation in a single flow.
  • -
  • For Ethereum wallets, derives the public key from the signed request header; for Solana wallets, retrieves it directly from the wallet.
  • -
  • Optionally accepts additional sub-organization parameters, a custom session key, and a custom session expiration.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided.
  • -
- - - - - - -optional parameters for creating a sub-organization (e.g., authenticators, user metadata). - - -session expiration time in seconds (defaults to the configured default). - - -session key to use for storing the session (defaults to the default session key). - - -wallet provider to use for authentication. - - - - - -A successful response returns the following fields: - - - A promise that resolves to an object containing: - - `sessionToken`: the signed JWT session token. - - `address`: the authenticated wallet address. - - `action`: whether the flow resulted in a login or signup (AuthAction). - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-oauth.mdx deleted file mode 100644 index 7f4deb81..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-oauth.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "loginWithOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs in a user using OAuth authentication. - -
    -
  • This function logs in a user using the provided OIDC token and public key.
  • -
  • Optionally invalidates any existing sessions for the user if ``invalidateExisting`` is set to true.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided.
  • -
  • Handles cleanup of unused key pairs if login fails.
  • -
- - - - - - -flag to invalidate existing sessions for the user. - - -OIDC token received after successful authentication with the OAuth provider. - - -public key to use for authentication. Must be generated prior to calling this function. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a BaseAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-otp.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-otp.mdx deleted file mode 100644 index b5da5752..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-otp.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "loginWithOtp()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs in a user using an OTP verification token. - -
    -
  • This function logs in a user using the verification token received after OTP verification (from email or SMS).
  • -
  • If a public key is not provided, a new API key pair will be generated for authentication.
  • -
  • Optionally invalidates any existing sessions for the user if ``invalidateExisting`` is set to true.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided.
  • -
  • Handles cleanup of unused key pairs if login fails.
  • -
- - - - - - -flag to invalidate existing session for the user. - - -public key to use for authentication. If not provided, a new key pair will be generated. - - -session key to use for session creation (defaults to the default session key). - - -verification token received after OTP verification. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a BaseAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-passkey.mdx deleted file mode 100644 index 80bb0046..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-passkey.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "loginWithPasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs in a user using a passkey, optionally specifying the public key, session key, and session expiration. - -
    -
  • This function initiates the login process with a passkey and handles session creation and storage.
  • -
  • If a public key is not provided, a new key pair will be generated for authentication.
  • -
  • If a session key is not provided, the default session key will be used.
  • -
  • The session expiration can be customized via the expirationSeconds parameter.
  • -
  • Handles cleanup of unused key pairs if login fails.
  • -
- - - - - - -session expiration time in seconds (defaults to the configured default). - - -public key to use for authentication. If not provided, a new key pair will be generated. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a PasskeyAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - - `credentialId`: an empty string. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-wallet.mdx deleted file mode 100644 index b23d5666..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-login-with-wallet.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "loginWithWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs in a user using the specified wallet provider. - -
    -
  • This function logs in a user by authenticating with the provided wallet provider via a wallet-based signature.
  • -
  • If a public key is not provided, a new one will be generated for authentication.
  • -
  • Optionally accepts a custom session key and session expiration time.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided.
  • -
  • Throws an error if a public key cannot be found or generated, or if the login process fails.
  • -
- - - - - - -optional session expiration time in seconds (defaults to the configured default). - - -optional public key to associate with the session (generated if not provided). - - -optional key to store the session under (defaults to the default session key). - - -wallet provider to use for authentication. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a WalletAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - - `address`: the authenticated wallet address. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-logout.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-logout.mdx deleted file mode 100644 index 65d404b3..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-logout.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "logout()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Logs out the current client session. - -
    -
  • This function clears the specified session and removes any associated key pairs from storage.
  • -
  • If a sessionKey is provided, it logs out from that session; otherwise, it logs out from the active session.
  • -
  • Cleans up any api keys associated with the session.
  • -
- - - - - - -session key to specify which session to log out from (defaults to the active session). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the logout process is complete. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-session.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-session.mdx deleted file mode 100644 index e3281cb4..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-session.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "refreshSession()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Refreshes the session associated with the specified session key, or the active session by default. - -
    -
  • This function refreshes the session and updates the session token and key pair associated with the given session key.
  • -
  • If a sessionKey is provided, it will refresh the session under that key; otherwise, it will use the current active session key.
  • -
  • Optionally allows specifying a new expiration time for the session, a custom public key, and whether to invalidate the existing session after refreshing.
  • -
  • Makes a request to the Turnkey API to stamp a new login and stores the refreshed session token.
  • -
  • Automatically manages key pair cleanup and session storage to ensure consistency.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -expiration time in seconds for the refreshed session (defaults to the configured default). - - -flag to invalidate the existing session before refreshing (defaults to false). - - -public key to use for the refreshed session (if not provided, a new key pair will be generated). - - -session key to refresh the session under (defaults to the active session key). - - -parameter to stamp the request with a specific stamper. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `TStampLoginResponse` object containing the refreshed session details. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-user.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-user.mdx deleted file mode 100644 index 8ddbba19..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-user.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "refreshUser()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:74

- - - -Refreshes the user details. - -
    -
  • This function fetches the latest user details for the current session (or optionally for a specific user/organization if provided)
  • -
- -and updates the ``user`` state variable in the provider. - -
    -
  • If a ``stampWith`` parameter is provided, it will use that stamper to fetch the user details (supports Passkey, ApiKey, or Wallet stampers).
  • -
  • Automatically handles error reporting via the configured callbacks.
  • -
  • Typically used after authentication, user profile updates, or linking/unlinking authenticators to ensure the provider state is up to date.
  • -
  • If no user is found, the state will not be updated.
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the user details are successfully refreshed and state is updated. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-wallets.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-wallets.mdx deleted file mode 100644 index d762f4af..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-refresh-wallets.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "refreshWallets()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- -

Defined in: react-wallet-kit/src/providers/client/Types.tsx:94

- - - -Refreshes the wallets state for the current user session. - -
    -
  • This function fetches the latest list of wallets associated with the current session or user,
  • -
- -and updates the ``wallets`` state variable in the provider. - -
    -
  • If a ``stampWith`` parameter is provided, it will use that stamper to fetch the wallets
  • -
- -(supports Passkey, ApiKey, or Wallet stampers for granular authentication control). - -
    -
  • Automatically handles error reporting via the configured callbacks.
  • -
  • Typically used after wallet creation, import, export, account changes, or authentication
  • -
- -to ensure the provider state is up to date. - -
    -
  • If no wallets are found, the state will be set to an empty array.
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - - - - -A successful response returns the following fields: - - - A promise that resolves when the wallets are successfully refreshed and state is updated. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-oauth-providers.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-remove-oauth-providers.mdx deleted file mode 100644 index 1fca54aa..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-oauth-providers.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "removeOauthProviders()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Removes a list of OAuth providers from the user. - -
    -
  • This function removes OAuth providers (e.g., Google, Apple) from the user's account.
  • -
  • If a userId is provided, it removes the providers for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
  • Returns an array of remaining provider IDs associated with the user after removal.
  • -
- - - - - - -IDs of the OAuth providers to remove. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to remove the provider for a specific user (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of provider IDs that were removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-passkeys.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-remove-passkeys.mdx deleted file mode 100644 index f25416b8..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-passkeys.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "removePasskeys()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Removes passkeys (authenticator) from the user. - -
    -
  • This function removes passkeys (WebAuthn/FIDO2 authenticators) from the user's account.
  • -
  • If a userId is provided, it removes the passkeys for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
  • Returns an array of remaining authenticator IDs for the user after removal.
  • -
- - - - - - -IDs of the authenticators (passkeys) to remove. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to remove the passkeys for a specific user (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an array of authenticator IDs that were removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-email.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-email.mdx deleted file mode 100644 index 800303d6..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-email.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "removeUserEmail()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Removes the user's email address. - -
    -
  • This function removes the user's email address by setting it to an empty string.
  • -
  • If a userId is provided, it removes the email for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to remove a specific user's email address (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user whose email was removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-phone-number.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-phone-number.mdx deleted file mode 100644 index a034a6f7..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-remove-user-phone-number.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "removeUserPhoneNumber()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Removes the user's phone number. - -
    -
  • This function removes the user's phone number by setting it to an empty string.
  • -
  • If a userId is provided, it removes the phone number for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to remove a specific user's phone number (defaults to the current session's userId). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the user whose phone number was removed. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-set-active-session.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-set-active-session.mdx deleted file mode 100644 index bde4db65..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-set-active-session.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "setActiveSession()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Sets the active session to the specified session key. - -
    -
  • This function updates the ``activeSessionKey`` in persistent storage to the specified session key.
  • -
  • Ensures that subsequent operations use the session associated with this key as the active session.
  • -
  • Does not validate whether the session key exists or is valid; it simply updates the pointer.
  • -
  • Useful for switching between multiple stored sessions or restoring a previous session context.
  • -
- - - - - - -session key to set as the active session. - - - - - -A successful response returns the following fields: - - - A promise that resolves when the active session key is successfully set. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-and-send-transaction.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-and-send-transaction.mdx deleted file mode 100644 index 46499b28..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-and-send-transaction.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "signAndSendTransaction()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs and broadcasts a transaction using the specified wallet account. - -
    -
  • For **connected wallets**:
  • -
  • Calls the wallet’s native ``signAndSendTransaction`` method.
  • -
  • Does **not** require an ``rpcUrl``.
  • -
- -
    -
  • For **embedded wallets**:
  • -
  • Signs the transaction using the Turnkey API.
  • -
  • Requires an ``rpcUrl`` to broadcast the transaction.
  • -
  • Broadcasts the transaction using a JSON-RPC client.
  • -
- - - - - - -required for embedded wallets to broadcast the signed transaction. - - -optional stamper to tag the signing request. - - -transaction type (e.g., "TRANSACTION_TYPE_SOLANA"). - - -unsigned transaction (serialized string). - - -wallet account to use for signing and sending. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a transaction signature or hash. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-message.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-message.mdx deleted file mode 100644 index 8a5c542c..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-message.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "signMessage()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs a message using the specified wallet account. - -
    -
  • Supports both embedded and connected wallets.
  • -
  • For **connected wallets**:
  • -
  • Delegates signing to the wallet provider’s native signing method.
  • -
  • **Important:** For Ethereum wallets (e.g., MetaMask), signatures follow [EIP-191](https://eips.ethereum.org/EIPS/eip-191).
  • -
- -The message is automatically prefixed with ``"\x19Ethereum Signed Message:\n" + message length`` before signing. As a result, this signature **cannot be used as a raw transaction signature** or broadcast on-chain. - -
    -
  • For **embedded wallets**, uses the Turnkey API to sign the message directly.
  • -
  • Automatically handles message encoding and hashing based on the wallet account’s address format,
  • -
- -unless explicitly overridden. - - - - - - -whether to prefix the message with Ethereum's `"\x19Ethereum Signed Message:\n"` string. - - If `true` (default for Ethereum), the message is prefixed before signing. - - If `false`: - - Connected wallets will throw an error because they always prefix automatically. - - Embedded wallets will sign the raw message without any prefix. - - -override for the payload encoding (defaults to the encoding appropriate for the address type). - - -override for the hash function (defaults to the hash function appropriate for the address type). - - -message to sign. - - -stamper to tag the signing request (e.g., Passkey, ApiKey, or Wallet). - - -wallet account to use for signing. - - - - - -A successful response returns the following fields: - - - A promise resolving to a `v1SignRawPayloadResult` containing the signature and metadata. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-transaction.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-transaction.mdx deleted file mode 100644 index 38697f41..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-transaction.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "signTransaction()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs a transaction using the specified wallet account. - -
    -
  • This function signs a blockchain transaction using the provided wallet address and transaction data.
  • -
  • Supports all Turnkey-supported blockchain networks (e.g., Ethereum, Solana, Tron).
  • -
  • Automatically determines the appropriate signing method based on the transaction type.
  • -
  • Delegates signing to the Turnkey API, which returns the signed transaction and related metadata.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -type of transaction (e.g., "TRANSACTION_TYPE_ETHEREUM", "TRANSACTION_TYPE_SOLANA", "TRANSACTION_TYPE_TRON"). - - -unsigned transaction data (serialized as a string) to be signed. - - -wallet account to use for signing the transaction. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a `TSignTransactionResponse` object containing the signed transaction and any additional signing metadata. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-oauth.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-oauth.mdx deleted file mode 100644 index 8d248c6e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-oauth.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "signUpWithOauth()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs up a user using OAuth authentication. - -
    -
  • This function creates a new sub-organization for the user using the provided OIDC token, public key, and provider name.
  • -
  • Handles the full OAuth sign-up flow, including sub-organization creation and session management.
  • -
  • Optionally accepts additional sub-organization creation parameters and a custom session key.
  • -
  • After successful sign-up, automatically logs in the user and returns a signed JWT session token.
  • -
- - - - - - -parameters for sub-organization creation (e.g., authenticators, user metadata). - - -OIDC token received after successful authentication with the OAuth provider. - - -name of the OAuth provider (e.g., "Google", "Apple"). - - -public key to associate with the new sub-organization. - - -session key to use for session creation (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a BaseAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-otp.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-otp.mdx deleted file mode 100644 index 23ec9a3e..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-otp.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "signUpWithOtp()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs up a user using an OTP verification token. - -
    -
  • This function signs up a user using the verification token received after OTP verification (from email or SMS).
  • -
  • Creates a new sub-organization for the user with the provided parameters and associates the contact (email or phone) with the sub-organization.
  • -
  • Automatically generates a new API key pair for authentication and session management.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided.
  • -
  • Handles both email and SMS OTP types, and supports additional sub-organization creation parameters.
  • -
- - - - - - -contact information for the user (e.g., email address or phone number). - - -parameters for creating a sub-organization (e.g., authenticators, user metadata). - - -flag to invalidate existing session for the user. - - -type of OTP being used (OtpType.Email or OtpType.Sms). - - -session key to use for session creation (defaults to the default session key). - - -verification token received after OTP verification. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a BaseAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-passkey.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-passkey.mdx deleted file mode 100644 index a6582146..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-passkey.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "signUpWithPasskey()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs up a user using a passkey, creating a new sub-organization and session. - -
    -
  • This function creates a new passkey authenticator and uses it to register a new sub-organization for the user.
  • -
  • Handles both passkey creation and sub-organization creation in a single flow.
  • -
  • Optionally accepts additional sub-organization parameters, a custom session key, a custom passkey display name, and a custom session expiration.
  • -
  • Automatically generates a new API key pair for authentication and session management.
  • -
  • Stores the resulting session token and manages cleanup of unused key pairs.
  • -
- - - - - - -challenge string to use for passkey registration. If not provided, a new challenge will be generated. - - -parameters for creating a sub-organization (e.g., authenticators, user metadata). - - -session expiration time in seconds (defaults to the configured default). - - -display name for the passkey (defaults to a generated name based on the current timestamp). - - -session key to use for storing the session (defaults to the default session key). - - - - - -A successful response returns the following fields: - - - A promise that resolves to a PasskeyAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - - `credentialId`: the credential ID associated with the passkey created. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-wallet.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-wallet.mdx deleted file mode 100644 index 081914c3..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-sign-up-with-wallet.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "signUpWithWallet()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Signs up a user using a wallet, creating a new sub-organization and session. - -
    -
  • This function creates a new wallet authenticator and uses it to register a new sub-organization for the user.
  • -
  • Handles both wallet authentication and sub-organization creation in a single flow.
  • -
  • Optionally accepts additional sub-organization parameters, a custom session key, and a custom session expiration.
  • -
  • Automatically generates additional API key pairs for authentication and session management.
  • -
  • Stores the resulting session token under the specified session key, or the default session key if not provided, and manages cleanup of unused key pairs.
  • -
- - - - - - -parameters for creating a sub-organization (e.g., authenticators, user metadata). - - -session expiration time in seconds (defaults to the configured default). - - -session key to use for storing the session (defaults to the default session key). - - -wallet provider to use for authentication. - - - - - -A successful response returns the following fields: - - - A promise that resolves to a WalletAuthResult, which includes: - - `sessionToken`: the signed JWT session token. - - `address`: the authenticated wallet address. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-store-session.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-store-session.mdx deleted file mode 100644 index d807f71d..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-store-session.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "storeSession()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Stores a session token and updates the session associated with the specified session key, or by default the active session. - -
    -
  • This function parses and stores a signed JWT session token in local storage, associating it with the given session key.
  • -
  • If a sessionKey is provided, the session will be stored under that key; otherwise, it will use the default session key.
  • -
  • If a session already exists for the session key, its associated key pair will be deleted before storing the new session.
  • -
  • After storing the session, any unused key pairs are automatically cleared from storage.
  • -
  • Ensures that session management is consistent and prevents orphaned key pairs.
  • -
- - - - - - -session key to store the session under (defaults to the default session key). - - -JWT session token to store. - - - - - -A successful response returns the following fields: - - - A promise that resolves when the session is successfully stored. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-account-chain.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-account-chain.mdx deleted file mode 100644 index 1331c045..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-account-chain.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "switchWalletAccountChain()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Switches the wallet provider associated with a given wallet account to a different chain. - -
    -
  • Requires the wallet manager and its connector to be initialized
  • -
  • Only works for connected wallet accounts
  • -
  • Looks up the provider for the given account address
  • -
  • Does nothing if the provider is already on the desired chain.
  • -
- - - - - - -The target chain, specified as a chain ID string or a SwitchableChain object. - - -The wallet account whose provider should be switched. - - -Optional list of wallet providers to search; falls back to `fetchWalletProviders()` if omitted. - - - - - -A successful response returns the following fields: - - - A promise that resolves once the chain switch is complete. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-provider-chain.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-provider-chain.mdx deleted file mode 100644 index 5505d477..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-switch-wallet-provider-chain.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "switchWalletProviderChain()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Switches the specified wallet provider to a different blockchain chain. - -
    -
  • Requires the wallet manager and its connector to be initialized.
  • -
  • The wallet provider must have at least one connected address.
  • -
  • Does nothing if the wallet provider is already on the desired chain.
  • -
- - - - - wallet provider to switch. - - - - target chain as a chain ID string or SwitchableChain object. - - - -A successful response returns the following fields: - - - A promise that resolves once the chain switch is complete. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-email.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-email.mdx deleted file mode 100644 index 3a21cbe1..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-email.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "updateUserEmail()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Updates the user's email address. - -
    -
  • This function updates the user's email address and, if provided, verifies it using a verification token (typically from an OTP flow).
  • -
  • If a userId is provided, it updates the email for that specific user; otherwise, it uses the current session's userId.
  • -
  • If a verificationToken is not provided, the email will be updated but will not be marked as verified.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Handles session management and error reporting for both update and verification flows.
  • -
- - - - - - -new email address to set for the user. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to update a specific user's email (defaults to the current session's userId). - - -verification token from OTP email verification (required if verifying the email). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the updated user. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-name.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-name.mdx deleted file mode 100644 index 2364c27d..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-name.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "updateUserName()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Updates the user's name. - -
    -
  • This function updates the user's display name.
  • -
  • If a userId is provided, it updates the name for that specific user; otherwise, it uses the current session's userId.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
  • -
  • Handles session management and error reporting for the update flow.
  • -
- - - - - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to update a specific user's name (defaults to the current session's userId). - - -new name to set for the user. - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the updated user. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-phone-number.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-phone-number.mdx deleted file mode 100644 index b5af982b..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-update-user-phone-number.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "updateUserPhoneNumber()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Updates the user's phone number. - -
    -
  • This function updates the user's phone number and, if provided, verifies it using a verification token (from an OTP flow).
  • -
  • If a userId is provided, it updates the phone number for that specific user; otherwise, it uses the current session's userId.
  • -
  • If a verificationToken is not provided, the phone number will be updated but will not be marked as verified.
  • -
  • Automatically ensures an active session exists before making the request.
  • -
  • Handles session management and error reporting for both update and verification flows.
  • -
- - - - - - -new phone number to set for the user. - - -parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet). - - -user ID to update a specific user's phone number (defaults to the current session's userId). - - -verification token from OTP phone verification (required if verifying the phone number). - - - - - -A successful response returns the following fields: - - - A promise that resolves to the userId of the updated user. - diff --git a/generated-docs/formatted/react-wallet-kit/client-context-type-verify-otp.mdx b/generated-docs/formatted/react-wallet-kit/client-context-type-verify-otp.mdx deleted file mode 100644 index 95338992..00000000 --- a/generated-docs/formatted/react-wallet-kit/client-context-type-verify-otp.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "verifyOtp()" ---- - -import { H3Bordered } from "/snippets/h3-bordered.mdx"; -import { NestedParam } from "/snippets/nested-param.mdx"; - -

Package: react-wallet-kit

- - - -Verifies the OTP code sent to the user. - -
    -
  • This function verifies the OTP code entered by the user against the OTP sent to their contact information (email or phone) using the auth proxy.
  • -
  • If verification is successful, it returns the sub-organization ID associated with the contact (if it exists) and a verification token.
  • -
  • The verification token can be used for subsequent login or sign-up flows.
  • -
  • Handles both email and SMS OTP types.
  • -
- - - - - - -contact information for the user (e.g., email address or phone number). - - -OTP code entered by the user. - - -ID of the OTP to verify (returned from `initOtp`). - - -type of OTP being verified (OtpType.Email or OtpType.Sms). - - - - - -A successful response returns the following fields: - - - A promise that resolves to an object containing: - - subOrganizationId: sub-organization ID if the contact is already associated with a sub-organization, or an empty string if not. - - verificationToken: verification token to be used for login or sign-up. - - - - - diff --git a/sdks/react/auth.mdx b/sdks/react/auth.mdx index 597201d7..554197f2 100644 --- a/sdks/react/auth.mdx +++ b/sdks/react/auth.mdx @@ -75,7 +75,7 @@ function CustomAuthButtons() { } ``` -For a complete list of available authentication functions, check out the [SDK Reference](/generated-docs/formatted/core/turnkey-client-add-oauth-provider). +For a complete list of available authentication functions, check out the [SDK Reference](/generated-docs/core/turnkey-client-add-oauth-provider). ## Knowing when users are authenticated