@turnkey/http 4.1.1 → 6.0.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.
- package/CHANGELOG.md +75 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts +515 -5
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js +855 -5
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs +855 -5
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts +75730 -8740
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js +821 -5
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs +754 -6
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts +1992 -70
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts.map +1 -1
- package/dist/async.d.ts.map +1 -1
- package/dist/async.js +24 -0
- package/dist/async.js.map +1 -1
- package/dist/async.mjs +24 -0
- package/dist/async.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -183,6 +183,106 @@ class TurnkeyClient {
|
|
|
183
183
|
url: fullUrl,
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Poll the status of a fee claim by its claim_request_id.
|
|
188
|
+
*
|
|
189
|
+
* Sign the provided `TGetClaimEarnFeesStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_claim_earn_fees_status).
|
|
190
|
+
*
|
|
191
|
+
* See also {@link stampGetClaimEarnFeesStatus}.
|
|
192
|
+
*/
|
|
193
|
+
this.getClaimEarnFeesStatus = async (input) => {
|
|
194
|
+
return this.request("/public/v1/query/get_claim_earn_fees_status", input);
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Produce a `SignedRequest` from `TGetClaimEarnFeesStatusBody` by using the client's `stamp` function.
|
|
198
|
+
*
|
|
199
|
+
* See also {@link GetClaimEarnFeesStatus}.
|
|
200
|
+
*/
|
|
201
|
+
this.stampGetClaimEarnFeesStatus = async (input) => {
|
|
202
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_claim_earn_fees_status";
|
|
203
|
+
const body = JSON.stringify(input);
|
|
204
|
+
const stamp = await this.stamper.stamp(body);
|
|
205
|
+
return {
|
|
206
|
+
body: body,
|
|
207
|
+
stamp: stamp,
|
|
208
|
+
url: fullUrl,
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Poll the status of a wrapper deployment by its deploy_request_id.
|
|
213
|
+
*
|
|
214
|
+
* Sign the provided `TGetEarnDeployStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_deploy_status).
|
|
215
|
+
*
|
|
216
|
+
* See also {@link stampGetEarnDeployStatus}.
|
|
217
|
+
*/
|
|
218
|
+
this.getEarnDeployStatus = async (input) => {
|
|
219
|
+
return this.request("/public/v1/query/get_earn_deploy_status", input);
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Produce a `SignedRequest` from `TGetEarnDeployStatusBody` by using the client's `stamp` function.
|
|
223
|
+
*
|
|
224
|
+
* See also {@link GetEarnDeployStatus}.
|
|
225
|
+
*/
|
|
226
|
+
this.stampGetEarnDeployStatus = async (input) => {
|
|
227
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_deploy_status";
|
|
228
|
+
const body = JSON.stringify(input);
|
|
229
|
+
const stamp = await this.stamper.stamp(body);
|
|
230
|
+
return {
|
|
231
|
+
body: body,
|
|
232
|
+
stamp: stamp,
|
|
233
|
+
url: fullUrl,
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Poll the status of a deposit by its deposit_request_id (for the async/sponsored deposit path).
|
|
238
|
+
*
|
|
239
|
+
* Sign the provided `TGetEarnDepositStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_deposit_status).
|
|
240
|
+
*
|
|
241
|
+
* See also {@link stampGetEarnDepositStatus}.
|
|
242
|
+
*/
|
|
243
|
+
this.getEarnDepositStatus = async (input) => {
|
|
244
|
+
return this.request("/public/v1/query/get_earn_deposit_status", input);
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Produce a `SignedRequest` from `TGetEarnDepositStatusBody` by using the client's `stamp` function.
|
|
248
|
+
*
|
|
249
|
+
* See also {@link GetEarnDepositStatus}.
|
|
250
|
+
*/
|
|
251
|
+
this.stampGetEarnDepositStatus = async (input) => {
|
|
252
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_deposit_status";
|
|
253
|
+
const body = JSON.stringify(input);
|
|
254
|
+
const stamp = await this.stamper.stamp(body);
|
|
255
|
+
return {
|
|
256
|
+
body: body,
|
|
257
|
+
stamp: stamp,
|
|
258
|
+
url: fullUrl,
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Poll the status of a withdrawal by its withdraw_request_id.
|
|
263
|
+
*
|
|
264
|
+
* Sign the provided `TGetEarnWithdrawStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_withdraw_status).
|
|
265
|
+
*
|
|
266
|
+
* See also {@link stampGetEarnWithdrawStatus}.
|
|
267
|
+
*/
|
|
268
|
+
this.getEarnWithdrawStatus = async (input) => {
|
|
269
|
+
return this.request("/public/v1/query/get_earn_withdraw_status", input);
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Produce a `SignedRequest` from `TGetEarnWithdrawStatusBody` by using the client's `stamp` function.
|
|
273
|
+
*
|
|
274
|
+
* See also {@link GetEarnWithdrawStatus}.
|
|
275
|
+
*/
|
|
276
|
+
this.stampGetEarnWithdrawStatus = async (input) => {
|
|
277
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_withdraw_status";
|
|
278
|
+
const body = JSON.stringify(input);
|
|
279
|
+
const stamp = await this.stamper.stamp(body);
|
|
280
|
+
return {
|
|
281
|
+
body: body,
|
|
282
|
+
stamp: stamp,
|
|
283
|
+
url: fullUrl,
|
|
284
|
+
};
|
|
285
|
+
};
|
|
186
286
|
/**
|
|
187
287
|
* Get gas usage and gas limits for either the parent organization or a sub-organization.
|
|
188
288
|
*
|
|
@@ -258,6 +358,81 @@ class TurnkeyClient {
|
|
|
258
358
|
url: fullUrl,
|
|
259
359
|
};
|
|
260
360
|
};
|
|
361
|
+
/**
|
|
362
|
+
* Get all MFA policies for a user.
|
|
363
|
+
*
|
|
364
|
+
* Sign the provided `TGetMfaPoliciesBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_mfa_policies).
|
|
365
|
+
*
|
|
366
|
+
* See also {@link stampGetMfaPolicies}.
|
|
367
|
+
*/
|
|
368
|
+
this.getMfaPolicies = async (input) => {
|
|
369
|
+
return this.request("/public/v1/query/get_mfa_policies", input);
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Produce a `SignedRequest` from `TGetMfaPoliciesBody` by using the client's `stamp` function.
|
|
373
|
+
*
|
|
374
|
+
* See also {@link GetMfaPolicies}.
|
|
375
|
+
*/
|
|
376
|
+
this.stampGetMfaPolicies = async (input) => {
|
|
377
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_mfa_policies";
|
|
378
|
+
const body = JSON.stringify(input);
|
|
379
|
+
const stamp = await this.stamper.stamp(body);
|
|
380
|
+
return {
|
|
381
|
+
body: body,
|
|
382
|
+
stamp: stamp,
|
|
383
|
+
url: fullUrl,
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Get a single MFA policy for a user.
|
|
388
|
+
*
|
|
389
|
+
* Sign the provided `TGetMfaPolicyBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_mfa_policy).
|
|
390
|
+
*
|
|
391
|
+
* See also {@link stampGetMfaPolicy}.
|
|
392
|
+
*/
|
|
393
|
+
this.getMfaPolicy = async (input) => {
|
|
394
|
+
return this.request("/public/v1/query/get_mfa_policy", input);
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* Produce a `SignedRequest` from `TGetMfaPolicyBody` by using the client's `stamp` function.
|
|
398
|
+
*
|
|
399
|
+
* See also {@link GetMfaPolicy}.
|
|
400
|
+
*/
|
|
401
|
+
this.stampGetMfaPolicy = async (input) => {
|
|
402
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_mfa_policy";
|
|
403
|
+
const body = JSON.stringify(input);
|
|
404
|
+
const stamp = await this.stamper.stamp(body);
|
|
405
|
+
return {
|
|
406
|
+
body: body,
|
|
407
|
+
stamp: stamp,
|
|
408
|
+
url: fullUrl,
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Get the MFA status of an activity for a specific user or all voting users.
|
|
413
|
+
*
|
|
414
|
+
* Sign the provided `TGetMfaStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_mfa_status).
|
|
415
|
+
*
|
|
416
|
+
* See also {@link stampGetMfaStatus}.
|
|
417
|
+
*/
|
|
418
|
+
this.getMfaStatus = async (input) => {
|
|
419
|
+
return this.request("/public/v1/query/get_mfa_status", input);
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* Produce a `SignedRequest` from `TGetMfaStatusBody` by using the client's `stamp` function.
|
|
423
|
+
*
|
|
424
|
+
* See also {@link GetMfaStatus}.
|
|
425
|
+
*/
|
|
426
|
+
this.stampGetMfaStatus = async (input) => {
|
|
427
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_mfa_status";
|
|
428
|
+
const body = JSON.stringify(input);
|
|
429
|
+
const stamp = await this.stamper.stamp(body);
|
|
430
|
+
return {
|
|
431
|
+
body: body,
|
|
432
|
+
stamp: stamp,
|
|
433
|
+
url: fullUrl,
|
|
434
|
+
};
|
|
435
|
+
};
|
|
261
436
|
/**
|
|
262
437
|
* Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions.
|
|
263
438
|
*
|
|
@@ -508,6 +683,56 @@ class TurnkeyClient {
|
|
|
508
683
|
url: fullUrl,
|
|
509
684
|
};
|
|
510
685
|
};
|
|
686
|
+
/**
|
|
687
|
+
* Get a single session profile for an organization.
|
|
688
|
+
*
|
|
689
|
+
* Sign the provided `TGetSessionProfileBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_session_profile).
|
|
690
|
+
*
|
|
691
|
+
* See also {@link stampGetSessionProfile}.
|
|
692
|
+
*/
|
|
693
|
+
this.getSessionProfile = async (input) => {
|
|
694
|
+
return this.request("/public/v1/query/get_session_profile", input);
|
|
695
|
+
};
|
|
696
|
+
/**
|
|
697
|
+
* Produce a `SignedRequest` from `TGetSessionProfileBody` by using the client's `stamp` function.
|
|
698
|
+
*
|
|
699
|
+
* See also {@link GetSessionProfile}.
|
|
700
|
+
*/
|
|
701
|
+
this.stampGetSessionProfile = async (input) => {
|
|
702
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_session_profile";
|
|
703
|
+
const body = JSON.stringify(input);
|
|
704
|
+
const stamp = await this.stamper.stamp(body);
|
|
705
|
+
return {
|
|
706
|
+
body: body,
|
|
707
|
+
stamp: stamp,
|
|
708
|
+
url: fullUrl,
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* Get all session profiles for an organization.
|
|
713
|
+
*
|
|
714
|
+
* Sign the provided `TGetSessionProfilesBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_session_profiles).
|
|
715
|
+
*
|
|
716
|
+
* See also {@link stampGetSessionProfiles}.
|
|
717
|
+
*/
|
|
718
|
+
this.getSessionProfiles = async (input) => {
|
|
719
|
+
return this.request("/public/v1/query/get_session_profiles", input);
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* Produce a `SignedRequest` from `TGetSessionProfilesBody` by using the client's `stamp` function.
|
|
723
|
+
*
|
|
724
|
+
* See also {@link GetSessionProfiles}.
|
|
725
|
+
*/
|
|
726
|
+
this.stampGetSessionProfiles = async (input) => {
|
|
727
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_session_profiles";
|
|
728
|
+
const body = JSON.stringify(input);
|
|
729
|
+
const stamp = await this.stamper.stamp(body);
|
|
730
|
+
return {
|
|
731
|
+
body: body,
|
|
732
|
+
stamp: stamp,
|
|
733
|
+
url: fullUrl,
|
|
734
|
+
};
|
|
735
|
+
};
|
|
511
736
|
/**
|
|
512
737
|
* Get details about a smart contract interface.
|
|
513
738
|
*
|
|
@@ -533,6 +758,56 @@ class TurnkeyClient {
|
|
|
533
758
|
url: fullUrl,
|
|
534
759
|
};
|
|
535
760
|
};
|
|
761
|
+
/**
|
|
762
|
+
* Get a swap quote. Asset chains are derived from CAIP-19 asset IDs; cross-chain quotes are supported.
|
|
763
|
+
*
|
|
764
|
+
* Sign the provided `TGetSwapQuoteBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_quote).
|
|
765
|
+
*
|
|
766
|
+
* See also {@link stampGetSwapQuote}.
|
|
767
|
+
*/
|
|
768
|
+
this.getSwapQuote = async (input) => {
|
|
769
|
+
return this.request("/public/v1/query/get_swap_quote", input);
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* Produce a `SignedRequest` from `TGetSwapQuoteBody` by using the client's `stamp` function.
|
|
773
|
+
*
|
|
774
|
+
* See also {@link GetSwapQuote}.
|
|
775
|
+
*/
|
|
776
|
+
this.stampGetSwapQuote = async (input) => {
|
|
777
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_swap_quote";
|
|
778
|
+
const body = JSON.stringify(input);
|
|
779
|
+
const stamp = await this.stamper.stamp(body);
|
|
780
|
+
return {
|
|
781
|
+
body: body,
|
|
782
|
+
stamp: stamp,
|
|
783
|
+
url: fullUrl,
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
/**
|
|
787
|
+
* Get the status of a swap by the send_transaction_status_id returned from execute_swap. Covers same-chain and cross-chain swaps.
|
|
788
|
+
*
|
|
789
|
+
* Sign the provided `TGetSwapStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_status).
|
|
790
|
+
*
|
|
791
|
+
* See also {@link stampGetSwapStatus}.
|
|
792
|
+
*/
|
|
793
|
+
this.getSwapStatus = async (input) => {
|
|
794
|
+
return this.request("/public/v1/query/get_swap_status", input);
|
|
795
|
+
};
|
|
796
|
+
/**
|
|
797
|
+
* Produce a `SignedRequest` from `TGetSwapStatusBody` by using the client's `stamp` function.
|
|
798
|
+
*
|
|
799
|
+
* See also {@link GetSwapStatus}.
|
|
800
|
+
*/
|
|
801
|
+
this.stampGetSwapStatus = async (input) => {
|
|
802
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_swap_status";
|
|
803
|
+
const body = JSON.stringify(input);
|
|
804
|
+
const stamp = await this.stamper.stamp(body);
|
|
805
|
+
return {
|
|
806
|
+
body: body,
|
|
807
|
+
stamp: stamp,
|
|
808
|
+
url: fullUrl,
|
|
809
|
+
};
|
|
810
|
+
};
|
|
536
811
|
/**
|
|
537
812
|
* Get details about a single TVC App
|
|
538
813
|
*
|
|
@@ -583,6 +858,31 @@ class TurnkeyClient {
|
|
|
583
858
|
url: fullUrl,
|
|
584
859
|
};
|
|
585
860
|
};
|
|
861
|
+
/**
|
|
862
|
+
* Get a bounded window of application logs from a debug-mode TVC deployment. Returned lines are collected from every running replica and sorted by platform timestamp.
|
|
863
|
+
*
|
|
864
|
+
* Sign the provided `TGetTvcDeploymentDebugLogsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_tvc_deployment_debug_logs).
|
|
865
|
+
*
|
|
866
|
+
* See also {@link stampGetTvcDeploymentDebugLogs}.
|
|
867
|
+
*/
|
|
868
|
+
this.getTvcDeploymentDebugLogs = async (input) => {
|
|
869
|
+
return this.request("/public/v1/query/get_tvc_deployment_debug_logs", input);
|
|
870
|
+
};
|
|
871
|
+
/**
|
|
872
|
+
* Produce a `SignedRequest` from `TGetTvcDeploymentDebugLogsBody` by using the client's `stamp` function.
|
|
873
|
+
*
|
|
874
|
+
* See also {@link GetTvcDeploymentDebugLogs}.
|
|
875
|
+
*/
|
|
876
|
+
this.stampGetTvcDeploymentDebugLogs = async (input) => {
|
|
877
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_tvc_deployment_debug_logs";
|
|
878
|
+
const body = JSON.stringify(input);
|
|
879
|
+
const stamp = await this.stamper.stamp(body);
|
|
880
|
+
return {
|
|
881
|
+
body: body,
|
|
882
|
+
stamp: stamp,
|
|
883
|
+
url: fullUrl,
|
|
884
|
+
};
|
|
885
|
+
};
|
|
586
886
|
/**
|
|
587
887
|
* Get the attestation document and manifest envelope of the provisioning enclave for a TVC deployment
|
|
588
888
|
*
|
|
@@ -685,7 +985,7 @@ class TurnkeyClient {
|
|
|
685
985
|
};
|
|
686
986
|
};
|
|
687
987
|
/**
|
|
688
|
-
* Get balances of supported assets for an address on the specified network. Only non-zero balances are returned.
|
|
988
|
+
* Get balances of supported assets for an address on the specified network. Only non-zero balances are returned.
|
|
689
989
|
*
|
|
690
990
|
* Sign the provided `TGetWalletAddressBalancesBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_wallet_address_balances).
|
|
691
991
|
*
|
|
@@ -759,6 +1059,131 @@ class TurnkeyClient {
|
|
|
759
1059
|
url: fullUrl,
|
|
760
1060
|
};
|
|
761
1061
|
};
|
|
1062
|
+
/**
|
|
1063
|
+
* Get the organization's deployed wrappers with on-chain total deposited and live APY. The management view, distinct from per-wallet positions.
|
|
1064
|
+
*
|
|
1065
|
+
* Sign the provided `TListEarnEnabledVaultsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_enabled_vaults).
|
|
1066
|
+
*
|
|
1067
|
+
* See also {@link stampListEarnEnabledVaults}.
|
|
1068
|
+
*/
|
|
1069
|
+
this.listEarnEnabledVaults = async (input) => {
|
|
1070
|
+
return this.request("/public/v1/query/list_earn_enabled_vaults", input);
|
|
1071
|
+
};
|
|
1072
|
+
/**
|
|
1073
|
+
* Produce a `SignedRequest` from `TListEarnEnabledVaultsBody` by using the client's `stamp` function.
|
|
1074
|
+
*
|
|
1075
|
+
* See also {@link ListEarnEnabledVaults}.
|
|
1076
|
+
*/
|
|
1077
|
+
this.stampListEarnEnabledVaults = async (input) => {
|
|
1078
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_enabled_vaults";
|
|
1079
|
+
const body = JSON.stringify(input);
|
|
1080
|
+
const stamp = await this.stamper.stamp(body);
|
|
1081
|
+
return {
|
|
1082
|
+
body: body,
|
|
1083
|
+
stamp: stamp,
|
|
1084
|
+
url: fullUrl,
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
/**
|
|
1088
|
+
* Get the active Earn positions for a specific wallet, including current value, cost basis, yield, and projected fees.
|
|
1089
|
+
*
|
|
1090
|
+
* Sign the provided `TListEarnPositionsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_positions).
|
|
1091
|
+
*
|
|
1092
|
+
* See also {@link stampListEarnPositions}.
|
|
1093
|
+
*/
|
|
1094
|
+
this.listEarnPositions = async (input) => {
|
|
1095
|
+
return this.request("/public/v1/query/list_earn_positions", input);
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Produce a `SignedRequest` from `TListEarnPositionsBody` by using the client's `stamp` function.
|
|
1099
|
+
*
|
|
1100
|
+
* See also {@link ListEarnPositions}.
|
|
1101
|
+
*/
|
|
1102
|
+
this.stampListEarnPositions = async (input) => {
|
|
1103
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_positions";
|
|
1104
|
+
const body = JSON.stringify(input);
|
|
1105
|
+
const stamp = await this.stamper.stamp(body);
|
|
1106
|
+
return {
|
|
1107
|
+
body: body,
|
|
1108
|
+
stamp: stamp,
|
|
1109
|
+
url: fullUrl,
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
/**
|
|
1113
|
+
* Get the catalog of all wrappable yield vaults across supported chains, enriched with live TVL and APY. Annotates which vaults the organization has already enabled.
|
|
1114
|
+
*
|
|
1115
|
+
* Sign the provided `TListEarnVaultsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_vaults).
|
|
1116
|
+
*
|
|
1117
|
+
* See also {@link stampListEarnVaults}.
|
|
1118
|
+
*/
|
|
1119
|
+
this.listEarnVaults = async (input) => {
|
|
1120
|
+
return this.request("/public/v1/query/list_earn_vaults", input);
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Produce a `SignedRequest` from `TListEarnVaultsBody` by using the client's `stamp` function.
|
|
1124
|
+
*
|
|
1125
|
+
* See also {@link ListEarnVaults}.
|
|
1126
|
+
*/
|
|
1127
|
+
this.stampListEarnVaults = async (input) => {
|
|
1128
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_vaults";
|
|
1129
|
+
const body = JSON.stringify(input);
|
|
1130
|
+
const stamp = await this.stamper.stamp(body);
|
|
1131
|
+
return {
|
|
1132
|
+
body: body,
|
|
1133
|
+
stamp: stamp,
|
|
1134
|
+
url: fullUrl,
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* List email events for the organization.
|
|
1139
|
+
*
|
|
1140
|
+
* Sign the provided `TListEmailEventsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_email_events).
|
|
1141
|
+
*
|
|
1142
|
+
* See also {@link stampListEmailEvents}.
|
|
1143
|
+
*/
|
|
1144
|
+
this.listEmailEvents = async (input) => {
|
|
1145
|
+
return this.request("/public/v1/query/list_email_events", input);
|
|
1146
|
+
};
|
|
1147
|
+
/**
|
|
1148
|
+
* Produce a `SignedRequest` from `TListEmailEventsBody` by using the client's `stamp` function.
|
|
1149
|
+
*
|
|
1150
|
+
* See also {@link ListEmailEvents}.
|
|
1151
|
+
*/
|
|
1152
|
+
this.stampListEmailEvents = async (input) => {
|
|
1153
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_email_events";
|
|
1154
|
+
const body = JSON.stringify(input);
|
|
1155
|
+
const stamp = await this.stamper.stamp(body);
|
|
1156
|
+
return {
|
|
1157
|
+
body: body,
|
|
1158
|
+
stamp: stamp,
|
|
1159
|
+
url: fullUrl,
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
/**
|
|
1163
|
+
* List Ethereum transaction history for a wallet address on the specified network.
|
|
1164
|
+
*
|
|
1165
|
+
* Sign the provided `TListEthTransactionHistoryBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_eth_transaction_history).
|
|
1166
|
+
*
|
|
1167
|
+
* See also {@link stampListEthTransactionHistory}.
|
|
1168
|
+
*/
|
|
1169
|
+
this.listEthTransactionHistory = async (input) => {
|
|
1170
|
+
return this.request("/public/v1/query/list_eth_transaction_history", input);
|
|
1171
|
+
};
|
|
1172
|
+
/**
|
|
1173
|
+
* Produce a `SignedRequest` from `TListEthTransactionHistoryBody` by using the client's `stamp` function.
|
|
1174
|
+
*
|
|
1175
|
+
* See also {@link ListEthTransactionHistory}.
|
|
1176
|
+
*/
|
|
1177
|
+
this.stampListEthTransactionHistory = async (input) => {
|
|
1178
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_eth_transaction_history";
|
|
1179
|
+
const body = JSON.stringify(input);
|
|
1180
|
+
const stamp = await this.stamper.stamp(body);
|
|
1181
|
+
return {
|
|
1182
|
+
body: body,
|
|
1183
|
+
stamp: stamp,
|
|
1184
|
+
url: fullUrl,
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
762
1187
|
/**
|
|
763
1188
|
* List all fiat on ramp provider credentials within an organization.
|
|
764
1189
|
*
|
|
@@ -909,6 +1334,31 @@ class TurnkeyClient {
|
|
|
909
1334
|
url: fullUrl,
|
|
910
1335
|
};
|
|
911
1336
|
};
|
|
1337
|
+
/**
|
|
1338
|
+
* List Solana transaction history for a wallet address on the specified network.
|
|
1339
|
+
*
|
|
1340
|
+
* Sign the provided `TListSolTransactionHistoryBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_sol_transaction_history).
|
|
1341
|
+
*
|
|
1342
|
+
* See also {@link stampListSolTransactionHistory}.
|
|
1343
|
+
*/
|
|
1344
|
+
this.listSolTransactionHistory = async (input) => {
|
|
1345
|
+
return this.request("/public/v1/query/list_sol_transaction_history", input);
|
|
1346
|
+
};
|
|
1347
|
+
/**
|
|
1348
|
+
* Produce a `SignedRequest` from `TListSolTransactionHistoryBody` by using the client's `stamp` function.
|
|
1349
|
+
*
|
|
1350
|
+
* See also {@link ListSolTransactionHistory}.
|
|
1351
|
+
*/
|
|
1352
|
+
this.stampListSolTransactionHistory = async (input) => {
|
|
1353
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_sol_transaction_history";
|
|
1354
|
+
const body = JSON.stringify(input);
|
|
1355
|
+
const stamp = await this.stamper.stamp(body);
|
|
1356
|
+
return {
|
|
1357
|
+
body: body,
|
|
1358
|
+
stamp: stamp,
|
|
1359
|
+
url: fullUrl,
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
912
1362
|
/**
|
|
913
1363
|
* Get all suborg IDs associated given a parent org ID and an optional filter.
|
|
914
1364
|
*
|
|
@@ -935,7 +1385,7 @@ class TurnkeyClient {
|
|
|
935
1385
|
};
|
|
936
1386
|
};
|
|
937
1387
|
/**
|
|
938
|
-
* List supported assets for the specified network.
|
|
1388
|
+
* List supported assets for the specified network.
|
|
939
1389
|
*
|
|
940
1390
|
* Sign the provided `TListSupportedAssetsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_supported_assets).
|
|
941
1391
|
*
|
|
@@ -1234,6 +1684,56 @@ class TurnkeyClient {
|
|
|
1234
1684
|
url: fullUrl,
|
|
1235
1685
|
};
|
|
1236
1686
|
};
|
|
1687
|
+
/**
|
|
1688
|
+
* Claim earn fees through the activity pipeline.
|
|
1689
|
+
*
|
|
1690
|
+
* Sign the provided `TClaimEarnFeesBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/claim_earn_fees).
|
|
1691
|
+
*
|
|
1692
|
+
* See also {@link stampClaimEarnFees}.
|
|
1693
|
+
*/
|
|
1694
|
+
this.claimEarnFees = async (input) => {
|
|
1695
|
+
return this.request("/public/v1/submit/claim_earn_fees", input);
|
|
1696
|
+
};
|
|
1697
|
+
/**
|
|
1698
|
+
* Produce a `SignedRequest` from `TClaimEarnFeesBody` by using the client's `stamp` function.
|
|
1699
|
+
*
|
|
1700
|
+
* See also {@link ClaimEarnFees}.
|
|
1701
|
+
*/
|
|
1702
|
+
this.stampClaimEarnFees = async (input) => {
|
|
1703
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/claim_earn_fees";
|
|
1704
|
+
const body = JSON.stringify(input);
|
|
1705
|
+
const stamp = await this.stamper.stamp(body);
|
|
1706
|
+
return {
|
|
1707
|
+
body: body,
|
|
1708
|
+
stamp: stamp,
|
|
1709
|
+
url: fullUrl,
|
|
1710
|
+
};
|
|
1711
|
+
};
|
|
1712
|
+
/**
|
|
1713
|
+
* Claim swap fees through the activity pipeline.
|
|
1714
|
+
*
|
|
1715
|
+
* Sign the provided `TClaimSwapFeesBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/claim_swap_fees).
|
|
1716
|
+
*
|
|
1717
|
+
* See also {@link stampClaimSwapFees}.
|
|
1718
|
+
*/
|
|
1719
|
+
this.claimSwapFees = async (input) => {
|
|
1720
|
+
return this.request("/public/v1/submit/claim_swap_fees", input);
|
|
1721
|
+
};
|
|
1722
|
+
/**
|
|
1723
|
+
* Produce a `SignedRequest` from `TClaimSwapFeesBody` by using the client's `stamp` function.
|
|
1724
|
+
*
|
|
1725
|
+
* See also {@link ClaimSwapFees}.
|
|
1726
|
+
*/
|
|
1727
|
+
this.stampClaimSwapFees = async (input) => {
|
|
1728
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/claim_swap_fees";
|
|
1729
|
+
const body = JSON.stringify(input);
|
|
1730
|
+
const stamp = await this.stamper.stamp(body);
|
|
1731
|
+
return {
|
|
1732
|
+
body: body,
|
|
1733
|
+
stamp: stamp,
|
|
1734
|
+
url: fullUrl,
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1237
1737
|
/**
|
|
1238
1738
|
* Add API keys to an existing user.
|
|
1239
1739
|
*
|
|
@@ -1359,6 +1859,31 @@ class TurnkeyClient {
|
|
|
1359
1859
|
url: fullUrl,
|
|
1360
1860
|
};
|
|
1361
1861
|
};
|
|
1862
|
+
/**
|
|
1863
|
+
* Create a new MFA policy for a user.
|
|
1864
|
+
*
|
|
1865
|
+
* Sign the provided `TCreateMfaPolicyBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_mfa_policy).
|
|
1866
|
+
*
|
|
1867
|
+
* See also {@link stampCreateMfaPolicy}.
|
|
1868
|
+
*/
|
|
1869
|
+
this.createMfaPolicy = async (input) => {
|
|
1870
|
+
return this.request("/public/v1/submit/create_mfa_policy", input);
|
|
1871
|
+
};
|
|
1872
|
+
/**
|
|
1873
|
+
* Produce a `SignedRequest` from `TCreateMfaPolicyBody` by using the client's `stamp` function.
|
|
1874
|
+
*
|
|
1875
|
+
* See also {@link CreateMfaPolicy}.
|
|
1876
|
+
*/
|
|
1877
|
+
this.stampCreateMfaPolicy = async (input) => {
|
|
1878
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_mfa_policy";
|
|
1879
|
+
const body = JSON.stringify(input);
|
|
1880
|
+
const stamp = await this.stamper.stamp(body);
|
|
1881
|
+
return {
|
|
1882
|
+
body: body,
|
|
1883
|
+
stamp: stamp,
|
|
1884
|
+
url: fullUrl,
|
|
1885
|
+
};
|
|
1886
|
+
};
|
|
1362
1887
|
/**
|
|
1363
1888
|
* Enable authentication for end users with an OAuth 2.0 provider
|
|
1364
1889
|
*
|
|
@@ -1559,6 +2084,31 @@ class TurnkeyClient {
|
|
|
1559
2084
|
url: fullUrl,
|
|
1560
2085
|
};
|
|
1561
2086
|
};
|
|
2087
|
+
/**
|
|
2088
|
+
* Create a new session profile for an organization.
|
|
2089
|
+
*
|
|
2090
|
+
* Sign the provided `TCreateSessionProfileBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_session_profile).
|
|
2091
|
+
*
|
|
2092
|
+
* See also {@link stampCreateSessionProfile}.
|
|
2093
|
+
*/
|
|
2094
|
+
this.createSessionProfile = async (input) => {
|
|
2095
|
+
return this.request("/public/v1/submit/create_session_profile", input);
|
|
2096
|
+
};
|
|
2097
|
+
/**
|
|
2098
|
+
* Produce a `SignedRequest` from `TCreateSessionProfileBody` by using the client's `stamp` function.
|
|
2099
|
+
*
|
|
2100
|
+
* See also {@link CreateSessionProfile}.
|
|
2101
|
+
*/
|
|
2102
|
+
this.stampCreateSessionProfile = async (input) => {
|
|
2103
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_session_profile";
|
|
2104
|
+
const body = JSON.stringify(input);
|
|
2105
|
+
const stamp = await this.stamper.stamp(body);
|
|
2106
|
+
return {
|
|
2107
|
+
body: body,
|
|
2108
|
+
stamp: stamp,
|
|
2109
|
+
url: fullUrl,
|
|
2110
|
+
};
|
|
2111
|
+
};
|
|
1562
2112
|
/**
|
|
1563
2113
|
* Create an ABI/IDL in JSON.
|
|
1564
2114
|
*
|
|
@@ -1585,7 +2135,7 @@ class TurnkeyClient {
|
|
|
1585
2135
|
};
|
|
1586
2136
|
};
|
|
1587
2137
|
/**
|
|
1588
|
-
* Create a new sub-organization.
|
|
2138
|
+
* Create a new sub-organization. Each root user must have at least one valid credential: an API key, an authenticator, an OAuth provider, or an email or phone number with a login method enabled on the sub-organization (email, email OTP, or SMS).
|
|
1589
2139
|
*
|
|
1590
2140
|
* Sign the provided `TCreateSubOrganizationBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_sub_organization).
|
|
1591
2141
|
*
|
|
@@ -1684,6 +2234,56 @@ class TurnkeyClient {
|
|
|
1684
2234
|
url: fullUrl,
|
|
1685
2235
|
};
|
|
1686
2236
|
};
|
|
2237
|
+
/**
|
|
2238
|
+
* Create a TVC Operator backed by uncompressed P-256 Turnkey wallet accounts
|
|
2239
|
+
*
|
|
2240
|
+
* Sign the provided `TCreateTvcOperatorBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_operator).
|
|
2241
|
+
*
|
|
2242
|
+
* See also {@link stampCreateTvcOperator}.
|
|
2243
|
+
*/
|
|
2244
|
+
this.createTvcOperator = async (input) => {
|
|
2245
|
+
return this.request("/public/v1/submit/create_tvc_operator", input);
|
|
2246
|
+
};
|
|
2247
|
+
/**
|
|
2248
|
+
* Produce a `SignedRequest` from `TCreateTvcOperatorBody` by using the client's `stamp` function.
|
|
2249
|
+
*
|
|
2250
|
+
* See also {@link CreateTvcOperator}.
|
|
2251
|
+
*/
|
|
2252
|
+
this.stampCreateTvcOperator = async (input) => {
|
|
2253
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_operator";
|
|
2254
|
+
const body = JSON.stringify(input);
|
|
2255
|
+
const stamp = await this.stamper.stamp(body);
|
|
2256
|
+
return {
|
|
2257
|
+
body: body,
|
|
2258
|
+
stamp: stamp,
|
|
2259
|
+
url: fullUrl,
|
|
2260
|
+
};
|
|
2261
|
+
};
|
|
2262
|
+
/**
|
|
2263
|
+
* Create a hosted TVC quorum key and encrypted shares.
|
|
2264
|
+
*
|
|
2265
|
+
* Sign the provided `TCreateTvcQuorumKeyBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_tvc_quorum_key).
|
|
2266
|
+
*
|
|
2267
|
+
* See also {@link stampCreateTvcQuorumKey}.
|
|
2268
|
+
*/
|
|
2269
|
+
this.createTvcQuorumKey = async (input) => {
|
|
2270
|
+
return this.request("/public/v1/submit/create_tvc_quorum_key", input);
|
|
2271
|
+
};
|
|
2272
|
+
/**
|
|
2273
|
+
* Produce a `SignedRequest` from `TCreateTvcQuorumKeyBody` by using the client's `stamp` function.
|
|
2274
|
+
*
|
|
2275
|
+
* See also {@link CreateTvcQuorumKey}.
|
|
2276
|
+
*/
|
|
2277
|
+
this.stampCreateTvcQuorumKey = async (input) => {
|
|
2278
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_tvc_quorum_key";
|
|
2279
|
+
const body = JSON.stringify(input);
|
|
2280
|
+
const stamp = await this.stamper.stamp(body);
|
|
2281
|
+
return {
|
|
2282
|
+
body: body,
|
|
2283
|
+
stamp: stamp,
|
|
2284
|
+
url: fullUrl,
|
|
2285
|
+
};
|
|
2286
|
+
};
|
|
1687
2287
|
/**
|
|
1688
2288
|
* Create a user tag and add it to users.
|
|
1689
2289
|
*
|
|
@@ -1710,7 +2310,7 @@ class TurnkeyClient {
|
|
|
1710
2310
|
};
|
|
1711
2311
|
};
|
|
1712
2312
|
/**
|
|
1713
|
-
* Create users in an existing organization.
|
|
2313
|
+
* Create users in an existing organization. Each user must have at least one valid credential: an API key, an authenticator, an OAuth provider, or an email or phone number with a login method enabled on the organization (email, email OTP, or SMS).
|
|
1714
2314
|
*
|
|
1715
2315
|
* Sign the provided `TCreateUsersBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_users).
|
|
1716
2316
|
*
|
|
@@ -1909,6 +2509,31 @@ class TurnkeyClient {
|
|
|
1909
2509
|
url: fullUrl,
|
|
1910
2510
|
};
|
|
1911
2511
|
};
|
|
2512
|
+
/**
|
|
2513
|
+
* Delete an MFA policy for a user.
|
|
2514
|
+
*
|
|
2515
|
+
* Sign the provided `TDeleteMfaPolicyBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/delete_mfa_policy).
|
|
2516
|
+
*
|
|
2517
|
+
* See also {@link stampDeleteMfaPolicy}.
|
|
2518
|
+
*/
|
|
2519
|
+
this.deleteMfaPolicy = async (input) => {
|
|
2520
|
+
return this.request("/public/v1/submit/delete_mfa_policy", input);
|
|
2521
|
+
};
|
|
2522
|
+
/**
|
|
2523
|
+
* Produce a `SignedRequest` from `TDeleteMfaPolicyBody` by using the client's `stamp` function.
|
|
2524
|
+
*
|
|
2525
|
+
* See also {@link DeleteMfaPolicy}.
|
|
2526
|
+
*/
|
|
2527
|
+
this.stampDeleteMfaPolicy = async (input) => {
|
|
2528
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/delete_mfa_policy";
|
|
2529
|
+
const body = JSON.stringify(input);
|
|
2530
|
+
const stamp = await this.stamper.stamp(body);
|
|
2531
|
+
return {
|
|
2532
|
+
body: body,
|
|
2533
|
+
stamp: stamp,
|
|
2534
|
+
url: fullUrl,
|
|
2535
|
+
};
|
|
2536
|
+
};
|
|
1912
2537
|
/**
|
|
1913
2538
|
* Disable authentication for end users with an OAuth 2.0 provider
|
|
1914
2539
|
*
|
|
@@ -2284,6 +2909,106 @@ class TurnkeyClient {
|
|
|
2284
2909
|
url: fullUrl,
|
|
2285
2910
|
};
|
|
2286
2911
|
};
|
|
2912
|
+
/**
|
|
2913
|
+
* Enable a yield vault for an organization by deploying its fee wrapper. Must be called before any deposits into the vault.
|
|
2914
|
+
*
|
|
2915
|
+
* Sign the provided `TEarnDeployWrapperBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/earn_deploy_wrapper).
|
|
2916
|
+
*
|
|
2917
|
+
* See also {@link stampEarnDeployWrapper}.
|
|
2918
|
+
*/
|
|
2919
|
+
this.earnDeployWrapper = async (input) => {
|
|
2920
|
+
return this.request("/public/v1/submit/earn_deploy_wrapper", input);
|
|
2921
|
+
};
|
|
2922
|
+
/**
|
|
2923
|
+
* Produce a `SignedRequest` from `TEarnDeployWrapperBody` by using the client's `stamp` function.
|
|
2924
|
+
*
|
|
2925
|
+
* See also {@link EarnDeployWrapper}.
|
|
2926
|
+
*/
|
|
2927
|
+
this.stampEarnDeployWrapper = async (input) => {
|
|
2928
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/earn_deploy_wrapper";
|
|
2929
|
+
const body = JSON.stringify(input);
|
|
2930
|
+
const stamp = await this.stamper.stamp(body);
|
|
2931
|
+
return {
|
|
2932
|
+
body: body,
|
|
2933
|
+
stamp: stamp,
|
|
2934
|
+
url: fullUrl,
|
|
2935
|
+
};
|
|
2936
|
+
};
|
|
2937
|
+
/**
|
|
2938
|
+
* Deposit assets from a wallet into an enabled yield vault.
|
|
2939
|
+
*
|
|
2940
|
+
* Sign the provided `TEarnDepositBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/earn_deposit).
|
|
2941
|
+
*
|
|
2942
|
+
* See also {@link stampEarnDeposit}.
|
|
2943
|
+
*/
|
|
2944
|
+
this.earnDeposit = async (input) => {
|
|
2945
|
+
return this.request("/public/v1/submit/earn_deposit", input);
|
|
2946
|
+
};
|
|
2947
|
+
/**
|
|
2948
|
+
* Produce a `SignedRequest` from `TEarnDepositBody` by using the client's `stamp` function.
|
|
2949
|
+
*
|
|
2950
|
+
* See also {@link EarnDeposit}.
|
|
2951
|
+
*/
|
|
2952
|
+
this.stampEarnDeposit = async (input) => {
|
|
2953
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/earn_deposit";
|
|
2954
|
+
const body = JSON.stringify(input);
|
|
2955
|
+
const stamp = await this.stamper.stamp(body);
|
|
2956
|
+
return {
|
|
2957
|
+
body: body,
|
|
2958
|
+
stamp: stamp,
|
|
2959
|
+
url: fullUrl,
|
|
2960
|
+
};
|
|
2961
|
+
};
|
|
2962
|
+
/**
|
|
2963
|
+
* Enable or disable deposits to a deployed Earn wrapper. Withdrawals are always allowed.
|
|
2964
|
+
*
|
|
2965
|
+
* Sign the provided `TEarnSetWrapperStateBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/earn_set_wrapper_state).
|
|
2966
|
+
*
|
|
2967
|
+
* See also {@link stampEarnSetWrapperState}.
|
|
2968
|
+
*/
|
|
2969
|
+
this.earnSetWrapperState = async (input) => {
|
|
2970
|
+
return this.request("/public/v1/submit/earn_set_wrapper_state", input);
|
|
2971
|
+
};
|
|
2972
|
+
/**
|
|
2973
|
+
* Produce a `SignedRequest` from `TEarnSetWrapperStateBody` by using the client's `stamp` function.
|
|
2974
|
+
*
|
|
2975
|
+
* See also {@link EarnSetWrapperState}.
|
|
2976
|
+
*/
|
|
2977
|
+
this.stampEarnSetWrapperState = async (input) => {
|
|
2978
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/earn_set_wrapper_state";
|
|
2979
|
+
const body = JSON.stringify(input);
|
|
2980
|
+
const stamp = await this.stamper.stamp(body);
|
|
2981
|
+
return {
|
|
2982
|
+
body: body,
|
|
2983
|
+
stamp: stamp,
|
|
2984
|
+
url: fullUrl,
|
|
2985
|
+
};
|
|
2986
|
+
};
|
|
2987
|
+
/**
|
|
2988
|
+
* Withdraw assets or redeem shares from an enabled yield vault.
|
|
2989
|
+
*
|
|
2990
|
+
* Sign the provided `TEarnWithdrawBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/earn_withdraw).
|
|
2991
|
+
*
|
|
2992
|
+
* See also {@link stampEarnWithdraw}.
|
|
2993
|
+
*/
|
|
2994
|
+
this.earnWithdraw = async (input) => {
|
|
2995
|
+
return this.request("/public/v1/submit/earn_withdraw", input);
|
|
2996
|
+
};
|
|
2997
|
+
/**
|
|
2998
|
+
* Produce a `SignedRequest` from `TEarnWithdrawBody` by using the client's `stamp` function.
|
|
2999
|
+
*
|
|
3000
|
+
* See also {@link EarnWithdraw}.
|
|
3001
|
+
*/
|
|
3002
|
+
this.stampEarnWithdraw = async (input) => {
|
|
3003
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/earn_withdraw";
|
|
3004
|
+
const body = JSON.stringify(input);
|
|
3005
|
+
const stamp = await this.stamper.stamp(body);
|
|
3006
|
+
return {
|
|
3007
|
+
body: body,
|
|
3008
|
+
stamp: stamp,
|
|
3009
|
+
url: fullUrl,
|
|
3010
|
+
};
|
|
3011
|
+
};
|
|
2287
3012
|
/**
|
|
2288
3013
|
* Authenticate a user via email.
|
|
2289
3014
|
*
|
|
@@ -2359,6 +3084,31 @@ class TurnkeyClient {
|
|
|
2359
3084
|
url: fullUrl,
|
|
2360
3085
|
};
|
|
2361
3086
|
};
|
|
3087
|
+
/**
|
|
3088
|
+
* Execute a quoted swap through the activity pipeline and Turnkey broadcasting.
|
|
3089
|
+
*
|
|
3090
|
+
* Sign the provided `TExecuteSwapBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/execute_swap).
|
|
3091
|
+
*
|
|
3092
|
+
* See also {@link stampExecuteSwap}.
|
|
3093
|
+
*/
|
|
3094
|
+
this.executeSwap = async (input) => {
|
|
3095
|
+
return this.request("/public/v1/submit/execute_swap", input);
|
|
3096
|
+
};
|
|
3097
|
+
/**
|
|
3098
|
+
* Produce a `SignedRequest` from `TExecuteSwapBody` by using the client's `stamp` function.
|
|
3099
|
+
*
|
|
3100
|
+
* See also {@link ExecuteSwap}.
|
|
3101
|
+
*/
|
|
3102
|
+
this.stampExecuteSwap = async (input) => {
|
|
3103
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/execute_swap";
|
|
3104
|
+
const body = JSON.stringify(input);
|
|
3105
|
+
const stamp = await this.stamper.stamp(body);
|
|
3106
|
+
return {
|
|
3107
|
+
body: body,
|
|
3108
|
+
stamp: stamp,
|
|
3109
|
+
url: fullUrl,
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
2362
3112
|
/**
|
|
2363
3113
|
* Export a private key.
|
|
2364
3114
|
*
|
|
@@ -2534,6 +3284,31 @@ class TurnkeyClient {
|
|
|
2534
3284
|
url: fullUrl,
|
|
2535
3285
|
};
|
|
2536
3286
|
};
|
|
3287
|
+
/**
|
|
3288
|
+
* Initialize secret imports by generating Ingress Encryption Target Keys.
|
|
3289
|
+
*
|
|
3290
|
+
* Sign the provided `TInitImportSecretsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/init_import_secrets).
|
|
3291
|
+
*
|
|
3292
|
+
* See also {@link stampInitImportSecrets}.
|
|
3293
|
+
*/
|
|
3294
|
+
this.initImportSecrets = async (input) => {
|
|
3295
|
+
return this.request("/public/v1/submit/init_import_secrets", input);
|
|
3296
|
+
};
|
|
3297
|
+
/**
|
|
3298
|
+
* Produce a `SignedRequest` from `TInitImportSecretsBody` by using the client's `stamp` function.
|
|
3299
|
+
*
|
|
3300
|
+
* See also {@link InitImportSecrets}.
|
|
3301
|
+
*/
|
|
3302
|
+
this.stampInitImportSecrets = async (input) => {
|
|
3303
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/init_import_secrets";
|
|
3304
|
+
const body = JSON.stringify(input);
|
|
3305
|
+
const stamp = await this.stamper.stamp(body);
|
|
3306
|
+
return {
|
|
3307
|
+
body: body,
|
|
3308
|
+
stamp: stamp,
|
|
3309
|
+
url: fullUrl,
|
|
3310
|
+
};
|
|
3311
|
+
};
|
|
2537
3312
|
/**
|
|
2538
3313
|
* Initialize a new wallet import.
|
|
2539
3314
|
*
|
|
@@ -2784,6 +3559,31 @@ class TurnkeyClient {
|
|
|
2784
3559
|
url: fullUrl,
|
|
2785
3560
|
};
|
|
2786
3561
|
};
|
|
3562
|
+
/**
|
|
3563
|
+
* Re-encrypt a hosted TVC quorum key share for a deployment.
|
|
3564
|
+
*
|
|
3565
|
+
* Sign the provided `TReEncryptTvcQuorumKeyShareBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/re_encrypt_tvc_quorum_key_share).
|
|
3566
|
+
*
|
|
3567
|
+
* See also {@link stampReEncryptTvcQuorumKeyShare}.
|
|
3568
|
+
*/
|
|
3569
|
+
this.reEncryptTvcQuorumKeyShare = async (input) => {
|
|
3570
|
+
return this.request("/public/v1/submit/re_encrypt_tvc_quorum_key_share", input);
|
|
3571
|
+
};
|
|
3572
|
+
/**
|
|
3573
|
+
* Produce a `SignedRequest` from `TReEncryptTvcQuorumKeyShareBody` by using the client's `stamp` function.
|
|
3574
|
+
*
|
|
3575
|
+
* See also {@link ReEncryptTvcQuorumKeyShare}.
|
|
3576
|
+
*/
|
|
3577
|
+
this.stampReEncryptTvcQuorumKeyShare = async (input) => {
|
|
3578
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/re_encrypt_tvc_quorum_key_share";
|
|
3579
|
+
const body = JSON.stringify(input);
|
|
3580
|
+
const stamp = await this.stamper.stamp(body);
|
|
3581
|
+
return {
|
|
3582
|
+
body: body,
|
|
3583
|
+
stamp: stamp,
|
|
3584
|
+
url: fullUrl,
|
|
3585
|
+
};
|
|
3586
|
+
};
|
|
2787
3587
|
/**
|
|
2788
3588
|
* Complete the process of recovering a user by adding an authenticator.
|
|
2789
3589
|
*
|
|
@@ -3060,7 +3860,7 @@ class TurnkeyClient {
|
|
|
3060
3860
|
};
|
|
3061
3861
|
};
|
|
3062
3862
|
/**
|
|
3063
|
-
* Submit a transaction intent describing an SVM transaction you would like to broadcast.
|
|
3863
|
+
* Submit a transaction intent describing an SVM transaction you would like to broadcast. Supports single- and multi-signer intents via activity type versioning.
|
|
3064
3864
|
*
|
|
3065
3865
|
* Sign the provided `TSolSendTransactionBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/sol_send_transaction).
|
|
3066
3866
|
*
|
|
@@ -3234,6 +4034,31 @@ class TurnkeyClient {
|
|
|
3234
4034
|
url: fullUrl,
|
|
3235
4035
|
};
|
|
3236
4036
|
};
|
|
4037
|
+
/**
|
|
4038
|
+
* Update an MFA policy for a user.
|
|
4039
|
+
*
|
|
4040
|
+
* Sign the provided `TUpdateMfaPolicyBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/update_mfa_policy).
|
|
4041
|
+
*
|
|
4042
|
+
* See also {@link stampUpdateMfaPolicy}.
|
|
4043
|
+
*/
|
|
4044
|
+
this.updateMfaPolicy = async (input) => {
|
|
4045
|
+
return this.request("/public/v1/submit/update_mfa_policy", input);
|
|
4046
|
+
};
|
|
4047
|
+
/**
|
|
4048
|
+
* Produce a `SignedRequest` from `TUpdateMfaPolicyBody` by using the client's `stamp` function.
|
|
4049
|
+
*
|
|
4050
|
+
* See also {@link UpdateMfaPolicy}.
|
|
4051
|
+
*/
|
|
4052
|
+
this.stampUpdateMfaPolicy = async (input) => {
|
|
4053
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/update_mfa_policy";
|
|
4054
|
+
const body = JSON.stringify(input);
|
|
4055
|
+
const stamp = await this.stamper.stamp(body);
|
|
4056
|
+
return {
|
|
4057
|
+
body: body,
|
|
4058
|
+
stamp: stamp,
|
|
4059
|
+
url: fullUrl,
|
|
4060
|
+
};
|
|
4061
|
+
};
|
|
3237
4062
|
/**
|
|
3238
4063
|
* Update an OAuth 2.0 provider credential
|
|
3239
4064
|
*
|
|
@@ -3534,6 +4359,31 @@ class TurnkeyClient {
|
|
|
3534
4359
|
url: fullUrl,
|
|
3535
4360
|
};
|
|
3536
4361
|
};
|
|
4362
|
+
/**
|
|
4363
|
+
* Enable or disable swap configuration for an organization.
|
|
4364
|
+
*
|
|
4365
|
+
* Sign the provided `TUpsertSwapConfigBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/upsert_swap_config).
|
|
4366
|
+
*
|
|
4367
|
+
* See also {@link stampUpsertSwapConfig}.
|
|
4368
|
+
*/
|
|
4369
|
+
this.upsertSwapConfig = async (input) => {
|
|
4370
|
+
return this.request("/public/v1/submit/upsert_swap_config", input);
|
|
4371
|
+
};
|
|
4372
|
+
/**
|
|
4373
|
+
* Produce a `SignedRequest` from `TUpsertSwapConfigBody` by using the client's `stamp` function.
|
|
4374
|
+
*
|
|
4375
|
+
* See also {@link UpsertSwapConfig}.
|
|
4376
|
+
*/
|
|
4377
|
+
this.stampUpsertSwapConfig = async (input) => {
|
|
4378
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/upsert_swap_config";
|
|
4379
|
+
const body = JSON.stringify(input);
|
|
4380
|
+
const stamp = await this.stamper.stamp(body);
|
|
4381
|
+
return {
|
|
4382
|
+
body: body,
|
|
4383
|
+
stamp: stamp,
|
|
4384
|
+
url: fullUrl,
|
|
4385
|
+
};
|
|
4386
|
+
};
|
|
3537
4387
|
/**
|
|
3538
4388
|
* Verify a generic OTP.
|
|
3539
4389
|
*
|