@turnkey/http 6.0.0 → 6.2.0

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.
@@ -757,32 +757,7 @@ class TurnkeyClient {
757
757
  };
758
758
  };
759
759
  /**
760
- * Get a swap quote. Asset chains are derived from CAIP-19 asset IDs; cross-chain quotes are supported.
761
- *
762
- * Sign the provided `TGetSwapQuoteBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_quote).
763
- *
764
- * See also {@link stampGetSwapQuote}.
765
- */
766
- this.getSwapQuote = async (input) => {
767
- return this.request("/public/v1/query/get_swap_quote", input);
768
- };
769
- /**
770
- * Produce a `SignedRequest` from `TGetSwapQuoteBody` by using the client's `stamp` function.
771
- *
772
- * See also {@link GetSwapQuote}.
773
- */
774
- this.stampGetSwapQuote = async (input) => {
775
- const fullUrl = this.config.baseUrl + "/public/v1/query/get_swap_quote";
776
- const body = JSON.stringify(input);
777
- const stamp = await this.stamper.stamp(body);
778
- return {
779
- body: body,
780
- stamp: stamp,
781
- url: fullUrl,
782
- };
783
- };
784
- /**
785
- * Get the status of a swap by the send_transaction_status_id returned from execute_swap. Covers same-chain and cross-chain swaps.
760
+ * Poll the status of a swap by its swap_request_id. Covers same-chain and cross-chain swaps.
786
761
  *
787
762
  * Sign the provided `TGetSwapStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_status).
788
763
  *
@@ -907,6 +882,31 @@ class TurnkeyClient {
907
882
  url: fullUrl,
908
883
  };
909
884
  };
885
+ /**
886
+ * List QOS versions supported for new TVC deployments and the latest recommended QOS version.
887
+ *
888
+ * Sign the provided `TGetTvcQosVersionsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_qos_versions).
889
+ *
890
+ * See also {@link stampGetTvcQosVersions}.
891
+ */
892
+ this.getTvcQosVersions = async (input) => {
893
+ return this.request("/public/v1/query/get_tvc_qos_versions", input);
894
+ };
895
+ /**
896
+ * Produce a `SignedRequest` from `TGetTvcQosVersionsBody` by using the client's `stamp` function.
897
+ *
898
+ * See also {@link GetTvcQosVersions}.
899
+ */
900
+ this.stampGetTvcQosVersions = async (input) => {
901
+ const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_qos_versions";
902
+ const body = JSON.stringify(input);
903
+ const stamp = await this.stamper.stamp(body);
904
+ return {
905
+ body: body,
906
+ stamp: stamp,
907
+ url: fullUrl,
908
+ };
909
+ };
910
910
  /**
911
911
  * Get details about a user.
912
912
  *
@@ -1307,6 +1307,31 @@ class TurnkeyClient {
1307
1307
  url: fullUrl,
1308
1308
  };
1309
1309
  };
1310
+ /**
1311
+ * List secret metadata for an organization.
1312
+ *
1313
+ * Sign the provided `TListSecretsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_secrets).
1314
+ *
1315
+ * See also {@link stampListSecrets}.
1316
+ */
1317
+ this.listSecrets = async (input) => {
1318
+ return this.request("/public/v1/query/list_secrets", input);
1319
+ };
1320
+ /**
1321
+ * Produce a `SignedRequest` from `TListSecretsBody` by using the client's `stamp` function.
1322
+ *
1323
+ * See also {@link ListSecrets}.
1324
+ */
1325
+ this.stampListSecrets = async (input) => {
1326
+ const fullUrl = this.config.baseUrl + "/public/v1/query/list_secrets";
1327
+ const body = JSON.stringify(input);
1328
+ const stamp = await this.stamper.stamp(body);
1329
+ return {
1330
+ body: body,
1331
+ stamp: stamp,
1332
+ url: fullUrl,
1333
+ };
1334
+ };
1310
1335
  /**
1311
1336
  * List all smart contract interfaces within an organization.
1312
1337
  *
@@ -2157,6 +2182,31 @@ class TurnkeyClient {
2157
2182
  url: fullUrl,
2158
2183
  };
2159
2184
  };
2185
+ /**
2186
+ * Get a swap quote. Asset chains are derived from CAIP-19 asset IDs; cross-chain quotes are supported.
2187
+ *
2188
+ * Sign the provided `TCreateSwapQuoteBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_swap_quote).
2189
+ *
2190
+ * See also {@link stampCreateSwapQuote}.
2191
+ */
2192
+ this.createSwapQuote = async (input) => {
2193
+ return this.request("/public/v1/submit/create_swap_quote", input);
2194
+ };
2195
+ /**
2196
+ * Produce a `SignedRequest` from `TCreateSwapQuoteBody` by using the client's `stamp` function.
2197
+ *
2198
+ * See also {@link CreateSwapQuote}.
2199
+ */
2200
+ this.stampCreateSwapQuote = async (input) => {
2201
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/create_swap_quote";
2202
+ const body = JSON.stringify(input);
2203
+ const stamp = await this.stamper.stamp(body);
2204
+ return {
2205
+ body: body,
2206
+ stamp: stamp,
2207
+ url: fullUrl,
2208
+ };
2209
+ };
2160
2210
  /**
2161
2211
  * Create a new TVC application
2162
2212
  *
@@ -3083,7 +3133,32 @@ class TurnkeyClient {
3083
3133
  };
3084
3134
  };
3085
3135
  /**
3086
- * Execute a quoted swap through the activity pipeline and Turnkey broadcasting.
3136
+ * Submit an EIP-7702 undelegation transaction.
3137
+ *
3138
+ * Sign the provided `TEthUndelegate7702Body` with the client's `stamp` function, and submit the request (POST /public/v1/submit/eth_undelegate_7702).
3139
+ *
3140
+ * See also {@link stampEthUndelegate7702}.
3141
+ */
3142
+ this.ethUndelegate7702 = async (input) => {
3143
+ return this.request("/public/v1/submit/eth_undelegate_7702", input);
3144
+ };
3145
+ /**
3146
+ * Produce a `SignedRequest` from `TEthUndelegate7702Body` by using the client's `stamp` function.
3147
+ *
3148
+ * See also {@link EthUndelegate7702}.
3149
+ */
3150
+ this.stampEthUndelegate7702 = async (input) => {
3151
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/eth_undelegate_7702";
3152
+ const body = JSON.stringify(input);
3153
+ const stamp = await this.stamper.stamp(body);
3154
+ return {
3155
+ body: body,
3156
+ stamp: stamp,
3157
+ url: fullUrl,
3158
+ };
3159
+ };
3160
+ /**
3161
+ * Execute the exact provider quote identified by quote_id through the activity pipeline and Turnkey broadcasting. Requests must use ACTIVITY_TYPE_EXECUTE_SWAP_V2.
3087
3162
  *
3088
3163
  * Sign the provided `TExecuteSwapBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/execute_swap).
3089
3164
  *
@@ -3132,6 +3207,31 @@ class TurnkeyClient {
3132
3207
  url: fullUrl,
3133
3208
  };
3134
3209
  };
3210
+ /**
3211
+ * Export secrets encrypted to client-provided target public keys.
3212
+ *
3213
+ * Sign the provided `TExportSecretsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/export_secrets).
3214
+ *
3215
+ * See also {@link stampExportSecrets}.
3216
+ */
3217
+ this.exportSecrets = async (input) => {
3218
+ return this.request("/public/v1/submit/export_secrets", input);
3219
+ };
3220
+ /**
3221
+ * Produce a `SignedRequest` from `TExportSecretsBody` by using the client's `stamp` function.
3222
+ *
3223
+ * See also {@link ExportSecrets}.
3224
+ */
3225
+ this.stampExportSecrets = async (input) => {
3226
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/export_secrets";
3227
+ const body = JSON.stringify(input);
3228
+ const stamp = await this.stamper.stamp(body);
3229
+ return {
3230
+ body: body,
3231
+ stamp: stamp,
3232
+ url: fullUrl,
3233
+ };
3234
+ };
3135
3235
  /**
3136
3236
  * Export a wallet.
3137
3237
  *
@@ -3207,6 +3307,31 @@ class TurnkeyClient {
3207
3307
  url: fullUrl,
3208
3308
  };
3209
3309
  };
3310
+ /**
3311
+ * Import secrets encrypted to target keys returned from InitImportSecrets.
3312
+ *
3313
+ * Sign the provided `TImportSecretsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/import_secrets).
3314
+ *
3315
+ * See also {@link stampImportSecrets}.
3316
+ */
3317
+ this.importSecrets = async (input) => {
3318
+ return this.request("/public/v1/submit/import_secrets", input);
3319
+ };
3320
+ /**
3321
+ * Produce a `SignedRequest` from `TImportSecretsBody` by using the client's `stamp` function.
3322
+ *
3323
+ * See also {@link ImportSecrets}.
3324
+ */
3325
+ this.stampImportSecrets = async (input) => {
3326
+ const fullUrl = this.config.baseUrl + "/public/v1/submit/import_secrets";
3327
+ const body = JSON.stringify(input);
3328
+ const stamp = await this.stamper.stamp(body);
3329
+ return {
3330
+ body: body,
3331
+ stamp: stamp,
3332
+ url: fullUrl,
3333
+ };
3334
+ };
3210
3335
  /**
3211
3336
  * Import a wallet.
3212
3337
  *