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