@turnkey/core 1.6.0 → 1.8.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/dist/__clients__/core.d.ts +10 -5
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +94 -37
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +95 -38
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +12 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +325 -204
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +325 -204
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__inputs__/public_api.types.d.ts +296 -6
- package/dist/__inputs__/public_api.types.d.ts.map +1 -1
- package/dist/__types__/external-wallets.d.ts +19 -0
- package/dist/__types__/external-wallets.d.ts.map +1 -1
- package/dist/__types__/method-types.d.ts +7 -1
- package/dist/__types__/method-types.d.ts.map +1 -1
- package/dist/__wallet__/mobile/manager.d.ts.map +1 -1
- package/dist/__wallet__/mobile/manager.js +5 -2
- package/dist/__wallet__/mobile/manager.js.map +1 -1
- package/dist/__wallet__/mobile/manager.mjs +5 -2
- package/dist/__wallet__/mobile/manager.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/base.d.ts +25 -11
- package/dist/__wallet__/wallet-connect/base.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/base.js +112 -30
- package/dist/__wallet__/wallet-connect/base.js.map +1 -1
- package/dist/__wallet__/wallet-connect/base.mjs +112 -30
- package/dist/__wallet__/wallet-connect/base.mjs.map +1 -1
- package/dist/__wallet__/wallet-connect/client.d.ts.map +1 -1
- package/dist/__wallet__/wallet-connect/client.js +4 -0
- package/dist/__wallet__/wallet-connect/client.js.map +1 -1
- package/dist/__wallet__/wallet-connect/client.mjs +4 -0
- package/dist/__wallet__/wallet-connect/client.mjs.map +1 -1
- package/dist/__wallet__/web/manager.d.ts +11 -0
- package/dist/__wallet__/web/manager.d.ts.map +1 -1
- package/dist/__wallet__/web/manager.js +36 -21
- package/dist/__wallet__/web/manager.js.map +1 -1
- package/dist/__wallet__/web/manager.mjs +36 -21
- package/dist/__wallet__/web/manager.mjs.map +1 -1
- package/dist/__wallet__/web/native/ethereum.d.ts.map +1 -1
- package/dist/__wallet__/web/native/ethereum.js +27 -4
- package/dist/__wallet__/web/native/ethereum.js.map +1 -1
- package/dist/__wallet__/web/native/ethereum.mjs +27 -4
- package/dist/__wallet__/web/native/ethereum.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -21,14 +21,12 @@ class TurnkeySDKClientBase {
|
|
|
21
21
|
if (!activeStamper) {
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
|
-
const { organizationId, ...parameters } = input;
|
|
25
24
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity";
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
organizationId,
|
|
29
|
-
type: "ACTIVITY_TYPE_GET_ACTIVITY",
|
|
25
|
+
const body = {
|
|
26
|
+
...input,
|
|
27
|
+
organizationId: input.organizationId,
|
|
30
28
|
};
|
|
31
|
-
const stringifiedBody = JSON.stringify(
|
|
29
|
+
const stringifiedBody = JSON.stringify(body);
|
|
32
30
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
33
31
|
return {
|
|
34
32
|
body: stringifiedBody,
|
|
@@ -50,14 +48,12 @@ class TurnkeySDKClientBase {
|
|
|
50
48
|
if (!activeStamper) {
|
|
51
49
|
return undefined;
|
|
52
50
|
}
|
|
53
|
-
const { organizationId, ...parameters } = input;
|
|
54
51
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key";
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
organizationId,
|
|
58
|
-
type: "ACTIVITY_TYPE_GET_API_KEY",
|
|
52
|
+
const body = {
|
|
53
|
+
...input,
|
|
54
|
+
organizationId: input.organizationId,
|
|
59
55
|
};
|
|
60
|
-
const stringifiedBody = JSON.stringify(
|
|
56
|
+
const stringifiedBody = JSON.stringify(body);
|
|
61
57
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
62
58
|
return {
|
|
63
59
|
body: stringifiedBody,
|
|
@@ -79,14 +75,12 @@ class TurnkeySDKClientBase {
|
|
|
79
75
|
if (!activeStamper) {
|
|
80
76
|
return undefined;
|
|
81
77
|
}
|
|
82
|
-
const { organizationId, ...parameters } = input;
|
|
83
78
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys";
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
organizationId,
|
|
87
|
-
type: "ACTIVITY_TYPE_GET_API_KEYS",
|
|
79
|
+
const body = {
|
|
80
|
+
...input,
|
|
81
|
+
organizationId: input.organizationId,
|
|
88
82
|
};
|
|
89
|
-
const stringifiedBody = JSON.stringify(
|
|
83
|
+
const stringifiedBody = JSON.stringify(body);
|
|
90
84
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
91
85
|
return {
|
|
92
86
|
body: stringifiedBody,
|
|
@@ -108,14 +102,12 @@ class TurnkeySDKClientBase {
|
|
|
108
102
|
if (!activeStamper) {
|
|
109
103
|
return undefined;
|
|
110
104
|
}
|
|
111
|
-
const { organizationId, ...parameters } = input;
|
|
112
105
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation";
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
organizationId,
|
|
116
|
-
type: "ACTIVITY_TYPE_GET_ATTESTATION_DOCUMENT",
|
|
106
|
+
const body = {
|
|
107
|
+
...input,
|
|
108
|
+
organizationId: input.organizationId,
|
|
117
109
|
};
|
|
118
|
-
const stringifiedBody = JSON.stringify(
|
|
110
|
+
const stringifiedBody = JSON.stringify(body);
|
|
119
111
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
120
112
|
return {
|
|
121
113
|
body: stringifiedBody,
|
|
@@ -137,14 +129,12 @@ class TurnkeySDKClientBase {
|
|
|
137
129
|
if (!activeStamper) {
|
|
138
130
|
return undefined;
|
|
139
131
|
}
|
|
140
|
-
const { organizationId, ...parameters } = input;
|
|
141
132
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator";
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
organizationId,
|
|
145
|
-
type: "ACTIVITY_TYPE_GET_AUTHENTICATOR",
|
|
133
|
+
const body = {
|
|
134
|
+
...input,
|
|
135
|
+
organizationId: input.organizationId,
|
|
146
136
|
};
|
|
147
|
-
const stringifiedBody = JSON.stringify(
|
|
137
|
+
const stringifiedBody = JSON.stringify(body);
|
|
148
138
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
149
139
|
return {
|
|
150
140
|
body: stringifiedBody,
|
|
@@ -166,14 +156,12 @@ class TurnkeySDKClientBase {
|
|
|
166
156
|
if (!activeStamper) {
|
|
167
157
|
return undefined;
|
|
168
158
|
}
|
|
169
|
-
const { organizationId, ...parameters } = input;
|
|
170
159
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators";
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
organizationId,
|
|
174
|
-
type: "ACTIVITY_TYPE_GET_AUTHENTICATORS",
|
|
160
|
+
const body = {
|
|
161
|
+
...input,
|
|
162
|
+
organizationId: input.organizationId,
|
|
175
163
|
};
|
|
176
|
-
const stringifiedBody = JSON.stringify(
|
|
164
|
+
const stringifiedBody = JSON.stringify(body);
|
|
177
165
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
178
166
|
return {
|
|
179
167
|
body: stringifiedBody,
|
|
@@ -195,14 +183,12 @@ class TurnkeySDKClientBase {
|
|
|
195
183
|
if (!activeStamper) {
|
|
196
184
|
return undefined;
|
|
197
185
|
}
|
|
198
|
-
const { organizationId, ...parameters } = input;
|
|
199
186
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_boot_proof";
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
organizationId,
|
|
203
|
-
type: "ACTIVITY_TYPE_GET_BOOT_PROOF",
|
|
187
|
+
const body = {
|
|
188
|
+
...input,
|
|
189
|
+
organizationId: input.organizationId,
|
|
204
190
|
};
|
|
205
|
-
const stringifiedBody = JSON.stringify(
|
|
191
|
+
const stringifiedBody = JSON.stringify(body);
|
|
206
192
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
207
193
|
return {
|
|
208
194
|
body: stringifiedBody,
|
|
@@ -224,14 +210,12 @@ class TurnkeySDKClientBase {
|
|
|
224
210
|
if (!activeStamper) {
|
|
225
211
|
return undefined;
|
|
226
212
|
}
|
|
227
|
-
const { organizationId, ...parameters } = input;
|
|
228
213
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_latest_boot_proof";
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
organizationId,
|
|
232
|
-
type: "ACTIVITY_TYPE_GET_LATEST_BOOT_PROOF",
|
|
214
|
+
const body = {
|
|
215
|
+
...input,
|
|
216
|
+
organizationId: input.organizationId,
|
|
233
217
|
};
|
|
234
|
-
const stringifiedBody = JSON.stringify(
|
|
218
|
+
const stringifiedBody = JSON.stringify(body);
|
|
235
219
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
236
220
|
return {
|
|
237
221
|
body: stringifiedBody,
|
|
@@ -253,14 +237,12 @@ class TurnkeySDKClientBase {
|
|
|
253
237
|
if (!activeStamper) {
|
|
254
238
|
return undefined;
|
|
255
239
|
}
|
|
256
|
-
const { organizationId, ...parameters } = input;
|
|
257
240
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth2_credential";
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
organizationId,
|
|
261
|
-
type: "ACTIVITY_TYPE_GET_OAUTH2CREDENTIAL",
|
|
241
|
+
const body = {
|
|
242
|
+
...input,
|
|
243
|
+
organizationId: input.organizationId,
|
|
262
244
|
};
|
|
263
|
-
const stringifiedBody = JSON.stringify(
|
|
245
|
+
const stringifiedBody = JSON.stringify(body);
|
|
264
246
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
265
247
|
return {
|
|
266
248
|
body: stringifiedBody,
|
|
@@ -282,14 +264,39 @@ class TurnkeySDKClientBase {
|
|
|
282
264
|
if (!activeStamper) {
|
|
283
265
|
return undefined;
|
|
284
266
|
}
|
|
285
|
-
const { organizationId, ...parameters } = input;
|
|
286
267
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers";
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
organizationId,
|
|
290
|
-
type: "ACTIVITY_TYPE_GET_OAUTH_PROVIDERS",
|
|
268
|
+
const body = {
|
|
269
|
+
...input,
|
|
270
|
+
organizationId: input.organizationId,
|
|
291
271
|
};
|
|
292
|
-
const stringifiedBody = JSON.stringify(
|
|
272
|
+
const stringifiedBody = JSON.stringify(body);
|
|
273
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
274
|
+
return {
|
|
275
|
+
body: stringifiedBody,
|
|
276
|
+
stamp: stamp,
|
|
277
|
+
url: fullUrl,
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
this.getOnRampTransactionStatus = async (input, stampWith) => {
|
|
281
|
+
const session = await this.storageManager?.getActiveSession();
|
|
282
|
+
return this.request("/public/v1/query/get_onramp_transaction_status", {
|
|
283
|
+
...input,
|
|
284
|
+
organizationId: input.organizationId ??
|
|
285
|
+
session?.organizationId ??
|
|
286
|
+
this.config.organizationId,
|
|
287
|
+
}, stampWith);
|
|
288
|
+
};
|
|
289
|
+
this.stampGetOnRampTransactionStatus = async (input, stampWith) => {
|
|
290
|
+
const activeStamper = this.getStamper(stampWith);
|
|
291
|
+
if (!activeStamper) {
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_onramp_transaction_status";
|
|
295
|
+
const body = {
|
|
296
|
+
...input,
|
|
297
|
+
organizationId: input.organizationId,
|
|
298
|
+
};
|
|
299
|
+
const stringifiedBody = JSON.stringify(body);
|
|
293
300
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
294
301
|
return {
|
|
295
302
|
body: stringifiedBody,
|
|
@@ -311,14 +318,12 @@ class TurnkeySDKClientBase {
|
|
|
311
318
|
if (!activeStamper) {
|
|
312
319
|
return undefined;
|
|
313
320
|
}
|
|
314
|
-
const { organizationId, ...parameters } = input;
|
|
315
321
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization";
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
organizationId,
|
|
319
|
-
type: "ACTIVITY_TYPE_GET_ORGANIZATION",
|
|
322
|
+
const body = {
|
|
323
|
+
...input,
|
|
324
|
+
organizationId: input.organizationId,
|
|
320
325
|
};
|
|
321
|
-
const stringifiedBody = JSON.stringify(
|
|
326
|
+
const stringifiedBody = JSON.stringify(body);
|
|
322
327
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
323
328
|
return {
|
|
324
329
|
body: stringifiedBody,
|
|
@@ -340,14 +345,12 @@ class TurnkeySDKClientBase {
|
|
|
340
345
|
if (!activeStamper) {
|
|
341
346
|
return undefined;
|
|
342
347
|
}
|
|
343
|
-
const { organizationId, ...parameters } = input;
|
|
344
348
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs";
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
organizationId,
|
|
348
|
-
type: "ACTIVITY_TYPE_GET_ORGANIZATION_CONFIGS",
|
|
349
|
+
const body = {
|
|
350
|
+
...input,
|
|
351
|
+
organizationId: input.organizationId,
|
|
349
352
|
};
|
|
350
|
-
const stringifiedBody = JSON.stringify(
|
|
353
|
+
const stringifiedBody = JSON.stringify(body);
|
|
351
354
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
352
355
|
return {
|
|
353
356
|
body: stringifiedBody,
|
|
@@ -369,14 +372,12 @@ class TurnkeySDKClientBase {
|
|
|
369
372
|
if (!activeStamper) {
|
|
370
373
|
return undefined;
|
|
371
374
|
}
|
|
372
|
-
const { organizationId, ...parameters } = input;
|
|
373
375
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy";
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
organizationId,
|
|
377
|
-
type: "ACTIVITY_TYPE_GET_POLICY",
|
|
376
|
+
const body = {
|
|
377
|
+
...input,
|
|
378
|
+
organizationId: input.organizationId,
|
|
378
379
|
};
|
|
379
|
-
const stringifiedBody = JSON.stringify(
|
|
380
|
+
const stringifiedBody = JSON.stringify(body);
|
|
380
381
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
381
382
|
return {
|
|
382
383
|
body: stringifiedBody,
|
|
@@ -398,14 +399,12 @@ class TurnkeySDKClientBase {
|
|
|
398
399
|
if (!activeStamper) {
|
|
399
400
|
return undefined;
|
|
400
401
|
}
|
|
401
|
-
const { organizationId, ...parameters } = input;
|
|
402
402
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy_evaluations";
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
organizationId,
|
|
406
|
-
type: "ACTIVITY_TYPE_GET_POLICY_EVALUATIONS",
|
|
403
|
+
const body = {
|
|
404
|
+
...input,
|
|
405
|
+
organizationId: input.organizationId,
|
|
407
406
|
};
|
|
408
|
-
const stringifiedBody = JSON.stringify(
|
|
407
|
+
const stringifiedBody = JSON.stringify(body);
|
|
409
408
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
410
409
|
return {
|
|
411
410
|
body: stringifiedBody,
|
|
@@ -427,14 +426,12 @@ class TurnkeySDKClientBase {
|
|
|
427
426
|
if (!activeStamper) {
|
|
428
427
|
return undefined;
|
|
429
428
|
}
|
|
430
|
-
const { organizationId, ...parameters } = input;
|
|
431
429
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key";
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
organizationId,
|
|
435
|
-
type: "ACTIVITY_TYPE_GET_PRIVATE_KEY",
|
|
430
|
+
const body = {
|
|
431
|
+
...input,
|
|
432
|
+
organizationId: input.organizationId,
|
|
436
433
|
};
|
|
437
|
-
const stringifiedBody = JSON.stringify(
|
|
434
|
+
const stringifiedBody = JSON.stringify(body);
|
|
438
435
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
439
436
|
return {
|
|
440
437
|
body: stringifiedBody,
|
|
@@ -456,14 +453,12 @@ class TurnkeySDKClientBase {
|
|
|
456
453
|
if (!activeStamper) {
|
|
457
454
|
return undefined;
|
|
458
455
|
}
|
|
459
|
-
const { organizationId, ...parameters } = input;
|
|
460
456
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_smart_contract_interface";
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
organizationId,
|
|
464
|
-
type: "ACTIVITY_TYPE_GET_SMART_CONTRACT_INTERFACE",
|
|
457
|
+
const body = {
|
|
458
|
+
...input,
|
|
459
|
+
organizationId: input.organizationId,
|
|
465
460
|
};
|
|
466
|
-
const stringifiedBody = JSON.stringify(
|
|
461
|
+
const stringifiedBody = JSON.stringify(body);
|
|
467
462
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
468
463
|
return {
|
|
469
464
|
body: stringifiedBody,
|
|
@@ -485,14 +480,12 @@ class TurnkeySDKClientBase {
|
|
|
485
480
|
if (!activeStamper) {
|
|
486
481
|
return undefined;
|
|
487
482
|
}
|
|
488
|
-
const { organizationId, ...parameters } = input;
|
|
489
483
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user";
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
organizationId,
|
|
493
|
-
type: "ACTIVITY_TYPE_GET_USER",
|
|
484
|
+
const body = {
|
|
485
|
+
...input,
|
|
486
|
+
organizationId: input.organizationId,
|
|
494
487
|
};
|
|
495
|
-
const stringifiedBody = JSON.stringify(
|
|
488
|
+
const stringifiedBody = JSON.stringify(body);
|
|
496
489
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
497
490
|
return {
|
|
498
491
|
body: stringifiedBody,
|
|
@@ -514,14 +507,12 @@ class TurnkeySDKClientBase {
|
|
|
514
507
|
if (!activeStamper) {
|
|
515
508
|
return undefined;
|
|
516
509
|
}
|
|
517
|
-
const { organizationId, ...parameters } = input;
|
|
518
510
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet";
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
organizationId,
|
|
522
|
-
type: "ACTIVITY_TYPE_GET_WALLET",
|
|
511
|
+
const body = {
|
|
512
|
+
...input,
|
|
513
|
+
organizationId: input.organizationId,
|
|
523
514
|
};
|
|
524
|
-
const stringifiedBody = JSON.stringify(
|
|
515
|
+
const stringifiedBody = JSON.stringify(body);
|
|
525
516
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
526
517
|
return {
|
|
527
518
|
body: stringifiedBody,
|
|
@@ -543,14 +534,12 @@ class TurnkeySDKClientBase {
|
|
|
543
534
|
if (!activeStamper) {
|
|
544
535
|
return undefined;
|
|
545
536
|
}
|
|
546
|
-
const { organizationId, ...parameters } = input;
|
|
547
537
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet_account";
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
organizationId,
|
|
551
|
-
type: "ACTIVITY_TYPE_GET_WALLET_ACCOUNT",
|
|
538
|
+
const body = {
|
|
539
|
+
...input,
|
|
540
|
+
organizationId: input.organizationId,
|
|
552
541
|
};
|
|
553
|
-
const stringifiedBody = JSON.stringify(
|
|
542
|
+
const stringifiedBody = JSON.stringify(body);
|
|
554
543
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
555
544
|
return {
|
|
556
545
|
body: stringifiedBody,
|
|
@@ -572,14 +561,12 @@ class TurnkeySDKClientBase {
|
|
|
572
561
|
if (!activeStamper) {
|
|
573
562
|
return undefined;
|
|
574
563
|
}
|
|
575
|
-
const { organizationId, ...parameters } = input;
|
|
576
564
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities";
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
organizationId,
|
|
580
|
-
type: "ACTIVITY_TYPE_GET_ACTIVITIES",
|
|
565
|
+
const body = {
|
|
566
|
+
...input,
|
|
567
|
+
organizationId: input.organizationId,
|
|
581
568
|
};
|
|
582
|
-
const stringifiedBody = JSON.stringify(
|
|
569
|
+
const stringifiedBody = JSON.stringify(body);
|
|
583
570
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
584
571
|
return {
|
|
585
572
|
body: stringifiedBody,
|
|
@@ -601,14 +588,39 @@ class TurnkeySDKClientBase {
|
|
|
601
588
|
if (!activeStamper) {
|
|
602
589
|
return undefined;
|
|
603
590
|
}
|
|
604
|
-
const { organizationId, ...parameters } = input;
|
|
605
591
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_app_proofs";
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
organizationId,
|
|
609
|
-
type: "ACTIVITY_TYPE_GET_APP_PROOFS",
|
|
592
|
+
const body = {
|
|
593
|
+
...input,
|
|
594
|
+
organizationId: input.organizationId,
|
|
610
595
|
};
|
|
611
|
-
const stringifiedBody = JSON.stringify(
|
|
596
|
+
const stringifiedBody = JSON.stringify(body);
|
|
597
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
598
|
+
return {
|
|
599
|
+
body: stringifiedBody,
|
|
600
|
+
stamp: stamp,
|
|
601
|
+
url: fullUrl,
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
this.listFiatOnRampCredentials = async (input, stampWith) => {
|
|
605
|
+
const session = await this.storageManager?.getActiveSession();
|
|
606
|
+
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
607
|
+
...input,
|
|
608
|
+
organizationId: input.organizationId ??
|
|
609
|
+
session?.organizationId ??
|
|
610
|
+
this.config.organizationId,
|
|
611
|
+
}, stampWith);
|
|
612
|
+
};
|
|
613
|
+
this.stampListFiatOnRampCredentials = async (input, stampWith) => {
|
|
614
|
+
const activeStamper = this.getStamper(stampWith);
|
|
615
|
+
if (!activeStamper) {
|
|
616
|
+
return undefined;
|
|
617
|
+
}
|
|
618
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_fiat_on_ramp_credentials";
|
|
619
|
+
const body = {
|
|
620
|
+
...input,
|
|
621
|
+
organizationId: input.organizationId,
|
|
622
|
+
};
|
|
623
|
+
const stringifiedBody = JSON.stringify(body);
|
|
612
624
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
613
625
|
return {
|
|
614
626
|
body: stringifiedBody,
|
|
@@ -630,14 +642,12 @@ class TurnkeySDKClientBase {
|
|
|
630
642
|
if (!activeStamper) {
|
|
631
643
|
return undefined;
|
|
632
644
|
}
|
|
633
|
-
const { organizationId, ...parameters } = input;
|
|
634
645
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_oauth2_credentials";
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
organizationId,
|
|
638
|
-
type: "ACTIVITY_TYPE_LIST_OAUTH2CREDENTIALS",
|
|
646
|
+
const body = {
|
|
647
|
+
...input,
|
|
648
|
+
organizationId: input.organizationId,
|
|
639
649
|
};
|
|
640
|
-
const stringifiedBody = JSON.stringify(
|
|
650
|
+
const stringifiedBody = JSON.stringify(body);
|
|
641
651
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
642
652
|
return {
|
|
643
653
|
body: stringifiedBody,
|
|
@@ -659,14 +669,12 @@ class TurnkeySDKClientBase {
|
|
|
659
669
|
if (!activeStamper) {
|
|
660
670
|
return undefined;
|
|
661
671
|
}
|
|
662
|
-
const { organizationId, ...parameters } = input;
|
|
663
672
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies";
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
organizationId,
|
|
667
|
-
type: "ACTIVITY_TYPE_GET_POLICIES",
|
|
673
|
+
const body = {
|
|
674
|
+
...input,
|
|
675
|
+
organizationId: input.organizationId,
|
|
668
676
|
};
|
|
669
|
-
const stringifiedBody = JSON.stringify(
|
|
677
|
+
const stringifiedBody = JSON.stringify(body);
|
|
670
678
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
671
679
|
return {
|
|
672
680
|
body: stringifiedBody,
|
|
@@ -688,14 +696,12 @@ class TurnkeySDKClientBase {
|
|
|
688
696
|
if (!activeStamper) {
|
|
689
697
|
return undefined;
|
|
690
698
|
}
|
|
691
|
-
const { organizationId, ...parameters } = input;
|
|
692
699
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags";
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
organizationId,
|
|
696
|
-
type: "ACTIVITY_TYPE_LIST_PRIVATE_KEY_TAGS",
|
|
700
|
+
const body = {
|
|
701
|
+
...input,
|
|
702
|
+
organizationId: input.organizationId,
|
|
697
703
|
};
|
|
698
|
-
const stringifiedBody = JSON.stringify(
|
|
704
|
+
const stringifiedBody = JSON.stringify(body);
|
|
699
705
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
700
706
|
return {
|
|
701
707
|
body: stringifiedBody,
|
|
@@ -717,14 +723,12 @@ class TurnkeySDKClientBase {
|
|
|
717
723
|
if (!activeStamper) {
|
|
718
724
|
return undefined;
|
|
719
725
|
}
|
|
720
|
-
const { organizationId, ...parameters } = input;
|
|
721
726
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys";
|
|
722
|
-
const
|
|
723
|
-
|
|
724
|
-
organizationId,
|
|
725
|
-
type: "ACTIVITY_TYPE_GET_PRIVATE_KEYS",
|
|
727
|
+
const body = {
|
|
728
|
+
...input,
|
|
729
|
+
organizationId: input.organizationId,
|
|
726
730
|
};
|
|
727
|
-
const stringifiedBody = JSON.stringify(
|
|
731
|
+
const stringifiedBody = JSON.stringify(body);
|
|
728
732
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
729
733
|
return {
|
|
730
734
|
body: stringifiedBody,
|
|
@@ -746,15 +750,13 @@ class TurnkeySDKClientBase {
|
|
|
746
750
|
if (!activeStamper) {
|
|
747
751
|
return undefined;
|
|
748
752
|
}
|
|
749
|
-
const { organizationId, ...parameters } = input;
|
|
750
753
|
const fullUrl = this.config.apiBaseUrl +
|
|
751
754
|
"/public/v1/query/list_smart_contract_interfaces";
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
organizationId,
|
|
755
|
-
type: "ACTIVITY_TYPE_GET_SMART_CONTRACT_INTERFACES",
|
|
755
|
+
const body = {
|
|
756
|
+
...input,
|
|
757
|
+
organizationId: input.organizationId,
|
|
756
758
|
};
|
|
757
|
-
const stringifiedBody = JSON.stringify(
|
|
759
|
+
const stringifiedBody = JSON.stringify(body);
|
|
758
760
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
759
761
|
return {
|
|
760
762
|
body: stringifiedBody,
|
|
@@ -776,14 +778,12 @@ class TurnkeySDKClientBase {
|
|
|
776
778
|
if (!activeStamper) {
|
|
777
779
|
return undefined;
|
|
778
780
|
}
|
|
779
|
-
const { organizationId, ...parameters } = input;
|
|
780
781
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs";
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
organizationId,
|
|
784
|
-
type: "ACTIVITY_TYPE_GET_SUB_ORG_IDS",
|
|
782
|
+
const body = {
|
|
783
|
+
...input,
|
|
784
|
+
organizationId: input.organizationId,
|
|
785
785
|
};
|
|
786
|
-
const stringifiedBody = JSON.stringify(
|
|
786
|
+
const stringifiedBody = JSON.stringify(body);
|
|
787
787
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
788
788
|
return {
|
|
789
789
|
body: stringifiedBody,
|
|
@@ -805,14 +805,12 @@ class TurnkeySDKClientBase {
|
|
|
805
805
|
if (!activeStamper) {
|
|
806
806
|
return undefined;
|
|
807
807
|
}
|
|
808
|
-
const { organizationId, ...parameters } = input;
|
|
809
808
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags";
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
organizationId,
|
|
813
|
-
type: "ACTIVITY_TYPE_LIST_USER_TAGS",
|
|
809
|
+
const body = {
|
|
810
|
+
...input,
|
|
811
|
+
organizationId: input.organizationId,
|
|
814
812
|
};
|
|
815
|
-
const stringifiedBody = JSON.stringify(
|
|
813
|
+
const stringifiedBody = JSON.stringify(body);
|
|
816
814
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
817
815
|
return {
|
|
818
816
|
body: stringifiedBody,
|
|
@@ -834,14 +832,12 @@ class TurnkeySDKClientBase {
|
|
|
834
832
|
if (!activeStamper) {
|
|
835
833
|
return undefined;
|
|
836
834
|
}
|
|
837
|
-
const { organizationId, ...parameters } = input;
|
|
838
835
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users";
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
organizationId,
|
|
842
|
-
type: "ACTIVITY_TYPE_GET_USERS",
|
|
836
|
+
const body = {
|
|
837
|
+
...input,
|
|
838
|
+
organizationId: input.organizationId,
|
|
843
839
|
};
|
|
844
|
-
const stringifiedBody = JSON.stringify(
|
|
840
|
+
const stringifiedBody = JSON.stringify(body);
|
|
845
841
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
846
842
|
return {
|
|
847
843
|
body: stringifiedBody,
|
|
@@ -863,14 +859,12 @@ class TurnkeySDKClientBase {
|
|
|
863
859
|
if (!activeStamper) {
|
|
864
860
|
return undefined;
|
|
865
861
|
}
|
|
866
|
-
const { organizationId, ...parameters } = input;
|
|
867
862
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_verified_suborgs";
|
|
868
|
-
const
|
|
869
|
-
|
|
870
|
-
organizationId,
|
|
871
|
-
type: "ACTIVITY_TYPE_GET_VERIFIED_SUB_ORG_IDS",
|
|
863
|
+
const body = {
|
|
864
|
+
...input,
|
|
865
|
+
organizationId: input.organizationId,
|
|
872
866
|
};
|
|
873
|
-
const stringifiedBody = JSON.stringify(
|
|
867
|
+
const stringifiedBody = JSON.stringify(body);
|
|
874
868
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
875
869
|
return {
|
|
876
870
|
body: stringifiedBody,
|
|
@@ -892,14 +886,12 @@ class TurnkeySDKClientBase {
|
|
|
892
886
|
if (!activeStamper) {
|
|
893
887
|
return undefined;
|
|
894
888
|
}
|
|
895
|
-
const { organizationId, ...parameters } = input;
|
|
896
889
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts";
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
organizationId,
|
|
900
|
-
type: "ACTIVITY_TYPE_GET_WALLET_ACCOUNTS",
|
|
890
|
+
const body = {
|
|
891
|
+
...input,
|
|
892
|
+
organizationId: input.organizationId,
|
|
901
893
|
};
|
|
902
|
-
const stringifiedBody = JSON.stringify(
|
|
894
|
+
const stringifiedBody = JSON.stringify(body);
|
|
903
895
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
904
896
|
return {
|
|
905
897
|
body: stringifiedBody,
|
|
@@ -921,14 +913,12 @@ class TurnkeySDKClientBase {
|
|
|
921
913
|
if (!activeStamper) {
|
|
922
914
|
return undefined;
|
|
923
915
|
}
|
|
924
|
-
const { organizationId, ...parameters } = input;
|
|
925
916
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets";
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
organizationId,
|
|
929
|
-
type: "ACTIVITY_TYPE_GET_WALLETS",
|
|
917
|
+
const body = {
|
|
918
|
+
...input,
|
|
919
|
+
organizationId: input.organizationId,
|
|
930
920
|
};
|
|
931
|
-
const stringifiedBody = JSON.stringify(
|
|
921
|
+
const stringifiedBody = JSON.stringify(body);
|
|
932
922
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
933
923
|
return {
|
|
934
924
|
body: stringifiedBody,
|
|
@@ -950,14 +940,12 @@ class TurnkeySDKClientBase {
|
|
|
950
940
|
if (!activeStamper) {
|
|
951
941
|
return undefined;
|
|
952
942
|
}
|
|
953
|
-
const { organizationId, ...parameters } = input;
|
|
954
943
|
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami";
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
organizationId,
|
|
958
|
-
type: "ACTIVITY_TYPE_GET_WHOAMI",
|
|
944
|
+
const body = {
|
|
945
|
+
...input,
|
|
946
|
+
organizationId: input.organizationId,
|
|
959
947
|
};
|
|
960
|
-
const stringifiedBody = JSON.stringify(
|
|
948
|
+
const stringifiedBody = JSON.stringify(body);
|
|
961
949
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
962
950
|
return {
|
|
963
951
|
body: stringifiedBody,
|
|
@@ -1097,6 +1085,40 @@ class TurnkeySDKClientBase {
|
|
|
1097
1085
|
url: fullUrl,
|
|
1098
1086
|
};
|
|
1099
1087
|
};
|
|
1088
|
+
this.createFiatOnRampCredential = async (input, stampWith) => {
|
|
1089
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1090
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1091
|
+
return this.activity("/public/v1/submit/create_fiat_on_ramp_credential", {
|
|
1092
|
+
parameters: rest,
|
|
1093
|
+
organizationId: organizationId ??
|
|
1094
|
+
session?.organizationId ??
|
|
1095
|
+
this.config.organizationId,
|
|
1096
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1097
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1098
|
+
}, "createFiatOnRampCredentialResult", stampWith);
|
|
1099
|
+
};
|
|
1100
|
+
this.stampCreateFiatOnRampCredential = async (input, stampWith) => {
|
|
1101
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1102
|
+
if (!activeStamper) {
|
|
1103
|
+
return undefined;
|
|
1104
|
+
}
|
|
1105
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1106
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1107
|
+
"/public/v1/submit/create_fiat_on_ramp_credential";
|
|
1108
|
+
const bodyWithType = {
|
|
1109
|
+
parameters,
|
|
1110
|
+
organizationId,
|
|
1111
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1112
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1113
|
+
};
|
|
1114
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1115
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1116
|
+
return {
|
|
1117
|
+
body: stringifiedBody,
|
|
1118
|
+
stamp: stamp,
|
|
1119
|
+
url: fullUrl,
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1100
1122
|
this.createInvitations = async (input, stampWith) => {
|
|
1101
1123
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1102
1124
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -1659,6 +1681,40 @@ class TurnkeySDKClientBase {
|
|
|
1659
1681
|
url: fullUrl,
|
|
1660
1682
|
};
|
|
1661
1683
|
};
|
|
1684
|
+
this.deleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1685
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1686
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1687
|
+
return this.activity("/public/v1/submit/delete_fiat_on_ramp_credential", {
|
|
1688
|
+
parameters: rest,
|
|
1689
|
+
organizationId: organizationId ??
|
|
1690
|
+
session?.organizationId ??
|
|
1691
|
+
this.config.organizationId,
|
|
1692
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1693
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1694
|
+
}, "deleteFiatOnRampCredentialResult", stampWith);
|
|
1695
|
+
};
|
|
1696
|
+
this.stampDeleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1697
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1698
|
+
if (!activeStamper) {
|
|
1699
|
+
return undefined;
|
|
1700
|
+
}
|
|
1701
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1702
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1703
|
+
"/public/v1/submit/delete_fiat_on_ramp_credential";
|
|
1704
|
+
const bodyWithType = {
|
|
1705
|
+
parameters,
|
|
1706
|
+
organizationId,
|
|
1707
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1708
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1709
|
+
};
|
|
1710
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1711
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1712
|
+
return {
|
|
1713
|
+
body: stringifiedBody,
|
|
1714
|
+
stamp: stamp,
|
|
1715
|
+
url: fullUrl,
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1662
1718
|
this.deleteInvitation = async (input, stampWith) => {
|
|
1663
1719
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1664
1720
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2155,6 +2211,39 @@ class TurnkeySDKClientBase {
|
|
|
2155
2211
|
url: fullUrl,
|
|
2156
2212
|
};
|
|
2157
2213
|
};
|
|
2214
|
+
this.ethSendTransaction = async (input, stampWith) => {
|
|
2215
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2216
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2217
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
2218
|
+
parameters: rest,
|
|
2219
|
+
organizationId: organizationId ??
|
|
2220
|
+
session?.organizationId ??
|
|
2221
|
+
this.config.organizationId,
|
|
2222
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2223
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2224
|
+
}, "ethSendTransactionResult", stampWith);
|
|
2225
|
+
};
|
|
2226
|
+
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
2227
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2228
|
+
if (!activeStamper) {
|
|
2229
|
+
return undefined;
|
|
2230
|
+
}
|
|
2231
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2232
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
2233
|
+
const bodyWithType = {
|
|
2234
|
+
parameters,
|
|
2235
|
+
organizationId,
|
|
2236
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2237
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2238
|
+
};
|
|
2239
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2240
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2241
|
+
return {
|
|
2242
|
+
body: stringifiedBody,
|
|
2243
|
+
stamp: stamp,
|
|
2244
|
+
url: fullUrl,
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2158
2247
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
2159
2248
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2160
2249
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2947,6 +3036,40 @@ class TurnkeySDKClientBase {
|
|
|
2947
3036
|
url: fullUrl,
|
|
2948
3037
|
};
|
|
2949
3038
|
};
|
|
3039
|
+
this.updateFiatOnRampCredential = async (input, stampWith) => {
|
|
3040
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3041
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3042
|
+
return this.activity("/public/v1/submit/update_fiat_on_ramp_credential", {
|
|
3043
|
+
parameters: rest,
|
|
3044
|
+
organizationId: organizationId ??
|
|
3045
|
+
session?.organizationId ??
|
|
3046
|
+
this.config.organizationId,
|
|
3047
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3048
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3049
|
+
}, "updateFiatOnRampCredentialResult", stampWith);
|
|
3050
|
+
};
|
|
3051
|
+
this.stampUpdateFiatOnRampCredential = async (input, stampWith) => {
|
|
3052
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3053
|
+
if (!activeStamper) {
|
|
3054
|
+
return undefined;
|
|
3055
|
+
}
|
|
3056
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3057
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
3058
|
+
"/public/v1/submit/update_fiat_on_ramp_credential";
|
|
3059
|
+
const bodyWithType = {
|
|
3060
|
+
parameters,
|
|
3061
|
+
organizationId,
|
|
3062
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3063
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3064
|
+
};
|
|
3065
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3066
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3067
|
+
return {
|
|
3068
|
+
body: stringifiedBody,
|
|
3069
|
+
stamp: stamp,
|
|
3070
|
+
url: fullUrl,
|
|
3071
|
+
};
|
|
3072
|
+
};
|
|
2950
3073
|
this.updateOauth2Credential = async (input, stampWith) => {
|
|
2951
3074
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2952
3075
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3324,14 +3447,12 @@ class TurnkeySDKClientBase {
|
|
|
3324
3447
|
if (!activeStamper) {
|
|
3325
3448
|
return undefined;
|
|
3326
3449
|
}
|
|
3327
|
-
const { organizationId, ...parameters } = input;
|
|
3328
3450
|
const fullUrl = this.config.apiBaseUrl + "/tkhq/api/v1/test_rate_limits";
|
|
3329
|
-
const
|
|
3330
|
-
|
|
3331
|
-
organizationId,
|
|
3332
|
-
type: "ACTIVITY_TYPE_TEST_RATE_LIMITS",
|
|
3451
|
+
const body = {
|
|
3452
|
+
...input,
|
|
3453
|
+
organizationId: input.organizationId,
|
|
3333
3454
|
};
|
|
3334
|
-
const stringifiedBody = JSON.stringify(
|
|
3455
|
+
const stringifiedBody = JSON.stringify(body);
|
|
3335
3456
|
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3336
3457
|
return {
|
|
3337
3458
|
body: stringifiedBody,
|