@turnkey/sdk-browser 1.8.0 → 1.10.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +82 -14
  3. package/dist/__generated__/sdk-client-base.d.ts +76 -0
  4. package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
  5. package/dist/__generated__/sdk-client-base.js +1027 -52
  6. package/dist/__generated__/sdk-client-base.js.map +1 -1
  7. package/dist/__generated__/sdk-client-base.mjs +1027 -52
  8. package/dist/__generated__/sdk-client-base.mjs.map +1 -1
  9. package/dist/__generated__/version.d.ts +1 -1
  10. package/dist/__generated__/version.d.ts.map +1 -1
  11. package/dist/__generated__/version.js +1 -1
  12. package/dist/__generated__/version.mjs +1 -1
  13. package/dist/__inputs__/public_api.types.d.ts +7 -7
  14. package/dist/__inputs__/public_api.types.d.ts.map +1 -1
  15. package/dist/__types__/base.d.ts +18 -0
  16. package/dist/__types__/base.d.ts.map +1 -1
  17. package/dist/__types__/base.js +9 -0
  18. package/dist/__types__/base.js.map +1 -1
  19. package/dist/__types__/base.mjs +10 -1
  20. package/dist/__types__/base.mjs.map +1 -1
  21. package/dist/index.d.ts +9 -14
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +6 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +2 -1
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/models.d.ts +45 -6
  28. package/dist/models.d.ts.map +1 -1
  29. package/dist/sdk-client.d.ts +30 -5
  30. package/dist/sdk-client.d.ts.map +1 -1
  31. package/dist/sdk-client.js +91 -44
  32. package/dist/sdk-client.js.map +1 -1
  33. package/dist/sdk-client.mjs +93 -47
  34. package/dist/sdk-client.mjs.map +1 -1
  35. package/dist/storage.d.ts +12 -0
  36. package/dist/storage.d.ts.map +1 -1
  37. package/dist/storage.js +43 -0
  38. package/dist/storage.js.map +1 -1
  39. package/dist/storage.mjs +43 -1
  40. package/dist/storage.mjs.map +1 -1
  41. package/package.json +6 -5
@@ -14,141 +14,440 @@ class TurnkeySDKClientBase {
14
14
  organizationId: input.organizationId ?? this.config.organizationId,
15
15
  });
16
16
  };
17
+ this.stampGetActivity = async (input) => {
18
+ if (!this.config.stamper) {
19
+ return undefined;
20
+ }
21
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity";
22
+ const body = JSON.stringify(input);
23
+ const stamp = await this.config.stamper.stamp(body);
24
+ return {
25
+ body: body,
26
+ stamp: stamp,
27
+ url: fullUrl,
28
+ };
29
+ };
17
30
  this.getApiKey = async (input) => {
18
31
  return this.request("/public/v1/query/get_api_key", {
19
32
  ...input,
20
33
  organizationId: input.organizationId ?? this.config.organizationId,
21
34
  });
22
35
  };
36
+ this.stampGetApiKey = async (input) => {
37
+ if (!this.config.stamper) {
38
+ return undefined;
39
+ }
40
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key";
41
+ const body = JSON.stringify(input);
42
+ const stamp = await this.config.stamper.stamp(body);
43
+ return {
44
+ body: body,
45
+ stamp: stamp,
46
+ url: fullUrl,
47
+ };
48
+ };
23
49
  this.getApiKeys = async (input = {}) => {
24
50
  return this.request("/public/v1/query/get_api_keys", {
25
51
  ...input,
26
52
  organizationId: input.organizationId ?? this.config.organizationId,
27
53
  });
28
54
  };
55
+ this.stampGetApiKeys = async (input) => {
56
+ if (!this.config.stamper) {
57
+ return undefined;
58
+ }
59
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys";
60
+ const body = JSON.stringify(input);
61
+ const stamp = await this.config.stamper.stamp(body);
62
+ return {
63
+ body: body,
64
+ stamp: stamp,
65
+ url: fullUrl,
66
+ };
67
+ };
29
68
  this.getAttestationDocument = async (input) => {
30
69
  return this.request("/public/v1/query/get_attestation", {
31
70
  ...input,
32
71
  organizationId: input.organizationId ?? this.config.organizationId,
33
72
  });
34
73
  };
74
+ this.stampGetAttestationDocument = async (input) => {
75
+ if (!this.config.stamper) {
76
+ return undefined;
77
+ }
78
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation";
79
+ const body = JSON.stringify(input);
80
+ const stamp = await this.config.stamper.stamp(body);
81
+ return {
82
+ body: body,
83
+ stamp: stamp,
84
+ url: fullUrl,
85
+ };
86
+ };
35
87
  this.getAuthenticator = async (input) => {
36
88
  return this.request("/public/v1/query/get_authenticator", {
37
89
  ...input,
38
90
  organizationId: input.organizationId ?? this.config.organizationId,
39
91
  });
40
92
  };
93
+ this.stampGetAuthenticator = async (input) => {
94
+ if (!this.config.stamper) {
95
+ return undefined;
96
+ }
97
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator";
98
+ const body = JSON.stringify(input);
99
+ const stamp = await this.config.stamper.stamp(body);
100
+ return {
101
+ body: body,
102
+ stamp: stamp,
103
+ url: fullUrl,
104
+ };
105
+ };
41
106
  this.getAuthenticators = async (input) => {
42
107
  return this.request("/public/v1/query/get_authenticators", {
43
108
  ...input,
44
109
  organizationId: input.organizationId ?? this.config.organizationId,
45
110
  });
46
111
  };
112
+ this.stampGetAuthenticators = async (input) => {
113
+ if (!this.config.stamper) {
114
+ return undefined;
115
+ }
116
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators";
117
+ const body = JSON.stringify(input);
118
+ const stamp = await this.config.stamper.stamp(body);
119
+ return {
120
+ body: body,
121
+ stamp: stamp,
122
+ url: fullUrl,
123
+ };
124
+ };
47
125
  this.getOauthProviders = async (input) => {
48
126
  return this.request("/public/v1/query/get_oauth_providers", {
49
127
  ...input,
50
128
  organizationId: input.organizationId ?? this.config.organizationId,
51
129
  });
52
130
  };
131
+ this.stampGetOauthProviders = async (input) => {
132
+ if (!this.config.stamper) {
133
+ return undefined;
134
+ }
135
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers";
136
+ const body = JSON.stringify(input);
137
+ const stamp = await this.config.stamper.stamp(body);
138
+ return {
139
+ body: body,
140
+ stamp: stamp,
141
+ url: fullUrl,
142
+ };
143
+ };
53
144
  this.getOrganization = async (input = {}) => {
54
145
  return this.request("/public/v1/query/get_organization", {
55
146
  ...input,
56
147
  organizationId: input.organizationId ?? this.config.organizationId,
57
148
  });
58
149
  };
150
+ this.stampGetOrganization = async (input) => {
151
+ if (!this.config.stamper) {
152
+ return undefined;
153
+ }
154
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization";
155
+ const body = JSON.stringify(input);
156
+ const stamp = await this.config.stamper.stamp(body);
157
+ return {
158
+ body: body,
159
+ stamp: stamp,
160
+ url: fullUrl,
161
+ };
162
+ };
59
163
  this.getOrganizationConfigs = async (input) => {
60
164
  return this.request("/public/v1/query/get_organization_configs", {
61
165
  ...input,
62
166
  organizationId: input.organizationId ?? this.config.organizationId,
63
167
  });
64
168
  };
169
+ this.stampGetOrganizationConfigs = async (input) => {
170
+ if (!this.config.stamper) {
171
+ return undefined;
172
+ }
173
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs";
174
+ const body = JSON.stringify(input);
175
+ const stamp = await this.config.stamper.stamp(body);
176
+ return {
177
+ body: body,
178
+ stamp: stamp,
179
+ url: fullUrl,
180
+ };
181
+ };
65
182
  this.getPolicy = async (input) => {
66
183
  return this.request("/public/v1/query/get_policy", {
67
184
  ...input,
68
185
  organizationId: input.organizationId ?? this.config.organizationId,
69
186
  });
70
187
  };
188
+ this.stampGetPolicy = async (input) => {
189
+ if (!this.config.stamper) {
190
+ return undefined;
191
+ }
192
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy";
193
+ const body = JSON.stringify(input);
194
+ const stamp = await this.config.stamper.stamp(body);
195
+ return {
196
+ body: body,
197
+ stamp: stamp,
198
+ url: fullUrl,
199
+ };
200
+ };
71
201
  this.getPrivateKey = async (input) => {
72
202
  return this.request("/public/v1/query/get_private_key", {
73
203
  ...input,
74
204
  organizationId: input.organizationId ?? this.config.organizationId,
75
205
  });
76
206
  };
207
+ this.stampGetPrivateKey = async (input) => {
208
+ if (!this.config.stamper) {
209
+ return undefined;
210
+ }
211
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key";
212
+ const body = JSON.stringify(input);
213
+ const stamp = await this.config.stamper.stamp(body);
214
+ return {
215
+ body: body,
216
+ stamp: stamp,
217
+ url: fullUrl,
218
+ };
219
+ };
77
220
  this.getUser = async (input) => {
78
221
  return this.request("/public/v1/query/get_user", {
79
222
  ...input,
80
223
  organizationId: input.organizationId ?? this.config.organizationId,
81
224
  });
82
225
  };
226
+ this.stampGetUser = async (input) => {
227
+ if (!this.config.stamper) {
228
+ return undefined;
229
+ }
230
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user";
231
+ const body = JSON.stringify(input);
232
+ const stamp = await this.config.stamper.stamp(body);
233
+ return {
234
+ body: body,
235
+ stamp: stamp,
236
+ url: fullUrl,
237
+ };
238
+ };
83
239
  this.getWallet = async (input) => {
84
240
  return this.request("/public/v1/query/get_wallet", {
85
241
  ...input,
86
242
  organizationId: input.organizationId ?? this.config.organizationId,
87
243
  });
88
244
  };
245
+ this.stampGetWallet = async (input) => {
246
+ if (!this.config.stamper) {
247
+ return undefined;
248
+ }
249
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet";
250
+ const body = JSON.stringify(input);
251
+ const stamp = await this.config.stamper.stamp(body);
252
+ return {
253
+ body: body,
254
+ stamp: stamp,
255
+ url: fullUrl,
256
+ };
257
+ };
89
258
  this.getActivities = async (input = {}) => {
90
259
  return this.request("/public/v1/query/list_activities", {
91
260
  ...input,
92
261
  organizationId: input.organizationId ?? this.config.organizationId,
93
262
  });
94
263
  };
264
+ this.stampGetActivities = async (input) => {
265
+ if (!this.config.stamper) {
266
+ return undefined;
267
+ }
268
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities";
269
+ const body = JSON.stringify(input);
270
+ const stamp = await this.config.stamper.stamp(body);
271
+ return {
272
+ body: body,
273
+ stamp: stamp,
274
+ url: fullUrl,
275
+ };
276
+ };
95
277
  this.getPolicies = async (input = {}) => {
96
278
  return this.request("/public/v1/query/list_policies", {
97
279
  ...input,
98
280
  organizationId: input.organizationId ?? this.config.organizationId,
99
281
  });
100
282
  };
283
+ this.stampGetPolicies = async (input) => {
284
+ if (!this.config.stamper) {
285
+ return undefined;
286
+ }
287
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies";
288
+ const body = JSON.stringify(input);
289
+ const stamp = await this.config.stamper.stamp(body);
290
+ return {
291
+ body: body,
292
+ stamp: stamp,
293
+ url: fullUrl,
294
+ };
295
+ };
101
296
  this.listPrivateKeyTags = async (input) => {
102
297
  return this.request("/public/v1/query/list_private_key_tags", {
103
298
  ...input,
104
299
  organizationId: input.organizationId ?? this.config.organizationId,
105
300
  });
106
301
  };
302
+ this.stampListPrivateKeyTags = async (input) => {
303
+ if (!this.config.stamper) {
304
+ return undefined;
305
+ }
306
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags";
307
+ const body = JSON.stringify(input);
308
+ const stamp = await this.config.stamper.stamp(body);
309
+ return {
310
+ body: body,
311
+ stamp: stamp,
312
+ url: fullUrl,
313
+ };
314
+ };
107
315
  this.getPrivateKeys = async (input = {}) => {
108
316
  return this.request("/public/v1/query/list_private_keys", {
109
317
  ...input,
110
318
  organizationId: input.organizationId ?? this.config.organizationId,
111
319
  });
112
320
  };
321
+ this.stampGetPrivateKeys = async (input) => {
322
+ if (!this.config.stamper) {
323
+ return undefined;
324
+ }
325
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys";
326
+ const body = JSON.stringify(input);
327
+ const stamp = await this.config.stamper.stamp(body);
328
+ return {
329
+ body: body,
330
+ stamp: stamp,
331
+ url: fullUrl,
332
+ };
333
+ };
113
334
  this.getSubOrgIds = async (input = {}) => {
114
335
  return this.request("/public/v1/query/list_suborgs", {
115
336
  ...input,
116
337
  organizationId: input.organizationId ?? this.config.organizationId,
117
338
  });
118
339
  };
340
+ this.stampGetSubOrgIds = async (input) => {
341
+ if (!this.config.stamper) {
342
+ return undefined;
343
+ }
344
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs";
345
+ const body = JSON.stringify(input);
346
+ const stamp = await this.config.stamper.stamp(body);
347
+ return {
348
+ body: body,
349
+ stamp: stamp,
350
+ url: fullUrl,
351
+ };
352
+ };
119
353
  this.listUserTags = async (input = {}) => {
120
354
  return this.request("/public/v1/query/list_user_tags", {
121
355
  ...input,
122
356
  organizationId: input.organizationId ?? this.config.organizationId,
123
357
  });
124
358
  };
359
+ this.stampListUserTags = async (input) => {
360
+ if (!this.config.stamper) {
361
+ return undefined;
362
+ }
363
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags";
364
+ const body = JSON.stringify(input);
365
+ const stamp = await this.config.stamper.stamp(body);
366
+ return {
367
+ body: body,
368
+ stamp: stamp,
369
+ url: fullUrl,
370
+ };
371
+ };
125
372
  this.getUsers = async (input = {}) => {
126
373
  return this.request("/public/v1/query/list_users", {
127
374
  ...input,
128
375
  organizationId: input.organizationId ?? this.config.organizationId,
129
376
  });
130
377
  };
378
+ this.stampGetUsers = async (input) => {
379
+ if (!this.config.stamper) {
380
+ return undefined;
381
+ }
382
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users";
383
+ const body = JSON.stringify(input);
384
+ const stamp = await this.config.stamper.stamp(body);
385
+ return {
386
+ body: body,
387
+ stamp: stamp,
388
+ url: fullUrl,
389
+ };
390
+ };
131
391
  this.getWalletAccounts = async (input) => {
132
392
  return this.request("/public/v1/query/list_wallet_accounts", {
133
393
  ...input,
134
394
  organizationId: input.organizationId ?? this.config.organizationId,
135
395
  });
136
396
  };
397
+ this.stampGetWalletAccounts = async (input) => {
398
+ if (!this.config.stamper) {
399
+ return undefined;
400
+ }
401
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts";
402
+ const body = JSON.stringify(input);
403
+ const stamp = await this.config.stamper.stamp(body);
404
+ return {
405
+ body: body,
406
+ stamp: stamp,
407
+ url: fullUrl,
408
+ };
409
+ };
137
410
  this.getWallets = async (input = {}) => {
138
411
  return this.request("/public/v1/query/list_wallets", {
139
412
  ...input,
140
413
  organizationId: input.organizationId ?? this.config.organizationId,
141
414
  });
142
415
  };
416
+ this.stampGetWallets = async (input) => {
417
+ if (!this.config.stamper) {
418
+ return undefined;
419
+ }
420
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets";
421
+ const body = JSON.stringify(input);
422
+ const stamp = await this.config.stamper.stamp(body);
423
+ return {
424
+ body: body,
425
+ stamp: stamp,
426
+ url: fullUrl,
427
+ };
428
+ };
143
429
  this.getWhoami = async (input = {}) => {
144
430
  return this.request("/public/v1/query/whoami", {
145
431
  ...input,
146
432
  organizationId: input.organizationId ?? this.config.organizationId,
147
433
  });
148
434
  };
435
+ this.stampGetWhoami = async (input) => {
436
+ if (!this.config.stamper) {
437
+ return undefined;
438
+ }
439
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami";
440
+ const body = JSON.stringify(input);
441
+ const stamp = await this.config.stamper.stamp(body);
442
+ return {
443
+ body: body,
444
+ stamp: stamp,
445
+ url: fullUrl,
446
+ };
447
+ };
149
448
  this.approveActivity = async (input) => {
150
449
  const { organizationId, timestampMs, ...rest } = input;
151
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
450
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
152
451
  return this.activityDecision("/public/v1/submit/approve_activity", {
153
452
  parameters: rest,
154
453
  organizationId: organizationId ??
@@ -158,9 +457,22 @@ class TurnkeySDKClientBase {
158
457
  type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
159
458
  });
160
459
  };
460
+ this.stampApproveActivity = async (input) => {
461
+ if (!this.config.stamper) {
462
+ return undefined;
463
+ }
464
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity";
465
+ const body = JSON.stringify(input);
466
+ const stamp = await this.config.stamper.stamp(body);
467
+ return {
468
+ body: body,
469
+ stamp: stamp,
470
+ url: fullUrl,
471
+ };
472
+ };
161
473
  this.createApiKeys = async (input) => {
162
474
  const { organizationId, timestampMs, ...rest } = input;
163
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
475
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
164
476
  return this.command("/public/v1/submit/create_api_keys", {
165
477
  parameters: rest,
166
478
  organizationId: organizationId ??
@@ -170,9 +482,22 @@ class TurnkeySDKClientBase {
170
482
  type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
171
483
  }, "createApiKeysResult");
172
484
  };
485
+ this.stampCreateApiKeys = async (input) => {
486
+ if (!this.config.stamper) {
487
+ return undefined;
488
+ }
489
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys";
490
+ const body = JSON.stringify(input);
491
+ const stamp = await this.config.stamper.stamp(body);
492
+ return {
493
+ body: body,
494
+ stamp: stamp,
495
+ url: fullUrl,
496
+ };
497
+ };
173
498
  this.createApiOnlyUsers = async (input) => {
174
499
  const { organizationId, timestampMs, ...rest } = input;
175
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
500
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
176
501
  return this.command("/public/v1/submit/create_api_only_users", {
177
502
  parameters: rest,
178
503
  organizationId: organizationId ??
@@ -182,9 +507,22 @@ class TurnkeySDKClientBase {
182
507
  type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
183
508
  }, "createApiOnlyUsersResult");
184
509
  };
510
+ this.stampCreateApiOnlyUsers = async (input) => {
511
+ if (!this.config.stamper) {
512
+ return undefined;
513
+ }
514
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users";
515
+ const body = JSON.stringify(input);
516
+ const stamp = await this.config.stamper.stamp(body);
517
+ return {
518
+ body: body,
519
+ stamp: stamp,
520
+ url: fullUrl,
521
+ };
522
+ };
185
523
  this.createAuthenticators = async (input) => {
186
524
  const { organizationId, timestampMs, ...rest } = input;
187
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
525
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
188
526
  return this.command("/public/v1/submit/create_authenticators", {
189
527
  parameters: rest,
190
528
  organizationId: organizationId ??
@@ -194,9 +532,22 @@ class TurnkeySDKClientBase {
194
532
  type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
195
533
  }, "createAuthenticatorsResult");
196
534
  };
535
+ this.stampCreateAuthenticators = async (input) => {
536
+ if (!this.config.stamper) {
537
+ return undefined;
538
+ }
539
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_authenticators";
540
+ const body = JSON.stringify(input);
541
+ const stamp = await this.config.stamper.stamp(body);
542
+ return {
543
+ body: body,
544
+ stamp: stamp,
545
+ url: fullUrl,
546
+ };
547
+ };
197
548
  this.createInvitations = async (input) => {
198
549
  const { organizationId, timestampMs, ...rest } = input;
199
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
550
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
200
551
  return this.command("/public/v1/submit/create_invitations", {
201
552
  parameters: rest,
202
553
  organizationId: organizationId ??
@@ -206,9 +557,22 @@ class TurnkeySDKClientBase {
206
557
  type: "ACTIVITY_TYPE_CREATE_INVITATIONS",
207
558
  }, "createInvitationsResult");
208
559
  };
560
+ this.stampCreateInvitations = async (input) => {
561
+ if (!this.config.stamper) {
562
+ return undefined;
563
+ }
564
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_invitations";
565
+ const body = JSON.stringify(input);
566
+ const stamp = await this.config.stamper.stamp(body);
567
+ return {
568
+ body: body,
569
+ stamp: stamp,
570
+ url: fullUrl,
571
+ };
572
+ };
209
573
  this.createOauthProviders = async (input) => {
210
574
  const { organizationId, timestampMs, ...rest } = input;
211
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
575
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
212
576
  return this.command("/public/v1/submit/create_oauth_providers", {
213
577
  parameters: rest,
214
578
  organizationId: organizationId ??
@@ -218,9 +582,22 @@ class TurnkeySDKClientBase {
218
582
  type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS",
219
583
  }, "createOauthProvidersResult");
220
584
  };
585
+ this.stampCreateOauthProviders = async (input) => {
586
+ if (!this.config.stamper) {
587
+ return undefined;
588
+ }
589
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers";
590
+ const body = JSON.stringify(input);
591
+ const stamp = await this.config.stamper.stamp(body);
592
+ return {
593
+ body: body,
594
+ stamp: stamp,
595
+ url: fullUrl,
596
+ };
597
+ };
221
598
  this.createPolicies = async (input) => {
222
599
  const { organizationId, timestampMs, ...rest } = input;
223
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
600
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
224
601
  return this.command("/public/v1/submit/create_policies", {
225
602
  parameters: rest,
226
603
  organizationId: organizationId ??
@@ -230,9 +607,22 @@ class TurnkeySDKClientBase {
230
607
  type: "ACTIVITY_TYPE_CREATE_POLICIES",
231
608
  }, "createPoliciesResult");
232
609
  };
610
+ this.stampCreatePolicies = async (input) => {
611
+ if (!this.config.stamper) {
612
+ return undefined;
613
+ }
614
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policies";
615
+ const body = JSON.stringify(input);
616
+ const stamp = await this.config.stamper.stamp(body);
617
+ return {
618
+ body: body,
619
+ stamp: stamp,
620
+ url: fullUrl,
621
+ };
622
+ };
233
623
  this.createPolicy = async (input) => {
234
624
  const { organizationId, timestampMs, ...rest } = input;
235
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
625
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
236
626
  return this.command("/public/v1/submit/create_policy", {
237
627
  parameters: rest,
238
628
  organizationId: organizationId ??
@@ -242,9 +632,22 @@ class TurnkeySDKClientBase {
242
632
  type: "ACTIVITY_TYPE_CREATE_POLICY_V3",
243
633
  }, "createPolicyResult");
244
634
  };
635
+ this.stampCreatePolicy = async (input) => {
636
+ if (!this.config.stamper) {
637
+ return undefined;
638
+ }
639
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policy";
640
+ const body = JSON.stringify(input);
641
+ const stamp = await this.config.stamper.stamp(body);
642
+ return {
643
+ body: body,
644
+ stamp: stamp,
645
+ url: fullUrl,
646
+ };
647
+ };
245
648
  this.createPrivateKeyTag = async (input) => {
246
649
  const { organizationId, timestampMs, ...rest } = input;
247
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
650
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
248
651
  return this.command("/public/v1/submit/create_private_key_tag", {
249
652
  parameters: rest,
250
653
  organizationId: organizationId ??
@@ -254,9 +657,22 @@ class TurnkeySDKClientBase {
254
657
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
255
658
  }, "createPrivateKeyTagResult");
256
659
  };
660
+ this.stampCreatePrivateKeyTag = async (input) => {
661
+ if (!this.config.stamper) {
662
+ return undefined;
663
+ }
664
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag";
665
+ const body = JSON.stringify(input);
666
+ const stamp = await this.config.stamper.stamp(body);
667
+ return {
668
+ body: body,
669
+ stamp: stamp,
670
+ url: fullUrl,
671
+ };
672
+ };
257
673
  this.createPrivateKeys = async (input) => {
258
674
  const { organizationId, timestampMs, ...rest } = input;
259
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
675
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
260
676
  return this.command("/public/v1/submit/create_private_keys", {
261
677
  parameters: rest,
262
678
  organizationId: organizationId ??
@@ -266,9 +682,22 @@ class TurnkeySDKClientBase {
266
682
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
267
683
  }, "createPrivateKeysResultV2");
268
684
  };
685
+ this.stampCreatePrivateKeys = async (input) => {
686
+ if (!this.config.stamper) {
687
+ return undefined;
688
+ }
689
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_keys";
690
+ const body = JSON.stringify(input);
691
+ const stamp = await this.config.stamper.stamp(body);
692
+ return {
693
+ body: body,
694
+ stamp: stamp,
695
+ url: fullUrl,
696
+ };
697
+ };
269
698
  this.createReadOnlySession = async (input) => {
270
699
  const { organizationId, timestampMs, ...rest } = input;
271
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
700
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
272
701
  return this.command("/public/v1/submit/create_read_only_session", {
273
702
  parameters: rest,
274
703
  organizationId: organizationId ??
@@ -278,9 +707,22 @@ class TurnkeySDKClientBase {
278
707
  type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
279
708
  }, "createReadOnlySessionResult");
280
709
  };
710
+ this.stampCreateReadOnlySession = async (input) => {
711
+ if (!this.config.stamper) {
712
+ return undefined;
713
+ }
714
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session";
715
+ const body = JSON.stringify(input);
716
+ const stamp = await this.config.stamper.stamp(body);
717
+ return {
718
+ body: body,
719
+ stamp: stamp,
720
+ url: fullUrl,
721
+ };
722
+ };
281
723
  this.createReadWriteSession = async (input) => {
282
724
  const { organizationId, timestampMs, ...rest } = input;
283
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
725
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
284
726
  return this.command("/public/v1/submit/create_read_write_session", {
285
727
  parameters: rest,
286
728
  organizationId: organizationId ??
@@ -290,9 +732,22 @@ class TurnkeySDKClientBase {
290
732
  type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
291
733
  }, "createReadWriteSessionResultV2");
292
734
  };
735
+ this.stampCreateReadWriteSession = async (input) => {
736
+ if (!this.config.stamper) {
737
+ return undefined;
738
+ }
739
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session";
740
+ const body = JSON.stringify(input);
741
+ const stamp = await this.config.stamper.stamp(body);
742
+ return {
743
+ body: body,
744
+ stamp: stamp,
745
+ url: fullUrl,
746
+ };
747
+ };
293
748
  this.createSubOrganization = async (input) => {
294
749
  const { organizationId, timestampMs, ...rest } = input;
295
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
750
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
296
751
  return this.command("/public/v1/submit/create_sub_organization", {
297
752
  parameters: rest,
298
753
  organizationId: organizationId ??
@@ -302,9 +757,22 @@ class TurnkeySDKClientBase {
302
757
  type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7",
303
758
  }, "createSubOrganizationResultV7");
304
759
  };
760
+ this.stampCreateSubOrganization = async (input) => {
761
+ if (!this.config.stamper) {
762
+ return undefined;
763
+ }
764
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization";
765
+ const body = JSON.stringify(input);
766
+ const stamp = await this.config.stamper.stamp(body);
767
+ return {
768
+ body: body,
769
+ stamp: stamp,
770
+ url: fullUrl,
771
+ };
772
+ };
305
773
  this.createUserTag = async (input) => {
306
774
  const { organizationId, timestampMs, ...rest } = input;
307
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
775
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
308
776
  return this.command("/public/v1/submit/create_user_tag", {
309
777
  parameters: rest,
310
778
  organizationId: organizationId ??
@@ -314,9 +782,22 @@ class TurnkeySDKClientBase {
314
782
  type: "ACTIVITY_TYPE_CREATE_USER_TAG",
315
783
  }, "createUserTagResult");
316
784
  };
785
+ this.stampCreateUserTag = async (input) => {
786
+ if (!this.config.stamper) {
787
+ return undefined;
788
+ }
789
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag";
790
+ const body = JSON.stringify(input);
791
+ const stamp = await this.config.stamper.stamp(body);
792
+ return {
793
+ body: body,
794
+ stamp: stamp,
795
+ url: fullUrl,
796
+ };
797
+ };
317
798
  this.createUsers = async (input) => {
318
799
  const { organizationId, timestampMs, ...rest } = input;
319
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
800
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
320
801
  return this.command("/public/v1/submit/create_users", {
321
802
  parameters: rest,
322
803
  organizationId: organizationId ??
@@ -326,9 +807,22 @@ class TurnkeySDKClientBase {
326
807
  type: "ACTIVITY_TYPE_CREATE_USERS_V2",
327
808
  }, "createUsersResult");
328
809
  };
810
+ this.stampCreateUsers = async (input) => {
811
+ if (!this.config.stamper) {
812
+ return undefined;
813
+ }
814
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users";
815
+ const body = JSON.stringify(input);
816
+ const stamp = await this.config.stamper.stamp(body);
817
+ return {
818
+ body: body,
819
+ stamp: stamp,
820
+ url: fullUrl,
821
+ };
822
+ };
329
823
  this.createWallet = async (input) => {
330
824
  const { organizationId, timestampMs, ...rest } = input;
331
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
825
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
332
826
  return this.command("/public/v1/submit/create_wallet", {
333
827
  parameters: rest,
334
828
  organizationId: organizationId ??
@@ -338,9 +832,22 @@ class TurnkeySDKClientBase {
338
832
  type: "ACTIVITY_TYPE_CREATE_WALLET",
339
833
  }, "createWalletResult");
340
834
  };
835
+ this.stampCreateWallet = async (input) => {
836
+ if (!this.config.stamper) {
837
+ return undefined;
838
+ }
839
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet";
840
+ const body = JSON.stringify(input);
841
+ const stamp = await this.config.stamper.stamp(body);
842
+ return {
843
+ body: body,
844
+ stamp: stamp,
845
+ url: fullUrl,
846
+ };
847
+ };
341
848
  this.createWalletAccounts = async (input) => {
342
849
  const { organizationId, timestampMs, ...rest } = input;
343
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
850
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
344
851
  return this.command("/public/v1/submit/create_wallet_accounts", {
345
852
  parameters: rest,
346
853
  organizationId: organizationId ??
@@ -350,9 +857,22 @@ class TurnkeySDKClientBase {
350
857
  type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
351
858
  }, "createWalletAccountsResult");
352
859
  };
860
+ this.stampCreateWalletAccounts = async (input) => {
861
+ if (!this.config.stamper) {
862
+ return undefined;
863
+ }
864
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts";
865
+ const body = JSON.stringify(input);
866
+ const stamp = await this.config.stamper.stamp(body);
867
+ return {
868
+ body: body,
869
+ stamp: stamp,
870
+ url: fullUrl,
871
+ };
872
+ };
353
873
  this.deleteApiKeys = async (input) => {
354
874
  const { organizationId, timestampMs, ...rest } = input;
355
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
875
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
356
876
  return this.command("/public/v1/submit/delete_api_keys", {
357
877
  parameters: rest,
358
878
  organizationId: organizationId ??
@@ -362,9 +882,22 @@ class TurnkeySDKClientBase {
362
882
  type: "ACTIVITY_TYPE_DELETE_API_KEYS",
363
883
  }, "deleteApiKeysResult");
364
884
  };
885
+ this.stampDeleteApiKeys = async (input) => {
886
+ if (!this.config.stamper) {
887
+ return undefined;
888
+ }
889
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys";
890
+ const body = JSON.stringify(input);
891
+ const stamp = await this.config.stamper.stamp(body);
892
+ return {
893
+ body: body,
894
+ stamp: stamp,
895
+ url: fullUrl,
896
+ };
897
+ };
365
898
  this.deleteAuthenticators = async (input) => {
366
899
  const { organizationId, timestampMs, ...rest } = input;
367
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
900
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
368
901
  return this.command("/public/v1/submit/delete_authenticators", {
369
902
  parameters: rest,
370
903
  organizationId: organizationId ??
@@ -374,9 +907,22 @@ class TurnkeySDKClientBase {
374
907
  type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
375
908
  }, "deleteAuthenticatorsResult");
376
909
  };
910
+ this.stampDeleteAuthenticators = async (input) => {
911
+ if (!this.config.stamper) {
912
+ return undefined;
913
+ }
914
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators";
915
+ const body = JSON.stringify(input);
916
+ const stamp = await this.config.stamper.stamp(body);
917
+ return {
918
+ body: body,
919
+ stamp: stamp,
920
+ url: fullUrl,
921
+ };
922
+ };
377
923
  this.deleteInvitation = async (input) => {
378
924
  const { organizationId, timestampMs, ...rest } = input;
379
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
925
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
380
926
  return this.command("/public/v1/submit/delete_invitation", {
381
927
  parameters: rest,
382
928
  organizationId: organizationId ??
@@ -386,9 +932,22 @@ class TurnkeySDKClientBase {
386
932
  type: "ACTIVITY_TYPE_DELETE_INVITATION",
387
933
  }, "deleteInvitationResult");
388
934
  };
935
+ this.stampDeleteInvitation = async (input) => {
936
+ if (!this.config.stamper) {
937
+ return undefined;
938
+ }
939
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_invitation";
940
+ const body = JSON.stringify(input);
941
+ const stamp = await this.config.stamper.stamp(body);
942
+ return {
943
+ body: body,
944
+ stamp: stamp,
945
+ url: fullUrl,
946
+ };
947
+ };
389
948
  this.deleteOauthProviders = async (input) => {
390
949
  const { organizationId, timestampMs, ...rest } = input;
391
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
950
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
392
951
  return this.command("/public/v1/submit/delete_oauth_providers", {
393
952
  parameters: rest,
394
953
  organizationId: organizationId ??
@@ -398,9 +957,22 @@ class TurnkeySDKClientBase {
398
957
  type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
399
958
  }, "deleteOauthProvidersResult");
400
959
  };
960
+ this.stampDeleteOauthProviders = async (input) => {
961
+ if (!this.config.stamper) {
962
+ return undefined;
963
+ }
964
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers";
965
+ const body = JSON.stringify(input);
966
+ const stamp = await this.config.stamper.stamp(body);
967
+ return {
968
+ body: body,
969
+ stamp: stamp,
970
+ url: fullUrl,
971
+ };
972
+ };
401
973
  this.deletePolicy = async (input) => {
402
974
  const { organizationId, timestampMs, ...rest } = input;
403
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
975
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
404
976
  return this.command("/public/v1/submit/delete_policy", {
405
977
  parameters: rest,
406
978
  organizationId: organizationId ??
@@ -410,9 +982,22 @@ class TurnkeySDKClientBase {
410
982
  type: "ACTIVITY_TYPE_DELETE_POLICY",
411
983
  }, "deletePolicyResult");
412
984
  };
985
+ this.stampDeletePolicy = async (input) => {
986
+ if (!this.config.stamper) {
987
+ return undefined;
988
+ }
989
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policy";
990
+ const body = JSON.stringify(input);
991
+ const stamp = await this.config.stamper.stamp(body);
992
+ return {
993
+ body: body,
994
+ stamp: stamp,
995
+ url: fullUrl,
996
+ };
997
+ };
413
998
  this.deletePrivateKeyTags = async (input) => {
414
999
  const { organizationId, timestampMs, ...rest } = input;
415
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1000
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
416
1001
  return this.command("/public/v1/submit/delete_private_key_tags", {
417
1002
  parameters: rest,
418
1003
  organizationId: organizationId ??
@@ -422,9 +1007,22 @@ class TurnkeySDKClientBase {
422
1007
  type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
423
1008
  }, "deletePrivateKeyTagsResult");
424
1009
  };
1010
+ this.stampDeletePrivateKeyTags = async (input) => {
1011
+ if (!this.config.stamper) {
1012
+ return undefined;
1013
+ }
1014
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags";
1015
+ const body = JSON.stringify(input);
1016
+ const stamp = await this.config.stamper.stamp(body);
1017
+ return {
1018
+ body: body,
1019
+ stamp: stamp,
1020
+ url: fullUrl,
1021
+ };
1022
+ };
425
1023
  this.deletePrivateKeys = async (input) => {
426
1024
  const { organizationId, timestampMs, ...rest } = input;
427
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1025
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
428
1026
  return this.command("/public/v1/submit/delete_private_keys", {
429
1027
  parameters: rest,
430
1028
  organizationId: organizationId ??
@@ -434,9 +1032,22 @@ class TurnkeySDKClientBase {
434
1032
  type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
435
1033
  }, "deletePrivateKeysResult");
436
1034
  };
1035
+ this.stampDeletePrivateKeys = async (input) => {
1036
+ if (!this.config.stamper) {
1037
+ return undefined;
1038
+ }
1039
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys";
1040
+ const body = JSON.stringify(input);
1041
+ const stamp = await this.config.stamper.stamp(body);
1042
+ return {
1043
+ body: body,
1044
+ stamp: stamp,
1045
+ url: fullUrl,
1046
+ };
1047
+ };
437
1048
  this.deleteSubOrganization = async (input) => {
438
1049
  const { organizationId, timestampMs, ...rest } = input;
439
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1050
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
440
1051
  return this.command("/public/v1/submit/delete_sub_organization", {
441
1052
  parameters: rest,
442
1053
  organizationId: organizationId ??
@@ -446,9 +1057,22 @@ class TurnkeySDKClientBase {
446
1057
  type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
447
1058
  }, "deleteSubOrganizationResult");
448
1059
  };
1060
+ this.stampDeleteSubOrganization = async (input) => {
1061
+ if (!this.config.stamper) {
1062
+ return undefined;
1063
+ }
1064
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization";
1065
+ const body = JSON.stringify(input);
1066
+ const stamp = await this.config.stamper.stamp(body);
1067
+ return {
1068
+ body: body,
1069
+ stamp: stamp,
1070
+ url: fullUrl,
1071
+ };
1072
+ };
449
1073
  this.deleteUserTags = async (input) => {
450
1074
  const { organizationId, timestampMs, ...rest } = input;
451
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1075
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
452
1076
  return this.command("/public/v1/submit/delete_user_tags", {
453
1077
  parameters: rest,
454
1078
  organizationId: organizationId ??
@@ -458,9 +1082,22 @@ class TurnkeySDKClientBase {
458
1082
  type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
459
1083
  }, "deleteUserTagsResult");
460
1084
  };
1085
+ this.stampDeleteUserTags = async (input) => {
1086
+ if (!this.config.stamper) {
1087
+ return undefined;
1088
+ }
1089
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags";
1090
+ const body = JSON.stringify(input);
1091
+ const stamp = await this.config.stamper.stamp(body);
1092
+ return {
1093
+ body: body,
1094
+ stamp: stamp,
1095
+ url: fullUrl,
1096
+ };
1097
+ };
461
1098
  this.deleteUsers = async (input) => {
462
1099
  const { organizationId, timestampMs, ...rest } = input;
463
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1100
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
464
1101
  return this.command("/public/v1/submit/delete_users", {
465
1102
  parameters: rest,
466
1103
  organizationId: organizationId ??
@@ -470,9 +1107,22 @@ class TurnkeySDKClientBase {
470
1107
  type: "ACTIVITY_TYPE_DELETE_USERS",
471
1108
  }, "deleteUsersResult");
472
1109
  };
1110
+ this.stampDeleteUsers = async (input) => {
1111
+ if (!this.config.stamper) {
1112
+ return undefined;
1113
+ }
1114
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users";
1115
+ const body = JSON.stringify(input);
1116
+ const stamp = await this.config.stamper.stamp(body);
1117
+ return {
1118
+ body: body,
1119
+ stamp: stamp,
1120
+ url: fullUrl,
1121
+ };
1122
+ };
473
1123
  this.deleteWallets = async (input) => {
474
1124
  const { organizationId, timestampMs, ...rest } = input;
475
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1125
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
476
1126
  return this.command("/public/v1/submit/delete_wallets", {
477
1127
  parameters: rest,
478
1128
  organizationId: organizationId ??
@@ -482,9 +1132,22 @@ class TurnkeySDKClientBase {
482
1132
  type: "ACTIVITY_TYPE_DELETE_WALLETS",
483
1133
  }, "deleteWalletsResult");
484
1134
  };
1135
+ this.stampDeleteWallets = async (input) => {
1136
+ if (!this.config.stamper) {
1137
+ return undefined;
1138
+ }
1139
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets";
1140
+ const body = JSON.stringify(input);
1141
+ const stamp = await this.config.stamper.stamp(body);
1142
+ return {
1143
+ body: body,
1144
+ stamp: stamp,
1145
+ url: fullUrl,
1146
+ };
1147
+ };
485
1148
  this.emailAuth = async (input) => {
486
1149
  const { organizationId, timestampMs, ...rest } = input;
487
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1150
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
488
1151
  return this.command("/public/v1/submit/email_auth", {
489
1152
  parameters: rest,
490
1153
  organizationId: organizationId ??
@@ -494,9 +1157,22 @@ class TurnkeySDKClientBase {
494
1157
  type: "ACTIVITY_TYPE_EMAIL_AUTH_V2",
495
1158
  }, "emailAuthResult");
496
1159
  };
1160
+ this.stampEmailAuth = async (input) => {
1161
+ if (!this.config.stamper) {
1162
+ return undefined;
1163
+ }
1164
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth";
1165
+ const body = JSON.stringify(input);
1166
+ const stamp = await this.config.stamper.stamp(body);
1167
+ return {
1168
+ body: body,
1169
+ stamp: stamp,
1170
+ url: fullUrl,
1171
+ };
1172
+ };
497
1173
  this.exportPrivateKey = async (input) => {
498
1174
  const { organizationId, timestampMs, ...rest } = input;
499
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1175
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
500
1176
  return this.command("/public/v1/submit/export_private_key", {
501
1177
  parameters: rest,
502
1178
  organizationId: organizationId ??
@@ -506,9 +1182,22 @@ class TurnkeySDKClientBase {
506
1182
  type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
507
1183
  }, "exportPrivateKeyResult");
508
1184
  };
1185
+ this.stampExportPrivateKey = async (input) => {
1186
+ if (!this.config.stamper) {
1187
+ return undefined;
1188
+ }
1189
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_private_key";
1190
+ const body = JSON.stringify(input);
1191
+ const stamp = await this.config.stamper.stamp(body);
1192
+ return {
1193
+ body: body,
1194
+ stamp: stamp,
1195
+ url: fullUrl,
1196
+ };
1197
+ };
509
1198
  this.exportWallet = async (input) => {
510
1199
  const { organizationId, timestampMs, ...rest } = input;
511
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1200
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
512
1201
  return this.command("/public/v1/submit/export_wallet", {
513
1202
  parameters: rest,
514
1203
  organizationId: organizationId ??
@@ -518,9 +1207,22 @@ class TurnkeySDKClientBase {
518
1207
  type: "ACTIVITY_TYPE_EXPORT_WALLET",
519
1208
  }, "exportWalletResult");
520
1209
  };
1210
+ this.stampExportWallet = async (input) => {
1211
+ if (!this.config.stamper) {
1212
+ return undefined;
1213
+ }
1214
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet";
1215
+ const body = JSON.stringify(input);
1216
+ const stamp = await this.config.stamper.stamp(body);
1217
+ return {
1218
+ body: body,
1219
+ stamp: stamp,
1220
+ url: fullUrl,
1221
+ };
1222
+ };
521
1223
  this.exportWalletAccount = async (input) => {
522
1224
  const { organizationId, timestampMs, ...rest } = input;
523
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1225
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
524
1226
  return this.command("/public/v1/submit/export_wallet_account", {
525
1227
  parameters: rest,
526
1228
  organizationId: organizationId ??
@@ -530,9 +1232,22 @@ class TurnkeySDKClientBase {
530
1232
  type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
531
1233
  }, "exportWalletAccountResult");
532
1234
  };
1235
+ this.stampExportWalletAccount = async (input) => {
1236
+ if (!this.config.stamper) {
1237
+ return undefined;
1238
+ }
1239
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account";
1240
+ const body = JSON.stringify(input);
1241
+ const stamp = await this.config.stamper.stamp(body);
1242
+ return {
1243
+ body: body,
1244
+ stamp: stamp,
1245
+ url: fullUrl,
1246
+ };
1247
+ };
533
1248
  this.importPrivateKey = async (input) => {
534
1249
  const { organizationId, timestampMs, ...rest } = input;
535
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1250
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
536
1251
  return this.command("/public/v1/submit/import_private_key", {
537
1252
  parameters: rest,
538
1253
  organizationId: organizationId ??
@@ -542,9 +1257,22 @@ class TurnkeySDKClientBase {
542
1257
  type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
543
1258
  }, "importPrivateKeyResult");
544
1259
  };
1260
+ this.stampImportPrivateKey = async (input) => {
1261
+ if (!this.config.stamper) {
1262
+ return undefined;
1263
+ }
1264
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_private_key";
1265
+ const body = JSON.stringify(input);
1266
+ const stamp = await this.config.stamper.stamp(body);
1267
+ return {
1268
+ body: body,
1269
+ stamp: stamp,
1270
+ url: fullUrl,
1271
+ };
1272
+ };
545
1273
  this.importWallet = async (input) => {
546
1274
  const { organizationId, timestampMs, ...rest } = input;
547
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1275
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
548
1276
  return this.command("/public/v1/submit/import_wallet", {
549
1277
  parameters: rest,
550
1278
  organizationId: organizationId ??
@@ -554,9 +1282,22 @@ class TurnkeySDKClientBase {
554
1282
  type: "ACTIVITY_TYPE_IMPORT_WALLET",
555
1283
  }, "importWalletResult");
556
1284
  };
1285
+ this.stampImportWallet = async (input) => {
1286
+ if (!this.config.stamper) {
1287
+ return undefined;
1288
+ }
1289
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_wallet";
1290
+ const body = JSON.stringify(input);
1291
+ const stamp = await this.config.stamper.stamp(body);
1292
+ return {
1293
+ body: body,
1294
+ stamp: stamp,
1295
+ url: fullUrl,
1296
+ };
1297
+ };
557
1298
  this.initImportPrivateKey = async (input) => {
558
1299
  const { organizationId, timestampMs, ...rest } = input;
559
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1300
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
560
1301
  return this.command("/public/v1/submit/init_import_private_key", {
561
1302
  parameters: rest,
562
1303
  organizationId: organizationId ??
@@ -566,9 +1307,22 @@ class TurnkeySDKClientBase {
566
1307
  type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
567
1308
  }, "initImportPrivateKeyResult");
568
1309
  };
1310
+ this.stampInitImportPrivateKey = async (input) => {
1311
+ if (!this.config.stamper) {
1312
+ return undefined;
1313
+ }
1314
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key";
1315
+ const body = JSON.stringify(input);
1316
+ const stamp = await this.config.stamper.stamp(body);
1317
+ return {
1318
+ body: body,
1319
+ stamp: stamp,
1320
+ url: fullUrl,
1321
+ };
1322
+ };
569
1323
  this.initImportWallet = async (input) => {
570
1324
  const { organizationId, timestampMs, ...rest } = input;
571
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1325
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
572
1326
  return this.command("/public/v1/submit/init_import_wallet", {
573
1327
  parameters: rest,
574
1328
  organizationId: organizationId ??
@@ -578,9 +1332,22 @@ class TurnkeySDKClientBase {
578
1332
  type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
579
1333
  }, "initImportWalletResult");
580
1334
  };
1335
+ this.stampInitImportWallet = async (input) => {
1336
+ if (!this.config.stamper) {
1337
+ return undefined;
1338
+ }
1339
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet";
1340
+ const body = JSON.stringify(input);
1341
+ const stamp = await this.config.stamper.stamp(body);
1342
+ return {
1343
+ body: body,
1344
+ stamp: stamp,
1345
+ url: fullUrl,
1346
+ };
1347
+ };
581
1348
  this.initOtpAuth = async (input) => {
582
1349
  const { organizationId, timestampMs, ...rest } = input;
583
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1350
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
584
1351
  return this.command("/public/v1/submit/init_otp_auth", {
585
1352
  parameters: rest,
586
1353
  organizationId: organizationId ??
@@ -590,9 +1357,22 @@ class TurnkeySDKClientBase {
590
1357
  type: "ACTIVITY_TYPE_INIT_OTP_AUTH",
591
1358
  }, "initOtpAuthResult");
592
1359
  };
1360
+ this.stampInitOtpAuth = async (input) => {
1361
+ if (!this.config.stamper) {
1362
+ return undefined;
1363
+ }
1364
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_otp_auth";
1365
+ const body = JSON.stringify(input);
1366
+ const stamp = await this.config.stamper.stamp(body);
1367
+ return {
1368
+ body: body,
1369
+ stamp: stamp,
1370
+ url: fullUrl,
1371
+ };
1372
+ };
593
1373
  this.initUserEmailRecovery = async (input) => {
594
1374
  const { organizationId, timestampMs, ...rest } = input;
595
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1375
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
596
1376
  return this.command("/public/v1/submit/init_user_email_recovery", {
597
1377
  parameters: rest,
598
1378
  organizationId: organizationId ??
@@ -602,9 +1382,22 @@ class TurnkeySDKClientBase {
602
1382
  type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY",
603
1383
  }, "initUserEmailRecoveryResult");
604
1384
  };
1385
+ this.stampInitUserEmailRecovery = async (input) => {
1386
+ if (!this.config.stamper) {
1387
+ return undefined;
1388
+ }
1389
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery";
1390
+ const body = JSON.stringify(input);
1391
+ const stamp = await this.config.stamper.stamp(body);
1392
+ return {
1393
+ body: body,
1394
+ stamp: stamp,
1395
+ url: fullUrl,
1396
+ };
1397
+ };
605
1398
  this.oauth = async (input) => {
606
1399
  const { organizationId, timestampMs, ...rest } = input;
607
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1400
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
608
1401
  return this.command("/public/v1/submit/oauth", {
609
1402
  parameters: rest,
610
1403
  organizationId: organizationId ??
@@ -614,9 +1407,22 @@ class TurnkeySDKClientBase {
614
1407
  type: "ACTIVITY_TYPE_OAUTH",
615
1408
  }, "oauthResult");
616
1409
  };
1410
+ this.stampOauth = async (input) => {
1411
+ if (!this.config.stamper) {
1412
+ return undefined;
1413
+ }
1414
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth";
1415
+ const body = JSON.stringify(input);
1416
+ const stamp = await this.config.stamper.stamp(body);
1417
+ return {
1418
+ body: body,
1419
+ stamp: stamp,
1420
+ url: fullUrl,
1421
+ };
1422
+ };
617
1423
  this.otpAuth = async (input) => {
618
1424
  const { organizationId, timestampMs, ...rest } = input;
619
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1425
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
620
1426
  return this.command("/public/v1/submit/otp_auth", {
621
1427
  parameters: rest,
622
1428
  organizationId: organizationId ??
@@ -626,9 +1432,22 @@ class TurnkeySDKClientBase {
626
1432
  type: "ACTIVITY_TYPE_OTP_AUTH",
627
1433
  }, "otpAuthResult");
628
1434
  };
1435
+ this.stampOtpAuth = async (input) => {
1436
+ if (!this.config.stamper) {
1437
+ return undefined;
1438
+ }
1439
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/otp_auth";
1440
+ const body = JSON.stringify(input);
1441
+ const stamp = await this.config.stamper.stamp(body);
1442
+ return {
1443
+ body: body,
1444
+ stamp: stamp,
1445
+ url: fullUrl,
1446
+ };
1447
+ };
629
1448
  this.recoverUser = async (input) => {
630
1449
  const { organizationId, timestampMs, ...rest } = input;
631
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1450
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
632
1451
  return this.command("/public/v1/submit/recover_user", {
633
1452
  parameters: rest,
634
1453
  organizationId: organizationId ??
@@ -638,9 +1457,22 @@ class TurnkeySDKClientBase {
638
1457
  type: "ACTIVITY_TYPE_RECOVER_USER",
639
1458
  }, "recoverUserResult");
640
1459
  };
1460
+ this.stampRecoverUser = async (input) => {
1461
+ if (!this.config.stamper) {
1462
+ return undefined;
1463
+ }
1464
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/recover_user";
1465
+ const body = JSON.stringify(input);
1466
+ const stamp = await this.config.stamper.stamp(body);
1467
+ return {
1468
+ body: body,
1469
+ stamp: stamp,
1470
+ url: fullUrl,
1471
+ };
1472
+ };
641
1473
  this.rejectActivity = async (input) => {
642
1474
  const { organizationId, timestampMs, ...rest } = input;
643
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1475
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
644
1476
  return this.activityDecision("/public/v1/submit/reject_activity", {
645
1477
  parameters: rest,
646
1478
  organizationId: organizationId ??
@@ -650,9 +1482,22 @@ class TurnkeySDKClientBase {
650
1482
  type: "ACTIVITY_TYPE_REJECT_ACTIVITY",
651
1483
  });
652
1484
  };
1485
+ this.stampRejectActivity = async (input) => {
1486
+ if (!this.config.stamper) {
1487
+ return undefined;
1488
+ }
1489
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/reject_activity";
1490
+ const body = JSON.stringify(input);
1491
+ const stamp = await this.config.stamper.stamp(body);
1492
+ return {
1493
+ body: body,
1494
+ stamp: stamp,
1495
+ url: fullUrl,
1496
+ };
1497
+ };
653
1498
  this.removeOrganizationFeature = async (input) => {
654
1499
  const { organizationId, timestampMs, ...rest } = input;
655
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1500
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
656
1501
  return this.command("/public/v1/submit/remove_organization_feature", {
657
1502
  parameters: rest,
658
1503
  organizationId: organizationId ??
@@ -662,9 +1507,22 @@ class TurnkeySDKClientBase {
662
1507
  type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
663
1508
  }, "removeOrganizationFeatureResult");
664
1509
  };
1510
+ this.stampRemoveOrganizationFeature = async (input) => {
1511
+ if (!this.config.stamper) {
1512
+ return undefined;
1513
+ }
1514
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature";
1515
+ const body = JSON.stringify(input);
1516
+ const stamp = await this.config.stamper.stamp(body);
1517
+ return {
1518
+ body: body,
1519
+ stamp: stamp,
1520
+ url: fullUrl,
1521
+ };
1522
+ };
665
1523
  this.setOrganizationFeature = async (input) => {
666
1524
  const { organizationId, timestampMs, ...rest } = input;
667
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1525
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
668
1526
  return this.command("/public/v1/submit/set_organization_feature", {
669
1527
  parameters: rest,
670
1528
  organizationId: organizationId ??
@@ -674,9 +1532,22 @@ class TurnkeySDKClientBase {
674
1532
  type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
675
1533
  }, "setOrganizationFeatureResult");
676
1534
  };
1535
+ this.stampSetOrganizationFeature = async (input) => {
1536
+ if (!this.config.stamper) {
1537
+ return undefined;
1538
+ }
1539
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature";
1540
+ const body = JSON.stringify(input);
1541
+ const stamp = await this.config.stamper.stamp(body);
1542
+ return {
1543
+ body: body,
1544
+ stamp: stamp,
1545
+ url: fullUrl,
1546
+ };
1547
+ };
677
1548
  this.signRawPayload = async (input) => {
678
1549
  const { organizationId, timestampMs, ...rest } = input;
679
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1550
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
680
1551
  return this.command("/public/v1/submit/sign_raw_payload", {
681
1552
  parameters: rest,
682
1553
  organizationId: organizationId ??
@@ -686,9 +1557,22 @@ class TurnkeySDKClientBase {
686
1557
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
687
1558
  }, "signRawPayloadResult");
688
1559
  };
1560
+ this.stampSignRawPayload = async (input) => {
1561
+ if (!this.config.stamper) {
1562
+ return undefined;
1563
+ }
1564
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload";
1565
+ const body = JSON.stringify(input);
1566
+ const stamp = await this.config.stamper.stamp(body);
1567
+ return {
1568
+ body: body,
1569
+ stamp: stamp,
1570
+ url: fullUrl,
1571
+ };
1572
+ };
689
1573
  this.signRawPayloads = async (input) => {
690
1574
  const { organizationId, timestampMs, ...rest } = input;
691
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1575
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
692
1576
  return this.command("/public/v1/submit/sign_raw_payloads", {
693
1577
  parameters: rest,
694
1578
  organizationId: organizationId ??
@@ -698,9 +1582,22 @@ class TurnkeySDKClientBase {
698
1582
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
699
1583
  }, "signRawPayloadsResult");
700
1584
  };
1585
+ this.stampSignRawPayloads = async (input) => {
1586
+ if (!this.config.stamper) {
1587
+ return undefined;
1588
+ }
1589
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads";
1590
+ const body = JSON.stringify(input);
1591
+ const stamp = await this.config.stamper.stamp(body);
1592
+ return {
1593
+ body: body,
1594
+ stamp: stamp,
1595
+ url: fullUrl,
1596
+ };
1597
+ };
701
1598
  this.signTransaction = async (input) => {
702
1599
  const { organizationId, timestampMs, ...rest } = input;
703
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1600
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
704
1601
  return this.command("/public/v1/submit/sign_transaction", {
705
1602
  parameters: rest,
706
1603
  organizationId: organizationId ??
@@ -710,9 +1607,22 @@ class TurnkeySDKClientBase {
710
1607
  type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
711
1608
  }, "signTransactionResult");
712
1609
  };
1610
+ this.stampSignTransaction = async (input) => {
1611
+ if (!this.config.stamper) {
1612
+ return undefined;
1613
+ }
1614
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_transaction";
1615
+ const body = JSON.stringify(input);
1616
+ const stamp = await this.config.stamper.stamp(body);
1617
+ return {
1618
+ body: body,
1619
+ stamp: stamp,
1620
+ url: fullUrl,
1621
+ };
1622
+ };
713
1623
  this.updatePolicy = async (input) => {
714
1624
  const { organizationId, timestampMs, ...rest } = input;
715
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1625
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
716
1626
  return this.command("/public/v1/submit/update_policy", {
717
1627
  parameters: rest,
718
1628
  organizationId: organizationId ??
@@ -722,9 +1632,22 @@ class TurnkeySDKClientBase {
722
1632
  type: "ACTIVITY_TYPE_UPDATE_POLICY",
723
1633
  }, "updatePolicyResult");
724
1634
  };
1635
+ this.stampUpdatePolicy = async (input) => {
1636
+ if (!this.config.stamper) {
1637
+ return undefined;
1638
+ }
1639
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_policy";
1640
+ const body = JSON.stringify(input);
1641
+ const stamp = await this.config.stamper.stamp(body);
1642
+ return {
1643
+ body: body,
1644
+ stamp: stamp,
1645
+ url: fullUrl,
1646
+ };
1647
+ };
725
1648
  this.updatePrivateKeyTag = async (input) => {
726
1649
  const { organizationId, timestampMs, ...rest } = input;
727
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1650
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
728
1651
  return this.command("/public/v1/submit/update_private_key_tag", {
729
1652
  parameters: rest,
730
1653
  organizationId: organizationId ??
@@ -734,9 +1657,22 @@ class TurnkeySDKClientBase {
734
1657
  type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
735
1658
  }, "updatePrivateKeyTagResult");
736
1659
  };
1660
+ this.stampUpdatePrivateKeyTag = async (input) => {
1661
+ if (!this.config.stamper) {
1662
+ return undefined;
1663
+ }
1664
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag";
1665
+ const body = JSON.stringify(input);
1666
+ const stamp = await this.config.stamper.stamp(body);
1667
+ return {
1668
+ body: body,
1669
+ stamp: stamp,
1670
+ url: fullUrl,
1671
+ };
1672
+ };
737
1673
  this.updateRootQuorum = async (input) => {
738
1674
  const { organizationId, timestampMs, ...rest } = input;
739
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1675
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
740
1676
  return this.command("/public/v1/submit/update_root_quorum", {
741
1677
  parameters: rest,
742
1678
  organizationId: organizationId ??
@@ -746,9 +1682,22 @@ class TurnkeySDKClientBase {
746
1682
  type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
747
1683
  }, "updateRootQuorumResult");
748
1684
  };
1685
+ this.stampUpdateRootQuorum = async (input) => {
1686
+ if (!this.config.stamper) {
1687
+ return undefined;
1688
+ }
1689
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum";
1690
+ const body = JSON.stringify(input);
1691
+ const stamp = await this.config.stamper.stamp(body);
1692
+ return {
1693
+ body: body,
1694
+ stamp: stamp,
1695
+ url: fullUrl,
1696
+ };
1697
+ };
749
1698
  this.updateUser = async (input) => {
750
1699
  const { organizationId, timestampMs, ...rest } = input;
751
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1700
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
752
1701
  return this.command("/public/v1/submit/update_user", {
753
1702
  parameters: rest,
754
1703
  organizationId: organizationId ??
@@ -758,9 +1707,22 @@ class TurnkeySDKClientBase {
758
1707
  type: "ACTIVITY_TYPE_UPDATE_USER",
759
1708
  }, "updateUserResult");
760
1709
  };
1710
+ this.stampUpdateUser = async (input) => {
1711
+ if (!this.config.stamper) {
1712
+ return undefined;
1713
+ }
1714
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user";
1715
+ const body = JSON.stringify(input);
1716
+ const stamp = await this.config.stamper.stamp(body);
1717
+ return {
1718
+ body: body,
1719
+ stamp: stamp,
1720
+ url: fullUrl,
1721
+ };
1722
+ };
761
1723
  this.updateUserTag = async (input) => {
762
1724
  const { organizationId, timestampMs, ...rest } = input;
763
- const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
1725
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.UserSession);
764
1726
  return this.command("/public/v1/submit/update_user_tag", {
765
1727
  parameters: rest,
766
1728
  organizationId: organizationId ??
@@ -770,6 +1732,19 @@ class TurnkeySDKClientBase {
770
1732
  type: "ACTIVITY_TYPE_UPDATE_USER_TAG",
771
1733
  }, "updateUserTagResult");
772
1734
  };
1735
+ this.stampUpdateUserTag = async (input) => {
1736
+ if (!this.config.stamper) {
1737
+ return undefined;
1738
+ }
1739
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_tag";
1740
+ const body = JSON.stringify(input);
1741
+ const stamp = await this.config.stamper.stamp(body);
1742
+ return {
1743
+ body: body,
1744
+ stamp: stamp,
1745
+ url: fullUrl,
1746
+ };
1747
+ };
773
1748
  this.config = config;
774
1749
  }
775
1750
  async request(url, body) {