@turnkey/core 1.11.2 → 1.13.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 +62 -9
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +149 -36
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +149 -36
- package/dist/__clients__/core.mjs.map +1 -1
- package/dist/__generated__/sdk-client-base.d.ts +8 -8
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +128 -124
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +128 -124
- 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/__types__/method-types/shared.d.ts +29 -0
- package/dist/__types__/method-types/shared.d.ts.map +1 -1
- package/dist/__wallet__/web/native/solana.js +1 -1
- package/dist/__wallet__/web/native/solana.js.map +1 -1
- package/dist/__wallet__/web/native/solana.mjs +1 -1
- package/dist/__wallet__/web/native/solana.mjs.map +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +11 -10
|
@@ -99,36 +99,6 @@ class TurnkeySDKClientBase {
|
|
|
99
99
|
url: fullUrl,
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
this.getAttestationDocument = async (input, stampWith) => {
|
|
103
|
-
const session = await this.storageManager?.getActiveSession();
|
|
104
|
-
return this.request("/public/v1/query/get_attestation", {
|
|
105
|
-
...input,
|
|
106
|
-
organizationId: input.organizationId ??
|
|
107
|
-
session?.organizationId ??
|
|
108
|
-
this.config.organizationId,
|
|
109
|
-
}, stampWith);
|
|
110
|
-
};
|
|
111
|
-
this.stampGetAttestationDocument = async (input, stampWith) => {
|
|
112
|
-
const activeStamper = this.getStamper(stampWith);
|
|
113
|
-
if (!activeStamper) {
|
|
114
|
-
return undefined;
|
|
115
|
-
}
|
|
116
|
-
const session = await this.storageManager?.getActiveSession();
|
|
117
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation";
|
|
118
|
-
const body = {
|
|
119
|
-
...input,
|
|
120
|
-
organizationId: input.organizationId ??
|
|
121
|
-
session?.organizationId ??
|
|
122
|
-
this.config.organizationId,
|
|
123
|
-
};
|
|
124
|
-
const stringifiedBody = JSON.stringify(body);
|
|
125
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
126
|
-
return {
|
|
127
|
-
body: stringifiedBody,
|
|
128
|
-
stamp: stamp,
|
|
129
|
-
url: fullUrl,
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
102
|
this.getAuthenticator = async (input, stampWith) => {
|
|
133
103
|
const session = await this.storageManager?.getActiveSession();
|
|
134
104
|
return this.request("/public/v1/query/get_authenticator", {
|
|
@@ -399,36 +369,6 @@ class TurnkeySDKClientBase {
|
|
|
399
369
|
url: fullUrl,
|
|
400
370
|
};
|
|
401
371
|
};
|
|
402
|
-
this.getOrganization = async (input = {}, stampWith) => {
|
|
403
|
-
const session = await this.storageManager?.getActiveSession();
|
|
404
|
-
return this.request("/public/v1/query/get_organization", {
|
|
405
|
-
...input,
|
|
406
|
-
organizationId: input.organizationId ??
|
|
407
|
-
session?.organizationId ??
|
|
408
|
-
this.config.organizationId,
|
|
409
|
-
}, stampWith);
|
|
410
|
-
};
|
|
411
|
-
this.stampGetOrganization = async (input, stampWith) => {
|
|
412
|
-
const activeStamper = this.getStamper(stampWith);
|
|
413
|
-
if (!activeStamper) {
|
|
414
|
-
return undefined;
|
|
415
|
-
}
|
|
416
|
-
const session = await this.storageManager?.getActiveSession();
|
|
417
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization";
|
|
418
|
-
const body = {
|
|
419
|
-
...input,
|
|
420
|
-
organizationId: input.organizationId ??
|
|
421
|
-
session?.organizationId ??
|
|
422
|
-
this.config.organizationId,
|
|
423
|
-
};
|
|
424
|
-
const stringifiedBody = JSON.stringify(body);
|
|
425
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
426
|
-
return {
|
|
427
|
-
body: stringifiedBody,
|
|
428
|
-
stamp: stamp,
|
|
429
|
-
url: fullUrl,
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
372
|
this.getOrganizationConfigs = async (input, stampWith) => {
|
|
433
373
|
const session = await this.storageManager?.getActiveSession();
|
|
434
374
|
return this.request("/public/v1/query/get_organization_configs", {
|
|
@@ -699,6 +639,36 @@ class TurnkeySDKClientBase {
|
|
|
699
639
|
url: fullUrl,
|
|
700
640
|
};
|
|
701
641
|
};
|
|
642
|
+
this.getWalletAddressBalances = async (input, stampWith) => {
|
|
643
|
+
const session = await this.storageManager?.getActiveSession();
|
|
644
|
+
return this.request("/public/v1/query/get_wallet_address_balances", {
|
|
645
|
+
...input,
|
|
646
|
+
organizationId: input.organizationId ??
|
|
647
|
+
session?.organizationId ??
|
|
648
|
+
this.config.organizationId,
|
|
649
|
+
}, stampWith);
|
|
650
|
+
};
|
|
651
|
+
this.stampGetWalletAddressBalances = async (input, stampWith) => {
|
|
652
|
+
const activeStamper = this.getStamper(stampWith);
|
|
653
|
+
if (!activeStamper) {
|
|
654
|
+
return undefined;
|
|
655
|
+
}
|
|
656
|
+
const session = await this.storageManager?.getActiveSession();
|
|
657
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet_address_balances";
|
|
658
|
+
const body = {
|
|
659
|
+
...input,
|
|
660
|
+
organizationId: input.organizationId ??
|
|
661
|
+
session?.organizationId ??
|
|
662
|
+
this.config.organizationId,
|
|
663
|
+
};
|
|
664
|
+
const stringifiedBody = JSON.stringify(body);
|
|
665
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
666
|
+
return {
|
|
667
|
+
body: stringifiedBody,
|
|
668
|
+
stamp: stamp,
|
|
669
|
+
url: fullUrl,
|
|
670
|
+
};
|
|
671
|
+
};
|
|
702
672
|
this.getActivities = async (input = {}, stampWith) => {
|
|
703
673
|
const session = await this.storageManager?.getActiveSession();
|
|
704
674
|
return this.request("/public/v1/query/list_activities", {
|
|
@@ -970,6 +940,36 @@ class TurnkeySDKClientBase {
|
|
|
970
940
|
url: fullUrl,
|
|
971
941
|
};
|
|
972
942
|
};
|
|
943
|
+
this.listSupportedAssets = async (input, stampWith) => {
|
|
944
|
+
const session = await this.storageManager?.getActiveSession();
|
|
945
|
+
return this.request("/public/v1/query/list_supported_assets", {
|
|
946
|
+
...input,
|
|
947
|
+
organizationId: input.organizationId ??
|
|
948
|
+
session?.organizationId ??
|
|
949
|
+
this.config.organizationId,
|
|
950
|
+
}, stampWith);
|
|
951
|
+
};
|
|
952
|
+
this.stampListSupportedAssets = async (input, stampWith) => {
|
|
953
|
+
const activeStamper = this.getStamper(stampWith);
|
|
954
|
+
if (!activeStamper) {
|
|
955
|
+
return undefined;
|
|
956
|
+
}
|
|
957
|
+
const session = await this.storageManager?.getActiveSession();
|
|
958
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_supported_assets";
|
|
959
|
+
const body = {
|
|
960
|
+
...input,
|
|
961
|
+
organizationId: input.organizationId ??
|
|
962
|
+
session?.organizationId ??
|
|
963
|
+
this.config.organizationId,
|
|
964
|
+
};
|
|
965
|
+
const stringifiedBody = JSON.stringify(body);
|
|
966
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
967
|
+
return {
|
|
968
|
+
body: stringifiedBody,
|
|
969
|
+
stamp: stamp,
|
|
970
|
+
url: fullUrl,
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
973
|
this.listUserTags = async (input = {}, stampWith) => {
|
|
974
974
|
const session = await this.storageManager?.getActiveSession();
|
|
975
975
|
return this.request("/public/v1/query/list_user_tags", {
|
|
@@ -2412,40 +2412,6 @@ class TurnkeySDKClientBase {
|
|
|
2412
2412
|
url: fullUrl,
|
|
2413
2413
|
};
|
|
2414
2414
|
};
|
|
2415
|
-
this.ethSendRawTransaction = async (input, stampWith) => {
|
|
2416
|
-
const { organizationId, timestampMs, ...rest } = input;
|
|
2417
|
-
const session = await this.storageManager?.getActiveSession();
|
|
2418
|
-
return this.activity("/public/v1/submit/eth_send_raw_transaction", {
|
|
2419
|
-
parameters: rest,
|
|
2420
|
-
organizationId: organizationId ??
|
|
2421
|
-
session?.organizationId ??
|
|
2422
|
-
this.config.organizationId,
|
|
2423
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
2424
|
-
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2425
|
-
}, "ethSendRawTransactionResult", stampWith);
|
|
2426
|
-
};
|
|
2427
|
-
this.stampEthSendRawTransaction = async (input, stampWith) => {
|
|
2428
|
-
const activeStamper = this.getStamper(stampWith);
|
|
2429
|
-
if (!activeStamper) {
|
|
2430
|
-
return undefined;
|
|
2431
|
-
}
|
|
2432
|
-
const { organizationId, timestampMs, ...parameters } = input;
|
|
2433
|
-
const session = await this.storageManager?.getActiveSession();
|
|
2434
|
-
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_raw_transaction";
|
|
2435
|
-
const bodyWithType = {
|
|
2436
|
-
parameters,
|
|
2437
|
-
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
2438
|
-
timestampMs: timestampMs ?? String(Date.now()),
|
|
2439
|
-
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2440
|
-
};
|
|
2441
|
-
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2442
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2443
|
-
return {
|
|
2444
|
-
body: stringifiedBody,
|
|
2445
|
-
stamp: stamp,
|
|
2446
|
-
url: fullUrl,
|
|
2447
|
-
};
|
|
2448
|
-
};
|
|
2449
2415
|
this.ethSendTransaction = async (input, stampWith) => {
|
|
2450
2416
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2451
2417
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3262,6 +3228,40 @@ class TurnkeySDKClientBase {
|
|
|
3262
3228
|
url: fullUrl,
|
|
3263
3229
|
};
|
|
3264
3230
|
};
|
|
3231
|
+
this.solSendTransaction = async (input, stampWith) => {
|
|
3232
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3233
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3234
|
+
return this.activity("/public/v1/submit/sol_send_transaction", {
|
|
3235
|
+
parameters: rest,
|
|
3236
|
+
organizationId: organizationId ??
|
|
3237
|
+
session?.organizationId ??
|
|
3238
|
+
this.config.organizationId,
|
|
3239
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3240
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
3241
|
+
}, "solSendTransactionResult", stampWith);
|
|
3242
|
+
};
|
|
3243
|
+
this.stampSolSendTransaction = async (input, stampWith) => {
|
|
3244
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3245
|
+
if (!activeStamper) {
|
|
3246
|
+
return undefined;
|
|
3247
|
+
}
|
|
3248
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3249
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3250
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
|
|
3251
|
+
const bodyWithType = {
|
|
3252
|
+
parameters,
|
|
3253
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3254
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3255
|
+
type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
|
|
3256
|
+
};
|
|
3257
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3258
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3259
|
+
return {
|
|
3260
|
+
body: stringifiedBody,
|
|
3261
|
+
stamp: stamp,
|
|
3262
|
+
url: fullUrl,
|
|
3263
|
+
};
|
|
3264
|
+
};
|
|
3265
3265
|
this.stampLogin = async (input, stampWith) => {
|
|
3266
3266
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3267
3267
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3365,6 +3365,40 @@ class TurnkeySDKClientBase {
|
|
|
3365
3365
|
url: fullUrl,
|
|
3366
3366
|
};
|
|
3367
3367
|
};
|
|
3368
|
+
this.updateOrganizationName = async (input, stampWith) => {
|
|
3369
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3370
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3371
|
+
return this.activity("/public/v1/submit/update_organization_name", {
|
|
3372
|
+
parameters: rest,
|
|
3373
|
+
organizationId: organizationId ??
|
|
3374
|
+
session?.organizationId ??
|
|
3375
|
+
this.config.organizationId,
|
|
3376
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3377
|
+
type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
|
|
3378
|
+
}, "updateOrganizationNameResult", stampWith);
|
|
3379
|
+
};
|
|
3380
|
+
this.stampUpdateOrganizationName = async (input, stampWith) => {
|
|
3381
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3382
|
+
if (!activeStamper) {
|
|
3383
|
+
return undefined;
|
|
3384
|
+
}
|
|
3385
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3386
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3387
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_organization_name";
|
|
3388
|
+
const bodyWithType = {
|
|
3389
|
+
parameters,
|
|
3390
|
+
organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
|
|
3391
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3392
|
+
type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
|
|
3393
|
+
};
|
|
3394
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3395
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3396
|
+
return {
|
|
3397
|
+
body: stringifiedBody,
|
|
3398
|
+
stamp: stamp,
|
|
3399
|
+
url: fullUrl,
|
|
3400
|
+
};
|
|
3401
|
+
};
|
|
3368
3402
|
this.updatePolicy = async (input, stampWith) => {
|
|
3369
3403
|
const { organizationId, timestampMs, ...rest } = input;
|
|
3370
3404
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -3705,36 +3739,6 @@ class TurnkeySDKClientBase {
|
|
|
3705
3739
|
url: fullUrl,
|
|
3706
3740
|
};
|
|
3707
3741
|
};
|
|
3708
|
-
this.testRateLimits = async (input, stampWith) => {
|
|
3709
|
-
const session = await this.storageManager?.getActiveSession();
|
|
3710
|
-
return this.request("/tkhq/api/v1/test_rate_limits", {
|
|
3711
|
-
...input,
|
|
3712
|
-
organizationId: input.organizationId ??
|
|
3713
|
-
session?.organizationId ??
|
|
3714
|
-
this.config.organizationId,
|
|
3715
|
-
}, stampWith);
|
|
3716
|
-
};
|
|
3717
|
-
this.stampTestRateLimits = async (input, stampWith) => {
|
|
3718
|
-
const activeStamper = this.getStamper(stampWith);
|
|
3719
|
-
if (!activeStamper) {
|
|
3720
|
-
return undefined;
|
|
3721
|
-
}
|
|
3722
|
-
const session = await this.storageManager?.getActiveSession();
|
|
3723
|
-
const fullUrl = this.config.apiBaseUrl + "/tkhq/api/v1/test_rate_limits";
|
|
3724
|
-
const body = {
|
|
3725
|
-
...input,
|
|
3726
|
-
organizationId: input.organizationId ??
|
|
3727
|
-
session?.organizationId ??
|
|
3728
|
-
this.config.organizationId,
|
|
3729
|
-
};
|
|
3730
|
-
const stringifiedBody = JSON.stringify(body);
|
|
3731
|
-
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3732
|
-
return {
|
|
3733
|
-
body: stringifiedBody,
|
|
3734
|
-
stamp: stamp,
|
|
3735
|
-
url: fullUrl,
|
|
3736
|
-
};
|
|
3737
|
-
};
|
|
3738
3742
|
this.proxyGetAccount = async (input) => {
|
|
3739
3743
|
return this.authProxyRequest("/v1/account", input);
|
|
3740
3744
|
};
|