@turnkey/http 5.0.0 → 6.1.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 +70 -0
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts +230 -110
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js +379 -179
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs +379 -179
- package/dist/__generated__/services/coordinator/public/v1/public_api.client.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts +37144 -10889
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.d.ts.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js +365 -173
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.js.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs +336 -160
- package/dist/__generated__/services/coordinator/public/v1/public_api.fetcher.mjs.map +1 -1
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts +960 -330
- package/dist/__generated__/services/coordinator/public/v1/public_api.types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -9,47 +9,22 @@ class TurnkeyClient {
|
|
|
9
9
|
constructor(config, stamper) {
|
|
10
10
|
this.name = "TurnkeyClient";
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Sign the provided `TEarnDepositStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/earn_deposit_status).
|
|
15
|
-
*
|
|
16
|
-
* See also {@link stampEarnDepositStatus}.
|
|
17
|
-
*/
|
|
18
|
-
this.earnDepositStatus = async (input) => {
|
|
19
|
-
return this.request("/public/v1/query/earn_deposit_status", input);
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Produce a `SignedRequest` from `TEarnDepositStatusBody` by using the client's `stamp` function.
|
|
23
|
-
*
|
|
24
|
-
* See also {@link EarnDepositStatus}.
|
|
25
|
-
*/
|
|
26
|
-
this.stampEarnDepositStatus = async (input) => {
|
|
27
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/earn_deposit_status";
|
|
28
|
-
const body = JSON.stringify(input);
|
|
29
|
-
const stamp = await this.stamper.stamp(body);
|
|
30
|
-
return {
|
|
31
|
-
body: body,
|
|
32
|
-
stamp: stamp,
|
|
33
|
-
url: fullUrl,
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Get the organization's deployed wrappers with on-chain total deposited and live APY. The management view, distinct from per-wallet positions.
|
|
12
|
+
* Get details about an activity.
|
|
38
13
|
*
|
|
39
|
-
* Sign the provided `
|
|
14
|
+
* Sign the provided `TGetActivityBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_activity).
|
|
40
15
|
*
|
|
41
|
-
* See also {@link
|
|
16
|
+
* See also {@link stampGetActivity}.
|
|
42
17
|
*/
|
|
43
|
-
this.
|
|
44
|
-
return this.request("/public/v1/query/
|
|
18
|
+
this.getActivity = async (input) => {
|
|
19
|
+
return this.request("/public/v1/query/get_activity", input);
|
|
45
20
|
};
|
|
46
21
|
/**
|
|
47
|
-
* Produce a `SignedRequest` from `
|
|
22
|
+
* Produce a `SignedRequest` from `TGetActivityBody` by using the client's `stamp` function.
|
|
48
23
|
*
|
|
49
|
-
* See also {@link
|
|
24
|
+
* See also {@link GetActivity}.
|
|
50
25
|
*/
|
|
51
|
-
this.
|
|
52
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
26
|
+
this.stampGetActivity = async (input) => {
|
|
27
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_activity";
|
|
53
28
|
const body = JSON.stringify(input);
|
|
54
29
|
const stamp = await this.stamper.stamp(body);
|
|
55
30
|
return {
|
|
@@ -59,22 +34,22 @@ class TurnkeyClient {
|
|
|
59
34
|
};
|
|
60
35
|
};
|
|
61
36
|
/**
|
|
62
|
-
* Get
|
|
37
|
+
* Get details about an API key.
|
|
63
38
|
*
|
|
64
|
-
* Sign the provided `
|
|
39
|
+
* Sign the provided `TGetApiKeyBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_api_key).
|
|
65
40
|
*
|
|
66
|
-
* See also {@link
|
|
41
|
+
* See also {@link stampGetApiKey}.
|
|
67
42
|
*/
|
|
68
|
-
this.
|
|
69
|
-
return this.request("/public/v1/query/
|
|
43
|
+
this.getApiKey = async (input) => {
|
|
44
|
+
return this.request("/public/v1/query/get_api_key", input);
|
|
70
45
|
};
|
|
71
46
|
/**
|
|
72
|
-
* Produce a `SignedRequest` from `
|
|
47
|
+
* Produce a `SignedRequest` from `TGetApiKeyBody` by using the client's `stamp` function.
|
|
73
48
|
*
|
|
74
|
-
* See also {@link
|
|
49
|
+
* See also {@link GetApiKey}.
|
|
75
50
|
*/
|
|
76
|
-
this.
|
|
77
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
51
|
+
this.stampGetApiKey = async (input) => {
|
|
52
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_api_key";
|
|
78
53
|
const body = JSON.stringify(input);
|
|
79
54
|
const stamp = await this.stamper.stamp(body);
|
|
80
55
|
return {
|
|
@@ -84,22 +59,22 @@ class TurnkeyClient {
|
|
|
84
59
|
};
|
|
85
60
|
};
|
|
86
61
|
/**
|
|
87
|
-
* Get
|
|
62
|
+
* Get details about API keys for a user.
|
|
88
63
|
*
|
|
89
|
-
* Sign the provided `
|
|
64
|
+
* Sign the provided `TGetApiKeysBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_api_keys).
|
|
90
65
|
*
|
|
91
|
-
* See also {@link
|
|
66
|
+
* See also {@link stampGetApiKeys}.
|
|
92
67
|
*/
|
|
93
|
-
this.
|
|
94
|
-
return this.request("/public/v1/query/
|
|
68
|
+
this.getApiKeys = async (input) => {
|
|
69
|
+
return this.request("/public/v1/query/get_api_keys", input);
|
|
95
70
|
};
|
|
96
71
|
/**
|
|
97
|
-
* Produce a `SignedRequest` from `
|
|
72
|
+
* Produce a `SignedRequest` from `TGetApiKeysBody` by using the client's `stamp` function.
|
|
98
73
|
*
|
|
99
|
-
* See also {@link
|
|
74
|
+
* See also {@link GetApiKeys}.
|
|
100
75
|
*/
|
|
101
|
-
this.
|
|
102
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
76
|
+
this.stampGetApiKeys = async (input) => {
|
|
77
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_api_keys";
|
|
103
78
|
const body = JSON.stringify(input);
|
|
104
79
|
const stamp = await this.stamper.stamp(body);
|
|
105
80
|
return {
|
|
@@ -109,22 +84,22 @@ class TurnkeyClient {
|
|
|
109
84
|
};
|
|
110
85
|
};
|
|
111
86
|
/**
|
|
112
|
-
*
|
|
87
|
+
* Get live runtime status for a TVC App from the cluster.
|
|
113
88
|
*
|
|
114
|
-
* Sign the provided `
|
|
89
|
+
* Sign the provided `TGetAppStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_app_status).
|
|
115
90
|
*
|
|
116
|
-
* See also {@link
|
|
91
|
+
* See also {@link stampGetAppStatus}.
|
|
117
92
|
*/
|
|
118
|
-
this.
|
|
119
|
-
return this.request("/public/v1/query/
|
|
93
|
+
this.getAppStatus = async (input) => {
|
|
94
|
+
return this.request("/public/v1/query/get_app_status", input);
|
|
120
95
|
};
|
|
121
96
|
/**
|
|
122
|
-
* Produce a `SignedRequest` from `
|
|
97
|
+
* Produce a `SignedRequest` from `TGetAppStatusBody` by using the client's `stamp` function.
|
|
123
98
|
*
|
|
124
|
-
* See also {@link
|
|
99
|
+
* See also {@link GetAppStatus}.
|
|
125
100
|
*/
|
|
126
|
-
this.
|
|
127
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
101
|
+
this.stampGetAppStatus = async (input) => {
|
|
102
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_app_status";
|
|
128
103
|
const body = JSON.stringify(input);
|
|
129
104
|
const stamp = await this.stamper.stamp(body);
|
|
130
105
|
return {
|
|
@@ -134,22 +109,22 @@ class TurnkeyClient {
|
|
|
134
109
|
};
|
|
135
110
|
};
|
|
136
111
|
/**
|
|
137
|
-
* Get details about an
|
|
112
|
+
* Get details about an authenticator.
|
|
138
113
|
*
|
|
139
|
-
* Sign the provided `
|
|
114
|
+
* Sign the provided `TGetAuthenticatorBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_authenticator).
|
|
140
115
|
*
|
|
141
|
-
* See also {@link
|
|
116
|
+
* See also {@link stampGetAuthenticator}.
|
|
142
117
|
*/
|
|
143
|
-
this.
|
|
144
|
-
return this.request("/public/v1/query/
|
|
118
|
+
this.getAuthenticator = async (input) => {
|
|
119
|
+
return this.request("/public/v1/query/get_authenticator", input);
|
|
145
120
|
};
|
|
146
121
|
/**
|
|
147
|
-
* Produce a `SignedRequest` from `
|
|
122
|
+
* Produce a `SignedRequest` from `TGetAuthenticatorBody` by using the client's `stamp` function.
|
|
148
123
|
*
|
|
149
|
-
* See also {@link
|
|
124
|
+
* See also {@link GetAuthenticator}.
|
|
150
125
|
*/
|
|
151
|
-
this.
|
|
152
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
126
|
+
this.stampGetAuthenticator = async (input) => {
|
|
127
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_authenticator";
|
|
153
128
|
const body = JSON.stringify(input);
|
|
154
129
|
const stamp = await this.stamper.stamp(body);
|
|
155
130
|
return {
|
|
@@ -159,22 +134,22 @@ class TurnkeyClient {
|
|
|
159
134
|
};
|
|
160
135
|
};
|
|
161
136
|
/**
|
|
162
|
-
* Get details about
|
|
137
|
+
* Get details about authenticators for a user.
|
|
163
138
|
*
|
|
164
|
-
* Sign the provided `
|
|
139
|
+
* Sign the provided `TGetAuthenticatorsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_authenticators).
|
|
165
140
|
*
|
|
166
|
-
* See also {@link
|
|
141
|
+
* See also {@link stampGetAuthenticators}.
|
|
167
142
|
*/
|
|
168
|
-
this.
|
|
169
|
-
return this.request("/public/v1/query/
|
|
143
|
+
this.getAuthenticators = async (input) => {
|
|
144
|
+
return this.request("/public/v1/query/get_authenticators", input);
|
|
170
145
|
};
|
|
171
146
|
/**
|
|
172
|
-
* Produce a `SignedRequest` from `
|
|
147
|
+
* Produce a `SignedRequest` from `TGetAuthenticatorsBody` by using the client's `stamp` function.
|
|
173
148
|
*
|
|
174
|
-
* See also {@link
|
|
149
|
+
* See also {@link GetAuthenticators}.
|
|
175
150
|
*/
|
|
176
|
-
this.
|
|
177
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
151
|
+
this.stampGetAuthenticators = async (input) => {
|
|
152
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_authenticators";
|
|
178
153
|
const body = JSON.stringify(input);
|
|
179
154
|
const stamp = await this.stamper.stamp(body);
|
|
180
155
|
return {
|
|
@@ -184,22 +159,22 @@ class TurnkeyClient {
|
|
|
184
159
|
};
|
|
185
160
|
};
|
|
186
161
|
/**
|
|
187
|
-
* Get
|
|
162
|
+
* Get the boot proof for a given ephemeral key.
|
|
188
163
|
*
|
|
189
|
-
* Sign the provided `
|
|
164
|
+
* Sign the provided `TGetBootProofBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_boot_proof).
|
|
190
165
|
*
|
|
191
|
-
* See also {@link
|
|
166
|
+
* See also {@link stampGetBootProof}.
|
|
192
167
|
*/
|
|
193
|
-
this.
|
|
194
|
-
return this.request("/public/v1/query/
|
|
168
|
+
this.getBootProof = async (input) => {
|
|
169
|
+
return this.request("/public/v1/query/get_boot_proof", input);
|
|
195
170
|
};
|
|
196
171
|
/**
|
|
197
|
-
* Produce a `SignedRequest` from `
|
|
172
|
+
* Produce a `SignedRequest` from `TGetBootProofBody` by using the client's `stamp` function.
|
|
198
173
|
*
|
|
199
|
-
* See also {@link
|
|
174
|
+
* See also {@link GetBootProof}.
|
|
200
175
|
*/
|
|
201
|
-
this.
|
|
202
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
176
|
+
this.stampGetBootProof = async (input) => {
|
|
177
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_boot_proof";
|
|
203
178
|
const body = JSON.stringify(input);
|
|
204
179
|
const stamp = await this.stamper.stamp(body);
|
|
205
180
|
return {
|
|
@@ -209,22 +184,22 @@ class TurnkeyClient {
|
|
|
209
184
|
};
|
|
210
185
|
};
|
|
211
186
|
/**
|
|
212
|
-
*
|
|
187
|
+
* Poll the status of a fee claim by its claim_request_id.
|
|
213
188
|
*
|
|
214
|
-
* Sign the provided `
|
|
189
|
+
* Sign the provided `TGetClaimEarnFeesStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_claim_earn_fees_status).
|
|
215
190
|
*
|
|
216
|
-
* See also {@link
|
|
191
|
+
* See also {@link stampGetClaimEarnFeesStatus}.
|
|
217
192
|
*/
|
|
218
|
-
this.
|
|
219
|
-
return this.request("/public/v1/query/
|
|
193
|
+
this.getClaimEarnFeesStatus = async (input) => {
|
|
194
|
+
return this.request("/public/v1/query/get_claim_earn_fees_status", input);
|
|
220
195
|
};
|
|
221
196
|
/**
|
|
222
|
-
* Produce a `SignedRequest` from `
|
|
197
|
+
* Produce a `SignedRequest` from `TGetClaimEarnFeesStatusBody` by using the client's `stamp` function.
|
|
223
198
|
*
|
|
224
|
-
* See also {@link
|
|
199
|
+
* See also {@link GetClaimEarnFeesStatus}.
|
|
225
200
|
*/
|
|
226
|
-
this.
|
|
227
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
201
|
+
this.stampGetClaimEarnFeesStatus = async (input) => {
|
|
202
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_claim_earn_fees_status";
|
|
228
203
|
const body = JSON.stringify(input);
|
|
229
204
|
const stamp = await this.stamper.stamp(body);
|
|
230
205
|
return {
|
|
@@ -234,22 +209,22 @@ class TurnkeyClient {
|
|
|
234
209
|
};
|
|
235
210
|
};
|
|
236
211
|
/**
|
|
237
|
-
*
|
|
212
|
+
* Poll the status of a wrapper deployment by its deploy_request_id.
|
|
238
213
|
*
|
|
239
|
-
* Sign the provided `
|
|
214
|
+
* Sign the provided `TGetEarnDeployStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_deploy_status).
|
|
240
215
|
*
|
|
241
|
-
* See also {@link
|
|
216
|
+
* See also {@link stampGetEarnDeployStatus}.
|
|
242
217
|
*/
|
|
243
|
-
this.
|
|
244
|
-
return this.request("/public/v1/query/
|
|
218
|
+
this.getEarnDeployStatus = async (input) => {
|
|
219
|
+
return this.request("/public/v1/query/get_earn_deploy_status", input);
|
|
245
220
|
};
|
|
246
221
|
/**
|
|
247
|
-
* Produce a `SignedRequest` from `
|
|
222
|
+
* Produce a `SignedRequest` from `TGetEarnDeployStatusBody` by using the client's `stamp` function.
|
|
248
223
|
*
|
|
249
|
-
* See also {@link
|
|
224
|
+
* See also {@link GetEarnDeployStatus}.
|
|
250
225
|
*/
|
|
251
|
-
this.
|
|
252
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
226
|
+
this.stampGetEarnDeployStatus = async (input) => {
|
|
227
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_deploy_status";
|
|
253
228
|
const body = JSON.stringify(input);
|
|
254
229
|
const stamp = await this.stamper.stamp(body);
|
|
255
230
|
return {
|
|
@@ -259,22 +234,22 @@ class TurnkeyClient {
|
|
|
259
234
|
};
|
|
260
235
|
};
|
|
261
236
|
/**
|
|
262
|
-
*
|
|
237
|
+
* Poll the status of a deposit by its deposit_request_id (for the async/sponsored deposit path).
|
|
263
238
|
*
|
|
264
|
-
* Sign the provided `
|
|
239
|
+
* Sign the provided `TGetEarnDepositStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_deposit_status).
|
|
265
240
|
*
|
|
266
|
-
* See also {@link
|
|
241
|
+
* See also {@link stampGetEarnDepositStatus}.
|
|
267
242
|
*/
|
|
268
|
-
this.
|
|
269
|
-
return this.request("/public/v1/query/
|
|
243
|
+
this.getEarnDepositStatus = async (input) => {
|
|
244
|
+
return this.request("/public/v1/query/get_earn_deposit_status", input);
|
|
270
245
|
};
|
|
271
246
|
/**
|
|
272
|
-
* Produce a `SignedRequest` from `
|
|
247
|
+
* Produce a `SignedRequest` from `TGetEarnDepositStatusBody` by using the client's `stamp` function.
|
|
273
248
|
*
|
|
274
|
-
* See also {@link
|
|
249
|
+
* See also {@link GetEarnDepositStatus}.
|
|
275
250
|
*/
|
|
276
|
-
this.
|
|
277
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
251
|
+
this.stampGetEarnDepositStatus = async (input) => {
|
|
252
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_deposit_status";
|
|
278
253
|
const body = JSON.stringify(input);
|
|
279
254
|
const stamp = await this.stamper.stamp(body);
|
|
280
255
|
return {
|
|
@@ -284,22 +259,22 @@ class TurnkeyClient {
|
|
|
284
259
|
};
|
|
285
260
|
};
|
|
286
261
|
/**
|
|
287
|
-
*
|
|
262
|
+
* Poll the status of a withdrawal by its withdraw_request_id.
|
|
288
263
|
*
|
|
289
|
-
* Sign the provided `
|
|
264
|
+
* Sign the provided `TGetEarnWithdrawStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_earn_withdraw_status).
|
|
290
265
|
*
|
|
291
|
-
* See also {@link
|
|
266
|
+
* See also {@link stampGetEarnWithdrawStatus}.
|
|
292
267
|
*/
|
|
293
|
-
this.
|
|
294
|
-
return this.request("/public/v1/query/
|
|
268
|
+
this.getEarnWithdrawStatus = async (input) => {
|
|
269
|
+
return this.request("/public/v1/query/get_earn_withdraw_status", input);
|
|
295
270
|
};
|
|
296
271
|
/**
|
|
297
|
-
* Produce a `SignedRequest` from `
|
|
272
|
+
* Produce a `SignedRequest` from `TGetEarnWithdrawStatusBody` by using the client's `stamp` function.
|
|
298
273
|
*
|
|
299
|
-
* See also {@link
|
|
274
|
+
* See also {@link GetEarnWithdrawStatus}.
|
|
300
275
|
*/
|
|
301
|
-
this.
|
|
302
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/
|
|
276
|
+
this.stampGetEarnWithdrawStatus = async (input) => {
|
|
277
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/get_earn_withdraw_status";
|
|
303
278
|
const body = JSON.stringify(input);
|
|
304
279
|
const stamp = await this.stamper.stamp(body);
|
|
305
280
|
return {
|
|
@@ -784,32 +759,7 @@ class TurnkeyClient {
|
|
|
784
759
|
};
|
|
785
760
|
};
|
|
786
761
|
/**
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
* Sign the provided `TGetSwapQuoteBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_quote).
|
|
790
|
-
*
|
|
791
|
-
* See also {@link stampGetSwapQuote}.
|
|
792
|
-
*/
|
|
793
|
-
this.getSwapQuote = async (input) => {
|
|
794
|
-
return this.request("/public/v1/query/get_swap_quote", input);
|
|
795
|
-
};
|
|
796
|
-
/**
|
|
797
|
-
* Produce a `SignedRequest` from `TGetSwapQuoteBody` by using the client's `stamp` function.
|
|
798
|
-
*
|
|
799
|
-
* See also {@link GetSwapQuote}.
|
|
800
|
-
*/
|
|
801
|
-
this.stampGetSwapQuote = async (input) => {
|
|
802
|
-
const fullUrl = this.config.baseUrl + "/public/v1/query/get_swap_quote";
|
|
803
|
-
const body = JSON.stringify(input);
|
|
804
|
-
const stamp = await this.stamper.stamp(body);
|
|
805
|
-
return {
|
|
806
|
-
body: body,
|
|
807
|
-
stamp: stamp,
|
|
808
|
-
url: fullUrl,
|
|
809
|
-
};
|
|
810
|
-
};
|
|
811
|
-
/**
|
|
812
|
-
* Get the status of a swap by the send_transaction_status_id returned from execute_swap. Covers same-chain and cross-chain swaps.
|
|
762
|
+
* Poll the status of a swap by its swap_request_id. Covers same-chain and cross-chain swaps.
|
|
813
763
|
*
|
|
814
764
|
* Sign the provided `TGetSwapStatusBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/get_swap_status).
|
|
815
765
|
*
|
|
@@ -1084,6 +1034,81 @@ class TurnkeyClient {
|
|
|
1084
1034
|
url: fullUrl,
|
|
1085
1035
|
};
|
|
1086
1036
|
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Get the organization's deployed wrappers with on-chain total deposited and live APY. The management view, distinct from per-wallet positions.
|
|
1039
|
+
*
|
|
1040
|
+
* Sign the provided `TListEarnEnabledVaultsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_enabled_vaults).
|
|
1041
|
+
*
|
|
1042
|
+
* See also {@link stampListEarnEnabledVaults}.
|
|
1043
|
+
*/
|
|
1044
|
+
this.listEarnEnabledVaults = async (input) => {
|
|
1045
|
+
return this.request("/public/v1/query/list_earn_enabled_vaults", input);
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Produce a `SignedRequest` from `TListEarnEnabledVaultsBody` by using the client's `stamp` function.
|
|
1049
|
+
*
|
|
1050
|
+
* See also {@link ListEarnEnabledVaults}.
|
|
1051
|
+
*/
|
|
1052
|
+
this.stampListEarnEnabledVaults = async (input) => {
|
|
1053
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_enabled_vaults";
|
|
1054
|
+
const body = JSON.stringify(input);
|
|
1055
|
+
const stamp = await this.stamper.stamp(body);
|
|
1056
|
+
return {
|
|
1057
|
+
body: body,
|
|
1058
|
+
stamp: stamp,
|
|
1059
|
+
url: fullUrl,
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
/**
|
|
1063
|
+
* Get the active Earn positions for a specific wallet, including current value, cost basis, yield, and projected fees.
|
|
1064
|
+
*
|
|
1065
|
+
* Sign the provided `TListEarnPositionsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_positions).
|
|
1066
|
+
*
|
|
1067
|
+
* See also {@link stampListEarnPositions}.
|
|
1068
|
+
*/
|
|
1069
|
+
this.listEarnPositions = async (input) => {
|
|
1070
|
+
return this.request("/public/v1/query/list_earn_positions", input);
|
|
1071
|
+
};
|
|
1072
|
+
/**
|
|
1073
|
+
* Produce a `SignedRequest` from `TListEarnPositionsBody` by using the client's `stamp` function.
|
|
1074
|
+
*
|
|
1075
|
+
* See also {@link ListEarnPositions}.
|
|
1076
|
+
*/
|
|
1077
|
+
this.stampListEarnPositions = async (input) => {
|
|
1078
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_positions";
|
|
1079
|
+
const body = JSON.stringify(input);
|
|
1080
|
+
const stamp = await this.stamper.stamp(body);
|
|
1081
|
+
return {
|
|
1082
|
+
body: body,
|
|
1083
|
+
stamp: stamp,
|
|
1084
|
+
url: fullUrl,
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
/**
|
|
1088
|
+
* Get the catalog of all wrappable yield vaults across supported chains, enriched with live TVL and APY. Annotates which vaults the organization has already enabled.
|
|
1089
|
+
*
|
|
1090
|
+
* Sign the provided `TListEarnVaultsBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_earn_vaults).
|
|
1091
|
+
*
|
|
1092
|
+
* See also {@link stampListEarnVaults}.
|
|
1093
|
+
*/
|
|
1094
|
+
this.listEarnVaults = async (input) => {
|
|
1095
|
+
return this.request("/public/v1/query/list_earn_vaults", input);
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Produce a `SignedRequest` from `TListEarnVaultsBody` by using the client's `stamp` function.
|
|
1099
|
+
*
|
|
1100
|
+
* See also {@link ListEarnVaults}.
|
|
1101
|
+
*/
|
|
1102
|
+
this.stampListEarnVaults = async (input) => {
|
|
1103
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_earn_vaults";
|
|
1104
|
+
const body = JSON.stringify(input);
|
|
1105
|
+
const stamp = await this.stamper.stamp(body);
|
|
1106
|
+
return {
|
|
1107
|
+
body: body,
|
|
1108
|
+
stamp: stamp,
|
|
1109
|
+
url: fullUrl,
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1087
1112
|
/**
|
|
1088
1113
|
* List email events for the organization.
|
|
1089
1114
|
*
|
|
@@ -1109,6 +1134,31 @@ class TurnkeyClient {
|
|
|
1109
1134
|
url: fullUrl,
|
|
1110
1135
|
};
|
|
1111
1136
|
};
|
|
1137
|
+
/**
|
|
1138
|
+
* List Ethereum transaction history for a wallet address on the specified network.
|
|
1139
|
+
*
|
|
1140
|
+
* Sign the provided `TListEthTransactionHistoryBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_eth_transaction_history).
|
|
1141
|
+
*
|
|
1142
|
+
* See also {@link stampListEthTransactionHistory}.
|
|
1143
|
+
*/
|
|
1144
|
+
this.listEthTransactionHistory = async (input) => {
|
|
1145
|
+
return this.request("/public/v1/query/list_eth_transaction_history", input);
|
|
1146
|
+
};
|
|
1147
|
+
/**
|
|
1148
|
+
* Produce a `SignedRequest` from `TListEthTransactionHistoryBody` by using the client's `stamp` function.
|
|
1149
|
+
*
|
|
1150
|
+
* See also {@link ListEthTransactionHistory}.
|
|
1151
|
+
*/
|
|
1152
|
+
this.stampListEthTransactionHistory = async (input) => {
|
|
1153
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_eth_transaction_history";
|
|
1154
|
+
const body = JSON.stringify(input);
|
|
1155
|
+
const stamp = await this.stamper.stamp(body);
|
|
1156
|
+
return {
|
|
1157
|
+
body: body,
|
|
1158
|
+
stamp: stamp,
|
|
1159
|
+
url: fullUrl,
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1112
1162
|
/**
|
|
1113
1163
|
* List all fiat on ramp provider credentials within an organization.
|
|
1114
1164
|
*
|
|
@@ -1259,6 +1309,31 @@ class TurnkeyClient {
|
|
|
1259
1309
|
url: fullUrl,
|
|
1260
1310
|
};
|
|
1261
1311
|
};
|
|
1312
|
+
/**
|
|
1313
|
+
* List Solana transaction history for a wallet address on the specified network.
|
|
1314
|
+
*
|
|
1315
|
+
* Sign the provided `TListSolTransactionHistoryBody` with the client's `stamp` function, and submit the request (POST /public/v1/query/list_sol_transaction_history).
|
|
1316
|
+
*
|
|
1317
|
+
* See also {@link stampListSolTransactionHistory}.
|
|
1318
|
+
*/
|
|
1319
|
+
this.listSolTransactionHistory = async (input) => {
|
|
1320
|
+
return this.request("/public/v1/query/list_sol_transaction_history", input);
|
|
1321
|
+
};
|
|
1322
|
+
/**
|
|
1323
|
+
* Produce a `SignedRequest` from `TListSolTransactionHistoryBody` by using the client's `stamp` function.
|
|
1324
|
+
*
|
|
1325
|
+
* See also {@link ListSolTransactionHistory}.
|
|
1326
|
+
*/
|
|
1327
|
+
this.stampListSolTransactionHistory = async (input) => {
|
|
1328
|
+
const fullUrl = this.config.baseUrl + "/public/v1/query/list_sol_transaction_history";
|
|
1329
|
+
const body = JSON.stringify(input);
|
|
1330
|
+
const stamp = await this.stamper.stamp(body);
|
|
1331
|
+
return {
|
|
1332
|
+
body: body,
|
|
1333
|
+
stamp: stamp,
|
|
1334
|
+
url: fullUrl,
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1262
1337
|
/**
|
|
1263
1338
|
* Get all suborg IDs associated given a parent org ID and an optional filter.
|
|
1264
1339
|
*
|
|
@@ -1584,6 +1659,56 @@ class TurnkeyClient {
|
|
|
1584
1659
|
url: fullUrl,
|
|
1585
1660
|
};
|
|
1586
1661
|
};
|
|
1662
|
+
/**
|
|
1663
|
+
* Claim earn fees through the activity pipeline.
|
|
1664
|
+
*
|
|
1665
|
+
* Sign the provided `TClaimEarnFeesBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/claim_earn_fees).
|
|
1666
|
+
*
|
|
1667
|
+
* See also {@link stampClaimEarnFees}.
|
|
1668
|
+
*/
|
|
1669
|
+
this.claimEarnFees = async (input) => {
|
|
1670
|
+
return this.request("/public/v1/submit/claim_earn_fees", input);
|
|
1671
|
+
};
|
|
1672
|
+
/**
|
|
1673
|
+
* Produce a `SignedRequest` from `TClaimEarnFeesBody` by using the client's `stamp` function.
|
|
1674
|
+
*
|
|
1675
|
+
* See also {@link ClaimEarnFees}.
|
|
1676
|
+
*/
|
|
1677
|
+
this.stampClaimEarnFees = async (input) => {
|
|
1678
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/claim_earn_fees";
|
|
1679
|
+
const body = JSON.stringify(input);
|
|
1680
|
+
const stamp = await this.stamper.stamp(body);
|
|
1681
|
+
return {
|
|
1682
|
+
body: body,
|
|
1683
|
+
stamp: stamp,
|
|
1684
|
+
url: fullUrl,
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
/**
|
|
1688
|
+
* Claim swap fees through the activity pipeline.
|
|
1689
|
+
*
|
|
1690
|
+
* Sign the provided `TClaimSwapFeesBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/claim_swap_fees).
|
|
1691
|
+
*
|
|
1692
|
+
* See also {@link stampClaimSwapFees}.
|
|
1693
|
+
*/
|
|
1694
|
+
this.claimSwapFees = async (input) => {
|
|
1695
|
+
return this.request("/public/v1/submit/claim_swap_fees", input);
|
|
1696
|
+
};
|
|
1697
|
+
/**
|
|
1698
|
+
* Produce a `SignedRequest` from `TClaimSwapFeesBody` by using the client's `stamp` function.
|
|
1699
|
+
*
|
|
1700
|
+
* See also {@link ClaimSwapFees}.
|
|
1701
|
+
*/
|
|
1702
|
+
this.stampClaimSwapFees = async (input) => {
|
|
1703
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/claim_swap_fees";
|
|
1704
|
+
const body = JSON.stringify(input);
|
|
1705
|
+
const stamp = await this.stamper.stamp(body);
|
|
1706
|
+
return {
|
|
1707
|
+
body: body,
|
|
1708
|
+
stamp: stamp,
|
|
1709
|
+
url: fullUrl,
|
|
1710
|
+
};
|
|
1711
|
+
};
|
|
1587
1712
|
/**
|
|
1588
1713
|
* Add API keys to an existing user.
|
|
1589
1714
|
*
|
|
@@ -1985,7 +2110,7 @@ class TurnkeyClient {
|
|
|
1985
2110
|
};
|
|
1986
2111
|
};
|
|
1987
2112
|
/**
|
|
1988
|
-
* Create a new sub-organization.
|
|
2113
|
+
* Create a new sub-organization. Each root user must have at least one valid credential: an API key, an authenticator, an OAuth provider, or an email or phone number with a login method enabled on the sub-organization (email, email OTP, or SMS).
|
|
1989
2114
|
*
|
|
1990
2115
|
* Sign the provided `TCreateSubOrganizationBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_sub_organization).
|
|
1991
2116
|
*
|
|
@@ -2009,6 +2134,31 @@ class TurnkeyClient {
|
|
|
2009
2134
|
url: fullUrl,
|
|
2010
2135
|
};
|
|
2011
2136
|
};
|
|
2137
|
+
/**
|
|
2138
|
+
* Get a swap quote. Asset chains are derived from CAIP-19 asset IDs; cross-chain quotes are supported.
|
|
2139
|
+
*
|
|
2140
|
+
* Sign the provided `TCreateSwapQuoteBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_swap_quote).
|
|
2141
|
+
*
|
|
2142
|
+
* See also {@link stampCreateSwapQuote}.
|
|
2143
|
+
*/
|
|
2144
|
+
this.createSwapQuote = async (input) => {
|
|
2145
|
+
return this.request("/public/v1/submit/create_swap_quote", input);
|
|
2146
|
+
};
|
|
2147
|
+
/**
|
|
2148
|
+
* Produce a `SignedRequest` from `TCreateSwapQuoteBody` by using the client's `stamp` function.
|
|
2149
|
+
*
|
|
2150
|
+
* See also {@link CreateSwapQuote}.
|
|
2151
|
+
*/
|
|
2152
|
+
this.stampCreateSwapQuote = async (input) => {
|
|
2153
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/create_swap_quote";
|
|
2154
|
+
const body = JSON.stringify(input);
|
|
2155
|
+
const stamp = await this.stamper.stamp(body);
|
|
2156
|
+
return {
|
|
2157
|
+
body: body,
|
|
2158
|
+
stamp: stamp,
|
|
2159
|
+
url: fullUrl,
|
|
2160
|
+
};
|
|
2161
|
+
};
|
|
2012
2162
|
/**
|
|
2013
2163
|
* Create a new TVC application
|
|
2014
2164
|
*
|
|
@@ -2160,7 +2310,7 @@ class TurnkeyClient {
|
|
|
2160
2310
|
};
|
|
2161
2311
|
};
|
|
2162
2312
|
/**
|
|
2163
|
-
* Create users in an existing organization.
|
|
2313
|
+
* Create users in an existing organization. Each user must have at least one valid credential: an API key, an authenticator, an OAuth provider, or an email or phone number with a login method enabled on the organization (email, email OTP, or SMS).
|
|
2164
2314
|
*
|
|
2165
2315
|
* Sign the provided `TCreateUsersBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/create_users).
|
|
2166
2316
|
*
|
|
@@ -2809,6 +2959,31 @@ class TurnkeyClient {
|
|
|
2809
2959
|
url: fullUrl,
|
|
2810
2960
|
};
|
|
2811
2961
|
};
|
|
2962
|
+
/**
|
|
2963
|
+
* Enable or disable deposits to a deployed Earn wrapper. Withdrawals are always allowed.
|
|
2964
|
+
*
|
|
2965
|
+
* Sign the provided `TEarnSetWrapperStateBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/earn_set_wrapper_state).
|
|
2966
|
+
*
|
|
2967
|
+
* See also {@link stampEarnSetWrapperState}.
|
|
2968
|
+
*/
|
|
2969
|
+
this.earnSetWrapperState = async (input) => {
|
|
2970
|
+
return this.request("/public/v1/submit/earn_set_wrapper_state", input);
|
|
2971
|
+
};
|
|
2972
|
+
/**
|
|
2973
|
+
* Produce a `SignedRequest` from `TEarnSetWrapperStateBody` by using the client's `stamp` function.
|
|
2974
|
+
*
|
|
2975
|
+
* See also {@link EarnSetWrapperState}.
|
|
2976
|
+
*/
|
|
2977
|
+
this.stampEarnSetWrapperState = async (input) => {
|
|
2978
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/earn_set_wrapper_state";
|
|
2979
|
+
const body = JSON.stringify(input);
|
|
2980
|
+
const stamp = await this.stamper.stamp(body);
|
|
2981
|
+
return {
|
|
2982
|
+
body: body,
|
|
2983
|
+
stamp: stamp,
|
|
2984
|
+
url: fullUrl,
|
|
2985
|
+
};
|
|
2986
|
+
};
|
|
2812
2987
|
/**
|
|
2813
2988
|
* Withdraw assets or redeem shares from an enabled yield vault.
|
|
2814
2989
|
*
|
|
@@ -2910,7 +3085,32 @@ class TurnkeyClient {
|
|
|
2910
3085
|
};
|
|
2911
3086
|
};
|
|
2912
3087
|
/**
|
|
2913
|
-
*
|
|
3088
|
+
* Submit an EIP-7702 undelegation transaction.
|
|
3089
|
+
*
|
|
3090
|
+
* Sign the provided `TEthUndelegate7702Body` with the client's `stamp` function, and submit the request (POST /public/v1/submit/eth_undelegate_7702).
|
|
3091
|
+
*
|
|
3092
|
+
* See also {@link stampEthUndelegate7702}.
|
|
3093
|
+
*/
|
|
3094
|
+
this.ethUndelegate7702 = async (input) => {
|
|
3095
|
+
return this.request("/public/v1/submit/eth_undelegate_7702", input);
|
|
3096
|
+
};
|
|
3097
|
+
/**
|
|
3098
|
+
* Produce a `SignedRequest` from `TEthUndelegate7702Body` by using the client's `stamp` function.
|
|
3099
|
+
*
|
|
3100
|
+
* See also {@link EthUndelegate7702}.
|
|
3101
|
+
*/
|
|
3102
|
+
this.stampEthUndelegate7702 = async (input) => {
|
|
3103
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/eth_undelegate_7702";
|
|
3104
|
+
const body = JSON.stringify(input);
|
|
3105
|
+
const stamp = await this.stamper.stamp(body);
|
|
3106
|
+
return {
|
|
3107
|
+
body: body,
|
|
3108
|
+
stamp: stamp,
|
|
3109
|
+
url: fullUrl,
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
3112
|
+
/**
|
|
3113
|
+
* Execute the exact provider quote identified by quote_id through the activity pipeline and Turnkey broadcasting. Requests must use ACTIVITY_TYPE_EXECUTE_SWAP_V2.
|
|
2914
3114
|
*
|
|
2915
3115
|
* Sign the provided `TExecuteSwapBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/execute_swap).
|
|
2916
3116
|
*
|
|
@@ -3109,6 +3309,31 @@ class TurnkeyClient {
|
|
|
3109
3309
|
url: fullUrl,
|
|
3110
3310
|
};
|
|
3111
3311
|
};
|
|
3312
|
+
/**
|
|
3313
|
+
* Initialize secret imports by generating Ingress Encryption Target Keys.
|
|
3314
|
+
*
|
|
3315
|
+
* Sign the provided `TInitImportSecretsBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/init_import_secrets).
|
|
3316
|
+
*
|
|
3317
|
+
* See also {@link stampInitImportSecrets}.
|
|
3318
|
+
*/
|
|
3319
|
+
this.initImportSecrets = async (input) => {
|
|
3320
|
+
return this.request("/public/v1/submit/init_import_secrets", input);
|
|
3321
|
+
};
|
|
3322
|
+
/**
|
|
3323
|
+
* Produce a `SignedRequest` from `TInitImportSecretsBody` by using the client's `stamp` function.
|
|
3324
|
+
*
|
|
3325
|
+
* See also {@link InitImportSecrets}.
|
|
3326
|
+
*/
|
|
3327
|
+
this.stampInitImportSecrets = async (input) => {
|
|
3328
|
+
const fullUrl = this.config.baseUrl + "/public/v1/submit/init_import_secrets";
|
|
3329
|
+
const body = JSON.stringify(input);
|
|
3330
|
+
const stamp = await this.stamper.stamp(body);
|
|
3331
|
+
return {
|
|
3332
|
+
body: body,
|
|
3333
|
+
stamp: stamp,
|
|
3334
|
+
url: fullUrl,
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3112
3337
|
/**
|
|
3113
3338
|
* Initialize a new wallet import.
|
|
3114
3339
|
*
|
|
@@ -3660,7 +3885,7 @@ class TurnkeyClient {
|
|
|
3660
3885
|
};
|
|
3661
3886
|
};
|
|
3662
3887
|
/**
|
|
3663
|
-
* Submit a transaction intent describing an SVM transaction you would like to broadcast.
|
|
3888
|
+
* Submit a transaction intent describing an SVM transaction you would like to broadcast. Supports single- and multi-signer intents via activity type versioning.
|
|
3664
3889
|
*
|
|
3665
3890
|
* Sign the provided `TSolSendTransactionBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/sol_send_transaction).
|
|
3666
3891
|
*
|
|
@@ -4159,31 +4384,6 @@ class TurnkeyClient {
|
|
|
4159
4384
|
url: fullUrl,
|
|
4160
4385
|
};
|
|
4161
4386
|
};
|
|
4162
|
-
/**
|
|
4163
|
-
* Set the client's Earn fee rate and payout wallet for the organization.
|
|
4164
|
-
*
|
|
4165
|
-
* Sign the provided `TUpsertEarnClientFeeConfigBody` with the client's `stamp` function, and submit the request (POST /public/v1/submit/upsert_earn_client_fee_config).
|
|
4166
|
-
*
|
|
4167
|
-
* See also {@link stampUpsertEarnClientFeeConfig}.
|
|
4168
|
-
*/
|
|
4169
|
-
this.upsertEarnClientFeeConfig = async (input) => {
|
|
4170
|
-
return this.request("/public/v1/submit/upsert_earn_client_fee_config", input);
|
|
4171
|
-
};
|
|
4172
|
-
/**
|
|
4173
|
-
* Produce a `SignedRequest` from `TUpsertEarnClientFeeConfigBody` by using the client's `stamp` function.
|
|
4174
|
-
*
|
|
4175
|
-
* See also {@link UpsertEarnClientFeeConfig}.
|
|
4176
|
-
*/
|
|
4177
|
-
this.stampUpsertEarnClientFeeConfig = async (input) => {
|
|
4178
|
-
const fullUrl = this.config.baseUrl + "/public/v1/submit/upsert_earn_client_fee_config";
|
|
4179
|
-
const body = JSON.stringify(input);
|
|
4180
|
-
const stamp = await this.stamper.stamp(body);
|
|
4181
|
-
return {
|
|
4182
|
-
body: body,
|
|
4183
|
-
stamp: stamp,
|
|
4184
|
-
url: fullUrl,
|
|
4185
|
-
};
|
|
4186
|
-
};
|
|
4187
4387
|
/**
|
|
4188
4388
|
* Enable or disable swap configuration for an organization.
|
|
4189
4389
|
*
|