@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.
@@ -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", {
@@ -2410,40 +2410,6 @@ class TurnkeySDKClientBase {
2410
2410
  url: fullUrl,
2411
2411
  };
2412
2412
  };
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
2413
  this.ethSendTransaction = async (input, stampWith) => {
2448
2414
  const { organizationId, timestampMs, ...rest } = input;
2449
2415
  const session = await this.storageManager?.getActiveSession();
@@ -3260,6 +3226,40 @@ class TurnkeySDKClientBase {
3260
3226
  url: fullUrl,
3261
3227
  };
3262
3228
  };
3229
+ this.solSendTransaction = async (input, stampWith) => {
3230
+ const { organizationId, timestampMs, ...rest } = input;
3231
+ const session = await this.storageManager?.getActiveSession();
3232
+ return this.activity("/public/v1/submit/sol_send_transaction", {
3233
+ parameters: rest,
3234
+ organizationId: organizationId ??
3235
+ session?.organizationId ??
3236
+ this.config.organizationId,
3237
+ timestampMs: timestampMs ?? String(Date.now()),
3238
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
3239
+ }, "solSendTransactionResult", stampWith);
3240
+ };
3241
+ this.stampSolSendTransaction = async (input, stampWith) => {
3242
+ const activeStamper = this.getStamper(stampWith);
3243
+ if (!activeStamper) {
3244
+ return undefined;
3245
+ }
3246
+ const { organizationId, timestampMs, ...parameters } = input;
3247
+ const session = await this.storageManager?.getActiveSession();
3248
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sol_send_transaction";
3249
+ const bodyWithType = {
3250
+ parameters,
3251
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3252
+ timestampMs: timestampMs ?? String(Date.now()),
3253
+ type: "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
3254
+ };
3255
+ const stringifiedBody = JSON.stringify(bodyWithType);
3256
+ const stamp = await activeStamper.stamp(stringifiedBody);
3257
+ return {
3258
+ body: stringifiedBody,
3259
+ stamp: stamp,
3260
+ url: fullUrl,
3261
+ };
3262
+ };
3263
3263
  this.stampLogin = async (input, stampWith) => {
3264
3264
  const { organizationId, timestampMs, ...rest } = input;
3265
3265
  const session = await this.storageManager?.getActiveSession();
@@ -3363,6 +3363,40 @@ class TurnkeySDKClientBase {
3363
3363
  url: fullUrl,
3364
3364
  };
3365
3365
  };
3366
+ this.updateOrganizationName = async (input, stampWith) => {
3367
+ const { organizationId, timestampMs, ...rest } = input;
3368
+ const session = await this.storageManager?.getActiveSession();
3369
+ return this.activity("/public/v1/submit/update_organization_name", {
3370
+ parameters: rest,
3371
+ organizationId: organizationId ??
3372
+ session?.organizationId ??
3373
+ this.config.organizationId,
3374
+ timestampMs: timestampMs ?? String(Date.now()),
3375
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
3376
+ }, "updateOrganizationNameResult", stampWith);
3377
+ };
3378
+ this.stampUpdateOrganizationName = async (input, stampWith) => {
3379
+ const activeStamper = this.getStamper(stampWith);
3380
+ if (!activeStamper) {
3381
+ return undefined;
3382
+ }
3383
+ const { organizationId, timestampMs, ...parameters } = input;
3384
+ const session = await this.storageManager?.getActiveSession();
3385
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_organization_name";
3386
+ const bodyWithType = {
3387
+ parameters,
3388
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3389
+ timestampMs: timestampMs ?? String(Date.now()),
3390
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
3391
+ };
3392
+ const stringifiedBody = JSON.stringify(bodyWithType);
3393
+ const stamp = await activeStamper.stamp(stringifiedBody);
3394
+ return {
3395
+ body: stringifiedBody,
3396
+ stamp: stamp,
3397
+ url: fullUrl,
3398
+ };
3399
+ };
3366
3400
  this.updatePolicy = async (input, stampWith) => {
3367
3401
  const { organizationId, timestampMs, ...rest } = input;
3368
3402
  const session = await this.storageManager?.getActiveSession();
@@ -3703,36 +3737,6 @@ class TurnkeySDKClientBase {
3703
3737
  url: fullUrl,
3704
3738
  };
3705
3739
  };
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
3740
  this.proxyGetAccount = async (input) => {
3737
3741
  return this.authProxyRequest("/v1/account", input);
3738
3742
  };