@turnkey/sdk-browser 5.11.6 → 5.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/CHANGELOG.md +27 -0
- package/dist/__generated__/sdk-client-base.d.ts +14 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +179 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +179 -0
- package/dist/__generated__/sdk-client-base.mjs.map +1 -1
- package/dist/__generated__/sdk_api_types.d.ts +35 -0
- 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 +346 -4
- package/dist/__inputs__/public_api.types.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -237,6 +237,29 @@ class TurnkeySDKClientBase {
|
|
|
237
237
|
url: fullUrl,
|
|
238
238
|
};
|
|
239
239
|
};
|
|
240
|
+
this.getOnRampTransactionStatus = async (input) => {
|
|
241
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
242
|
+
session = parseSession(session);
|
|
243
|
+
return this.request("/public/v1/query/get_onramp_transaction_status", {
|
|
244
|
+
...input,
|
|
245
|
+
organizationId: input.organizationId ??
|
|
246
|
+
session?.organizationId ??
|
|
247
|
+
this.config.organizationId,
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
this.stampGetOnRampTransactionStatus = async (input) => {
|
|
251
|
+
if (!this.stamper) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_onramp_transaction_status";
|
|
255
|
+
const body = JSON.stringify(input);
|
|
256
|
+
const stamp = await this.stamper.stamp(body);
|
|
257
|
+
return {
|
|
258
|
+
body: body,
|
|
259
|
+
stamp: stamp,
|
|
260
|
+
url: fullUrl,
|
|
261
|
+
};
|
|
262
|
+
};
|
|
240
263
|
this.getOrganization = async (input = {}) => {
|
|
241
264
|
let session = await getStorageValue(StorageKeys.Session);
|
|
242
265
|
session = parseSession(session);
|
|
@@ -490,6 +513,29 @@ class TurnkeySDKClientBase {
|
|
|
490
513
|
url: fullUrl,
|
|
491
514
|
};
|
|
492
515
|
};
|
|
516
|
+
this.listFiatOnRampCredentials = async (input) => {
|
|
517
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
518
|
+
session = parseSession(session);
|
|
519
|
+
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
520
|
+
...input,
|
|
521
|
+
organizationId: input.organizationId ??
|
|
522
|
+
session?.organizationId ??
|
|
523
|
+
this.config.organizationId,
|
|
524
|
+
});
|
|
525
|
+
};
|
|
526
|
+
this.stampListFiatOnRampCredentials = async (input) => {
|
|
527
|
+
if (!this.stamper) {
|
|
528
|
+
return undefined;
|
|
529
|
+
}
|
|
530
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_fiat_on_ramp_credentials";
|
|
531
|
+
const body = JSON.stringify(input);
|
|
532
|
+
const stamp = await this.stamper.stamp(body);
|
|
533
|
+
return {
|
|
534
|
+
body: body,
|
|
535
|
+
stamp: stamp,
|
|
536
|
+
url: fullUrl,
|
|
537
|
+
};
|
|
538
|
+
};
|
|
493
539
|
this.listOauth2Credentials = async (input) => {
|
|
494
540
|
let session = await getStorageValue(StorageKeys.Session);
|
|
495
541
|
session = parseSession(session);
|
|
@@ -869,6 +915,33 @@ class TurnkeySDKClientBase {
|
|
|
869
915
|
url: fullUrl,
|
|
870
916
|
};
|
|
871
917
|
};
|
|
918
|
+
this.createFiatOnRampCredential = async (input) => {
|
|
919
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
920
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
921
|
+
session = parseSession(session);
|
|
922
|
+
return this.command("/public/v1/submit/create_fiat_on_ramp_credential", {
|
|
923
|
+
parameters: rest,
|
|
924
|
+
organizationId: organizationId ??
|
|
925
|
+
session?.organizationId ??
|
|
926
|
+
this.config.organizationId,
|
|
927
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
928
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
929
|
+
}, "createFiatOnRampCredentialResult");
|
|
930
|
+
};
|
|
931
|
+
this.stampCreateFiatOnRampCredential = async (input) => {
|
|
932
|
+
if (!this.stamper) {
|
|
933
|
+
return undefined;
|
|
934
|
+
}
|
|
935
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
936
|
+
"/public/v1/submit/create_fiat_on_ramp_credential";
|
|
937
|
+
const body = JSON.stringify(input);
|
|
938
|
+
const stamp = await this.stamper.stamp(body);
|
|
939
|
+
return {
|
|
940
|
+
body: body,
|
|
941
|
+
stamp: stamp,
|
|
942
|
+
url: fullUrl,
|
|
943
|
+
};
|
|
944
|
+
};
|
|
872
945
|
this.createInvitations = async (input) => {
|
|
873
946
|
const { organizationId, timestampMs, ...rest } = input;
|
|
874
947
|
let session = await getStorageValue(StorageKeys.Session);
|
|
@@ -1312,6 +1385,33 @@ class TurnkeySDKClientBase {
|
|
|
1312
1385
|
url: fullUrl,
|
|
1313
1386
|
};
|
|
1314
1387
|
};
|
|
1388
|
+
this.deleteFiatOnRampCredential = async (input) => {
|
|
1389
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1390
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
1391
|
+
session = parseSession(session);
|
|
1392
|
+
return this.command("/public/v1/submit/delete_fiat_on_ramp_credential", {
|
|
1393
|
+
parameters: rest,
|
|
1394
|
+
organizationId: organizationId ??
|
|
1395
|
+
session?.organizationId ??
|
|
1396
|
+
this.config.organizationId,
|
|
1397
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1398
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1399
|
+
}, "deleteFiatOnRampCredentialResult");
|
|
1400
|
+
};
|
|
1401
|
+
this.stampDeleteFiatOnRampCredential = async (input) => {
|
|
1402
|
+
if (!this.stamper) {
|
|
1403
|
+
return undefined;
|
|
1404
|
+
}
|
|
1405
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1406
|
+
"/public/v1/submit/delete_fiat_on_ramp_credential";
|
|
1407
|
+
const body = JSON.stringify(input);
|
|
1408
|
+
const stamp = await this.stamper.stamp(body);
|
|
1409
|
+
return {
|
|
1410
|
+
body: body,
|
|
1411
|
+
stamp: stamp,
|
|
1412
|
+
url: fullUrl,
|
|
1413
|
+
};
|
|
1414
|
+
};
|
|
1315
1415
|
this.deleteInvitation = async (input) => {
|
|
1316
1416
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1317
1417
|
let session = await getStorageValue(StorageKeys.Session);
|
|
@@ -1677,6 +1777,58 @@ class TurnkeySDKClientBase {
|
|
|
1677
1777
|
url: fullUrl,
|
|
1678
1778
|
};
|
|
1679
1779
|
};
|
|
1780
|
+
this.ethSendRawTransaction = async (input) => {
|
|
1781
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1782
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
1783
|
+
session = parseSession(session);
|
|
1784
|
+
return this.command("/public/v1/submit/eth_send_raw_transaction", {
|
|
1785
|
+
parameters: rest,
|
|
1786
|
+
organizationId: organizationId ??
|
|
1787
|
+
session?.organizationId ??
|
|
1788
|
+
this.config.organizationId,
|
|
1789
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1790
|
+
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
1791
|
+
}, "ethSendRawTransactionResult");
|
|
1792
|
+
};
|
|
1793
|
+
this.stampEthSendRawTransaction = async (input) => {
|
|
1794
|
+
if (!this.stamper) {
|
|
1795
|
+
return undefined;
|
|
1796
|
+
}
|
|
1797
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_raw_transaction";
|
|
1798
|
+
const body = JSON.stringify(input);
|
|
1799
|
+
const stamp = await this.stamper.stamp(body);
|
|
1800
|
+
return {
|
|
1801
|
+
body: body,
|
|
1802
|
+
stamp: stamp,
|
|
1803
|
+
url: fullUrl,
|
|
1804
|
+
};
|
|
1805
|
+
};
|
|
1806
|
+
this.ethSendTransaction = async (input) => {
|
|
1807
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1808
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
1809
|
+
session = parseSession(session);
|
|
1810
|
+
return this.command("/public/v1/submit/eth_send_transaction", {
|
|
1811
|
+
parameters: rest,
|
|
1812
|
+
organizationId: organizationId ??
|
|
1813
|
+
session?.organizationId ??
|
|
1814
|
+
this.config.organizationId,
|
|
1815
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1816
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
1817
|
+
}, "ethSendTransactionResult");
|
|
1818
|
+
};
|
|
1819
|
+
this.stampEthSendTransaction = async (input) => {
|
|
1820
|
+
if (!this.stamper) {
|
|
1821
|
+
return undefined;
|
|
1822
|
+
}
|
|
1823
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
1824
|
+
const body = JSON.stringify(input);
|
|
1825
|
+
const stamp = await this.stamper.stamp(body);
|
|
1826
|
+
return {
|
|
1827
|
+
body: body,
|
|
1828
|
+
stamp: stamp,
|
|
1829
|
+
url: fullUrl,
|
|
1830
|
+
};
|
|
1831
|
+
};
|
|
1680
1832
|
this.exportPrivateKey = async (input) => {
|
|
1681
1833
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1682
1834
|
let session = await getStorageValue(StorageKeys.Session);
|
|
@@ -2299,6 +2451,33 @@ class TurnkeySDKClientBase {
|
|
|
2299
2451
|
url: fullUrl,
|
|
2300
2452
|
};
|
|
2301
2453
|
};
|
|
2454
|
+
this.updateFiatOnRampCredential = async (input) => {
|
|
2455
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2456
|
+
let session = await getStorageValue(StorageKeys.Session);
|
|
2457
|
+
session = parseSession(session);
|
|
2458
|
+
return this.command("/public/v1/submit/update_fiat_on_ramp_credential", {
|
|
2459
|
+
parameters: rest,
|
|
2460
|
+
organizationId: organizationId ??
|
|
2461
|
+
session?.organizationId ??
|
|
2462
|
+
this.config.organizationId,
|
|
2463
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2464
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
2465
|
+
}, "updateFiatOnRampCredentialResult");
|
|
2466
|
+
};
|
|
2467
|
+
this.stampUpdateFiatOnRampCredential = async (input) => {
|
|
2468
|
+
if (!this.stamper) {
|
|
2469
|
+
return undefined;
|
|
2470
|
+
}
|
|
2471
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
2472
|
+
"/public/v1/submit/update_fiat_on_ramp_credential";
|
|
2473
|
+
const body = JSON.stringify(input);
|
|
2474
|
+
const stamp = await this.stamper.stamp(body);
|
|
2475
|
+
return {
|
|
2476
|
+
body: body,
|
|
2477
|
+
stamp: stamp,
|
|
2478
|
+
url: fullUrl,
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2302
2481
|
this.updateOauth2Credential = async (input) => {
|
|
2303
2482
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2304
2483
|
let session = await getStorageValue(StorageKeys.Session);
|