diff --git a/.changeset/itchy-elephants-wave.md b/.changeset/itchy-elephants-wave.md deleted file mode 100644 index f3b24c7a5..000000000 --- a/.changeset/itchy-elephants-wave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@turnkey/http": minor ---- - -Add VERSION constant diff --git a/.changeset/proud-swans-deny.md b/.changeset/proud-swans-deny.md deleted file mode 100644 index 69b44e4b6..000000000 --- a/.changeset/proud-swans-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@turnkey/http": patch ---- - -Update version string to include package name diff --git a/packages/cosmjs/CHANGELOG.md b/packages/cosmjs/CHANGELOG.md index a32335693..00a2135f6 100644 --- a/packages/cosmjs/CHANGELOG.md +++ b/packages/cosmjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @turnkey/cosmjs +## 0.5.5 + +### Patch Changes + +- Updated dependencies [7a3c890] + - @turnkey/http@2.6.0 + ## 0.5.4 ### Patch Changes diff --git a/packages/cosmjs/package.json b/packages/cosmjs/package.json index 3c4f13fbe..a7492217e 100644 --- a/packages/cosmjs/package.json +++ b/packages/cosmjs/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/cosmjs", - "version": "0.5.4", + "version": "0.5.5", "main": "./dist/index.js", "module": "./dist/index.mjs", "exports": { diff --git a/packages/ethers/CHANGELOG.md b/packages/ethers/CHANGELOG.md index 41dfc829f..b3c26094d 100644 --- a/packages/ethers/CHANGELOG.md +++ b/packages/ethers/CHANGELOG.md @@ -1,5 +1,12 @@ # @turnkey/ethers +## 0.19.5 + +### Patch Changes + +- Updated dependencies [7a3c890] + - @turnkey/http@2.6.0 + ## 0.19.4 ### Patch Changes diff --git a/packages/ethers/package.json b/packages/ethers/package.json index 4a17004b0..ecb210987 100644 --- a/packages/ethers/package.json +++ b/packages/ethers/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/ethers", - "version": "0.19.4", + "version": "0.19.5", "main": "./dist/index.js", "module": "./dist/index.mjs", "exports": { diff --git a/packages/http/CHANGELOG.md b/packages/http/CHANGELOG.md index 1e869395d..4c93d849a 100644 --- a/packages/http/CHANGELOG.md +++ b/packages/http/CHANGELOG.md @@ -1,5 +1,16 @@ # @turnkey/http +## 2.6.0 + +### Minor Changes + +- 0794f41: Add VERSION constant +- 7a3c890: Add key export support + +### Patch Changes + +- 4517e3b: Update version string to include package name + ## 2.5.1 ### Patch Changes diff --git a/packages/http/package.json b/packages/http/package.json index fc7054dd4..d04344a42 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/http", - "version": "2.5.1", + "version": "2.6.0", "main": "./dist/index.js", "module": "./dist/index.mjs", "exports": { diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.client.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.client.ts index 9935111f9..d84f718ba 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.client.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.client.ts @@ -12,6 +12,11 @@ import type { TGetActivityBody, TGetActivityResponse, } from "./public_api.fetcher"; +import type { TGetApiKeyBody, TGetApiKeyResponse } from "./public_api.fetcher"; +import type { + TGetApiKeysBody, + TGetApiKeysResponse, +} from "./public_api.fetcher"; import type { TGetAuthenticatorBody, TGetAuthenticatorResponse, @@ -138,6 +143,10 @@ import type { TExportWalletBody, TExportWalletResponse, } from "./public_api.fetcher"; +import type { + TExportWalletAccountBody, + TExportWalletAccountResponse, +} from "./public_api.fetcher"; import type { TInitUserEmailRecoveryBody, TInitUserEmailRecoveryResponse, @@ -262,6 +271,60 @@ export class TurnkeyClient { }; }; + /** + * Get details about an API key + * + * Sign the provided `TGetApiKeyBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_api_key). + * + * See also {@link stampGetApiKey}. + */ + getApiKey = async (input: TGetApiKeyBody): Promise => { + return this.request("/public/v1/query/get_api_key", input); + }; + + /** + * Produce a `SignedRequest` from `TGetApiKeyBody` by using the client's `stamp` function. + * + * See also {@link GetApiKey}. + */ + stampGetApiKey = async (input: TGetApiKeyBody): Promise => { + const fullUrl = this.config.baseUrl + "/public/v1/query/get_api_key"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + + /** + * Get details about API keys for a user + * + * Sign the provided `TGetApiKeysBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_api_keys). + * + * See also {@link stampGetApiKeys}. + */ + getApiKeys = async (input: TGetApiKeysBody): Promise => { + return this.request("/public/v1/query/get_api_keys", input); + }; + + /** + * Produce a `SignedRequest` from `TGetApiKeysBody` by using the client's `stamp` function. + * + * See also {@link GetApiKeys}. + */ + stampGetApiKeys = async (input: TGetApiKeysBody): Promise => { + const fullUrl = this.config.baseUrl + "/public/v1/query/get_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Get details about an authenticator * @@ -1361,6 +1424,38 @@ export class TurnkeyClient { }; }; + /** + * Exports a Wallet Account + * + * Sign the provided `TExportWalletAccountBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/export_wallet_account). + * + * See also {@link stampExportWalletAccount}. + */ + exportWalletAccount = async ( + input: TExportWalletAccountBody + ): Promise => { + return this.request("/public/v1/submit/export_wallet_account", input); + }; + + /** + * Produce a `SignedRequest` from `TExportWalletAccountBody` by using the client's `stamp` function. + * + * See also {@link ExportWalletAccount}. + */ + stampExportWalletAccount = async ( + input: TExportWalletAccountBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/export_wallet_account"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Initializes a new email recovery * diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts index 1295c529f..f9577ae99 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts @@ -53,6 +53,98 @@ export const signGetActivity = ( options, }); +/** + * `POST /public/v1/query/get_api_key` + */ +export type TGetApiKeyResponse = + operations["PublicApiService_GetApiKey"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/query/get_api_key` + */ +export type TGetApiKeyInput = { body: TGetApiKeyBody }; + +/** + * `POST /public/v1/query/get_api_key` + */ +export type TGetApiKeyBody = + operations["PublicApiService_GetApiKey"]["parameters"]["body"]["body"]; + +/** + * Get API key + * + * Get details about an API key + * + * `POST /public/v1/query/get_api_key` + */ +export const getApiKey = (input: TGetApiKeyInput) => + request({ + uri: "/public/v1/query/get_api_key", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `GetApiKey` request, ready to be POSTed to Turnkey. + * + * See {@link GetApiKey} + */ +export const signGetApiKey = ( + input: TGetApiKeyInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/query/get_api_key", + body: input.body, + options, + }); + +/** + * `POST /public/v1/query/get_api_keys` + */ +export type TGetApiKeysResponse = + operations["PublicApiService_GetApiKeys"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/query/get_api_keys` + */ +export type TGetApiKeysInput = { body: TGetApiKeysBody }; + +/** + * `POST /public/v1/query/get_api_keys` + */ +export type TGetApiKeysBody = + operations["PublicApiService_GetApiKeys"]["parameters"]["body"]["body"]; + +/** + * Get API key + * + * Get details about API keys for a user + * + * `POST /public/v1/query/get_api_keys` + */ +export const getApiKeys = (input: TGetApiKeysInput) => + request({ + uri: "/public/v1/query/get_api_keys", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `GetApiKeys` request, ready to be POSTed to Turnkey. + * + * See {@link GetApiKeys} + */ +export const signGetApiKeys = ( + input: TGetApiKeysInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/query/get_api_keys", + body: input.body, + options, + }); + /** * `POST /public/v1/query/get_authenticator` */ @@ -1793,6 +1885,58 @@ export const signExportWallet = ( options, }); +/** + * `POST /public/v1/submit/export_wallet_account` + */ +export type TExportWalletAccountResponse = + operations["PublicApiService_ExportWalletAccount"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/export_wallet_account` + */ +export type TExportWalletAccountInput = { body: TExportWalletAccountBody }; + +/** + * `POST /public/v1/submit/export_wallet_account` + */ +export type TExportWalletAccountBody = + operations["PublicApiService_ExportWalletAccount"]["parameters"]["body"]["body"]; + +/** + * Export Wallet Account + * + * Exports a Wallet Account + * + * `POST /public/v1/submit/export_wallet_account` + */ +export const exportWalletAccount = (input: TExportWalletAccountInput) => + request< + TExportWalletAccountResponse, + TExportWalletAccountBody, + never, + never, + never + >({ + uri: "/public/v1/submit/export_wallet_account", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `ExportWalletAccount` request, ready to be POSTed to Turnkey. + * + * See {@link ExportWalletAccount} + */ +export const signExportWalletAccount = ( + input: TExportWalletAccountInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/export_wallet_account", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/init_user_email_recovery` */ diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json index 4e11b5c64..add3618b6 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json @@ -100,6 +100,70 @@ "tags": ["Activities"] } }, + "/public/v1/query/get_api_key": { + "post": { + "summary": "Get API key", + "description": "Get details about an API key", + "operationId": "PublicApiService_GetApiKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetApiKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetApiKeyRequest" + } + } + ], + "tags": ["API keys"] + } + }, + "/public/v1/query/get_api_keys": { + "post": { + "summary": "Get API key", + "description": "Get details about API keys for a user", + "operationId": "PublicApiService_GetApiKeys", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetApiKeysResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetApiKeysRequest" + } + } + ], + "tags": ["API keys"] + } + }, "/public/v1/query/get_authenticator": { "post": { "summary": "Get Authenticator", @@ -1252,6 +1316,38 @@ "tags": ["Wallets"] } }, + "/public/v1/submit/export_wallet_account": { + "post": { + "summary": "Export Wallet Account", + "description": "Exports a Wallet Account", + "operationId": "PublicApiService_ExportWalletAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ActivityResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ExportWalletAccountRequest" + } + } + ], + "tags": ["Wallets"] + } + }, "/public/v1/submit/init_user_email_recovery": { "post": { "summary": "Init Email Recovery", @@ -1994,7 +2090,8 @@ "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", "ACTIVITY_TYPE_EXPORT_WALLET", "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4", - "ACTIVITY_TYPE_EMAIL_AUTH" + "ACTIVITY_TYPE_EMAIL_AUTH", + "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" ] }, "v1AddressFormat": { @@ -3138,6 +3235,11 @@ "$ref": "#/definitions/v1WalletAccountParams" }, "description": "A list of wallet Accounts." + }, + "mnemonicLength": { + "type": "string", + "format": "uint64", + "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." } }, "required": ["walletName", "accounts"] @@ -3558,7 +3660,7 @@ }, "expirationSeconds": { "type": "string", - "description": "Optional window (in seconds) indicating how long the API Key should last. Default to 30 minutes." + "description": "Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used." }, "emailCustomization": { "$ref": "#/definitions/v1EmailCustomization", @@ -3668,6 +3770,55 @@ }, "required": ["privateKeyId", "exportBundle"] }, + "v1ExportWalletAccountIntent": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address to identify Wallet Account." + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + } + }, + "required": ["address", "targetPublicKey"] + }, + "v1ExportWalletAccountRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/v1ExportWalletAccountIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1ExportWalletAccountResult": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address to identify Wallet Account." + }, + "exportBundle": { + "type": "string", + "description": "Export bundle containing a private key encrypted by the client's target public key." + } + }, + "required": ["address", "exportBundle"] + }, "v1ExportWalletIntent": { "type": "object", "properties": { @@ -3737,7 +3888,8 @@ "enum": [ "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY", "FEATURE_NAME_WEBAUTHN_ORIGINS", - "FEATURE_NAME_EMAIL_AUTH" + "FEATURE_NAME_EMAIL_AUTH", + "FEATURE_NAME_EMAIL_RECOVERY" ] }, "v1GetActivitiesRequest": { @@ -3796,6 +3948,58 @@ }, "required": ["organizationId", "activityId"] }, + "v1GetApiKeyRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "apiKeyId": { + "type": "string", + "description": "Unique identifier for a given API key." + } + }, + "required": ["organizationId", "apiKeyId"] + }, + "v1GetApiKeyResponse": { + "type": "object", + "properties": { + "apiKey": { + "$ref": "#/definitions/v1ApiKey", + "description": "An API key." + } + }, + "required": ["apiKey"] + }, + "v1GetApiKeysRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["organizationId"] + }, + "v1GetApiKeysResponse": { + "type": "object", + "properties": { + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ApiKey" + }, + "description": "A list of API keys." + } + }, + "required": ["apiKeys"] + }, "v1GetAuthenticatorRequest": { "type": "object", "properties": { @@ -4139,6 +4343,10 @@ "targetPublicKey": { "type": "string", "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + }, + "expirationSeconds": { + "type": "string", + "description": "Expiration window (in seconds) indicating how long the recovery credential is valid. If not provided, a default of 15 minutes will be used." } }, "required": ["email", "targetPublicKey"] @@ -4344,6 +4552,9 @@ }, "emailAuthIntent": { "$ref": "#/definitions/v1EmailAuthIntent" + }, + "exportWalletAccountIntent": { + "$ref": "#/definitions/v1ExportWalletAccountIntent" } }, "required": ["createOrganizationIntent"] @@ -5054,6 +5265,9 @@ }, "emailAuthResult": { "$ref": "#/definitions/v1EmailAuthResult" + }, + "exportWalletAccountResult": { + "$ref": "#/definitions/v1ExportWalletAccountResult" } } }, @@ -5963,6 +6177,10 @@ }, "updatedAt": { "$ref": "#/definitions/externaldatav1Timestamp" + }, + "exported": { + "type": "boolean", + "description": "True when a given Account is exported, false otherwise." } }, "required": [ @@ -5974,7 +6192,8 @@ "addressFormat", "address", "createdAt", - "updatedAt" + "updatedAt", + "exported" ] }, "v1WalletAccountParams": { @@ -6013,6 +6232,11 @@ "$ref": "#/definitions/v1WalletAccountParams" }, "description": "A list of wallet Accounts." + }, + "mnemonicLength": { + "type": "string", + "format": "uint64", + "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." } }, "required": ["walletName", "accounts"] diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts index a4c1a8355..0c6eb269c 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts @@ -8,6 +8,14 @@ export type paths = { /** Get details about an Activity */ post: operations["PublicApiService_GetActivity"]; }; + "/public/v1/query/get_api_key": { + /** Get details about an API key */ + post: operations["PublicApiService_GetApiKey"]; + }; + "/public/v1/query/get_api_keys": { + /** Get details about API keys for a user */ + post: operations["PublicApiService_GetApiKeys"]; + }; "/public/v1/query/get_authenticator": { /** Get details about an authenticator */ post: operations["PublicApiService_GetAuthenticator"]; @@ -152,6 +160,10 @@ export type paths = { /** Exports a Wallet */ post: operations["PublicApiService_ExportWallet"]; }; + "/public/v1/submit/export_wallet_account": { + /** Exports a Wallet Account */ + post: operations["PublicApiService_ExportWalletAccount"]; + }; "/public/v1/submit/init_user_email_recovery": { /** Initializes a new email recovery */ post: operations["PublicApiService_InitUserEmailRecovery"]; @@ -373,7 +385,8 @@ export type definitions = { | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_EXPORT_WALLET" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" - | "ACTIVITY_TYPE_EMAIL_AUTH"; + | "ACTIVITY_TYPE_EMAIL_AUTH" + | "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"; /** @enum {string} */ v1AddressFormat: | "ADDRESS_FORMAT_UNCOMPRESSED" @@ -811,6 +824,11 @@ export type definitions = { walletName: string; /** @description A list of wallet Accounts. */ accounts: definitions["v1WalletAccountParams"][]; + /** + * Format: uint64 + * @description Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24. + */ + mnemonicLength?: string; }; v1CreateWalletRequest: { /** @enum {string} */ @@ -970,7 +988,7 @@ export type definitions = { targetPublicKey: string; /** @description Optional human-readable name for an API Key. If none provided, default to Email Auth - */ apiKeyName?: string; - /** @description Optional window (in seconds) indicating how long the API Key should last. Default to 30 minutes. */ + /** @description Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used. */ expirationSeconds?: string; /** @description Optional parameters for customizing emails. If not provided, use defaults. */ emailCustomization?: definitions["v1EmailCustomization"]; @@ -1017,6 +1035,27 @@ export type definitions = { /** @description Export bundle containing a private key encrypted to the client's target public key. */ exportBundle: string; }; + v1ExportWalletAccountIntent: { + /** @description Address to identify Wallet Account. */ + address: string; + /** @description Client-side public key generated by the user, to which the export bundle will be encrypted. */ + targetPublicKey: string; + }; + v1ExportWalletAccountRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"; + /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */ + timestampMs: string; + /** @description Unique identifier for a given Organization. */ + organizationId: string; + parameters: definitions["v1ExportWalletAccountIntent"]; + }; + v1ExportWalletAccountResult: { + /** @description Address to identify Wallet Account. */ + address: string; + /** @description Export bundle containing a private key encrypted by the client's target public key. */ + exportBundle: string; + }; v1ExportWalletIntent: { /** @description Unique identifier for a given Wallet. */ walletId: string; @@ -1048,7 +1087,8 @@ export type definitions = { v1FeatureName: | "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" - | "FEATURE_NAME_EMAIL_AUTH"; + | "FEATURE_NAME_EMAIL_AUTH" + | "FEATURE_NAME_EMAIL_RECOVERY"; v1GetActivitiesRequest: { /** @description Unique identifier for a given Organization. */ organizationId: string; @@ -1069,6 +1109,26 @@ export type definitions = { /** @description Unique identifier for a given Activity object. */ activityId: string; }; + v1GetApiKeyRequest: { + /** @description Unique identifier for a given Organization. */ + organizationId: string; + /** @description Unique identifier for a given API key. */ + apiKeyId: string; + }; + v1GetApiKeyResponse: { + /** @description An API key. */ + apiKey: definitions["v1ApiKey"]; + }; + v1GetApiKeysRequest: { + /** @description Unique identifier for a given Organization. */ + organizationId: string; + /** @description Unique identifier for a given User. */ + userId?: string; + }; + v1GetApiKeysResponse: { + /** @description A list of API keys. */ + apiKeys: definitions["v1ApiKey"][]; + }; v1GetAuthenticatorRequest: { /** @description Unique identifier for a given Organization. */ organizationId: string; @@ -1204,6 +1264,8 @@ export type definitions = { email: string; /** @description Client-side public key generated by the user, to which the recovery bundle will be encrypted. */ targetPublicKey: string; + /** @description Expiration window (in seconds) indicating how long the recovery credential is valid. If not provided, a default of 15 minutes will be used. */ + expirationSeconds?: string; }; v1InitUserEmailRecoveryRequest: { /** @enum {string} */ @@ -1275,6 +1337,7 @@ export type definitions = { exportWalletIntent?: definitions["v1ExportWalletIntent"]; createSubOrganizationIntentV4?: definitions["v1CreateSubOrganizationIntentV4"]; emailAuthIntent?: definitions["v1EmailAuthIntent"]; + exportWalletAccountIntent?: definitions["v1ExportWalletAccountIntent"]; }; v1Invitation: { /** @description Unique identifier for a given Invitation object. */ @@ -1532,6 +1595,7 @@ export type definitions = { exportWalletResult?: definitions["v1ExportWalletResult"]; createSubOrganizationResultV4?: definitions["v1CreateSubOrganizationResultV4"]; emailAuthResult?: definitions["v1EmailAuthResult"]; + exportWalletAccountResult?: definitions["v1ExportWalletAccountResult"]; }; v1RootUserParams: { /** @description Human-readable name for a User. */ @@ -1884,6 +1948,8 @@ export type definitions = { address: string; createdAt: definitions["externaldatav1Timestamp"]; updatedAt: definitions["externaldatav1Timestamp"]; + /** @description True when a given Account is exported, false otherwise. */ + exported: boolean; }; v1WalletAccountParams: { /** @description Cryptographic curve used to generate a wallet Account. */ @@ -1900,6 +1966,11 @@ export type definitions = { walletName: string; /** @description A list of wallet Accounts. */ accounts: definitions["v1WalletAccountParams"][]; + /** + * Format: uint64 + * @description Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24. + */ + mnemonicLength?: string; }; v1WalletResult: { walletId: string; @@ -1937,6 +2008,42 @@ export type operations = { }; }; }; + /** Get details about an API key */ + PublicApiService_GetApiKey: { + parameters: { + body: { + body: definitions["v1GetApiKeyRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1GetApiKeyResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; + /** Get details about API keys for a user */ + PublicApiService_GetApiKeys: { + parameters: { + body: { + body: definitions["v1GetApiKeysRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1GetApiKeysResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Get details about an authenticator */ PublicApiService_GetAuthenticator: { parameters: { @@ -2585,6 +2692,24 @@ export type operations = { }; }; }; + /** Exports a Wallet Account */ + PublicApiService_ExportWalletAccount: { + parameters: { + body: { + body: definitions["v1ExportWalletAccountRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Initializes a new email recovery */ PublicApiService_InitUserEmailRecovery: { parameters: { diff --git a/packages/http/src/version.ts b/packages/http/src/version.ts index 53c6aa3f1..4ff1e3d08 100644 --- a/packages/http/src/version.ts +++ b/packages/http/src/version.ts @@ -1 +1 @@ -export const VERSION = "@turnkey/http@2.5.1"; +export const VERSION = "@turnkey/http@2.6.0"; diff --git a/packages/viem/CHANGELOG.md b/packages/viem/CHANGELOG.md index 706c0527a..87ef8431c 100644 --- a/packages/viem/CHANGELOG.md +++ b/packages/viem/CHANGELOG.md @@ -1,5 +1,12 @@ # @turnkey/viem +## 0.4.5 + +### Patch Changes + +- Updated dependencies [7a3c890] + - @turnkey/http@2.6.0 + ## 0.4.4 ### Patch Changes diff --git a/packages/viem/package.json b/packages/viem/package.json index ea47fbe2d..90e815127 100644 --- a/packages/viem/package.json +++ b/packages/viem/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/viem", - "version": "0.4.4", + "version": "0.4.5", "main": "./dist/index.js", "module": "./dist/index.mjs", "exports": {