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 9a3699ba5..7e478e925 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 @@ -88,6 +88,14 @@ import type { TCreateUsersBody, TCreateUsersResponse, } from "./public_api.fetcher"; +import type { + TCreateWalletBody, + TCreateWalletResponse, +} from "./public_api.fetcher"; +import type { + TCreateWalletAccountsBody, + TCreateWalletAccountsResponse, +} from "./public_api.fetcher"; import type { TDeleteApiKeysBody, TDeleteApiKeysResponse, @@ -104,18 +112,42 @@ import type { TDeletePolicyBody, TDeletePolicyResponse, } from "./public_api.fetcher"; +import type { + TExportPrivateKeyBody, + TExportPrivateKeyResponse, +} from "./public_api.fetcher"; +import type { + TInitUserEmailRecoveryBody, + TInitUserEmailRecoveryResponse, +} from "./public_api.fetcher"; import type { TRejectActivityBody, TRejectActivityResponse, } from "./public_api.fetcher"; +import type { + TRemoveOrganizationFeatureBody, + TRemoveOrganizationFeatureResponse, +} from "./public_api.fetcher"; +import type { + TSetOrganizationFeatureBody, + TSetOrganizationFeatureResponse, +} from "./public_api.fetcher"; import type { TSignRawPayloadBody, TSignRawPayloadResponse, } from "./public_api.fetcher"; +import type { + TSignRawPayloadV2Body, + TSignRawPayloadV2Response, +} from "./public_api.fetcher"; import type { TSignTransactionBody, TSignTransactionResponse, } from "./public_api.fetcher"; +import type { + TSignTransactionV2Body, + TSignTransactionV2Response, +} from "./public_api.fetcher"; import type { TUpdateAllowedOriginsBody, TUpdateAllowedOriginsResponse, @@ -146,6 +178,10 @@ export class TurnkeyClient { stamper: TStamper; constructor(config: THttpConfig, stamper: TStamper) { + if (!config.baseUrl) { + throw new Error(`Missing base URL. Please verify env vars.`); + } + this.config = config; this.stamper = stamper; } @@ -884,6 +920,69 @@ export class TurnkeyClient { }; }; + /** + * Create a Wallet + * + * Sign the provided `TCreateWalletBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_wallet). + * + * See also {@link stampCreateWallet}. + */ + createWallet = async ( + input: TCreateWalletBody + ): Promise => { + return this.request("/public/v1/submit/create_wallet", input); + }; + + /** + * Produce a `SignedRequest` from `TCreateWalletBody` by using the client's `stamp` function. + * + * See also {@link CreateWallet}. + */ + stampCreateWallet = async ( + input: TCreateWalletBody + ): Promise => { + const fullUrl = this.config.baseUrl + "/public/v1/submit/create_wallet"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + + /** + * Create Wallet accounts + * + * Sign the provided `TCreateWalletAccountsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_wallet_accounts). + * + * See also {@link stampCreateWalletAccounts}. + */ + createWalletAccounts = async ( + input: TCreateWalletAccountsBody + ): Promise => { + return this.request("/public/v1/submit/create_wallet_accounts", input); + }; + + /** + * Produce a `SignedRequest` from `TCreateWalletAccountsBody` by using the client's `stamp` function. + * + * See also {@link CreateWalletAccounts}. + */ + stampCreateWalletAccounts = async ( + input: TCreateWalletAccountsBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/create_wallet_accounts"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Remove api keys from a User * @@ -1010,6 +1109,70 @@ export class TurnkeyClient { }; }; + /** + * Exports a Private Key + * + * Sign the provided `TExportPrivateKeyBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/export_private_key). + * + * See also {@link stampExportPrivateKey}. + */ + exportPrivateKey = async ( + input: TExportPrivateKeyBody + ): Promise => { + return this.request("/public/v1/submit/export_private_key", input); + }; + + /** + * Produce a `SignedRequest` from `TExportPrivateKeyBody` by using the client's `stamp` function. + * + * See also {@link ExportPrivateKey}. + */ + stampExportPrivateKey = async ( + input: TExportPrivateKeyBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/export_private_key"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + + /** + * Initializes a new recovery + * + * Sign the provided `TInitUserEmailRecoveryBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/init_user_email_recovery). + * + * See also {@link stampInitUserEmailRecovery}. + */ + initUserEmailRecovery = async ( + input: TInitUserEmailRecoveryBody + ): Promise => { + return this.request("/public/v1/submit/init_user_email_recovery", input); + }; + + /** + * Produce a `SignedRequest` from `TInitUserEmailRecoveryBody` by using the client's `stamp` function. + * + * See also {@link InitUserEmailRecovery}. + */ + stampInitUserEmailRecovery = async ( + input: TInitUserEmailRecoveryBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/init_user_email_recovery"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Reject an Activity * @@ -1041,6 +1204,70 @@ export class TurnkeyClient { }; }; + /** + * Removes an organization feature + * + * Sign the provided `TRemoveOrganizationFeatureBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/remove_organization_feature). + * + * See also {@link stampRemoveOrganizationFeature}. + */ + removeOrganizationFeature = async ( + input: TRemoveOrganizationFeatureBody + ): Promise => { + return this.request("/public/v1/submit/remove_organization_feature", input); + }; + + /** + * Produce a `SignedRequest` from `TRemoveOrganizationFeatureBody` by using the client's `stamp` function. + * + * See also {@link RemoveOrganizationFeature}. + */ + stampRemoveOrganizationFeature = async ( + input: TRemoveOrganizationFeatureBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/remove_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + + /** + * Sets an organization feature + * + * Sign the provided `TSetOrganizationFeatureBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/set_organization_feature). + * + * See also {@link stampSetOrganizationFeature}. + */ + setOrganizationFeature = async ( + input: TSetOrganizationFeatureBody + ): Promise => { + return this.request("/public/v1/submit/set_organization_feature", input); + }; + + /** + * Produce a `SignedRequest` from `TSetOrganizationFeatureBody` by using the client's `stamp` function. + * + * See also {@link SetOrganizationFeature}. + */ + stampSetOrganizationFeature = async ( + input: TSetOrganizationFeatureBody + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/set_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Sign a raw payload with a Private Key * @@ -1072,6 +1299,38 @@ export class TurnkeyClient { }; }; + /** + * Sign a raw payload with a Private Key id or address + * + * Sign the provided `TSignRawPayloadV2Body` with the client's `stamp` function, and submit the request (POST /public/v1/submit/sign_raw_payload_v2). + * + * See also {@link stampSignRawPayloadV2}. + */ + signRawPayloadV2 = async ( + input: TSignRawPayloadV2Body + ): Promise => { + return this.request("/public/v1/submit/sign_raw_payload_v2", input); + }; + + /** + * Produce a `SignedRequest` from `TSignRawPayloadV2Body` by using the client's `stamp` function. + * + * See also {@link SignRawPayloadV2}. + */ + stampSignRawPayloadV2 = async ( + input: TSignRawPayloadV2Body + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/sign_raw_payload_v2"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Sign a transaction with a Private Key * @@ -1103,6 +1362,38 @@ export class TurnkeyClient { }; }; + /** + * Sign a transaction with a Private Key id or address + * + * Sign the provided `TSignTransactionV2Body` with the client's `stamp` function, and submit the request (POST /public/v1/submit/sign_transaction_v2). + * + * See also {@link stampSignTransactionV2}. + */ + signTransactionV2 = async ( + input: TSignTransactionV2Body + ): Promise => { + return this.request("/public/v1/submit/sign_transaction_v2", input); + }; + + /** + * Produce a `SignedRequest` from `TSignTransactionV2Body` by using the client's `stamp` function. + * + * See also {@link SignTransactionV2}. + */ + stampSignTransactionV2 = async ( + input: TSignTransactionV2Body + ): Promise => { + const fullUrl = + this.config.baseUrl + "/public/v1/submit/sign_transaction_v2"; + const body = JSON.stringify(input); + const stamp = await this.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + /** * Update the allowable origins for credentials and requests * 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 d35073d74..2bebac98a 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 @@ -1113,6 +1113,104 @@ export const signCreateUsers = ( options, }); +/** + * `POST /public/v1/submit/create_wallet` + */ +export type TCreateWalletResponse = + operations["PublicApiService_CreateWallet"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/create_wallet` + */ +export type TCreateWalletInput = { body: TCreateWalletBody }; + +/** + * `POST /public/v1/submit/create_wallet` + */ +export type TCreateWalletBody = + operations["PublicApiService_CreateWallet"]["parameters"]["body"]["body"]; + +/** + * Create Wallet + * + * Create a Wallet + * + * `POST /public/v1/submit/create_wallet` + */ +export const createWallet = (input: TCreateWalletInput) => + request({ + uri: "/public/v1/submit/create_wallet", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `CreateWallet` request, ready to be POSTed to Turnkey. + * + * See {@link CreateWallet} + */ +export const signCreateWallet = ( + input: TCreateWalletInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/create_wallet", + body: input.body, + options, + }); + +/** + * `POST /public/v1/submit/create_wallet_accounts` + */ +export type TCreateWalletAccountsResponse = + operations["PublicApiService_CreateWalletAccounts"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/create_wallet_accounts` + */ +export type TCreateWalletAccountsInput = { body: TCreateWalletAccountsBody }; + +/** + * `POST /public/v1/submit/create_wallet_accounts` + */ +export type TCreateWalletAccountsBody = + operations["PublicApiService_CreateWalletAccounts"]["parameters"]["body"]["body"]; + +/** + * Create Wallet accounts + * + * Create Wallet accounts + * + * `POST /public/v1/submit/create_wallet_accounts` + */ +export const createWalletAccounts = (input: TCreateWalletAccountsInput) => + request< + TCreateWalletAccountsResponse, + TCreateWalletAccountsBody, + never, + never, + never + >({ + uri: "/public/v1/submit/create_wallet_accounts", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `CreateWalletAccounts` request, ready to be POSTed to Turnkey. + * + * See {@link CreateWalletAccounts} + */ +export const signCreateWalletAccounts = ( + input: TCreateWalletAccountsInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/create_wallet_accounts", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/delete_api_keys` */ @@ -1309,6 +1407,110 @@ export const signDeletePolicy = ( options, }); +/** + * `POST /public/v1/submit/export_private_key` + */ +export type TExportPrivateKeyResponse = + operations["PublicApiService_ExportPrivateKey"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/export_private_key` + */ +export type TExportPrivateKeyInput = { body: TExportPrivateKeyBody }; + +/** + * `POST /public/v1/submit/export_private_key` + */ +export type TExportPrivateKeyBody = + operations["PublicApiService_ExportPrivateKey"]["parameters"]["body"]["body"]; + +/** + * Export Private Key + * + * Exports a Private Key + * + * `POST /public/v1/submit/export_private_key` + */ +export const exportPrivateKey = (input: TExportPrivateKeyInput) => + request< + TExportPrivateKeyResponse, + TExportPrivateKeyBody, + never, + never, + never + >({ + uri: "/public/v1/submit/export_private_key", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `ExportPrivateKey` request, ready to be POSTed to Turnkey. + * + * See {@link ExportPrivateKey} + */ +export const signExportPrivateKey = ( + input: TExportPrivateKeyInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/export_private_key", + body: input.body, + options, + }); + +/** + * `POST /public/v1/submit/init_user_email_recovery` + */ +export type TInitUserEmailRecoveryResponse = + operations["PublicApiService_InitUserEmailRecovery"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/init_user_email_recovery` + */ +export type TInitUserEmailRecoveryInput = { body: TInitUserEmailRecoveryBody }; + +/** + * `POST /public/v1/submit/init_user_email_recovery` + */ +export type TInitUserEmailRecoveryBody = + operations["PublicApiService_InitUserEmailRecovery"]["parameters"]["body"]["body"]; + +/** + * Init Recovery + * + * Initializes a new recovery + * + * `POST /public/v1/submit/init_user_email_recovery` + */ +export const initUserEmailRecovery = (input: TInitUserEmailRecoveryInput) => + request< + TInitUserEmailRecoveryResponse, + TInitUserEmailRecoveryBody, + never, + never, + never + >({ + uri: "/public/v1/submit/init_user_email_recovery", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `InitUserEmailRecovery` request, ready to be POSTed to Turnkey. + * + * See {@link InitUserEmailRecovery} + */ +export const signInitUserEmailRecovery = ( + input: TInitUserEmailRecoveryInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/init_user_email_recovery", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/reject_activity` */ @@ -1355,6 +1557,116 @@ export const signRejectActivity = ( options, }); +/** + * `POST /public/v1/submit/remove_organization_feature` + */ +export type TRemoveOrganizationFeatureResponse = + operations["PublicApiService_RemoveOrganizationFeature"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/remove_organization_feature` + */ +export type TRemoveOrganizationFeatureInput = { + body: TRemoveOrganizationFeatureBody; +}; + +/** + * `POST /public/v1/submit/remove_organization_feature` + */ +export type TRemoveOrganizationFeatureBody = + operations["PublicApiService_RemoveOrganizationFeature"]["parameters"]["body"]["body"]; + +/** + * Remove Organization Feature + * + * Removes an organization feature + * + * `POST /public/v1/submit/remove_organization_feature` + */ +export const removeOrganizationFeature = ( + input: TRemoveOrganizationFeatureInput +) => + request< + TRemoveOrganizationFeatureResponse, + TRemoveOrganizationFeatureBody, + never, + never, + never + >({ + uri: "/public/v1/submit/remove_organization_feature", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `RemoveOrganizationFeature` request, ready to be POSTed to Turnkey. + * + * See {@link RemoveOrganizationFeature} + */ +export const signRemoveOrganizationFeature = ( + input: TRemoveOrganizationFeatureInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/remove_organization_feature", + body: input.body, + options, + }); + +/** + * `POST /public/v1/submit/set_organization_feature` + */ +export type TSetOrganizationFeatureResponse = + operations["PublicApiService_SetOrganizationFeature"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/set_organization_feature` + */ +export type TSetOrganizationFeatureInput = { + body: TSetOrganizationFeatureBody; +}; + +/** + * `POST /public/v1/submit/set_organization_feature` + */ +export type TSetOrganizationFeatureBody = + operations["PublicApiService_SetOrganizationFeature"]["parameters"]["body"]["body"]; + +/** + * Set Organization Feature + * + * Sets an organization feature + * + * `POST /public/v1/submit/set_organization_feature` + */ +export const setOrganizationFeature = (input: TSetOrganizationFeatureInput) => + request< + TSetOrganizationFeatureResponse, + TSetOrganizationFeatureBody, + never, + never, + never + >({ + uri: "/public/v1/submit/set_organization_feature", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `SetOrganizationFeature` request, ready to be POSTed to Turnkey. + * + * See {@link SetOrganizationFeature} + */ +export const signSetOrganizationFeature = ( + input: TSetOrganizationFeatureInput, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/set_organization_feature", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/sign_raw_payload` */ @@ -1401,6 +1713,58 @@ export const signSignRawPayload = ( options, }); +/** + * `POST /public/v1/submit/sign_raw_payload_v2` + */ +export type TSignRawPayloadV2Response = + operations["PublicApiService_SignRawPayloadV2"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/sign_raw_payload_v2` + */ +export type TSignRawPayloadV2Input = { body: TSignRawPayloadV2Body }; + +/** + * `POST /public/v1/submit/sign_raw_payload_v2` + */ +export type TSignRawPayloadV2Body = + operations["PublicApiService_SignRawPayloadV2"]["parameters"]["body"]["body"]; + +/** + * Sign Raw Payload + * + * Sign a raw payload with a Private Key id or address + * + * `POST /public/v1/submit/sign_raw_payload_v2` + */ +export const signRawPayloadV2 = (input: TSignRawPayloadV2Input) => + request< + TSignRawPayloadV2Response, + TSignRawPayloadV2Body, + never, + never, + never + >({ + uri: "/public/v1/submit/sign_raw_payload_v2", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `SignRawPayloadV2` request, ready to be POSTed to Turnkey. + * + * See {@link SignRawPayloadV2} + */ +export const signSignRawPayloadV2 = ( + input: TSignRawPayloadV2Input, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/sign_raw_payload_v2", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/sign_transaction` */ @@ -1447,6 +1811,58 @@ export const signSignTransaction = ( options, }); +/** + * `POST /public/v1/submit/sign_transaction_v2` + */ +export type TSignTransactionV2Response = + operations["PublicApiService_SignTransactionV2"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/submit/sign_transaction_v2` + */ +export type TSignTransactionV2Input = { body: TSignTransactionV2Body }; + +/** + * `POST /public/v1/submit/sign_transaction_v2` + */ +export type TSignTransactionV2Body = + operations["PublicApiService_SignTransactionV2"]["parameters"]["body"]["body"]; + +/** + * Sign Transaction + * + * Sign a transaction with a Private Key id or address + * + * `POST /public/v1/submit/sign_transaction_v2` + */ +export const signTransactionV2 = (input: TSignTransactionV2Input) => + request< + TSignTransactionV2Response, + TSignTransactionV2Body, + never, + never, + never + >({ + uri: "/public/v1/submit/sign_transaction_v2", + method: "POST", + body: input.body, + }); + +/** + * Request a WebAuthn assertion and return a signed `SignTransactionV2` request, ready to be POSTed to Turnkey. + * + * See {@link SignTransactionV2} + */ +export const signSignTransactionV2 = ( + input: TSignTransactionV2Input, + options?: TurnkeyCredentialRequestOptions +) => + signedRequest({ + uri: "/public/v1/submit/sign_transaction_v2", + body: input.body, + options, + }); + /** * `POST /public/v1/submit/update_allowed_origins` */ 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 441d5b310..26b7bcbbc 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 @@ -796,6 +796,70 @@ "tags": ["Users"] } }, + "/public/v1/submit/create_wallet": { + "post": { + "summary": "Create Wallet", + "description": "Create a Wallet", + "operationId": "PublicApiService_CreateWallet", + "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/v1CreateWalletRequest" + } + } + ], + "tags": ["PublicApiService"] + } + }, + "/public/v1/submit/create_wallet_accounts": { + "post": { + "summary": "Create Wallet accounts", + "description": "Create Wallet accounts", + "operationId": "PublicApiService_CreateWalletAccounts", + "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/v1CreateWalletAccountsRequest" + } + } + ], + "tags": ["PublicApiService"] + } + }, "/public/v1/submit/delete_api_keys": { "post": { "summary": "Delete API Keys", @@ -924,6 +988,70 @@ "tags": ["Policies"] } }, + "/public/v1/submit/export_private_key": { + "post": { + "summary": "Export Private Key", + "description": "Exports a Private Key", + "operationId": "PublicApiService_ExportPrivateKey", + "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/v1ExportPrivateKeyRequest" + } + } + ], + "tags": ["Private Keys"] + } + }, + "/public/v1/submit/init_user_email_recovery": { + "post": { + "summary": "Init Recovery", + "description": "Initializes a new recovery", + "operationId": "PublicApiService_InitUserEmailRecovery", + "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/v1InitUserEmailRecoveryRequest" + } + } + ], + "tags": ["Organizations"] + } + }, "/public/v1/submit/reject_activity": { "post": { "summary": "Reject Activity", @@ -956,6 +1084,70 @@ "tags": ["Consensus"] } }, + "/public/v1/submit/remove_organization_feature": { + "post": { + "summary": "Remove Organization Feature", + "description": "Removes an organization feature", + "operationId": "PublicApiService_RemoveOrganizationFeature", + "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/v1RemoveOrganizationFeatureRequest" + } + } + ], + "tags": ["Organizations"] + } + }, + "/public/v1/submit/set_organization_feature": { + "post": { + "summary": "Set Organization Feature", + "description": "Sets an organization feature", + "operationId": "PublicApiService_SetOrganizationFeature", + "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/v1SetOrganizationFeatureRequest" + } + } + ], + "tags": ["Organizations"] + } + }, "/public/v1/submit/sign_raw_payload": { "post": { "summary": "Sign Raw Payload", @@ -988,6 +1180,38 @@ "tags": ["Private Keys"] } }, + "/public/v1/submit/sign_raw_payload_v2": { + "post": { + "summary": "Sign Raw Payload", + "description": "Sign a raw payload with a Private Key id or address", + "operationId": "PublicApiService_SignRawPayloadV2", + "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/v1SignRawPayloadV2Request" + } + } + ], + "tags": ["PublicApiService"] + } + }, "/public/v1/submit/sign_transaction": { "post": { "summary": "Sign Transaction", @@ -1020,6 +1244,38 @@ "tags": ["Private Keys"] } }, + "/public/v1/submit/sign_transaction_v2": { + "post": { + "summary": "Sign Transaction", + "description": "Sign a transaction with a Private Key id or address", + "operationId": "PublicApiService_SignTransactionV2", + "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/v1SignTransactionV2Request" + } + } + ], + "tags": ["PublicApiService"] + } + }, "/public/v1/submit/update_allowed_origins": { "post": { "summary": "Update Allowable Origins", @@ -1249,10 +1505,10 @@ "$ref": "#/definitions/v1TagType" }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": ["tagId", "tagName", "tagType", "createdAt", "updatedAt"] @@ -1290,6 +1546,27 @@ "AUTHENTICATOR_TRANSPORT_HYBRID" ] }, + "externaldatav1Credential": { + "type": "object", + "properties": { + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to sign messages and transactions." + }, + "type": { + "$ref": "#/definitions/externaldatav1CredentialType" + } + }, + "required": ["publicKey", "type"] + }, + "externaldatav1CredentialType": { + "type": "string", + "enum": [ + "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR", + "CREDENTIAL_TYPE_API_KEY_P256", + "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" + ] + }, "externaldatav1Curve": { "type": "string", "enum": ["CURVE_SECP256K1", "CURVE_ED25519"] @@ -1314,6 +1591,24 @@ "OPERATOR_CONTAINS_ALL" ] }, + "externaldatav1Quorum": { + "type": "object", + "properties": { + "threshold": { + "type": "integer", + "format": "int32", + "description": "Count of unique approvals required to meet quorum." + }, + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Unique identifiers of quorum set members." + } + }, + "required": ["threshold", "userIds"] + }, "externaldatav1Selector": { "type": "object", "properties": { @@ -1335,6 +1630,18 @@ }, "required": ["subject", "operator", "targets"] }, + "externaldatav1Timestamp": { + "type": "object", + "properties": { + "seconds": { + "type": "string" + }, + "nanos": { + "type": "string" + } + }, + "required": ["seconds", "nanos"] + }, "immutableactivityv1AccessType": { "type": "string", "enum": ["ACCESS_TYPE_WEB", "ACCESS_TYPE_API", "ACCESS_TYPE_ALL"] @@ -1343,29 +1650,26 @@ "type": "object", "properties": { "format": { - "$ref": "#/definitions/immutableactivityv1AddressFormat" + "$ref": "#/definitions/immutablecommonv1AddressFormat" }, "address": { "type": "string" } } }, - "immutableactivityv1AddressFormat": { - "type": "string", - "enum": [ - "ADDRESS_FORMAT_UNCOMPRESSED", - "ADDRESS_FORMAT_COMPRESSED", - "ADDRESS_FORMAT_ETHEREUM" - ] - }, - "immutableactivityv1Curve": { - "type": "string", - "enum": ["CURVE_SECP256K1", "CURVE_ED25519"] - }, "immutableactivityv1Effect": { "type": "string", "enum": ["EFFECT_ALLOW", "EFFECT_DENY"] }, + "immutableactivityv1HashFunction": { + "type": "string", + "enum": [ + "HASH_FUNCTION_NO_OP", + "HASH_FUNCTION_SHA256", + "HASH_FUNCTION_KECCAK256", + "HASH_FUNCTION_NOT_APPLICABLE" + ] + }, "immutableactivityv1Operator": { "type": "string", "enum": [ @@ -1382,6 +1686,10 @@ "OPERATOR_CONTAINS_ALL" ] }, + "immutableactivityv1PayloadEncoding": { + "type": "string", + "enum": ["PAYLOAD_ENCODING_HEXADECIMAL", "PAYLOAD_ENCODING_TEXT_UTF8"] + }, "immutableactivityv1Selector": { "type": "object", "properties": { @@ -1396,9 +1704,19 @@ } } }, - "immutableactivityv1TransactionType": { + "immutablecommonv1AddressFormat": { "type": "string", - "enum": ["TRANSACTION_TYPE_ETHEREUM"] + "enum": [ + "ADDRESS_FORMAT_UNCOMPRESSED", + "ADDRESS_FORMAT_COMPRESSED", + "ADDRESS_FORMAT_ETHEREUM", + "ADDRESS_FORMAT_SOLANA", + "ADDRESS_FORMAT_COSMOS" + ] + }, + "immutablecommonv1Curve": { + "type": "string", + "enum": ["CURVE_SECP256K1", "CURVE_ED25519"] }, "immutablewebauthnv1AuthenticatorTransport": { "type": "string", @@ -1554,10 +1872,10 @@ "type": "boolean" }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -1642,14 +1960,23 @@ "ACTIVITY_TYPE_UPDATE_USER", "ACTIVITY_TYPE_UPDATE_POLICY", "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2", - "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" + "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3", + "ACTIVITY_TYPE_CREATE_WALLET", + "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", + "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY", + "ACTIVITY_TYPE_RECOVER_USER", + "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE", + "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE", + "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", + "ACTIVITY_TYPE_SIGN_TRANSACTION_V2", + "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" ] }, "v1ApiKey": { "type": "object", "properties": { "credential": { - "$ref": "#/definitions/v1Credential", + "$ref": "#/definitions/externaldatav1Credential", "description": "A User credential that can be used to authenticate to Turnkey." }, "apiKeyId": { @@ -1661,10 +1988,10 @@ "description": "Human-readable name for an API Key." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -1805,7 +2132,7 @@ "description": "The type of Authenticator device." }, "credential": { - "$ref": "#/definitions/v1Credential", + "$ref": "#/definitions/externaldatav1Credential", "description": "A User credential that can be used to authenticate to Turnkey." }, "authenticatorId": { @@ -1817,10 +2144,10 @@ "description": "Human-readable name for an Authenticator." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -2644,34 +2971,122 @@ }, "required": ["userIds"] }, - "v1CredPropsAuthenticationExtensionsClientOutputs": { + "v1CreateWalletAccountsIntent": { "type": "object", "properties": { - "rk": { - "type": "boolean" + "walletId": { + "type": "string", + "description": "Unique identifier for a given Wallet." + }, + "accounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1WalletAccountParams" + }, + "description": "A list of wallet Accounts." } }, - "required": ["rk"] + "required": ["walletId", "accounts"] }, - "v1Credential": { + "v1CreateWalletAccountsRequest": { "type": "object", "properties": { - "publicKey": { + "type": { "type": "string", - "description": "The public component of a cryptographic key pair used to sign messages and transactions." + "enum": ["ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS"] }, + "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/v1CreateWalletAccountsIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1CreateWalletAccountsResult": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of derived addresses." + } + }, + "required": ["addresses"] + }, + "v1CreateWalletIntent": { + "type": "object", + "properties": { + "walletName": { + "type": "string", + "description": "Human-readable name for a Wallet." + }, + "accounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1WalletAccountParams" + }, + "description": "A list of wallet Accounts." + } + }, + "required": ["walletName", "accounts"] + }, + "v1CreateWalletRequest": { + "type": "object", + "properties": { "type": { - "$ref": "#/definitions/v1CredentialType" + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_WALLET"] + }, + "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/v1CreateWalletIntent" } }, - "required": ["publicKey", "type"] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "v1CredentialType": { - "type": "string", - "enum": [ - "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR", - "CREDENTIAL_TYPE_API_KEY_P256" - ] + "v1CreateWalletResult": { + "type": "object", + "properties": { + "walletId": { + "type": "string", + "description": "A list of Wallet IDs." + }, + "addresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of account addresses." + } + }, + "required": ["walletId", "addresses"] + }, + "v1CredPropsAuthenticationExtensionsClientOutputs": { + "type": "object", + "properties": { + "rk": { + "type": "boolean" + } + }, + "required": ["rk"] }, "v1DeleteApiKeysIntent": { "type": "object", @@ -2987,27 +3402,91 @@ "description": "A list of User IDs." } }, - "required": ["userIds"] + "required": ["userIds"] + }, + "v1DisablePrivateKeyIntent": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." + } + }, + "required": ["privateKeyId"] + }, + "v1DisablePrivateKeyResult": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." + } + }, + "required": ["privateKeyId"] + }, + "v1ExportPrivateKeyIntent": { + "type": "object", + "properties": { + "privateKeyId": { + "type": "string", + "description": "Unique identifier for a given Private Key." + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + } + }, + "required": ["privateKeyId", "targetPublicKey"] + }, + "v1ExportPrivateKeyRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"] + }, + "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/v1ExportPrivateKeyIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "v1DisablePrivateKeyIntent": { + "v1ExportPrivateKeyResult": { "type": "object", "properties": { "privateKeyId": { "type": "string", "description": "Unique identifier for a given Private Key." + }, + "exportBundle": { + "type": "string", + "description": "Export bundle containing a private key encrypted to the client's target public key." } }, - "required": ["privateKeyId"] + "required": ["privateKeyId", "exportBundle"] }, - "v1DisablePrivateKeyResult": { + "v1Feature": { "type": "object", "properties": { - "privateKeyId": { - "type": "string", - "description": "Unique identifier for a given Private Key." + "name": { + "$ref": "#/definitions/v1FeatureName" + }, + "value": { + "type": "string" } - }, - "required": ["privateKeyId"] + } + }, + "v1FeatureName": { + "type": "string", + "enum": ["FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY"] }, "v1GetActivitiesRequest": { "type": "object", @@ -3313,14 +3792,50 @@ }, "required": ["organizationId", "organizationName", "userId", "username"] }, - "v1HashFunction": { - "type": "string", - "enum": [ - "HASH_FUNCTION_NO_OP", - "HASH_FUNCTION_SHA256", - "HASH_FUNCTION_KECCAK256", - "HASH_FUNCTION_NOT_APPLICABLE" - ] + "v1InitUserEmailRecoveryIntent": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the user starting recovery" + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + } + }, + "required": ["email", "targetPublicKey"] + }, + "v1InitUserEmailRecoveryRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY"] + }, + "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/v1InitUserEmailRecoveryIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1InitUserEmailRecoveryResult": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique identifier for the user being recovered." + } + }, + "required": ["userId"] }, "v1Intent": { "type": "object", @@ -3456,6 +3971,33 @@ }, "createSubOrganizationIntentV3": { "$ref": "#/definitions/v1CreateSubOrganizationIntentV3" + }, + "createWalletIntent": { + "$ref": "#/definitions/v1CreateWalletIntent" + }, + "createWalletAccountsIntent": { + "$ref": "#/definitions/v1CreateWalletAccountsIntent" + }, + "initUserEmailRecoveryIntent": { + "$ref": "#/definitions/v1InitUserEmailRecoveryIntent" + }, + "recoverUserIntent": { + "$ref": "#/definitions/v1RecoverUserIntent" + }, + "setOrganizationFeatureIntent": { + "$ref": "#/definitions/v1SetOrganizationFeatureIntent" + }, + "removeOrganizationFeatureIntent": { + "$ref": "#/definitions/v1RemoveOrganizationFeatureIntent" + }, + "signRawPayloadIntentV2": { + "$ref": "#/definitions/v1SignRawPayloadIntentV2" + }, + "signTransactionIntentV2": { + "$ref": "#/definitions/v1SignTransactionIntentV2" + }, + "exportPrivateKeyIntent": { + "$ref": "#/definitions/v1ExportPrivateKeyIntent" } }, "required": ["createOrganizationIntent"] @@ -3491,10 +4033,10 @@ "description": "The current processing status of a specified Invitation." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "senderUserId": { "type": "string", @@ -3617,13 +4159,20 @@ } }, "rootQuorum": { - "$ref": "#/definitions/v1Quorum" + "$ref": "#/definitions/externaldatav1Quorum" }, "allowedOrigins": { "type": "array", "items": { "type": "string" } + }, + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Feature" + } } } }, @@ -3644,9 +4193,9 @@ } } }, - "v1PayloadEncoding": { + "v1PathFormat": { "type": "string", - "enum": ["PAYLOAD_ENCODING_HEXADECIMAL", "PAYLOAD_ENCODING_TEXT_UTF8"] + "enum": ["PATH_FORMAT_BIP32"] }, "v1Policy": { "type": "object", @@ -3672,10 +4221,10 @@ "description": "A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "notes": { "type": "string", @@ -3737,7 +4286,7 @@ "description": "A list of Private Key Tag IDs." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -3758,7 +4307,7 @@ "description": "Human-readable name for a Private Key." }, "curve": { - "$ref": "#/definitions/immutableactivityv1Curve", + "$ref": "#/definitions/immutablecommonv1Curve", "description": "Cryptographic Curve used to generate a given Private Key." }, "privateKeyTags": { @@ -3771,7 +4320,7 @@ "addressFormats": { "type": "array", "items": { - "$ref": "#/definitions/immutableactivityv1AddressFormat" + "$ref": "#/definitions/immutablecommonv1AddressFormat" }, "description": "Cryptocurrency-specific formats for a derived address (e.g., Ethereum)." } @@ -3825,23 +4374,32 @@ }, "required": ["id", "type", "rawId", "response", "clientExtensionResults"] }, - "v1Quorum": { + "v1RecoverUserIntent": { "type": "object", "properties": { - "threshold": { - "type": "integer", - "format": "int32", - "description": "Count of unique approvals required to meet quorum." + "authenticator": { + "$ref": "#/definitions/v1AuthenticatorParamsV2", + "description": "The new authenticator to register." }, - "userIds": { + "userId": { + "type": "string", + "description": "Unique identifier for the user performing recovery." + } + }, + "required": ["authenticator", "userId"] + }, + "v1RecoverUserResult": { + "type": "object", + "properties": { + "authenticatorId": { "type": "array", "items": { "type": "string" }, - "description": "Unique identifiers of quorum set members." + "description": "ID of the authenticator created." } }, - "required": ["threshold", "userIds"] + "required": ["authenticatorId"] }, "v1RejectActivityIntent": { "type": "object", @@ -3874,6 +4432,51 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, + "v1RemoveOrganizationFeatureIntent": { + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/v1FeatureName", + "description": "Name of the feature to remove" + } + }, + "required": ["name"] + }, + "v1RemoveOrganizationFeatureRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE"] + }, + "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/v1RemoveOrganizationFeatureIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1RemoveOrganizationFeatureResult": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Feature" + }, + "description": "Resulting list of organization features." + } + }, + "required": ["features"] + }, "v1Result": { "type": "object", "properties": { @@ -3978,6 +4581,27 @@ }, "createSubOrganizationResultV3": { "$ref": "#/definitions/v1CreateSubOrganizationResultV3" + }, + "createWalletResult": { + "$ref": "#/definitions/v1CreateWalletResult" + }, + "createWalletAccountsResult": { + "$ref": "#/definitions/v1CreateWalletAccountsResult" + }, + "initUserEmailRecoveryResult": { + "$ref": "#/definitions/v1InitUserEmailRecoveryResult" + }, + "recoverUserResult": { + "$ref": "#/definitions/v1RecoverUserResult" + }, + "setOrganizationFeatureResult": { + "$ref": "#/definitions/v1SetOrganizationFeatureResult" + }, + "removeOrganizationFeatureResult": { + "$ref": "#/definitions/v1RemoveOrganizationFeatureResult" + }, + "exportPrivateKeyResult": { + "$ref": "#/definitions/v1ExportPrivateKeyResult" } } }, @@ -4028,6 +4652,55 @@ } } }, + "v1SetOrganizationFeatureIntent": { + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/v1FeatureName", + "description": "Name of the feature to set" + }, + "value": { + "type": "string", + "description": "Optional value for the feature. Will override existing values if feature is already set." + } + }, + "required": ["name", "value"] + }, + "v1SetOrganizationFeatureRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE"] + }, + "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/v1SetOrganizationFeatureIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1SetOrganizationFeatureResult": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Feature" + }, + "description": "Resulting list of organization features." + } + }, + "required": ["features"] + }, "v1SetPaymentMethodIntent": { "type": "object", "properties": { @@ -4113,16 +4786,38 @@ "description": "Raw unsigned payload to be signed." }, "encoding": { - "$ref": "#/definitions/v1PayloadEncoding", + "$ref": "#/definitions/immutableactivityv1PayloadEncoding", "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." }, "hashFunction": { - "$ref": "#/definitions/v1HashFunction", + "$ref": "#/definitions/immutableactivityv1HashFunction", "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." } }, "required": ["privateKeyId", "payload", "encoding", "hashFunction"] }, + "v1SignRawPayloadIntentV2": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "The Private Key identifier or address." + }, + "payload": { + "type": "string", + "description": "Raw unsigned payload to be signed." + }, + "encoding": { + "$ref": "#/definitions/immutableactivityv1PayloadEncoding", + "description": "Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8)." + }, + "hashFunction": { + "$ref": "#/definitions/immutableactivityv1HashFunction", + "description": "Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032." + } + }, + "required": ["signWith", "payload", "encoding", "hashFunction"] + }, "v1SignRawPayloadRequest": { "type": "object", "properties": { @@ -4162,6 +4857,27 @@ }, "required": ["r", "s", "v"] }, + "v1SignRawPayloadV2Request": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"] + }, + "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/v1SignRawPayloadIntentV2" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, "v1SignTransactionIntent": { "type": "object", "properties": { @@ -4174,11 +4890,28 @@ "description": "Raw unsigned transaction to be signed by a particular Private Key." }, "type": { - "$ref": "#/definitions/immutableactivityv1TransactionType" + "$ref": "#/definitions/v1TransactionType" } }, "required": ["privateKeyId", "unsignedTransaction", "type"] }, + "v1SignTransactionIntentV2": { + "type": "object", + "properties": { + "signWith": { + "type": "string", + "description": "The Private Key identifier or address." + }, + "unsignedTransaction": { + "type": "string", + "description": "Raw unsigned transaction to be signed" + }, + "type": { + "$ref": "#/definitions/v1TransactionType" + } + }, + "required": ["signWith", "unsignedTransaction", "type"] + }, "v1SignTransactionRequest": { "type": "object", "properties": { @@ -4209,6 +4942,27 @@ }, "required": ["signedTransaction"] }, + "v1SignTransactionV2Request": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_SIGN_TRANSACTION_V2"] + }, + "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/v1SignTransactionIntentV2" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, "v1SimpleClientExtensionResults": { "type": "object", "properties": { @@ -4227,17 +4981,9 @@ "type": "string", "enum": ["TAG_TYPE_USER", "TAG_TYPE_PRIVATE_KEY"] }, - "v1Timestamp": { - "type": "object", - "properties": { - "seconds": { - "type": "string" - }, - "nanos": { - "type": "string" - } - }, - "required": ["seconds", "nanos"] + "v1TransactionType": { + "type": "string", + "enum": ["TRANSACTION_TYPE_ETHEREUM"] }, "v1UpdateAllowedOriginsIntent": { "type": "object", @@ -4596,10 +5342,10 @@ "description": "A list of User Tag IDs." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" }, "updatedAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -4747,7 +5493,7 @@ "description": "Method used to produce a signature." }, "createdAt": { - "$ref": "#/definitions/v1Timestamp" + "$ref": "#/definitions/externaldatav1Timestamp" } }, "required": [ @@ -4763,6 +5509,28 @@ "createdAt" ] }, + "v1WalletAccountParams": { + "type": "object", + "properties": { + "curve": { + "$ref": "#/definitions/immutablecommonv1Curve", + "description": "Cryptographic curve used to generate a wallet Account." + }, + "pathFormat": { + "$ref": "#/definitions/v1PathFormat", + "description": "Path format used to generate a wallet Account." + }, + "path": { + "type": "string", + "description": "Path used to generate a wallet Account." + }, + "addressFormat": { + "$ref": "#/definitions/immutablecommonv1AddressFormat", + "description": "Address format used to generate a wallet Acccount." + } + }, + "required": ["curve", "pathFormat", "path", "addressFormat"] + }, "v1WebAuthnStamp": { "type": "object", "properties": { 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 ebf35d758..4cd72b7ae 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 @@ -96,6 +96,14 @@ export type paths = { /** Create Users in an existing Organization */ post: operations["PublicApiService_CreateUsers"]; }; + "/public/v1/submit/create_wallet": { + /** Create a Wallet */ + post: operations["PublicApiService_CreateWallet"]; + }; + "/public/v1/submit/create_wallet_accounts": { + /** Create Wallet accounts */ + post: operations["PublicApiService_CreateWalletAccounts"]; + }; "/public/v1/submit/delete_api_keys": { /** Remove api keys from a User */ post: operations["PublicApiService_DeleteApiKeys"]; @@ -112,18 +120,42 @@ export type paths = { /** Delete an existing Policy */ post: operations["PublicApiService_DeletePolicy"]; }; + "/public/v1/submit/export_private_key": { + /** Exports a Private Key */ + post: operations["PublicApiService_ExportPrivateKey"]; + }; + "/public/v1/submit/init_user_email_recovery": { + /** Initializes a new recovery */ + post: operations["PublicApiService_InitUserEmailRecovery"]; + }; "/public/v1/submit/reject_activity": { /** Reject an Activity */ post: operations["PublicApiService_RejectActivity"]; }; + "/public/v1/submit/remove_organization_feature": { + /** Removes an organization feature */ + post: operations["PublicApiService_RemoveOrganizationFeature"]; + }; + "/public/v1/submit/set_organization_feature": { + /** Sets an organization feature */ + post: operations["PublicApiService_SetOrganizationFeature"]; + }; "/public/v1/submit/sign_raw_payload": { /** Sign a raw payload with a Private Key */ post: operations["PublicApiService_SignRawPayload"]; }; + "/public/v1/submit/sign_raw_payload_v2": { + /** Sign a raw payload with a Private Key id or address */ + post: operations["PublicApiService_SignRawPayloadV2"]; + }; "/public/v1/submit/sign_transaction": { /** Sign a transaction with a Private Key */ post: operations["PublicApiService_SignTransaction"]; }; + "/public/v1/submit/sign_transaction_v2": { + /** Sign a transaction with a Private Key id or address */ + post: operations["PublicApiService_SignTransactionV2"]; + }; "/public/v1/submit/update_allowed_origins": { /** Update the allowable origins for credentials and requests */ post: operations["PublicApiService_UpdateAllowedOrigins"]; @@ -160,8 +192,8 @@ export type definitions = { /** @description Human-readable name for a Tag. */ tagName: string; tagType: definitions["v1TagType"]; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; }; /** @enum {string} */ externaldatav1AccessType: @@ -184,6 +216,16 @@ export type definitions = { | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID"; + externaldatav1Credential: { + /** @description The public component of a cryptographic key pair used to sign messages and transactions. */ + publicKey: string; + type: definitions["externaldatav1CredentialType"]; + }; + /** @enum {string} */ + externaldatav1CredentialType: + | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" + | "CREDENTIAL_TYPE_API_KEY_P256" + | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256"; /** @enum {string} */ externaldatav1Curve: "CURVE_SECP256K1" | "CURVE_ED25519"; /** @enum {string} */ @@ -201,6 +243,15 @@ export type definitions = { | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL"; + externaldatav1Quorum: { + /** + * Format: int32 + * @description Count of unique approvals required to meet quorum. + */ + threshold: number; + /** @description Unique identifiers of quorum set members. */ + userIds: string[]; + }; externaldatav1Selector: { /** @description The resource being referenced within a policy (e.g., user.tags or activities.type). */ subject: string; @@ -209,25 +260,28 @@ export type definitions = { /** @description The specific parameter from the subject being referenced, like a specific user ID. */ targets: string[]; }; + externaldatav1Timestamp: { + seconds: string; + nanos: string; + }; /** @enum {string} */ immutableactivityv1AccessType: | "ACCESS_TYPE_WEB" | "ACCESS_TYPE_API" | "ACCESS_TYPE_ALL"; immutableactivityv1Address: { - format?: definitions["immutableactivityv1AddressFormat"]; + format?: definitions["immutablecommonv1AddressFormat"]; address?: string; }; /** @enum {string} */ - immutableactivityv1AddressFormat: - | "ADDRESS_FORMAT_UNCOMPRESSED" - | "ADDRESS_FORMAT_COMPRESSED" - | "ADDRESS_FORMAT_ETHEREUM"; - /** @enum {string} */ - immutableactivityv1Curve: "CURVE_SECP256K1" | "CURVE_ED25519"; - /** @enum {string} */ immutableactivityv1Effect: "EFFECT_ALLOW" | "EFFECT_DENY"; /** @enum {string} */ + immutableactivityv1HashFunction: + | "HASH_FUNCTION_NO_OP" + | "HASH_FUNCTION_SHA256" + | "HASH_FUNCTION_KECCAK256" + | "HASH_FUNCTION_NOT_APPLICABLE"; + /** @enum {string} */ immutableactivityv1Operator: | "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" @@ -240,13 +294,24 @@ export type definitions = { | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL"; + /** @enum {string} */ + immutableactivityv1PayloadEncoding: + | "PAYLOAD_ENCODING_HEXADECIMAL" + | "PAYLOAD_ENCODING_TEXT_UTF8"; immutableactivityv1Selector: { subject?: string; operator?: definitions["immutableactivityv1Operator"]; target?: string; }; /** @enum {string} */ - immutableactivityv1TransactionType: "TRANSACTION_TYPE_ETHEREUM"; + immutablecommonv1AddressFormat: + | "ADDRESS_FORMAT_UNCOMPRESSED" + | "ADDRESS_FORMAT_COMPRESSED" + | "ADDRESS_FORMAT_ETHEREUM" + | "ADDRESS_FORMAT_SOLANA" + | "ADDRESS_FORMAT_COSMOS"; + /** @enum {string} */ + immutablecommonv1Curve: "CURVE_SECP256K1" | "CURVE_ED25519"; /** @enum {string} */ immutablewebauthnv1AuthenticatorTransport: | "AUTHENTICATOR_TRANSPORT_BLE" @@ -312,8 +377,8 @@ export type definitions = { fingerprint: string; canApprove: boolean; canReject: boolean; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; }; v1ActivityResponse: { /** @description An action that can that can be taken within the Turnkey infrastructure. */ @@ -372,16 +437,25 @@ export type definitions = { | "ACTIVITY_TYPE_UPDATE_USER" | "ACTIVITY_TYPE_UPDATE_POLICY" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" - | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3"; + | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" + | "ACTIVITY_TYPE_CREATE_WALLET" + | "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" + | "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" + | "ACTIVITY_TYPE_RECOVER_USER" + | "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" + | "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" + | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" + | "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" + | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"; v1ApiKey: { /** @description A User credential that can be used to authenticate to Turnkey. */ - credential: definitions["v1Credential"]; + credential: definitions["externaldatav1Credential"]; /** @description Unique identifier for a given API Key. */ apiKeyId: string; /** @description Human-readable name for an API Key. */ apiKeyName: string; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; }; v1ApiKeyParams: { /** @description Human-readable name for an API Key. */ @@ -433,13 +507,13 @@ export type definitions = { /** @description The type of Authenticator device. */ model: string; /** @description A User credential that can be used to authenticate to Turnkey. */ - credential: definitions["v1Credential"]; + credential: definitions["externaldatav1Credential"]; /** @description Unique identifier for a given Authenticator. */ authenticatorId: string; /** @description Human-readable name for an Authenticator. */ authenticatorName: string; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; }; v1AuthenticatorAttestationResponse: { clientDataJson: string; @@ -744,18 +818,49 @@ export type definitions = { /** @description A list of User IDs. */ userIds: string[]; }; + v1CreateWalletAccountsIntent: { + /** @description Unique identifier for a given Wallet. */ + walletId: string; + /** @description A list of wallet Accounts. */ + accounts: definitions["v1WalletAccountParams"][]; + }; + v1CreateWalletAccountsRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS"; + /** @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["v1CreateWalletAccountsIntent"]; + }; + v1CreateWalletAccountsResult: { + /** @description A list of derived addresses. */ + addresses: string[]; + }; + v1CreateWalletIntent: { + /** @description Human-readable name for a Wallet. */ + walletName: string; + /** @description A list of wallet Accounts. */ + accounts: definitions["v1WalletAccountParams"][]; + }; + v1CreateWalletRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_CREATE_WALLET"; + /** @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["v1CreateWalletIntent"]; + }; + v1CreateWalletResult: { + /** @description A list of Wallet IDs. */ + walletId: string; + /** @description A list of account addresses. */ + addresses: string[]; + }; v1CredPropsAuthenticationExtensionsClientOutputs: { rk: boolean; }; - v1Credential: { - /** @description The public component of a cryptographic key pair used to sign messages and transactions. */ - publicKey: string; - type: definitions["v1CredentialType"]; - }; - /** @enum {string} */ - v1CredentialType: - | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" - | "CREDENTIAL_TYPE_API_KEY_P256"; v1DeleteApiKeysIntent: { /** @description Unique identifier for a given User. */ userId: string; @@ -880,6 +985,33 @@ export type definitions = { /** @description Unique identifier for a given Private Key. */ privateKeyId: string; }; + v1ExportPrivateKeyIntent: { + /** @description Unique identifier for a given Private Key. */ + privateKeyId: string; + /** @description Client-side public key generated by the user, to which the export bundle will be encrypted. */ + targetPublicKey: string; + }; + v1ExportPrivateKeyRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY"; + /** @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["v1ExportPrivateKeyIntent"]; + }; + v1ExportPrivateKeyResult: { + /** @description Unique identifier for a given Private Key. */ + privateKeyId: string; + /** @description Export bundle containing a private key encrypted to the client's target public key. */ + exportBundle: string; + }; + v1Feature: { + name?: definitions["v1FeatureName"]; + value?: string; + }; + /** @enum {string} */ + v1FeatureName: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY"; v1GetActivitiesRequest: { /** @description Unique identifier for a given Organization. */ organizationId: string; @@ -996,12 +1128,25 @@ export type definitions = { /** @description Human-readable name for a User. */ username: string; }; - /** @enum {string} */ - v1HashFunction: - | "HASH_FUNCTION_NO_OP" - | "HASH_FUNCTION_SHA256" - | "HASH_FUNCTION_KECCAK256" - | "HASH_FUNCTION_NOT_APPLICABLE"; + v1InitUserEmailRecoveryIntent: { + /** @description Email of the user starting recovery */ + email: string; + /** @description Client-side public key generated by the user, to which the recovery bundle will be encrypted. */ + targetPublicKey: string; + }; + v1InitUserEmailRecoveryRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY"; + /** @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["v1InitUserEmailRecoveryIntent"]; + }; + v1InitUserEmailRecoveryResult: { + /** @description Unique identifier for the user being recovered. */ + userId: string; + }; v1Intent: { createOrganizationIntent: definitions["v1CreateOrganizationIntent"]; createAuthenticatorsIntent?: definitions["v1CreateAuthenticatorsIntent"]; @@ -1047,6 +1192,15 @@ export type definitions = { updatePolicyIntent?: definitions["v1UpdatePolicyIntent"]; setPaymentMethodIntentV2?: definitions["v1SetPaymentMethodIntentV2"]; createSubOrganizationIntentV3?: definitions["v1CreateSubOrganizationIntentV3"]; + createWalletIntent?: definitions["v1CreateWalletIntent"]; + createWalletAccountsIntent?: definitions["v1CreateWalletAccountsIntent"]; + initUserEmailRecoveryIntent?: definitions["v1InitUserEmailRecoveryIntent"]; + recoverUserIntent?: definitions["v1RecoverUserIntent"]; + setOrganizationFeatureIntent?: definitions["v1SetOrganizationFeatureIntent"]; + removeOrganizationFeatureIntent?: definitions["v1RemoveOrganizationFeatureIntent"]; + signRawPayloadIntentV2?: definitions["v1SignRawPayloadIntentV2"]; + signTransactionIntentV2?: definitions["v1SignTransactionIntentV2"]; + exportPrivateKeyIntent?: definitions["v1ExportPrivateKeyIntent"]; }; v1Invitation: { /** @description Unique identifier for a given Invitation object. */ @@ -1061,8 +1215,8 @@ export type definitions = { accessType: definitions["externaldatav1AccessType"]; /** @description The current processing status of a specified Invitation. */ status: definitions["v1InvitationStatus"]; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; /** @description Unique identifier for the Sender of an Invitation. */ senderUserId: string; }; @@ -1095,8 +1249,9 @@ export type definitions = { invitations?: definitions["v1Invitation"][]; tags?: definitions["datav1Tag"][]; disabledPrivateKeys?: definitions["v1PrivateKey"][]; - rootQuorum?: definitions["v1Quorum"]; + rootQuorum?: definitions["externaldatav1Quorum"]; allowedOrigins?: string[]; + features?: definitions["v1Feature"][]; }; v1Pagination: { /** @description A limit of the number of object to be returned, between 1 and 100. Defaults to 10. */ @@ -1107,9 +1262,7 @@ export type definitions = { after?: string; }; /** @enum {string} */ - v1PayloadEncoding: - | "PAYLOAD_ENCODING_HEXADECIMAL" - | "PAYLOAD_ENCODING_TEXT_UTF8"; + v1PathFormat: "PATH_FORMAT_BIP32"; v1Policy: { /** @description Unique identifier for a given Policy. */ policyId: string; @@ -1119,8 +1272,8 @@ export type definitions = { effect: definitions["externaldatav1Effect"]; /** @description A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details. */ selectors: definitions["externaldatav1Selector"][]; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; /** @description Human-readable notes added by a User to describe a particular policy. */ notes: string; /** @description A consensus expression that evalutes to true or false. */ @@ -1141,17 +1294,17 @@ export type definitions = { addresses: definitions["externaldatav1Address"][]; /** @description A list of Private Key Tag IDs. */ privateKeyTags: string[]; - createdAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; }; v1PrivateKeyParams: { /** @description Human-readable name for a Private Key. */ privateKeyName: string; /** @description Cryptographic Curve used to generate a given Private Key. */ - curve: definitions["immutableactivityv1Curve"]; + curve: definitions["immutablecommonv1Curve"]; /** @description A list of Private Key Tag IDs. */ privateKeyTags: string[]; /** @description Cryptocurrency-specific formats for a derived address (e.g., Ethereum). */ - addressFormats: definitions["immutableactivityv1AddressFormat"][]; + addressFormats: definitions["immutablecommonv1AddressFormat"][]; }; v1PrivateKeyResult: { privateKeyId?: string; @@ -1167,14 +1320,15 @@ export type definitions = { response: definitions["v1AuthenticatorAttestationResponse"]; clientExtensionResults: definitions["v1SimpleClientExtensionResults"]; }; - v1Quorum: { - /** - * Format: int32 - * @description Count of unique approvals required to meet quorum. - */ - threshold: number; - /** @description Unique identifiers of quorum set members. */ - userIds: string[]; + v1RecoverUserIntent: { + /** @description The new authenticator to register. */ + authenticator: definitions["v1AuthenticatorParamsV2"]; + /** @description Unique identifier for the user performing recovery. */ + userId: string; + }; + v1RecoverUserResult: { + /** @description ID of the authenticator created. */ + authenticatorId: string[]; }; v1RejectActivityIntent: { /** @description An artifact verifying a User's action. */ @@ -1189,6 +1343,23 @@ export type definitions = { organizationId: string; parameters: definitions["v1RejectActivityIntent"]; }; + v1RemoveOrganizationFeatureIntent: { + /** @description Name of the feature to remove */ + name: definitions["v1FeatureName"]; + }; + v1RemoveOrganizationFeatureRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE"; + /** @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["v1RemoveOrganizationFeatureIntent"]; + }; + v1RemoveOrganizationFeatureResult: { + /** @description Resulting list of organization features. */ + features: definitions["v1Feature"][]; + }; v1Result: { createOrganizationResult?: definitions["v1CreateOrganizationResult"]; createAuthenticatorsResult?: definitions["v1CreateAuthenticatorsResult"]; @@ -1224,6 +1395,13 @@ export type definitions = { updateUserResult?: definitions["v1UpdateUserResult"]; updatePolicyResult?: definitions["v1UpdatePolicyResult"]; createSubOrganizationResultV3?: definitions["v1CreateSubOrganizationResultV3"]; + createWalletResult?: definitions["v1CreateWalletResult"]; + createWalletAccountsResult?: definitions["v1CreateWalletAccountsResult"]; + initUserEmailRecoveryResult?: definitions["v1InitUserEmailRecoveryResult"]; + recoverUserResult?: definitions["v1RecoverUserResult"]; + setOrganizationFeatureResult?: definitions["v1SetOrganizationFeatureResult"]; + removeOrganizationFeatureResult?: definitions["v1RemoveOrganizationFeatureResult"]; + exportPrivateKeyResult?: definitions["v1ExportPrivateKeyResult"]; }; v1RootUserParams: { /** @description Human-readable name for a User. */ @@ -1240,6 +1418,25 @@ export type definitions = { operator?: definitions["immutableactivityv1Operator"]; targets?: string[]; }; + v1SetOrganizationFeatureIntent: { + /** @description Name of the feature to set */ + name: definitions["v1FeatureName"]; + /** @description Optional value for the feature. Will override existing values if feature is already set. */ + value: string; + }; + v1SetOrganizationFeatureRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE"; + /** @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["v1SetOrganizationFeatureIntent"]; + }; + v1SetOrganizationFeatureResult: { + /** @description Resulting list of organization features. */ + features: definitions["v1Feature"][]; + }; v1SetPaymentMethodIntent: { /** @description The account number of the customer's credit card. */ number: string; @@ -1276,9 +1473,19 @@ export type definitions = { /** @description Raw unsigned payload to be signed. */ payload: string; /** @description Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8). */ - encoding: definitions["v1PayloadEncoding"]; + encoding: definitions["immutableactivityv1PayloadEncoding"]; + /** @description Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032. */ + hashFunction: definitions["immutableactivityv1HashFunction"]; + }; + v1SignRawPayloadIntentV2: { + /** @description The Private Key identifier or address. */ + signWith: string; + /** @description Raw unsigned payload to be signed. */ + payload: string; + /** @description Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8). */ + encoding: definitions["immutableactivityv1PayloadEncoding"]; /** @description Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032. */ - hashFunction: definitions["v1HashFunction"]; + hashFunction: definitions["immutableactivityv1HashFunction"]; }; v1SignRawPayloadRequest: { /** @enum {string} */ @@ -1297,12 +1504,28 @@ export type definitions = { /** @description Component of an ECSDA signature. */ v: string; }; + v1SignRawPayloadV2Request: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2"; + /** @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["v1SignRawPayloadIntentV2"]; + }; v1SignTransactionIntent: { /** @description Unique identifier for a given Private Key. */ privateKeyId: string; /** @description Raw unsigned transaction to be signed by a particular Private Key. */ unsignedTransaction: string; - type: definitions["immutableactivityv1TransactionType"]; + type: definitions["v1TransactionType"]; + }; + v1SignTransactionIntentV2: { + /** @description The Private Key identifier or address. */ + signWith: string; + /** @description Raw unsigned transaction to be signed */ + unsignedTransaction: string; + type: definitions["v1TransactionType"]; }; v1SignTransactionRequest: { /** @enum {string} */ @@ -1316,6 +1539,15 @@ export type definitions = { v1SignTransactionResult: { signedTransaction: string; }; + v1SignTransactionV2Request: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2"; + /** @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["v1SignTransactionIntentV2"]; + }; v1SimpleClientExtensionResults: { appid?: boolean; appidExclude?: boolean; @@ -1323,10 +1555,8 @@ export type definitions = { }; /** @enum {string} */ v1TagType: "TAG_TYPE_USER" | "TAG_TYPE_PRIVATE_KEY"; - v1Timestamp: { - seconds: string; - nanos: string; - }; + /** @enum {string} */ + v1TransactionType: "TRANSACTION_TYPE_ETHEREUM"; v1UpdateAllowedOriginsIntent: { /** @description Additional origins requests are allowed from besides Turnkey origins */ allowedOrigins: string[]; @@ -1471,8 +1701,8 @@ export type definitions = { apiKeys: definitions["v1ApiKey"][]; /** @description A list of User Tag IDs. */ userTags: string[]; - createdAt: definitions["v1Timestamp"]; - updatedAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + updatedAt: definitions["externaldatav1Timestamp"]; }; v1UserParams: { /** @description Human-readable name for a User. */ @@ -1521,7 +1751,17 @@ export type definitions = { signature: string; /** @description Method used to produce a signature. */ scheme: string; - createdAt: definitions["v1Timestamp"]; + createdAt: definitions["externaldatav1Timestamp"]; + }; + v1WalletAccountParams: { + /** @description Cryptographic curve used to generate a wallet Account. */ + curve: definitions["immutablecommonv1Curve"]; + /** @description Path format used to generate a wallet Account. */ + pathFormat: definitions["v1PathFormat"]; + /** @description Path used to generate a wallet Account. */ + path: string; + /** @description Address format used to generate a wallet Acccount. */ + addressFormat: definitions["immutablecommonv1AddressFormat"]; }; v1WebAuthnStamp: { /** @description A base64 url encoded Unique identifier for a given credential. */ @@ -1950,6 +2190,42 @@ export type operations = { }; }; }; + /** Create a Wallet */ + PublicApiService_CreateWallet: { + parameters: { + body: { + body: definitions["v1CreateWalletRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; + /** Create Wallet accounts */ + PublicApiService_CreateWalletAccounts: { + parameters: { + body: { + body: definitions["v1CreateWalletAccountsRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Remove api keys from a User */ PublicApiService_DeleteApiKeys: { parameters: { @@ -2022,6 +2298,42 @@ export type operations = { }; }; }; + /** Exports a Private Key */ + PublicApiService_ExportPrivateKey: { + parameters: { + body: { + body: definitions["v1ExportPrivateKeyRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; + /** Initializes a new recovery */ + PublicApiService_InitUserEmailRecovery: { + parameters: { + body: { + body: definitions["v1InitUserEmailRecoveryRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Reject an Activity */ PublicApiService_RejectActivity: { parameters: { @@ -2040,6 +2352,42 @@ export type operations = { }; }; }; + /** Removes an organization feature */ + PublicApiService_RemoveOrganizationFeature: { + parameters: { + body: { + body: definitions["v1RemoveOrganizationFeatureRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; + /** Sets an organization feature */ + PublicApiService_SetOrganizationFeature: { + parameters: { + body: { + body: definitions["v1SetOrganizationFeatureRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Sign a raw payload with a Private Key */ PublicApiService_SignRawPayload: { parameters: { @@ -2058,6 +2406,24 @@ export type operations = { }; }; }; + /** Sign a raw payload with a Private Key id or address */ + PublicApiService_SignRawPayloadV2: { + parameters: { + body: { + body: definitions["v1SignRawPayloadV2Request"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Sign a transaction with a Private Key */ PublicApiService_SignTransaction: { parameters: { @@ -2076,6 +2442,24 @@ export type operations = { }; }; }; + /** Sign a transaction with a Private Key id or address */ + PublicApiService_SignTransactionV2: { + parameters: { + body: { + body: definitions["v1SignTransactionV2Request"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Update the allowable origins for credentials and requests */ PublicApiService_UpdateAllowedOrigins: { parameters: {