@turnkey/core 1.6.0 → 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 +12 -0
- package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
- package/dist/__generated__/sdk-client-base.js +193 -0
- package/dist/__generated__/sdk-client-base.js.map +1 -1
- package/dist/__generated__/sdk-client-base.mjs +193 -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 +296 -6
- 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 +5 -5
|
@@ -299,6 +299,35 @@ class TurnkeySDKClientBase {
|
|
|
299
299
|
url: fullUrl,
|
|
300
300
|
};
|
|
301
301
|
};
|
|
302
|
+
this.getOnRampTransactionStatus = async (input, stampWith) => {
|
|
303
|
+
const session = await this.storageManager?.getActiveSession();
|
|
304
|
+
return this.request("/public/v1/query/get_onramp_transaction_status", {
|
|
305
|
+
...input,
|
|
306
|
+
organizationId: input.organizationId ??
|
|
307
|
+
session?.organizationId ??
|
|
308
|
+
this.config.organizationId,
|
|
309
|
+
}, stampWith);
|
|
310
|
+
};
|
|
311
|
+
this.stampGetOnRampTransactionStatus = async (input, stampWith) => {
|
|
312
|
+
const activeStamper = this.getStamper(stampWith);
|
|
313
|
+
if (!activeStamper) {
|
|
314
|
+
return undefined;
|
|
315
|
+
}
|
|
316
|
+
const { organizationId, ...parameters } = input;
|
|
317
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_onramp_transaction_status";
|
|
318
|
+
const bodyWithType = {
|
|
319
|
+
parameters,
|
|
320
|
+
organizationId,
|
|
321
|
+
type: "ACTIVITY_TYPE_GET_ON_RAMP_TRANSACTION_STATUS",
|
|
322
|
+
};
|
|
323
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
324
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
325
|
+
return {
|
|
326
|
+
body: stringifiedBody,
|
|
327
|
+
stamp: stamp,
|
|
328
|
+
url: fullUrl,
|
|
329
|
+
};
|
|
330
|
+
};
|
|
302
331
|
this.getOrganization = async (input = {}, stampWith) => {
|
|
303
332
|
const session = await this.storageManager?.getActiveSession();
|
|
304
333
|
return this.request("/public/v1/query/get_organization", {
|
|
@@ -618,6 +647,35 @@ class TurnkeySDKClientBase {
|
|
|
618
647
|
url: fullUrl,
|
|
619
648
|
};
|
|
620
649
|
};
|
|
650
|
+
this.listFiatOnRampCredentials = async (input, stampWith) => {
|
|
651
|
+
const session = await this.storageManager?.getActiveSession();
|
|
652
|
+
return this.request("/public/v1/query/list_fiat_on_ramp_credentials", {
|
|
653
|
+
...input,
|
|
654
|
+
organizationId: input.organizationId ??
|
|
655
|
+
session?.organizationId ??
|
|
656
|
+
this.config.organizationId,
|
|
657
|
+
}, stampWith);
|
|
658
|
+
};
|
|
659
|
+
this.stampListFiatOnRampCredentials = async (input, stampWith) => {
|
|
660
|
+
const activeStamper = this.getStamper(stampWith);
|
|
661
|
+
if (!activeStamper) {
|
|
662
|
+
return undefined;
|
|
663
|
+
}
|
|
664
|
+
const { organizationId, ...parameters } = input;
|
|
665
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_fiat_on_ramp_credentials";
|
|
666
|
+
const bodyWithType = {
|
|
667
|
+
parameters,
|
|
668
|
+
organizationId,
|
|
669
|
+
type: "ACTIVITY_TYPE_LIST_FIAT_ON_RAMP_CREDENTIALS",
|
|
670
|
+
};
|
|
671
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
672
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
673
|
+
return {
|
|
674
|
+
body: stringifiedBody,
|
|
675
|
+
stamp: stamp,
|
|
676
|
+
url: fullUrl,
|
|
677
|
+
};
|
|
678
|
+
};
|
|
621
679
|
this.listOauth2Credentials = async (input, stampWith) => {
|
|
622
680
|
const session = await this.storageManager?.getActiveSession();
|
|
623
681
|
return this.request("/public/v1/query/list_oauth2_credentials", {
|
|
@@ -1099,6 +1157,40 @@ class TurnkeySDKClientBase {
|
|
|
1099
1157
|
url: fullUrl,
|
|
1100
1158
|
};
|
|
1101
1159
|
};
|
|
1160
|
+
this.createFiatOnRampCredential = async (input, stampWith) => {
|
|
1161
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1162
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1163
|
+
return this.activity("/public/v1/submit/create_fiat_on_ramp_credential", {
|
|
1164
|
+
parameters: rest,
|
|
1165
|
+
organizationId: organizationId ??
|
|
1166
|
+
session?.organizationId ??
|
|
1167
|
+
this.config.organizationId,
|
|
1168
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1169
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1170
|
+
}, "createFiatOnRampCredentialResult", stampWith);
|
|
1171
|
+
};
|
|
1172
|
+
this.stampCreateFiatOnRampCredential = async (input, stampWith) => {
|
|
1173
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1174
|
+
if (!activeStamper) {
|
|
1175
|
+
return undefined;
|
|
1176
|
+
}
|
|
1177
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1178
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1179
|
+
"/public/v1/submit/create_fiat_on_ramp_credential";
|
|
1180
|
+
const bodyWithType = {
|
|
1181
|
+
parameters,
|
|
1182
|
+
organizationId,
|
|
1183
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1184
|
+
type: "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1185
|
+
};
|
|
1186
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1187
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1188
|
+
return {
|
|
1189
|
+
body: stringifiedBody,
|
|
1190
|
+
stamp: stamp,
|
|
1191
|
+
url: fullUrl,
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1102
1194
|
this.createInvitations = async (input, stampWith) => {
|
|
1103
1195
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1104
1196
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -1661,6 +1753,40 @@ class TurnkeySDKClientBase {
|
|
|
1661
1753
|
url: fullUrl,
|
|
1662
1754
|
};
|
|
1663
1755
|
};
|
|
1756
|
+
this.deleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1757
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
1758
|
+
const session = await this.storageManager?.getActiveSession();
|
|
1759
|
+
return this.activity("/public/v1/submit/delete_fiat_on_ramp_credential", {
|
|
1760
|
+
parameters: rest,
|
|
1761
|
+
organizationId: organizationId ??
|
|
1762
|
+
session?.organizationId ??
|
|
1763
|
+
this.config.organizationId,
|
|
1764
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1765
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1766
|
+
}, "deleteFiatOnRampCredentialResult", stampWith);
|
|
1767
|
+
};
|
|
1768
|
+
this.stampDeleteFiatOnRampCredential = async (input, stampWith) => {
|
|
1769
|
+
const activeStamper = this.getStamper(stampWith);
|
|
1770
|
+
if (!activeStamper) {
|
|
1771
|
+
return undefined;
|
|
1772
|
+
}
|
|
1773
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
1774
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
1775
|
+
"/public/v1/submit/delete_fiat_on_ramp_credential";
|
|
1776
|
+
const bodyWithType = {
|
|
1777
|
+
parameters,
|
|
1778
|
+
organizationId,
|
|
1779
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
1780
|
+
type: "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
|
|
1781
|
+
};
|
|
1782
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
1783
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
1784
|
+
return {
|
|
1785
|
+
body: stringifiedBody,
|
|
1786
|
+
stamp: stamp,
|
|
1787
|
+
url: fullUrl,
|
|
1788
|
+
};
|
|
1789
|
+
};
|
|
1664
1790
|
this.deleteInvitation = async (input, stampWith) => {
|
|
1665
1791
|
const { organizationId, timestampMs, ...rest } = input;
|
|
1666
1792
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2157,6 +2283,39 @@ class TurnkeySDKClientBase {
|
|
|
2157
2283
|
url: fullUrl,
|
|
2158
2284
|
};
|
|
2159
2285
|
};
|
|
2286
|
+
this.ethSendTransaction = async (input, stampWith) => {
|
|
2287
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
2288
|
+
const session = await this.storageManager?.getActiveSession();
|
|
2289
|
+
return this.activity("/public/v1/submit/eth_send_transaction", {
|
|
2290
|
+
parameters: rest,
|
|
2291
|
+
organizationId: organizationId ??
|
|
2292
|
+
session?.organizationId ??
|
|
2293
|
+
this.config.organizationId,
|
|
2294
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2295
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2296
|
+
}, "ethSendTransactionResult", stampWith);
|
|
2297
|
+
};
|
|
2298
|
+
this.stampEthSendTransaction = async (input, stampWith) => {
|
|
2299
|
+
const activeStamper = this.getStamper(stampWith);
|
|
2300
|
+
if (!activeStamper) {
|
|
2301
|
+
return undefined;
|
|
2302
|
+
}
|
|
2303
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
2304
|
+
const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/eth_send_transaction";
|
|
2305
|
+
const bodyWithType = {
|
|
2306
|
+
parameters,
|
|
2307
|
+
organizationId,
|
|
2308
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
2309
|
+
type: "ACTIVITY_TYPE_ETH_SEND_TRANSACTION",
|
|
2310
|
+
};
|
|
2311
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
2312
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
2313
|
+
return {
|
|
2314
|
+
body: stringifiedBody,
|
|
2315
|
+
stamp: stamp,
|
|
2316
|
+
url: fullUrl,
|
|
2317
|
+
};
|
|
2318
|
+
};
|
|
2160
2319
|
this.exportPrivateKey = async (input, stampWith) => {
|
|
2161
2320
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2162
2321
|
const session = await this.storageManager?.getActiveSession();
|
|
@@ -2949,6 +3108,40 @@ class TurnkeySDKClientBase {
|
|
|
2949
3108
|
url: fullUrl,
|
|
2950
3109
|
};
|
|
2951
3110
|
};
|
|
3111
|
+
this.updateFiatOnRampCredential = async (input, stampWith) => {
|
|
3112
|
+
const { organizationId, timestampMs, ...rest } = input;
|
|
3113
|
+
const session = await this.storageManager?.getActiveSession();
|
|
3114
|
+
return this.activity("/public/v1/submit/update_fiat_on_ramp_credential", {
|
|
3115
|
+
parameters: rest,
|
|
3116
|
+
organizationId: organizationId ??
|
|
3117
|
+
session?.organizationId ??
|
|
3118
|
+
this.config.organizationId,
|
|
3119
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3120
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3121
|
+
}, "updateFiatOnRampCredentialResult", stampWith);
|
|
3122
|
+
};
|
|
3123
|
+
this.stampUpdateFiatOnRampCredential = async (input, stampWith) => {
|
|
3124
|
+
const activeStamper = this.getStamper(stampWith);
|
|
3125
|
+
if (!activeStamper) {
|
|
3126
|
+
return undefined;
|
|
3127
|
+
}
|
|
3128
|
+
const { organizationId, timestampMs, ...parameters } = input;
|
|
3129
|
+
const fullUrl = this.config.apiBaseUrl +
|
|
3130
|
+
"/public/v1/submit/update_fiat_on_ramp_credential";
|
|
3131
|
+
const bodyWithType = {
|
|
3132
|
+
parameters,
|
|
3133
|
+
organizationId,
|
|
3134
|
+
timestampMs: timestampMs ?? String(Date.now()),
|
|
3135
|
+
type: "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
|
|
3136
|
+
};
|
|
3137
|
+
const stringifiedBody = JSON.stringify(bodyWithType);
|
|
3138
|
+
const stamp = await activeStamper.stamp(stringifiedBody);
|
|
3139
|
+
return {
|
|
3140
|
+
body: stringifiedBody,
|
|
3141
|
+
stamp: stamp,
|
|
3142
|
+
url: fullUrl,
|
|
3143
|
+
};
|
|
3144
|
+
};
|
|
2952
3145
|
this.updateOauth2Credential = async (input, stampWith) => {
|
|
2953
3146
|
const { organizationId, timestampMs, ...rest } = input;
|
|
2954
3147
|
const session = await this.storageManager?.getActiveSession();
|