@turnkey/core 1.5.2 → 1.7.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 +9 -5
- package/dist/__clients__/core.d.ts.map +1 -1
- package/dist/__clients__/core.js +22 -14
- package/dist/__clients__/core.js.map +1 -1
- package/dist/__clients__/core.mjs +22 -14
- package/dist/__clients__/core.mjs.map +1 -1
- 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 +226 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +226 -0
- 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/__inputs__/public_api.types.d.ts +346 -4
- package/dist/__inputs__/public_api.types.d.ts.map +1 -1
- package/dist/__types__/method-types.d.ts +3 -1
- package/dist/__types__/method-types.d.ts.map +1 -1
- package/package.json +19 -6
|
@@ -297,6 +297,35 @@ class TurnkeySDKClientBase {
|
|
|
297
297
|
url: fullUrl,
|
|
298
298
|
};
|
|
299
299
|
};
|
|
300
|
+
this.getOnRampTransactionStatus = async (input, stampWith) => {
|
|
301
|
+
const session = await this.storageManager?.getActiveSession();
|
|
302
|
+
return this.request("/public/v1/query/get_onramp_transaction_status", {
|
|
303
|
+
...input,
|
|
304
|
+
organizationId: input.organizationId ??
|
|
305
|
+
session?.organizationId ??
|
|
306
|
+
this.config.organizationId,
|
|
307
|
+
}, stampWith);
|
|
308
|
+
};
|
|
309
|
+
this.stampGetOnRampTransactionStatus = async (input, stampWith) => {
|
|
310
|
+
const activeStamper = this.getStamper(stampWith);
|
|
311
|
+
if (!activeStamper) {
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
const { organizationId, ...parameters } = input;
|
|
315
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_onramp_transaction_status";
|
|
316
|
+
const bodyWithType = {
|
|
317
|
+
parameters,
|
|
318
|
+
organizationId,
|
|
319
|
+
type: "ACTIVITY_TYPE_GET_ON_RAMP_TRANSACTION_STATUS",
|
|
320
|
+
};
|
|
321
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
322
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
323
|
+
return {
|
|
324
|
+
body: stringifiedBody,
|
|
325
|
+
stamp: stamp,
|
|
326
|
+
url: fullUrl,
|
|
327
|
+
};
|
|
328
|
+
};
|
|
300
329
|
this.getOrganization = async (input = {}, stampWith) => {
|
|
301
330
|
const session = await this.storageManager?.getActiveSession();
|
|
302
331
|
return this.request("/public/v1/query/get_organization", {
|
|
@@ -616,6 +645,35 @@ class TurnkeySDKClientBase {
|
|
|
616
645
|
url: fullUrl,
|
|
617
646
|
};
|
|
618
647
|
};
|
|
648
|
+
this.listFiatOnRampCredentials = async (input, stampWith) => {
|
|
649
|
+
const session = await this.storageManager?.getActiveSession();
|
|
650
|
+
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
651
|
+
...input,
|
|
652
|
+
organizationId: input.organizationId ??
|
|
653
|
+
session?.organizationId ??
|
|
654
|
+
this.config.organizationId,
|
|
655
|
+
}, stampWith);
|
|
656
|
+
};
|
|
657
|
+
this.stampListFiatOnRampCredentials = async (input, stampWith) => {
|
|
658
|
+
const activeStamper = this.getStamper(stampWith);
|
|
659
|
+
if (!activeStamper) {
|
|
660
|
+
return undefined;
|
|
661
|
+
}
|
|
662
|
+
const { organizationId, ...parameters } = input;
|
|
663
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_fiat_on_ramp_credentials";
|
|
664
|
+
const bodyWithType = {
|
|
665
|
+
parameters,
|
|
666
|
+
organizationId,
|
|
667
|
+
type: "ACTIVITY_TYPE_LIST_FIAT_ON_RAMP_CREDENTIALS",
|
|
668
|
+
};
|
|
669
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
670
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
671
|
+
return {
|
|
672
|
+
body: stringifiedBody,
|
|
673
|
+
stamp: stamp,
|
|
674
|
+
url: fullUrl,
|
|
675
|
+
};
|
|
676
|
+
};
|
|
619
677
|
this.listOauth2Credentials = async (input, stampWith) => {
|
|
620
678
|
const session = await this.storageManager?.getActiveSession();
|
|
621
679
|
return this.request("/public/v1/query/list_oauth2_credentials", {
|
|
@@ -1097,6 +1155,40 @@ class TurnkeySDKClientBase {
|
|
|
1097
1155
|
url: fullUrl,
|
|
1098
1156
|
};
|
|
1099
1157
|
};
|
|
1158
|
+
this.createFiatOnRampCredential = async (input, stampWith) => {
|
|
1159
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1160
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1161
|
+
return this.activity("/public/v1/submit/create_fiat_on_ramp_credential", {
|
|
1162
|
+
parameters: rest,
|
|
1163
|
+
organizationId: organizationId ??
|
|
1164
|
+
session?.organizationId ??
|
|
1165
|
+
this.config.organizationId,
|
|
1166
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1167
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1168
|
+
}, "createFiatOnRampCredentialResult", stampWith);
|
|
1169
|
+
};
|
|
1170
|
+
this.stampCreateFiatOnRampCredential = async (input, stampWith) => {
|
|
1171
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1172
|
+
if (!activeStamper) {
|
|
1173
|
+
return undefined;
|
|
1174
|
+
}
|
|
1175
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1176
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1177
|
+
"/public/v1/submit/create_fiat_on_ramp_credential";
|
|
1178
|
+
const bodyWithType = {
|
|
1179
|
+
parameters,
|
|
1180
|
+
organizationId,
|
|
1181
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1182
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1183
|
+
};
|
|
1184
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1185
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1186
|
+
return {
|
|
1187
|
+
body: stringifiedBody,
|
|
1188
|
+
stamp: stamp,
|
|
1189
|
+
url: fullUrl,
|
|
1190
|
+
};
|
|
1191
|
+
};
|
|
1100
1192
|
this.createInvitations = async (input, stampWith) => {
|
|
1101
1193
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1102
1194
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -1659,6 +1751,40 @@ class TurnkeySDKClientBase {
|
|
|
1659
1751
|
url: fullUrl,
|
|
1660
1752
|
};
|
|
1661
1753
|
};
|
|
1754
|
+
this.deleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1755
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1756
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1757
|
+
return this.activity("/public/v1/submit/delete_fiat_on_ramp_credential", {
|
|
1758
|
+
parameters: rest,
|
|
1759
|
+
organizationId: organizationId ??
|
|
1760
|
+
session?.organizationId ??
|
|
1761
|
+
this.config.organizationId,
|
|
1762
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1763
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1764
|
+
}, "deleteFiatOnRampCredentialResult", stampWith);
|
|
1765
|
+
};
|
|
1766
|
+
this.stampDeleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1767
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1768
|
+
if (!activeStamper) {
|
|
1769
|
+
return undefined;
|
|
1770
|
+
}
|
|
1771
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1772
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1773
|
+
"/public/v1/submit/delete_fiat_on_ramp_credential";
|
|
1774
|
+
const bodyWithType = {
|
|
1775
|
+
parameters,
|
|
1776
|
+
organizationId,
|
|
1777
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1778
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1779
|
+
};
|
|
1780
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1781
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1782
|
+
return {
|
|
1783
|
+
body: stringifiedBody,
|
|
1784
|
+
stamp: stamp,
|
|
1785
|
+
url: fullUrl,
|
|
1786
|
+
};
|
|
1787
|
+
};
|
|
1662
1788
|
this.deleteInvitation = async (input, stampWith) => {
|
|
1663
1789
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1664
1790
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2122,6 +2248,72 @@ class TurnkeySDKClientBase {
|
|
|
2122
2248
|
url: fullUrl,
|
|
2123
2249
|
};
|
|
2124
2250
|
};
|
|
2251
|
+
this.ethSendRawTransaction = async (input, stampWith) => {
|
|
2252
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2253
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2254
|
+
return this.activity("/public/v1/submit/eth_send_raw_transaction", {
|
|
2255
|
+
parameters: rest,
|
|
2256
|
+
organizationId: organizationId ??
|
|
2257
|
+
session?.organizationId ??
|
|
2258
|
+
this.config.organizationId,
|
|
2259
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2260
|
+
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2261
|
+
}, "ethSendRawTransactionResult", stampWith);
|
|
2262
|
+
};
|
|
2263
|
+
this.stampEthSendRawTransaction = async (input, stampWith) => {
|
|
2264
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2265
|
+
if (!activeStamper) {
|
|
2266
|
+
return undefined;
|
|
2267
|
+
}
|
|
2268
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2269
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_raw_transaction";
|
|
2270
|
+
const bodyWithType = {
|
|
2271
|
+
parameters,
|
|
2272
|
+
organizationId,
|
|
2273
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2274
|
+
type: "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION",
|
|
2275
|
+
};
|
|
2276
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2277
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2278
|
+
return {
|
|
2279
|
+
body: stringifiedBody,
|
|
2280
|
+
stamp: stamp,
|
|
2281
|
+
url: fullUrl,
|
|
2282
|
+
};
|
|
2283
|
+
};
|
|
2284
|
+
this.ethSendTransaction = async (input, stampWith) => {
|
|
2285
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2286
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2287
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
2288
|
+
parameters: rest,
|
|
2289
|
+
organizationId: organizationId ??
|
|
2290
|
+
session?.organizationId ??
|
|
2291
|
+
this.config.organizationId,
|
|
2292
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2293
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2294
|
+
}, "ethSendTransactionResult", stampWith);
|
|
2295
|
+
};
|
|
2296
|
+
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
2297
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2298
|
+
if (!activeStamper) {
|
|
2299
|
+
return undefined;
|
|
2300
|
+
}
|
|
2301
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2302
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
2303
|
+
const bodyWithType = {
|
|
2304
|
+
parameters,
|
|
2305
|
+
organizationId,
|
|
2306
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2307
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2308
|
+
};
|
|
2309
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2310
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2311
|
+
return {
|
|
2312
|
+
body: stringifiedBody,
|
|
2313
|
+
stamp: stamp,
|
|
2314
|
+
url: fullUrl,
|
|
2315
|
+
};
|
|
2316
|
+
};
|
|
2125
2317
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
2126
2318
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2127
2319
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2914,6 +3106,40 @@ class TurnkeySDKClientBase {
|
|
|
2914
3106
|
url: fullUrl,
|
|
2915
3107
|
};
|
|
2916
3108
|
};
|
|
3109
|
+
this.updateFiatOnRampCredential = async (input, stampWith) => {
|
|
3110
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3111
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3112
|
+
return this.activity("/public/v1/submit/update_fiat_on_ramp_credential", {
|
|
3113
|
+
parameters: rest,
|
|
3114
|
+
organizationId: organizationId ??
|
|
3115
|
+
session?.organizationId ??
|
|
3116
|
+
this.config.organizationId,
|
|
3117
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3118
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3119
|
+
}, "updateFiatOnRampCredentialResult", stampWith);
|
|
3120
|
+
};
|
|
3121
|
+
this.stampUpdateFiatOnRampCredential = async (input, stampWith) => {
|
|
3122
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3123
|
+
if (!activeStamper) {
|
|
3124
|
+
return undefined;
|
|
3125
|
+
}
|
|
3126
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3127
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
3128
|
+
"/public/v1/submit/update_fiat_on_ramp_credential";
|
|
3129
|
+
const bodyWithType = {
|
|
3130
|
+
parameters,
|
|
3131
|
+
organizationId,
|
|
3132
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3133
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3134
|
+
};
|
|
3135
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3136
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3137
|
+
return {
|
|
3138
|
+
body: stringifiedBody,
|
|
3139
|
+
stamp: stamp,
|
|
3140
|
+
url: fullUrl,
|
|
3141
|
+
};
|
|
3142
|
+
};
|
|
2917
3143
|
this.updateOauth2Credential = async (input, stampWith) => {
|
|
2918
3144
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2919
3145
|
const session = await this.storageManager?.getActiveSession();
|