@imtbl/generated-clients 2.8.1-alpha.0 → 2.9.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/browser/index.js +2 -2
  2. package/dist/node/index.cjs +3 -3
  3. package/dist/node/index.js +2 -2
  4. package/dist/types/magic-tee/api.d.ts +4 -3
  5. package/dist/types/magic-tee/base.d.ts +2 -2
  6. package/dist/types/magic-tee/common.d.ts +2 -2
  7. package/dist/types/magic-tee/configuration.d.ts +2 -2
  8. package/dist/types/magic-tee/domain/identity-provider-api.d.ts +291 -0
  9. package/dist/types/magic-tee/domain/sign-operations-api.d.ts +200 -0
  10. package/dist/types/magic-tee/domain/wallet-api.d.ts +16 -88
  11. package/dist/types/magic-tee/index.d.ts +2 -2
  12. package/dist/types/magic-tee/models/httpvalidation-error.d.ts +2 -2
  13. package/dist/types/magic-tee/models/identity-provider-create-schema.d.ts +36 -0
  14. package/dist/types/magic-tee/models/identity-provider-model.d.ts +42 -0
  15. package/dist/types/magic-tee/models/identity-provider-update-schema.d.ts +36 -0
  16. package/dist/types/magic-tee/models/index.d.ts +5 -4
  17. package/dist/types/magic-tee/models/sign-data-request.d.ts +5 -6
  18. package/dist/types/magic-tee/models/sign-data-response.d.ts +2 -2
  19. package/dist/types/magic-tee/models/sign-message-request.d.ts +24 -0
  20. package/dist/types/magic-tee/models/sign-message-response.d.ts +42 -0
  21. package/dist/types/magic-tee/models/validation-error-loc-inner.d.ts +2 -2
  22. package/dist/types/magic-tee/models/validation-error.d.ts +2 -2
  23. package/dist/types/magic-tee/models/wallet-response-model.d.ts +2 -2
  24. package/dist/types/magic-tee-api-clients.d.ts +2 -2
  25. package/package.json +1 -1
  26. package/dist/types/magic-tee/domain/transaction-api.d.ts +0 -184
  27. package/dist/types/magic-tee/models/chain.d.ts +0 -20
  28. package/dist/types/magic-tee/models/create-wallet-request-model.d.ts +0 -25
  29. package/dist/types/magic-tee/models/personal-sign-request.d.ts +0 -31
  30. package/dist/types/magic-tee/models/personal-sign-response.d.ts +0 -42
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -12,8 +12,6 @@
12
12
  import type { Configuration } from '../configuration';
13
13
  import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
- import { Chain } from '../models';
16
- import { CreateWalletRequestModel } from '../models';
17
15
  import { WalletResponseModel } from '../models';
18
16
  /**
19
17
  * WalletApi - axios parameter creator
@@ -21,27 +19,16 @@ import { WalletResponseModel } from '../models';
21
19
  */
22
20
  export declare const WalletApiAxiosParamCreator: (configuration?: Configuration) => {
23
21
  /**
24
- * Creates a new wallet for the given chain and returns its public address. **Example cURL:** ```bash curl -X POST \'https://tee.express.magiclabs.com/v1/wallet\' \\ -H \'Content-Type: application/json\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' \\ -d \'{ \"chain\": \"ETH\" }\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
25
- * @summary Create a new wallet.
26
- * @param {CreateWalletRequestModel} createWalletRequestModel
27
- * @param {string} [xMagicAPIKey]
28
- * @param {string} [xMagicSecretKey]
29
- * @param {string} [xOIDCProviderID]
30
- * @param {*} [options] Override http request option.
31
- * @throws {RequiredError}
32
- */
33
- createWalletV1WalletPost: (createWalletRequestModel: CreateWalletRequestModel, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
34
- /**
35
- * Returns the wallet\'s public address for the given chain. **Example cURL:** ```bash curl -X GET \'https://tee.express.magiclabs.com/v1/wallet?chain=ETH\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
36
- * @summary Get wallet details.
37
- * @param {Chain} chain
22
+ *
23
+ * @summary Create Wallet
24
+ * @param {string} xMagicChain
38
25
  * @param {string} [xMagicAPIKey]
39
26
  * @param {string} [xMagicSecretKey]
40
27
  * @param {string} [xOIDCProviderID]
41
28
  * @param {*} [options] Override http request option.
42
29
  * @throws {RequiredError}
43
30
  */
44
- getWalletV1WalletGet: (chain: Chain, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ createWalletV1WalletPost: (xMagicChain: string, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
45
32
  };
46
33
  /**
47
34
  * WalletApi - functional programming interface
@@ -49,27 +36,16 @@ export declare const WalletApiAxiosParamCreator: (configuration?: Configuration)
49
36
  */
50
37
  export declare const WalletApiFp: (configuration?: Configuration) => {
51
38
  /**
52
- * Creates a new wallet for the given chain and returns its public address. **Example cURL:** ```bash curl -X POST \'https://tee.express.magiclabs.com/v1/wallet\' \\ -H \'Content-Type: application/json\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' \\ -d \'{ \"chain\": \"ETH\" }\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
53
- * @summary Create a new wallet.
54
- * @param {CreateWalletRequestModel} createWalletRequestModel
55
- * @param {string} [xMagicAPIKey]
56
- * @param {string} [xMagicSecretKey]
57
- * @param {string} [xOIDCProviderID]
58
- * @param {*} [options] Override http request option.
59
- * @throws {RequiredError}
60
- */
61
- createWalletV1WalletPost(createWalletRequestModel: CreateWalletRequestModel, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WalletResponseModel>>;
62
- /**
63
- * Returns the wallet\'s public address for the given chain. **Example cURL:** ```bash curl -X GET \'https://tee.express.magiclabs.com/v1/wallet?chain=ETH\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
64
- * @summary Get wallet details.
65
- * @param {Chain} chain
39
+ *
40
+ * @summary Create Wallet
41
+ * @param {string} xMagicChain
66
42
  * @param {string} [xMagicAPIKey]
67
43
  * @param {string} [xMagicSecretKey]
68
44
  * @param {string} [xOIDCProviderID]
69
45
  * @param {*} [options] Override http request option.
70
46
  * @throws {RequiredError}
71
47
  */
72
- getWalletV1WalletGet(chain: Chain, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WalletResponseModel>>;
48
+ createWalletV1WalletPost(xMagicChain: string, xMagicAPIKey?: string, xMagicSecretKey?: string, xOIDCProviderID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WalletResponseModel>>;
73
49
  };
74
50
  /**
75
51
  * WalletApi - factory interface
@@ -77,21 +53,13 @@ export declare const WalletApiFp: (configuration?: Configuration) => {
77
53
  */
78
54
  export declare const WalletApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
79
55
  /**
80
- * Creates a new wallet for the given chain and returns its public address. **Example cURL:** ```bash curl -X POST \'https://tee.express.magiclabs.com/v1/wallet\' \\ -H \'Content-Type: application/json\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' \\ -d \'{ \"chain\": \"ETH\" }\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
81
- * @summary Create a new wallet.
56
+ *
57
+ * @summary Create Wallet
82
58
  * @param {WalletApiCreateWalletV1WalletPostRequest} requestParameters Request parameters.
83
59
  * @param {*} [options] Override http request option.
84
60
  * @throws {RequiredError}
85
61
  */
86
62
  createWalletV1WalletPost(requestParameters: WalletApiCreateWalletV1WalletPostRequest, options?: AxiosRequestConfig): AxiosPromise<WalletResponseModel>;
87
- /**
88
- * Returns the wallet\'s public address for the given chain. **Example cURL:** ```bash curl -X GET \'https://tee.express.magiclabs.com/v1/wallet?chain=ETH\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
89
- * @summary Get wallet details.
90
- * @param {WalletApiGetWalletV1WalletGetRequest} requestParameters Request parameters.
91
- * @param {*} [options] Override http request option.
92
- * @throws {RequiredError}
93
- */
94
- getWalletV1WalletGet(requestParameters: WalletApiGetWalletV1WalletGetRequest, options?: AxiosRequestConfig): AxiosPromise<WalletResponseModel>;
95
63
  };
96
64
  /**
97
65
  * Request parameters for createWalletV1WalletPost operation in WalletApi.
@@ -101,10 +69,10 @@ export declare const WalletApiFactory: (configuration?: Configuration, basePath?
101
69
  export interface WalletApiCreateWalletV1WalletPostRequest {
102
70
  /**
103
71
  *
104
- * @type {CreateWalletRequestModel}
72
+ * @type {string}
105
73
  * @memberof WalletApiCreateWalletV1WalletPost
106
74
  */
107
- readonly createWalletRequestModel: CreateWalletRequestModel;
75
+ readonly xMagicChain: string;
108
76
  /**
109
77
  *
110
78
  * @type {string}
@@ -124,37 +92,6 @@ export interface WalletApiCreateWalletV1WalletPostRequest {
124
92
  */
125
93
  readonly xOIDCProviderID?: string;
126
94
  }
127
- /**
128
- * Request parameters for getWalletV1WalletGet operation in WalletApi.
129
- * @export
130
- * @interface WalletApiGetWalletV1WalletGetRequest
131
- */
132
- export interface WalletApiGetWalletV1WalletGetRequest {
133
- /**
134
- *
135
- * @type {Chain}
136
- * @memberof WalletApiGetWalletV1WalletGet
137
- */
138
- readonly chain: Chain;
139
- /**
140
- *
141
- * @type {string}
142
- * @memberof WalletApiGetWalletV1WalletGet
143
- */
144
- readonly xMagicAPIKey?: string;
145
- /**
146
- *
147
- * @type {string}
148
- * @memberof WalletApiGetWalletV1WalletGet
149
- */
150
- readonly xMagicSecretKey?: string;
151
- /**
152
- *
153
- * @type {string}
154
- * @memberof WalletApiGetWalletV1WalletGet
155
- */
156
- readonly xOIDCProviderID?: string;
157
- }
158
95
  /**
159
96
  * WalletApi - object-oriented interface
160
97
  * @export
@@ -163,21 +100,12 @@ export interface WalletApiGetWalletV1WalletGetRequest {
163
100
  */
164
101
  export declare class WalletApi extends BaseAPI {
165
102
  /**
166
- * Creates a new wallet for the given chain and returns its public address. **Example cURL:** ```bash curl -X POST \'https://tee.express.magiclabs.com/v1/wallet\' \\ -H \'Content-Type: application/json\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' \\ -d \'{ \"chain\": \"ETH\" }\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
167
- * @summary Create a new wallet.
103
+ *
104
+ * @summary Create Wallet
168
105
  * @param {WalletApiCreateWalletV1WalletPostRequest} requestParameters Request parameters.
169
106
  * @param {*} [options] Override http request option.
170
107
  * @throws {RequiredError}
171
108
  * @memberof WalletApi
172
109
  */
173
110
  createWalletV1WalletPost(requestParameters: WalletApiCreateWalletV1WalletPostRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WalletResponseModel, any>>;
174
- /**
175
- * Returns the wallet\'s public address for the given chain. **Example cURL:** ```bash curl -X GET \'https://tee.express.magiclabs.com/v1/wallet?chain=ETH\' \\ -H \'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjNhYVl5dGR3d2UwMzJzMXIzVElyOSJ9...\' \\ -H \'X-Magic-API-Key: your-magic-api-key\' \\ -H \'X-OIDC-Provider-ID: your-oidc-provider-id\' ``` **Example Response:** ```json { \"public_address\": \"0x6b422EefBFBc47a6900A1fc5454Ef4b940B7e36e\" } ```
176
- * @summary Get wallet details.
177
- * @param {WalletApiGetWalletV1WalletGetRequest} requestParameters Request parameters.
178
- * @param {*} [options] Override http request option.
179
- * @throws {RequiredError}
180
- * @memberof WalletApi
181
- */
182
- getWalletV1WalletGet(requestParameters: WalletApiGetWalletV1WalletGetRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WalletResponseModel, any>>;
183
111
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -0,0 +1,36 @@
1
+ /**
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface IdentityProviderCreateSchema
16
+ */
17
+ export interface IdentityProviderCreateSchema {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof IdentityProviderCreateSchema
22
+ */
23
+ 'issuer': string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof IdentityProviderCreateSchema
28
+ */
29
+ 'audience': string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof IdentityProviderCreateSchema
34
+ */
35
+ 'jwks_uri': string;
36
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface IdentityProviderModel
16
+ */
17
+ export interface IdentityProviderModel {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof IdentityProviderModel
22
+ */
23
+ 'id': string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof IdentityProviderModel
28
+ */
29
+ 'issuer': string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof IdentityProviderModel
34
+ */
35
+ 'audience': string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof IdentityProviderModel
40
+ */
41
+ 'jwks_uri': string;
42
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface IdentityProviderUpdateSchema
16
+ */
17
+ export interface IdentityProviderUpdateSchema {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof IdentityProviderUpdateSchema
22
+ */
23
+ 'issuer'?: string | null;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof IdentityProviderUpdateSchema
28
+ */
29
+ 'audience'?: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof IdentityProviderUpdateSchema
34
+ */
35
+ 'jwks_uri'?: string | null;
36
+ }
@@ -1,10 +1,11 @@
1
- export * from './chain';
2
- export * from './create-wallet-request-model';
3
1
  export * from './httpvalidation-error';
4
- export * from './personal-sign-request';
5
- export * from './personal-sign-response';
2
+ export * from './identity-provider-create-schema';
3
+ export * from './identity-provider-model';
4
+ export * from './identity-provider-update-schema';
6
5
  export * from './sign-data-request';
7
6
  export * from './sign-data-response';
7
+ export * from './sign-message-request';
8
+ export * from './sign-message-response';
8
9
  export * from './validation-error';
9
10
  export * from './validation-error-loc-inner';
10
11
  export * from './wallet-response-model';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Chain } from './chain';
13
12
  /**
14
13
  *
15
14
  * @export
@@ -18,14 +17,14 @@ import { Chain } from './chain';
18
17
  export interface SignDataRequest {
19
18
  /**
20
19
  *
21
- * @type {Chain}
20
+ * @type {string}
22
21
  * @memberof SignDataRequest
23
22
  */
24
- 'chain': Chain;
23
+ 'raw_data_hash': string;
25
24
  /**
26
25
  *
27
26
  * @type {string}
28
27
  * @memberof SignDataRequest
29
28
  */
30
- 'raw_data_hash': string;
29
+ 'one_time_code'?: string | null;
31
30
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -0,0 +1,24 @@
1
+ /**
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface SignMessageRequest
16
+ */
17
+ export interface SignMessageRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SignMessageRequest
22
+ */
23
+ 'message_base64': string;
24
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface SignMessageResponse
16
+ */
17
+ export interface SignMessageResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SignMessageResponse
22
+ */
23
+ 'signature': string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SignMessageResponse
28
+ */
29
+ 'r'?: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SignMessageResponse
34
+ */
35
+ 's'?: string | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SignMessageResponse
40
+ */
41
+ 'v'?: string | null;
42
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
- * TEE Express
3
- * TEE Express is a service that simplifies wallet management for developers. Unlike traditional wallet solutions that require complex key management, TEE Express handles all key management internally, providing a streamlined API for wallet operations. TEE Express leverages secure enclave technology to ensure that private keys never leave the secure environment. All wallet operations, including creation, signing, and key management, are performed within a trusted execution environment (TEE). This provides enterprise-grade security while maintaining the simplicity of a REST API. The service supports Ethereum wallets and provides endpoints for wallet creation, transaction signing, and message signing. All operations are authenticated using JWT tokens passed in the Authorization header, ensuring secure access to user wallets. **Migration Notice:** If you\'re an existing customer, your users\' wallets have been automatically migrated to TEE Express. There\'s no action required on your part - all existing wallets are now accessible through the TEE Express API using the same JWT tokens you currently use for authentication. Simply update your API calls to use the TEE Express endpoints, and pass your existing JWT token in the Authorization header for all requests. **Authentication:** - An API key via the `X-Magic-API-Key` header or a secret key via the `X-Magic-Secret-Key` header. - The OIDC provider ID via the `X-OIDC-Provider-ID` header. - Bearer token in the `Authorization` header. **Data Hashing for Signing:** For personal sign operations, encode your data as base64: ```typescript const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); ``` For signing transaction data or other structured data, provide a keccak256 hash: ```typescript import { MessageTypes, SignTypedDataVersion, TypedDataUtils, TypedDataV1, TypedMessage, typedSignatureHash, } from \'@metamask/eth-sig-util\'; import { resolveProperties, Signature, Transaction, TransactionLike, TransactionRequest } from \'ethers\'; const computeEip712Hash = ( data: TypedMessage<MessageTypes>, version: SignTypedDataVersion.V3 | SignTypedDataVersion.V4, ): string => { const hashBuffer = TypedDataUtils.eip712Hash(data, version); return \'0x\' + hashBuffer.toString(\'hex\'); }; const personalSign = async (data: string) => { const message = Buffer.from(data, \'utf-8\').toString(\'base64\'); const body = { message_base64: message, chain: \'ETH\' }; return await fetch(\'/v1/wallet/personal-sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV1 = async (data: TypedDataV1) => { const rawDataHash = typedSignatureHash(data); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV3 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V3); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTypedDataV4 = async (data: TypedMessage<MessageTypes>) => { const rawDataHash = computeEip712Hash(data, SignTypedDataVersion.V4); const body = { raw_data_hash: rawDataHash, chain: \'ETH\' }; return await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); }; const signTransaction = async (tx: TransactionRequest) => { const resolvedTx = await resolveProperties(tx); const txForSigning = { ...resolvedTx }; delete txForSigning.from; const btx = Transaction.from(txForSigning as TransactionLike); const body = { raw_data_hash: btx.unsignedHash, chain: \'ETH\' }; const res = await fetch(\'/v1/wallet/sign\', { method: \'POST\', body: JSON.stringify(body) }); const { r, s, v } = res.json(); btx.signature = Signature.from({ r, s, v }); return btx.serialized; }; ```
2
+ * FastAPI
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
5
  * The version of the OpenAPI document: 0.1.0
6
6
  *
@@ -1,4 +1,4 @@
1
- import { TransactionApi, WalletApi } from './magic-tee';
1
+ import { SignOperationsApi, WalletApi } from './magic-tee';
2
2
  export type MagicTeeApiClientsConfig = {
3
3
  basePath: string;
4
4
  timeout: number;
@@ -6,7 +6,7 @@ export type MagicTeeApiClientsConfig = {
6
6
  magicProviderId: string;
7
7
  };
8
8
  export declare class MagicTeeApiClients {
9
- transactionApi: TransactionApi;
9
+ signOperationsApi: SignOperationsApi;
10
10
  walletApi: WalletApi;
11
11
  constructor(config: MagicTeeApiClientsConfig);
12
12
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/generated-clients",
3
3
  "description": "Generated Immutable API clients",
4
- "version": "2.8.1-alpha.0",
4
+ "version": "2.9.0-alpha.1",
5
5
  "author": "Immutable",
6
6
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
7
7
  "dependencies": {