@turnkey/core 1.11.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__clients__/core.d.ts +41 -8
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +72 -7
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +72 -7
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +6 -10
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +95 -158
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +95 -158
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/version.d.ts +1 -1
- package/dist/__generated__/version.js +1 -1
- package/dist/__generated__/version.mjs +1 -1
- package/dist/__stampers__/api/base.d.ts +0 -1
- package/dist/__stampers__/api/base.d.ts.map +1 -1
- package/dist/__stampers__/api/base.js +0 -6
- package/dist/__stampers__/api/base.js.map +1 -1
- package/dist/__stampers__/api/base.mjs +0 -6
- package/dist/__stampers__/api/base.mjs.map +1 -1
- package/dist/__stampers__/api/mobile/stamper.d.ts +1 -1
- package/dist/__stampers__/api/mobile/stamper.d.ts.map +1 -1
- package/dist/__stampers__/api/mobile/stamper.js +41 -10
- package/dist/__stampers__/api/mobile/stamper.js.map +1 -1
- package/dist/__stampers__/api/mobile/stamper.mjs +41 -10
- package/dist/__stampers__/api/mobile/stamper.mjs.map +1 -1
- package/dist/__stampers__/api/web/stamper.d.ts +0 -1
- package/dist/__stampers__/api/web/stamper.d.ts.map +1 -1
- package/dist/__stampers__/api/web/stamper.js +0 -13
- package/dist/__stampers__/api/web/stamper.js.map +1 -1
- package/dist/__stampers__/api/web/stamper.mjs +0 -13
- package/dist/__stampers__/api/web/stamper.mjs.map +1 -1
- package/dist/__types__/auth.d.ts +0 -1
- package/dist/__types__/auth.d.ts.map +1 -1
- package/dist/__types__/method-types/shared.d.ts +12 -0
- package/dist/__types__/method-types/shared.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -97,36 +97,6 @@ class TurnkeySDKClientBase {
|
|
|
97
97
|
url: fullUrl,
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
-
this.getAttestationDocument = async (input, stampWith) => {
|
|
101
|
-
const session = await this.storageManager?.getActiveSession();
|
|
102
|
-
return this.request("/public/v1/query/get_attestation", {
|
|
103
|
-
...input,
|
|
104
|
-
organizationId: input.organizationId ??
|
|
105
|
-
session?.organizationId ??
|
|
106
|
-
this.config.organizationId,
|
|
107
|
-
}, stampWith);
|
|
108
|
-
};
|
|
109
|
-
this.stampGetAttestationDocument = async (input, stampWith) => {
|
|
110
|
-
const activeStamper = this.getStamper(stampWith);
|
|
111
|
-
if (!activeStamper) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
const session = await this.storageManager?.getActiveSession();
|
|
115
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation";
|
|
116
|
-
const body = {
|
|
117
|
-
...input,
|
|
118
|
-
organizationId: input.organizationId ??
|
|
119
|
-
session?.organizationId ??
|
|
120
|
-
this.config.organizationId,
|
|
121
|
-
};
|
|
122
|
-
const stringifiedBody = JSON.stringify(body);
|
|
123
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
124
|
-
return {
|
|
125
|
-
body: stringifiedBody,
|
|
126
|
-
stamp: stamp,
|
|
127
|
-
url: fullUrl,
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
100
|
this.getAuthenticator = async (input, stampWith) => {
|
|
131
101
|
const session = await this.storageManager?.getActiveSession();
|
|
132
102
|
return this.request("/public/v1/query/get_authenticator", {
|
|
@@ -397,36 +367,6 @@ class TurnkeySDKClientBase {
|
|
|
397
367
|
url: fullUrl,
|
|
398
368
|
};
|
|
399
369
|
};
|
|
400
|
-
this.getOrganization = async (input = {}, stampWith) => {
|
|
401
|
-
const session = await this.storageManager?.getActiveSession();
|
|
402
|
-
return this.request("/public/v1/query/get_organization", {
|
|
403
|
-
...input,
|
|
404
|
-
organizationId: input.organizationId ??
|
|
405
|
-
session?.organizationId ??
|
|
406
|
-
this.config.organizationId,
|
|
407
|
-
}, stampWith);
|
|
408
|
-
};
|
|
409
|
-
this.stampGetOrganization = async (input, stampWith) => {
|
|
410
|
-
const activeStamper = this.getStamper(stampWith);
|
|
411
|
-
if (!activeStamper) {
|
|
412
|
-
return undefined;
|
|
413
|
-
}
|
|
414
|
-
const session = await this.storageManager?.getActiveSession();
|
|
415
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization";
|
|
416
|
-
const body = {
|
|
417
|
-
...input,
|
|
418
|
-
organizationId: input.organizationId ??
|
|
419
|
-
session?.organizationId ??
|
|
420
|
-
this.config.organizationId,
|
|
421
|
-
};
|
|
422
|
-
const stringifiedBody = JSON.stringify(body);
|
|
423
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
424
|
-
return {
|
|
425
|
-
body: stringifiedBody,
|
|
426
|
-
stamp: stamp,
|
|
427
|
-
url: fullUrl,
|
|
428
|
-
};
|
|
429
|
-
};
|
|
430
370
|
this.getOrganizationConfigs = async (input, stampWith) => {
|
|
431
371
|
const session = await this.storageManager?.getActiveSession();
|
|
432
372
|
return this.request("/public/v1/query/get_organization_configs", {
|
|
@@ -697,6 +637,36 @@ class TurnkeySDKClientBase {
|
|
|
697
637
|
url: fullUrl,
|
|
698
638
|
};
|
|
699
639
|
};
|
|
640
|
+
this.getWalletAddressBalances = async (input, stampWith) => {
|
|
641
|
+
const session = await this.storageManager?.getActiveSession();
|
|
642
|
+
return this.request("/public/v1/query/get_wallet_address_balances", {
|
|
643
|
+
...input,
|
|
644
|
+
organizationId: input.organizationId ??
|
|
645
|
+
session?.organizationId ??
|
|
646
|
+
this.config.organizationId,
|
|
647
|
+
}, stampWith);
|
|
648
|
+
};
|
|
649
|
+
this.stampGetWalletAddressBalances = async (input, stampWith) => {
|
|
650
|
+
const activeStamper = this.getStamper(stampWith);
|
|
651
|
+
if (!activeStamper) {
|
|
652
|
+
return undefined;
|
|
653
|
+
}
|
|
654
|
+
const session = await this.storageManager?.getActiveSession();
|
|
655
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet_address_balances";
|
|
656
|
+
const body = {
|
|
657
|
+
...input,
|
|
658
|
+
organizationId: input.organizationId ??
|
|
659
|
+
session?.organizationId ??
|
|
660
|
+
this.config.organizationId,
|
|
661
|
+
};
|
|
662
|
+
const stringifiedBody = JSON.stringify(body);
|
|
663
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
664
|
+
return {
|
|
665
|
+
body: stringifiedBody,
|
|
666
|
+
stamp: stamp,
|
|
667
|
+
url: fullUrl,
|
|
668
|
+
};
|
|
669
|
+
};
|
|
700
670
|
this.getActivities = async (input = {}, stampWith) => {
|
|
701
671
|
const session = await this.storageManager?.getActiveSession();
|
|
702
672
|
return this.request("/public/v1/query/list_activities", {
|
|
@@ -968,6 +938,36 @@ class TurnkeySDKClientBase {
|
|
|
968
938
|
url: fullUrl,
|
|
969
939
|
};
|
|
970
940
|
};
|
|
941
|
+
this.listSupportedAssets = async (input, stampWith) => {
|
|
942
|
+
const session = await this.storageManager?.getActiveSession();
|
|
943
|
+
return this.request("/public/v1/query/list_supported_assets", {
|
|
944
|
+
...input,
|
|
945
|
+
organizationId: input.organizationId ??
|
|
946
|
+
session?.organizationId ??
|
|
947
|
+
this.config.organizationId,
|
|
948
|
+
}, stampWith);
|
|
949
|
+
};
|
|
950
|
+
this.stampListSupportedAssets = async (input, stampWith) => {
|
|
951
|
+
const activeStamper = this.getStamper(stampWith);
|
|
952
|
+
if (!activeStamper) {
|
|
953
|
+
return undefined;
|
|
954
|
+
}
|
|
955
|
+
const session = await this.storageManager?.getActiveSession();
|
|
956
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_supported_assets";
|
|
957
|
+
const body = {
|
|
958
|
+
...input,
|
|
959
|
+
organizationId: input.organizationId ??
|
|
960
|
+
session?.organizationId ??
|
|
961
|
+
this.config.organizationId,
|
|
962
|
+
};
|
|
963
|
+
const stringifiedBody = JSON.stringify(body);
|
|
964
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
965
|
+
return {
|
|
966
|
+
body: stringifiedBody,
|
|
967
|
+
stamp: stamp,
|
|
968
|
+
url: fullUrl,
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
971
|
this.listUserTags = async (input = {}, stampWith) => {
|
|
972
972
|
const session = await this.storageManager?.getActiveSession();
|
|
973
973
|
return this.request("/public/v1/query/list_user_tags", {
|
|
@@ -1216,40 +1216,6 @@ class TurnkeySDKClientBase {
|
|
|
1216
1216
|
url: fullUrl,
|
|
1217
1217
|
};
|
|
1218
1218
|
};
|
|
1219
|
-
this.createApiOnlyUsers = async (input, stampWith) => {
|
|
1220
|
-
const { organizationId, timestampMs, ...rest } = input;
|
|
1221
|
-
const session = await this.storageManager?.getActiveSession();
|
|
1222
|
-
return this.activity("/public/v1/submit/create_api_only_users", {
|
|
1223
|
-
parameters: rest,
|
|
1224
|
-
organizationId: organizationId ??
|
|
1225
|
-
session?.organizationId ??
|
|
1226
|
-
this.config.organizationId,
|
|
1227
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
1228
|
-
type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
|
|
1229
|
-
}, "createApiOnlyUsersResult", stampWith);
|
|
1230
|
-
};
|
|
1231
|
-
this.stampCreateApiOnlyUsers = async (input, stampWith) => {
|
|
1232
|
-
const activeStamper = this.getStamper(stampWith);
|
|
1233
|
-
if (!activeStamper) {
|
|
1234
|
-
return undefined;
|
|
1235
|
-
}
|
|
1236
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
1237
|
-
const session = await this.storageManager?.getActiveSession();
|
|
1238
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users";
|
|
1239
|
-
const bodyWithType = {
|
|
1240
|
-
parameters,
|
|
1241
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
1242
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
1243
|
-
type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
|
|
1244
|
-
};
|
|
1245
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1246
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1247
|
-
return {
|
|
1248
|
-
body: stringifiedBody,
|
|
1249
|
-
stamp: stamp,
|
|
1250
|
-
url: fullUrl,
|
|
1251
|
-
};
|
|
1252
|
-
};
|
|
1253
1219
|
this.createAuthenticators = async (input, stampWith) => {
|
|
1254
1220
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1255
1221
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2410,40 +2376,6 @@ class TurnkeySDKClientBase {
|
|
|
2410
2376
|
url: fullUrl,
|
|
2411
2377
|
};
|
|
2412
2378
|
};
|
|
2413
|
-
this.ethSendRawTransaction = async (input, stampWith) => {
|
|
2414
|
-
const { organizationId, timestampMs, ...rest } = input;
|
|
2415
|
-
const session = await this.storageManager?.getActiveSession();
|
|
2416
|
-
return this.activity("/public/v1/submit/eth_send_raw_transaction", {
|
|
2417
|
-
parameters: rest,
|
|
2418
|
-
organizationId: organizationId ??
|
|
2419
|
-
session?.organizationId ??
|
|
2420
|
-
this.config.organizationId,
|
|
2421
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
2422
|
-
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2423
|
-
}, "ethSendRawTransactionResult", stampWith);
|
|
2424
|
-
};
|
|
2425
|
-
this.stampEthSendRawTransaction = async (input, stampWith) => {
|
|
2426
|
-
const activeStamper = this.getStamper(stampWith);
|
|
2427
|
-
if (!activeStamper) {
|
|
2428
|
-
return undefined;
|
|
2429
|
-
}
|
|
2430
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
2431
|
-
const session = await this.storageManager?.getActiveSession();
|
|
2432
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_raw_transaction";
|
|
2433
|
-
const bodyWithType = {
|
|
2434
|
-
parameters,
|
|
2435
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2436
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
2437
|
-
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2438
|
-
};
|
|
2439
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2440
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2441
|
-
return {
|
|
2442
|
-
body: stringifiedBody,
|
|
2443
|
-
stamp: stamp,
|
|
2444
|
-
url: fullUrl,
|
|
2445
|
-
};
|
|
2446
|
-
};
|
|
2447
2379
|
this.ethSendTransaction = async (input, stampWith) => {
|
|
2448
2380
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2449
2381
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3260,6 +3192,40 @@ class TurnkeySDKClientBase {
|
|
|
3260
3192
|
url: fullUrl,
|
|
3261
3193
|
};
|
|
3262
3194
|
};
|
|
3195
|
+
this.solSendTransaction = async (input, stampWith) => {
|
|
3196
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3197
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3198
|
+
return this.activity("/public/v1/submit/sol_send_transaction", {
|
|
3199
|
+
parameters: rest,
|
|
3200
|
+
organizationId: organizationId ??
|
|
3201
|
+
session?.organizationId ??
|
|
3202
|
+
this.config.organizationId,
|
|
3203
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3204
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
3205
|
+
}, "solSendTransactionResult", stampWith);
|
|
3206
|
+
};
|
|
3207
|
+
this.stampSolSendTransaction = async (input, stampWith) => {
|
|
3208
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3209
|
+
if (!activeStamper) {
|
|
3210
|
+
return undefined;
|
|
3211
|
+
}
|
|
3212
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3213
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3214
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
|
|
3215
|
+
const bodyWithType = {
|
|
3216
|
+
parameters,
|
|
3217
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3218
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3219
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
3220
|
+
};
|
|
3221
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3222
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3223
|
+
return {
|
|
3224
|
+
body: stringifiedBody,
|
|
3225
|
+
stamp: stamp,
|
|
3226
|
+
url: fullUrl,
|
|
3227
|
+
};
|
|
3228
|
+
};
|
|
3263
3229
|
this.stampLogin = async (input, stampWith) => {
|
|
3264
3230
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3265
3231
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3703,36 +3669,6 @@ class TurnkeySDKClientBase {
|
|
|
3703
3669
|
url: fullUrl,
|
|
3704
3670
|
};
|
|
3705
3671
|
};
|
|
3706
|
-
this.testRateLimits = async (input, stampWith) => {
|
|
3707
|
-
const session = await this.storageManager?.getActiveSession();
|
|
3708
|
-
return this.request("/tkhq/api/v1/test_rate_limits", {
|
|
3709
|
-
...input,
|
|
3710
|
-
organizationId: input.organizationId ??
|
|
3711
|
-
session?.organizationId ??
|
|
3712
|
-
this.config.organizationId,
|
|
3713
|
-
}, stampWith);
|
|
3714
|
-
};
|
|
3715
|
-
this.stampTestRateLimits = async (input, stampWith) => {
|
|
3716
|
-
const activeStamper = this.getStamper(stampWith);
|
|
3717
|
-
if (!activeStamper) {
|
|
3718
|
-
return undefined;
|
|
3719
|
-
}
|
|
3720
|
-
const session = await this.storageManager?.getActiveSession();
|
|
3721
|
-
const fullUrl = this.config.apiBaseUrl + "/tkhq/api/v1/test_rate_limits";
|
|
3722
|
-
const body = {
|
|
3723
|
-
...input,
|
|
3724
|
-
organizationId: input.organizationId ??
|
|
3725
|
-
session?.organizationId ??
|
|
3726
|
-
this.config.organizationId,
|
|
3727
|
-
};
|
|
3728
|
-
const stringifiedBody = JSON.stringify(body);
|
|
3729
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3730
|
-
return {
|
|
3731
|
-
body: stringifiedBody,
|
|
3732
|
-
stamp: stamp,
|
|
3733
|
-
url: fullUrl,
|
|
3734
|
-
};
|
|
3735
|
-
};
|
|
3736
3672
|
this.proxyGetAccount = async (input) => {
|
|
3737
3673
|
return this.authProxyRequest("/v1/account", input);
|
|
3738
3674
|
};
|
|
@@ -3855,6 +3791,7 @@ class TurnkeySDKClientBase {
|
|
|
3855
3791
|
const fullUrl = this.config.apiBaseUrl + url;
|
|
3856
3792
|
const stringifiedBody = JSON.stringify(body);
|
|
3857
3793
|
var headers = {
|
|
3794
|
+
"Content-Type": "application/json",
|
|
3858
3795
|
"X-Client-Version": VERSION,
|
|
3859
3796
|
};
|
|
3860
3797
|
// Use the specified stamper for this request
|