@wallaby-cash/api-client 0.0.1
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 +7 -0
- package/dist/client/client.gen.d.ts +3 -0
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/client.gen.js +234 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +6 -0
- package/dist/client/types.gen.d.ts +118 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/types.gen.js +2 -0
- package/dist/client/utils.gen.d.ts +34 -0
- package/dist/client/utils.gen.d.ts.map +1 -0
- package/dist/client/utils.gen.js +228 -0
- package/dist/client.gen.d.ts +13 -0
- package/dist/client.gen.d.ts.map +1 -0
- package/dist/client.gen.js +3 -0
- package/dist/core/auth.gen.d.ts +19 -0
- package/dist/core/auth.gen.d.ts.map +1 -0
- package/dist/core/auth.gen.js +14 -0
- package/dist/core/bodySerializer.gen.d.ts +26 -0
- package/dist/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/core/bodySerializer.gen.js +57 -0
- package/dist/core/params.gen.d.ts +44 -0
- package/dist/core/params.gen.d.ts.map +1 -0
- package/dist/core/params.gen.js +100 -0
- package/dist/core/pathSerializer.gen.d.ts +34 -0
- package/dist/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/core/pathSerializer.gen.js +106 -0
- package/dist/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/core/queryKeySerializer.gen.js +92 -0
- package/dist/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/core/serverSentEvents.gen.js +133 -0
- package/dist/core/types.gen.d.ts +79 -0
- package/dist/core/types.gen.d.ts.map +1 -0
- package/dist/core/types.gen.js +2 -0
- package/dist/core/utils.gen.d.ts +20 -0
- package/dist/core/utils.gen.d.ts.map +1 -0
- package/dist/core/utils.gen.js +87 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/sdk.gen.d.ts +494 -0
- package/dist/sdk.gen.d.ts.map +1 -0
- package/dist/sdk.gen.js +1232 -0
- package/dist/startClient.d.ts +24 -0
- package/dist/startClient.d.ts.map +1 -0
- package/dist/startClient.js +49 -0
- package/dist/types.gen.d.ts +14551 -0
- package/dist/types.gen.d.ts.map +1 -0
- package/dist/types.gen.js +2 -0
- package/package.json +54 -0
package/dist/sdk.gen.js
ADDED
|
@@ -0,0 +1,1232 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client } from './client.gen';
|
|
3
|
+
/**
|
|
4
|
+
* Health Check API
|
|
5
|
+
*/
|
|
6
|
+
export const getHello = (options) => (options?.client ?? client).get({
|
|
7
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
8
|
+
url: '/',
|
|
9
|
+
...options
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Service API status check
|
|
13
|
+
*/
|
|
14
|
+
export const getHealthCheck = (options) => (options?.client ?? client).get({
|
|
15
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
16
|
+
url: '/healthz',
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* The returned message will be used for sign up and sign in signature
|
|
21
|
+
*/
|
|
22
|
+
export const generateExternalSignatureMessage = (options) => (options.client ?? client).post({
|
|
23
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
24
|
+
url: '/api/v1/auth/signature-message/external',
|
|
25
|
+
...options,
|
|
26
|
+
headers: {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
...options.headers
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* The returned message will be used for sign up and sign in signature
|
|
33
|
+
*/
|
|
34
|
+
export const generateSignatureMessage = (options) => (options.client ?? client).post({
|
|
35
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
36
|
+
url: '/api/v1/auth/signature-message',
|
|
37
|
+
...options,
|
|
38
|
+
headers: {
|
|
39
|
+
'Content-Type': 'application/json',
|
|
40
|
+
...options.headers
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Users will be able to sign up by providing a signature and message. Message to sign can be retrieved from /api/auth/signature-message
|
|
45
|
+
*/
|
|
46
|
+
export const signUp = (options) => (options.client ?? client).post({
|
|
47
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
48
|
+
url: '/api/v1/auth/sign-up',
|
|
49
|
+
...options,
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
...options.headers
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Users will be able to sign up by providing a signature and message. Message to sign can be retrieved from /api/auth/signature-message
|
|
57
|
+
*/
|
|
58
|
+
export const signUpExternal = (options) => (options.client ?? client).post({
|
|
59
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
60
|
+
url: '/api/v1/auth/sign-up/external',
|
|
61
|
+
...options,
|
|
62
|
+
headers: {
|
|
63
|
+
'Content-Type': 'application/json',
|
|
64
|
+
...options.headers
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
|
|
69
|
+
*/
|
|
70
|
+
export const signIn = (options) => (options.client ?? client).post({
|
|
71
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
72
|
+
url: '/api/v1/auth/sign-in',
|
|
73
|
+
...options,
|
|
74
|
+
headers: {
|
|
75
|
+
'Content-Type': 'application/json',
|
|
76
|
+
...options.headers
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
|
|
81
|
+
*
|
|
82
|
+
* @deprecated
|
|
83
|
+
*/
|
|
84
|
+
export const refreshAccessToken = (options) => (options?.client ?? client).post({
|
|
85
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
86
|
+
url: '/api/v1/auth/refresh-access-token',
|
|
87
|
+
...options
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Change user authentication public key
|
|
91
|
+
*/
|
|
92
|
+
export const changeAuthPublicKey = (options) => (options.client ?? client).put({
|
|
93
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
94
|
+
url: '/api/v1/auth/client-auth-pubkey',
|
|
95
|
+
...options,
|
|
96
|
+
headers: {
|
|
97
|
+
'Content-Type': 'application/json',
|
|
98
|
+
...options.headers
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* Get user public key
|
|
103
|
+
*/
|
|
104
|
+
export const getWallabyAuthPubKey = (options) => (options.client ?? client).post({
|
|
105
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
106
|
+
url: '/api/v1/auth/wallaby-auth-pubkey',
|
|
107
|
+
...options,
|
|
108
|
+
headers: {
|
|
109
|
+
'Content-Type': 'application/json',
|
|
110
|
+
...options.headers
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* Get user passkey credentials
|
|
115
|
+
*/
|
|
116
|
+
export const getPasskeyCredentials = (options) => (options?.client ?? client).get({
|
|
117
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
118
|
+
url: '/api/v1/auth/passkey-credentials',
|
|
119
|
+
...options
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Get all supported chains
|
|
123
|
+
*/
|
|
124
|
+
export const getAllChains = (options) => (options?.client ?? client).get({
|
|
125
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
126
|
+
url: '/api/v1/chains',
|
|
127
|
+
...options
|
|
128
|
+
});
|
|
129
|
+
/**
|
|
130
|
+
* Create new chain. This endpoint is only available for super admin and republic admin
|
|
131
|
+
*/
|
|
132
|
+
export const createChain = (options) => (options.client ?? client).post({
|
|
133
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
134
|
+
url: '/api/v1/chains',
|
|
135
|
+
...options,
|
|
136
|
+
headers: {
|
|
137
|
+
'Content-Type': 'application/json',
|
|
138
|
+
...options.headers
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
/**
|
|
142
|
+
* Update the chain public data
|
|
143
|
+
*/
|
|
144
|
+
export const updateChain = (options) => (options.client ?? client).put({
|
|
145
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
146
|
+
url: '/api/v1/chains/{chainId}',
|
|
147
|
+
...options,
|
|
148
|
+
headers: {
|
|
149
|
+
'Content-Type': 'application/json',
|
|
150
|
+
...options.headers
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Get all supported assets configuration that can be imported into a merchant or a user wallet
|
|
155
|
+
*/
|
|
156
|
+
export const getAssetsConfigurations = (options) => (options?.client ?? client).get({
|
|
157
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
158
|
+
url: '/api/v1/assets/configurations',
|
|
159
|
+
...options
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* Create new asset configuration that can be imported later into a merchant or a user wallet. This endpoint is only available for super admin and republic admin
|
|
163
|
+
*/
|
|
164
|
+
export const createAssetConfig = (options) => (options.client ?? client).post({
|
|
165
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
166
|
+
url: '/api/v1/assets/configurations',
|
|
167
|
+
...options,
|
|
168
|
+
headers: {
|
|
169
|
+
'Content-Type': 'application/json',
|
|
170
|
+
...options.headers
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
/**
|
|
174
|
+
* Update asset configuration that can be imported later into a merchant or a user wallet. This endpoint is only available for owner, super admin and republic admin
|
|
175
|
+
*/
|
|
176
|
+
export const updateAssetConfig = (options) => (options.client ?? client).put({
|
|
177
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
178
|
+
url: '/api/v1/assets/configurations/{assetConfigId}',
|
|
179
|
+
...options,
|
|
180
|
+
headers: {
|
|
181
|
+
'Content-Type': 'application/json',
|
|
182
|
+
...options.headers
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
/**
|
|
186
|
+
* Verify asset configuration details.
|
|
187
|
+
*/
|
|
188
|
+
export const verifyAsset = (options) => (options.client ?? client).post({
|
|
189
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
190
|
+
url: '/api/v1/assets/configurations/{assetConfigId}/verify',
|
|
191
|
+
...options
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* Unverify asset configuration
|
|
195
|
+
*/
|
|
196
|
+
export const unverifyAsset = (options) => (options.client ?? client).delete({
|
|
197
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
198
|
+
url: '/api/v1/assets/configurations/{assetConfigId}/unverify',
|
|
199
|
+
...options
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* Archive an asset configuration
|
|
203
|
+
*/
|
|
204
|
+
export const archiveAsset = (options) => (options.client ?? client).post({
|
|
205
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
206
|
+
url: '/api/v1/assets/configurations/{assetConfigId}/archive',
|
|
207
|
+
...options
|
|
208
|
+
});
|
|
209
|
+
/**
|
|
210
|
+
* Archive an asset configuration
|
|
211
|
+
*/
|
|
212
|
+
export const unarchiveAsset = (options) => (options.client ?? client).post({
|
|
213
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
214
|
+
url: '/api/v1/assets/configurations/{assetConfigId}/unarchive',
|
|
215
|
+
...options
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* Get all merchants
|
|
219
|
+
*/
|
|
220
|
+
export const getAllMerchants = (options) => (options?.client ?? client).get({
|
|
221
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
222
|
+
url: '/api/v1/merchants',
|
|
223
|
+
...options
|
|
224
|
+
});
|
|
225
|
+
/**
|
|
226
|
+
* Create new merchant. This endpoint is only available for super admin and republic admin
|
|
227
|
+
*/
|
|
228
|
+
export const createMerchant = (options) => (options.client ?? client).post({
|
|
229
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
230
|
+
url: '/api/v1/merchants',
|
|
231
|
+
...options,
|
|
232
|
+
headers: {
|
|
233
|
+
'Content-Type': 'application/json',
|
|
234
|
+
...options.headers
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* Get one merchant by id with counts
|
|
239
|
+
*/
|
|
240
|
+
export const getOneMerchant = (options) => (options.client ?? client).get({
|
|
241
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
242
|
+
url: '/api/v1/merchants/{merchantId}',
|
|
243
|
+
...options
|
|
244
|
+
});
|
|
245
|
+
/**
|
|
246
|
+
* Update merchant. This endpoint is only available for super admin and republic admin
|
|
247
|
+
*/
|
|
248
|
+
export const updateMerchant = (options) => (options.client ?? client).put({
|
|
249
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
250
|
+
url: '/api/v1/merchants/{merchantId}',
|
|
251
|
+
...options,
|
|
252
|
+
headers: {
|
|
253
|
+
'Content-Type': 'application/json',
|
|
254
|
+
...options.headers
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* Get merchant assets by merchant id
|
|
259
|
+
*/
|
|
260
|
+
export const getMerchantAssets = (options) => (options.client ?? client).get({
|
|
261
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
262
|
+
url: '/api/v1/merchants/{merchantId}/assets',
|
|
263
|
+
...options
|
|
264
|
+
});
|
|
265
|
+
/**
|
|
266
|
+
* Get merchant users by merchant id
|
|
267
|
+
*/
|
|
268
|
+
export const getMerchantUsers = (options) => (options.client ?? client).get({
|
|
269
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
270
|
+
url: '/api/v1/merchants/{merchantId}/users',
|
|
271
|
+
...options
|
|
272
|
+
});
|
|
273
|
+
/**
|
|
274
|
+
* Get merchant admins by merchant id
|
|
275
|
+
*/
|
|
276
|
+
export const getMerchantAdmins = (options) => (options.client ?? client).get({
|
|
277
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
278
|
+
url: '/api/v1/merchants/{merchantId}/admins',
|
|
279
|
+
...options
|
|
280
|
+
});
|
|
281
|
+
/**
|
|
282
|
+
* Invite merchant admins by merchant id
|
|
283
|
+
*/
|
|
284
|
+
export const inviteMerchantAdmins = (options) => (options.client ?? client).post({
|
|
285
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
286
|
+
url: '/api/v1/merchants/admins/invite',
|
|
287
|
+
...options,
|
|
288
|
+
headers: {
|
|
289
|
+
'Content-Type': 'application/json',
|
|
290
|
+
...options.headers
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
/**
|
|
294
|
+
* Invite merchant admins by merchant id
|
|
295
|
+
*/
|
|
296
|
+
export const revokeMerchantAdmins = (options) => (options.client ?? client).delete({
|
|
297
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
298
|
+
url: '/api/v1/merchants/{merchantId}/admins/{userId}',
|
|
299
|
+
...options
|
|
300
|
+
});
|
|
301
|
+
/**
|
|
302
|
+
* Get merchant wallets by merchant id
|
|
303
|
+
*/
|
|
304
|
+
export const getMerchantWallets = (options) => (options.client ?? client).get({
|
|
305
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
306
|
+
url: '/api/v1/merchants/{merchantId}/wallets',
|
|
307
|
+
...options
|
|
308
|
+
});
|
|
309
|
+
/**
|
|
310
|
+
* Add assets to merchant wallets by merchant id
|
|
311
|
+
*/
|
|
312
|
+
export const addMerchantWalletAssets = (options) => (options.client ?? client).post({
|
|
313
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
314
|
+
url: '/api/v1/merchants/wallets/add-assets',
|
|
315
|
+
...options,
|
|
316
|
+
headers: {
|
|
317
|
+
'Content-Type': 'application/json',
|
|
318
|
+
...options.headers
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
/**
|
|
322
|
+
* Add new asset to merchant based on the asset configuration
|
|
323
|
+
*/
|
|
324
|
+
export const addNewAsset = (options) => (options.client ?? client).post({
|
|
325
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
326
|
+
url: '/api/v1/merchants/assets/add',
|
|
327
|
+
...options,
|
|
328
|
+
headers: {
|
|
329
|
+
'Content-Type': 'application/json',
|
|
330
|
+
...options.headers
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
/**
|
|
334
|
+
* Remove asset from merchant based on the asset configuration
|
|
335
|
+
*/
|
|
336
|
+
export const removeAsset = (options) => (options.client ?? client).delete({
|
|
337
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
338
|
+
url: '/api/v1/merchants/assets/delete',
|
|
339
|
+
...options,
|
|
340
|
+
headers: {
|
|
341
|
+
'Content-Type': 'application/json',
|
|
342
|
+
...options.headers
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
/**
|
|
346
|
+
* Show merchant asset to wallet holders based on the asset configuration
|
|
347
|
+
*/
|
|
348
|
+
export const showMerchantAssetToWalletHolders = (options) => (options.client ?? client).post({
|
|
349
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
350
|
+
url: '/api/v1/merchants/assets/update-visibility',
|
|
351
|
+
...options,
|
|
352
|
+
headers: {
|
|
353
|
+
'Content-Type': 'application/json',
|
|
354
|
+
...options.headers
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
/**
|
|
358
|
+
* Change merchant asset default status
|
|
359
|
+
*/
|
|
360
|
+
export const changeMerchantAssetDefaultStatus = (options) => (options.client ?? client).post({
|
|
361
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
362
|
+
url: '/api/v1/merchants/assets/update-default-status',
|
|
363
|
+
...options,
|
|
364
|
+
headers: {
|
|
365
|
+
'Content-Type': 'application/json',
|
|
366
|
+
...options.headers
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
/**
|
|
370
|
+
* Create new API Key
|
|
371
|
+
*/
|
|
372
|
+
export const createApiKey = (options) => (options.client ?? client).post({
|
|
373
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
374
|
+
url: '/api/v1/merchants/api-keys/new',
|
|
375
|
+
...options,
|
|
376
|
+
headers: {
|
|
377
|
+
'Content-Type': 'application/json',
|
|
378
|
+
...options.headers
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
/**
|
|
382
|
+
* Whitelist API Key's origins
|
|
383
|
+
*/
|
|
384
|
+
export const whitelistApiKeyOrigins = (options) => (options.client ?? client).post({
|
|
385
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
386
|
+
url: '/api/v1/merchants/api-keys/whitelist-origins',
|
|
387
|
+
...options,
|
|
388
|
+
headers: {
|
|
389
|
+
'Content-Type': 'application/json',
|
|
390
|
+
...options.headers
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
/**
|
|
394
|
+
* Get all wallets by the admin
|
|
395
|
+
*/
|
|
396
|
+
export const getAllUsers = (options) => (options?.client ?? client).get({
|
|
397
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
398
|
+
url: '/api/v1/wallets',
|
|
399
|
+
...options
|
|
400
|
+
});
|
|
401
|
+
/**
|
|
402
|
+
* Create a newly fresh wallet, returns asset list and encrypted seed
|
|
403
|
+
*/
|
|
404
|
+
export const createWallet = (options) => (options.client ?? client).post({
|
|
405
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
406
|
+
url: '/api/v1/wallets/create',
|
|
407
|
+
...options,
|
|
408
|
+
headers: {
|
|
409
|
+
'Content-Type': 'application/json',
|
|
410
|
+
...options.headers
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
/**
|
|
414
|
+
* Verify that the user still has the ability to transact with the wallet
|
|
415
|
+
*/
|
|
416
|
+
export const verifyAccess = (options) => (options.client ?? client).post({
|
|
417
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
418
|
+
url: '/api/v1/wallets/verify-access',
|
|
419
|
+
...options,
|
|
420
|
+
headers: {
|
|
421
|
+
'Content-Type': 'application/json',
|
|
422
|
+
...options.headers
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
/**
|
|
426
|
+
* Create a server side admin wallet where encryptedSeed will be opaque to the caller
|
|
427
|
+
*/
|
|
428
|
+
export const createAdminWallet = (options) => (options.client ?? client).post({
|
|
429
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
430
|
+
url: '/api/v1/wallets/create-admin-server-wallet',
|
|
431
|
+
...options,
|
|
432
|
+
headers: {
|
|
433
|
+
'Content-Type': 'application/json',
|
|
434
|
+
...options.headers
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
/**
|
|
438
|
+
* Create a newly fresh wallet, returns asset list and encrypted seed, shares, or both
|
|
439
|
+
*/
|
|
440
|
+
export const createWalletV2 = (options) => (options.client ?? client).post({
|
|
441
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
442
|
+
url: '/api/v1/wallets/create-with-shares',
|
|
443
|
+
...options,
|
|
444
|
+
headers: {
|
|
445
|
+
'Content-Type': 'application/json',
|
|
446
|
+
...options.headers
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
/**
|
|
450
|
+
* Import an existing wallet seed phrase into wallaby system directly
|
|
451
|
+
*/
|
|
452
|
+
export const importWalletSeedPhraseV2 = (options) => (options.client ?? client).post({
|
|
453
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
454
|
+
url: '/api/v1/wallets/create-shares-based-wallet-from-seed',
|
|
455
|
+
...options,
|
|
456
|
+
headers: {
|
|
457
|
+
'Content-Type': 'application/json',
|
|
458
|
+
...options.headers
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
/**
|
|
462
|
+
* Retrieve shares which belong to the user on a specified wallet
|
|
463
|
+
*/
|
|
464
|
+
export const retrieveShares = (options) => (options.client ?? client).post({
|
|
465
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
466
|
+
url: '/api/v1/wallets/retrieve-shares',
|
|
467
|
+
...options,
|
|
468
|
+
headers: {
|
|
469
|
+
'Content-Type': 'application/json',
|
|
470
|
+
...options.headers
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
/**
|
|
474
|
+
* Share an entity wallet with another user
|
|
475
|
+
*/
|
|
476
|
+
export const shareWallet = (options) => (options.client ?? client).post({
|
|
477
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
478
|
+
url: '/api/v1/wallets/initiate-share-wallet',
|
|
479
|
+
...options,
|
|
480
|
+
headers: {
|
|
481
|
+
'Content-Type': 'application/json',
|
|
482
|
+
...options.headers
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
/**
|
|
486
|
+
* Unshare an entity wallet with a user previously granted access
|
|
487
|
+
*/
|
|
488
|
+
export const unshareWallet = (options) => (options.client ?? client).post({
|
|
489
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
490
|
+
url: '/api/v1/wallets/unshare-wallet',
|
|
491
|
+
...options,
|
|
492
|
+
headers: {
|
|
493
|
+
'Content-Type': 'application/json',
|
|
494
|
+
...options.headers
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
/**
|
|
498
|
+
* This endpoint will be called by the new device after it receives a Wallaby wrapped share
|
|
499
|
+
*/
|
|
500
|
+
export const addNewDevice = (options) => (options.client ?? client).post({
|
|
501
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
502
|
+
url: '/api/v1/wallets/add-new-device',
|
|
503
|
+
...options,
|
|
504
|
+
headers: {
|
|
505
|
+
'Content-Type': 'application/json',
|
|
506
|
+
...options.headers
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
/**
|
|
510
|
+
* Import an existing wallet seed phrase into wallaby system directly
|
|
511
|
+
*/
|
|
512
|
+
export const importWalletSeedPhrase = (options) => (options.client ?? client).post({
|
|
513
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
514
|
+
url: '/api/v1/wallets/import-seed-phrase',
|
|
515
|
+
...options,
|
|
516
|
+
headers: {
|
|
517
|
+
'Content-Type': 'application/json',
|
|
518
|
+
...options.headers
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
/**
|
|
522
|
+
* Generates missing wallet addresses for a user's wallet
|
|
523
|
+
*/
|
|
524
|
+
export const generateMissingAddresses = (options) => (options.client ?? client).post({
|
|
525
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
526
|
+
url: '/api/v1/wallets/generate-wallet-addresses',
|
|
527
|
+
...options,
|
|
528
|
+
headers: {
|
|
529
|
+
'Content-Type': 'application/json',
|
|
530
|
+
...options.headers
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
/**
|
|
534
|
+
* Get all assets that exist in a certain wallet, by specifying a wallet ID
|
|
535
|
+
*/
|
|
536
|
+
export const getUserAssetsByWalletId = (options) => (options.client ?? client).get({
|
|
537
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
538
|
+
url: '/api/v1/wallets/{walletId}/assets',
|
|
539
|
+
...options
|
|
540
|
+
});
|
|
541
|
+
/**
|
|
542
|
+
* Get one asset from a user's wallet
|
|
543
|
+
*/
|
|
544
|
+
export const getUserAsset = (options) => (options.client ?? client).get({
|
|
545
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
546
|
+
url: '/api/v1/wallets/asset',
|
|
547
|
+
...options,
|
|
548
|
+
headers: {
|
|
549
|
+
'Content-Type': 'application/json',
|
|
550
|
+
...options.headers
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
/**
|
|
554
|
+
* Update a specific asset in a wallet
|
|
555
|
+
*/
|
|
556
|
+
export const updateUserAsset = (options) => (options.client ?? client).put({
|
|
557
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
558
|
+
url: '/api/v1/wallets/asset/update',
|
|
559
|
+
...options,
|
|
560
|
+
headers: {
|
|
561
|
+
'Content-Type': 'application/json',
|
|
562
|
+
...options.headers
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
/**
|
|
566
|
+
* Initiate creation for a new multisig asset, by specifying participants and the threshold
|
|
567
|
+
*/
|
|
568
|
+
export const createMultisigAsset = (options) => (options.client ?? client).post({
|
|
569
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
570
|
+
url: '/api/v1/wallets/create-multisig-asset',
|
|
571
|
+
...options,
|
|
572
|
+
headers: {
|
|
573
|
+
'Content-Type': 'application/json',
|
|
574
|
+
...options.headers
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
/**
|
|
578
|
+
* Wallet Recovery - Step 1: Initiate wallet recovery
|
|
579
|
+
*/
|
|
580
|
+
export const initiateWalletRecovery = (options) => (options.client ?? client).post({
|
|
581
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
582
|
+
url: '/api/v1/wallets/recover/init',
|
|
583
|
+
...options,
|
|
584
|
+
headers: {
|
|
585
|
+
'Content-Type': 'application/json',
|
|
586
|
+
...options.headers
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
/**
|
|
590
|
+
* Wallet Recovery - Step 2 and final: Recover the lost wallet and its assets
|
|
591
|
+
*/
|
|
592
|
+
export const recoverWallet = (options) => (options.client ?? client).post({
|
|
593
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
594
|
+
url: '/api/v1/wallets/recover',
|
|
595
|
+
...options,
|
|
596
|
+
headers: {
|
|
597
|
+
'Content-Type': 'application/json',
|
|
598
|
+
...options.headers
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
/**
|
|
602
|
+
* Convert BIP39 Standard seed phrase to Algorand fixed 25 words mnemonic phrase
|
|
603
|
+
*/
|
|
604
|
+
export const convertStandardPhraseToAlgoSpecific = (options) => (options.client ?? client).post({
|
|
605
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
606
|
+
url: '/api/v1/wallets/convert-mnemonic-seed',
|
|
607
|
+
...options,
|
|
608
|
+
headers: {
|
|
609
|
+
'Content-Type': 'application/json',
|
|
610
|
+
...options.headers
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
/**
|
|
614
|
+
* Request a swap quote for exchanging assets
|
|
615
|
+
*/
|
|
616
|
+
export const requestSwapQuote = (options) => (options.client ?? client).post({
|
|
617
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
618
|
+
url: '/api/v1/wallets/{walletId}/swap/quote',
|
|
619
|
+
...options,
|
|
620
|
+
headers: {
|
|
621
|
+
'Content-Type': 'application/json',
|
|
622
|
+
...options.headers
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
/**
|
|
626
|
+
* Get swap history for a wallet
|
|
627
|
+
*/
|
|
628
|
+
export const getSwapHistory = (options) => (options.client ?? client).get({
|
|
629
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
630
|
+
url: '/api/v1/wallets/{walletId}/swaps',
|
|
631
|
+
...options
|
|
632
|
+
});
|
|
633
|
+
/**
|
|
634
|
+
* Get a specific swap by ID
|
|
635
|
+
*/
|
|
636
|
+
export const getSwapById = (options) => (options.client ?? client).get({
|
|
637
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
638
|
+
url: '/api/v1/wallets/{walletId}/swaps/{swapId}',
|
|
639
|
+
...options
|
|
640
|
+
});
|
|
641
|
+
/**
|
|
642
|
+
* Execute a swap transaction between supported assets
|
|
643
|
+
*/
|
|
644
|
+
export const executeSwap = (options) => (options.client ?? client).post({
|
|
645
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
646
|
+
url: '/api/v1/wallets/execute-swap',
|
|
647
|
+
...options,
|
|
648
|
+
headers: {
|
|
649
|
+
'Content-Type': 'application/json',
|
|
650
|
+
...options.headers
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
/**
|
|
654
|
+
* Get list of transactions
|
|
655
|
+
*/
|
|
656
|
+
export const getTransactions = (options) => (options?.client ?? client).get({
|
|
657
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
658
|
+
url: '/api/v1/transactions',
|
|
659
|
+
...options
|
|
660
|
+
});
|
|
661
|
+
/**
|
|
662
|
+
* Get list of pending transactions
|
|
663
|
+
*/
|
|
664
|
+
export const getPendingTransactions = (options) => (options.client ?? client).get({
|
|
665
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
666
|
+
url: '/api/v1/transactions/pending',
|
|
667
|
+
...options
|
|
668
|
+
});
|
|
669
|
+
/**
|
|
670
|
+
* Approve or reject a pending transaction
|
|
671
|
+
*/
|
|
672
|
+
export const resolvePendingTransaction = (options) => (options.client ?? client).post({
|
|
673
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
674
|
+
url: '/api/v1/transactions/resolve',
|
|
675
|
+
...options,
|
|
676
|
+
headers: {
|
|
677
|
+
'Content-Type': 'application/json',
|
|
678
|
+
...options.headers
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
/**
|
|
682
|
+
* Request transferring funds to a recipient address
|
|
683
|
+
*/
|
|
684
|
+
export const sendTransaction = (options) => (options.client ?? client).post({
|
|
685
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
686
|
+
url: '/api/v1/transactions/transfer',
|
|
687
|
+
...options,
|
|
688
|
+
headers: {
|
|
689
|
+
'Content-Type': 'application/json',
|
|
690
|
+
...options.headers
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
/**
|
|
694
|
+
* Request transferring funds to a recipient address
|
|
695
|
+
*/
|
|
696
|
+
export const sendV2Transaction = (options) => (options.client ?? client).post({
|
|
697
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
698
|
+
url: '/api/v1/transactions/transfer-with-shares',
|
|
699
|
+
...options,
|
|
700
|
+
headers: {
|
|
701
|
+
'Content-Type': 'application/json',
|
|
702
|
+
...options.headers
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
/**
|
|
706
|
+
* User initiating and signing a multi-sig transfer request
|
|
707
|
+
*/
|
|
708
|
+
export const initMultisigTransfer = (options) => (options.client ?? client).post({
|
|
709
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
710
|
+
url: '/api/v1/transactions/init-multisig-transfer',
|
|
711
|
+
...options,
|
|
712
|
+
headers: {
|
|
713
|
+
'Content-Type': 'application/json',
|
|
714
|
+
...options.headers
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
/**
|
|
718
|
+
* User initiating a multi-sig asset optin request and subsequently signs the first signature on the request
|
|
719
|
+
*/
|
|
720
|
+
export const initMultisigAssetOptin = (options) => (options.client ?? client).post({
|
|
721
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
722
|
+
url: '/api/v1/transactions/init-multisig-asset-optin',
|
|
723
|
+
...options,
|
|
724
|
+
headers: {
|
|
725
|
+
'Content-Type': 'application/json',
|
|
726
|
+
...options.headers
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
/**
|
|
730
|
+
* User initiating a multi-sig app optin request and subsequently signs the first signature on the request
|
|
731
|
+
*/
|
|
732
|
+
export const initMultisigAppOptin = (options) => (options.client ?? client).post({
|
|
733
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
734
|
+
url: '/api/v1/transactions/init-multisig-app-optin',
|
|
735
|
+
...options,
|
|
736
|
+
headers: {
|
|
737
|
+
'Content-Type': 'application/json',
|
|
738
|
+
...options.headers
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
/**
|
|
742
|
+
* Append signature to an existing multisig transaction request: It can be a request to transfer, optin, etc, ...
|
|
743
|
+
*/
|
|
744
|
+
export const signOnMultisigTransactionRequest = (options) => (options.client ?? client).post({
|
|
745
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
746
|
+
url: '/api/v1/transactions/sign-multisig-request',
|
|
747
|
+
...options,
|
|
748
|
+
headers: {
|
|
749
|
+
'Content-Type': 'application/json',
|
|
750
|
+
...options.headers
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
/**
|
|
754
|
+
* Transaction for optin to receive a specific asset in the future
|
|
755
|
+
*/
|
|
756
|
+
export const assetOptInTransaction = (options) => (options.client ?? client).post({
|
|
757
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
758
|
+
url: '/api/v1/transactions/asset-optin',
|
|
759
|
+
...options,
|
|
760
|
+
headers: {
|
|
761
|
+
'Content-Type': 'application/json',
|
|
762
|
+
...options.headers
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
/**
|
|
766
|
+
* Transaction for optin to interact with a specific app
|
|
767
|
+
*/
|
|
768
|
+
export const appOptInTransaction = (options) => (options.client ?? client).post({
|
|
769
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
770
|
+
url: '/api/v1/transactions/app-optin',
|
|
771
|
+
...options,
|
|
772
|
+
headers: {
|
|
773
|
+
'Content-Type': 'application/json',
|
|
774
|
+
...options.headers
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
/**
|
|
778
|
+
* Request fee estimate for a particular transaction
|
|
779
|
+
*/
|
|
780
|
+
export const getEstimateFee = (options) => (options.client ?? client).get({
|
|
781
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
782
|
+
url: '/api/v1/transactions/estimate-fee',
|
|
783
|
+
...options
|
|
784
|
+
});
|
|
785
|
+
/**
|
|
786
|
+
* Sign and broadcast raw transaction API
|
|
787
|
+
*
|
|
788
|
+
* The sign and broadcast transaction API was designed and implemented specifically for uses cases where the caller has their own custom raw transaction that is not yet currently supported by Wallaby
|
|
789
|
+
*/
|
|
790
|
+
export const signAndBroadcastRawTx = (options) => (options.client ?? client).post({
|
|
791
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
792
|
+
url: '/api/v1/transactions/sign-broadcast-rawtx',
|
|
793
|
+
...options,
|
|
794
|
+
headers: {
|
|
795
|
+
'Content-Type': 'application/json',
|
|
796
|
+
...options.headers
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
/**
|
|
800
|
+
* Fetch transaction status data using a reference or transaction hash
|
|
801
|
+
*/
|
|
802
|
+
export const fetchTransactionByHashOrReference = (options) => (options.client ?? client).get({
|
|
803
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
804
|
+
url: '/api/v1/transactions/status',
|
|
805
|
+
...options
|
|
806
|
+
});
|
|
807
|
+
/**
|
|
808
|
+
* Initiate a multisig raw transaction and sign the first signature on that same transaction
|
|
809
|
+
*/
|
|
810
|
+
export const initMultisigRawTransaction = (options) => (options.client ?? client).post({
|
|
811
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
812
|
+
url: '/api/v1/transactions/init-sign-broadcast-multisig-rawtx',
|
|
813
|
+
...options,
|
|
814
|
+
headers: {
|
|
815
|
+
'Content-Type': 'application/json',
|
|
816
|
+
...options.headers
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
/**
|
|
820
|
+
* Fetch transaction in raw data format from the system persistence
|
|
821
|
+
*/
|
|
822
|
+
export const getDetailedRawTransactionDataByReference = (options) => (options.client ?? client).get({
|
|
823
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
824
|
+
url: '/api/v1/transactions/raw-status',
|
|
825
|
+
...options
|
|
826
|
+
});
|
|
827
|
+
/**
|
|
828
|
+
* Fetch transaction's participants
|
|
829
|
+
*/
|
|
830
|
+
export const fetchTransactionParticipants = (options) => (options.client ?? client).get({
|
|
831
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
832
|
+
url: '/api/v1/transactions/{reference}/participants',
|
|
833
|
+
...options
|
|
834
|
+
});
|
|
835
|
+
/**
|
|
836
|
+
* Request to detect whether there is a transfer restriction on a particular transaction
|
|
837
|
+
*/
|
|
838
|
+
export const detectTransferRestriction = (options) => (options.client ?? client).get({
|
|
839
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
840
|
+
url: '/api/v1/transactions/detect-transfers-restrictions',
|
|
841
|
+
...options
|
|
842
|
+
});
|
|
843
|
+
/**
|
|
844
|
+
* Request restriction message by providing a restriction code
|
|
845
|
+
*/
|
|
846
|
+
export const fetchMessageForTransferRestriction = (options) => (options.client ?? client).get({
|
|
847
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
848
|
+
url: '/api/v1/transactions/transfer-restriction-message',
|
|
849
|
+
...options
|
|
850
|
+
});
|
|
851
|
+
/**
|
|
852
|
+
* Get the list of all assets that the current account has opted into. This is only relevant for the Algorand chain
|
|
853
|
+
*/
|
|
854
|
+
export const checkAssetOptinForAddress = (options) => (options.client ?? client).get({
|
|
855
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
856
|
+
url: '/api/v1/transactions/check-asset-optin',
|
|
857
|
+
...options
|
|
858
|
+
});
|
|
859
|
+
/**
|
|
860
|
+
* Get the list of all apps that the current account has opted into. This is only relevant for the Algorand chain
|
|
861
|
+
*/
|
|
862
|
+
export const checkAppOptinForAddress = (options) => (options.client ?? client).get({
|
|
863
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
864
|
+
url: '/api/v1/transactions/check-app-optin',
|
|
865
|
+
...options
|
|
866
|
+
});
|
|
867
|
+
/**
|
|
868
|
+
* Create an allowance for others to spend on your behalf
|
|
869
|
+
*/
|
|
870
|
+
export const createAllowanceTransaction = (options) => (options.client ?? client).post({
|
|
871
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
872
|
+
url: '/api/v1/transactions/create-allowance',
|
|
873
|
+
...options,
|
|
874
|
+
headers: {
|
|
875
|
+
'Content-Type': 'application/json',
|
|
876
|
+
...options.headers
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
/**
|
|
880
|
+
* Fetch asset balance by specifying the asset address and the asset symbol
|
|
881
|
+
*/
|
|
882
|
+
export const fetchBalance = (options) => (options.client ?? client).get({
|
|
883
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
884
|
+
url: '/api/v1/query/assets/balance',
|
|
885
|
+
...options
|
|
886
|
+
});
|
|
887
|
+
/**
|
|
888
|
+
* Fetch address balance by specifying the address and the asset symbol. This API works even for external assets addresses
|
|
889
|
+
*/
|
|
890
|
+
export const fetchOnlyBalance = (options) => (options.client ?? client).get({
|
|
891
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
892
|
+
url: '/api/v1/query/address/balance',
|
|
893
|
+
...options
|
|
894
|
+
});
|
|
895
|
+
/**
|
|
896
|
+
* Fetch assets' balance by providing an array of asset addresses and symbols
|
|
897
|
+
*/
|
|
898
|
+
export const fetchBulkBalance = (options) => (options.client ?? client).post({
|
|
899
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
900
|
+
url: '/api/v1/query/assets/bulk-balance',
|
|
901
|
+
...options,
|
|
902
|
+
headers: {
|
|
903
|
+
'Content-Type': 'application/json',
|
|
904
|
+
...options.headers
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
/**
|
|
908
|
+
* Fetch assets balances by specifying the wallet ID
|
|
909
|
+
*/
|
|
910
|
+
export const fetchWalletBulkBalance = (options) => (options.client ?? client).post({
|
|
911
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
912
|
+
url: '/api/v1/query/assets/wallet-bulk-balance',
|
|
913
|
+
...options,
|
|
914
|
+
headers: {
|
|
915
|
+
'Content-Type': 'application/json',
|
|
916
|
+
...options.headers
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
/**
|
|
920
|
+
* Fetch the current address historical transactions
|
|
921
|
+
*/
|
|
922
|
+
export const fetchTransactions = (options) => (options.client ?? client).get({
|
|
923
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
924
|
+
url: '/api/v1/query/transactions',
|
|
925
|
+
...options
|
|
926
|
+
});
|
|
927
|
+
/**
|
|
928
|
+
* Request token asset info like decimals, name and symbol
|
|
929
|
+
*/
|
|
930
|
+
export const fetchEvmTokenAssetInfo = (options) => (options.client ?? client).get({
|
|
931
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
932
|
+
url: '/api/v1/query/fetch-token-info',
|
|
933
|
+
...options
|
|
934
|
+
});
|
|
935
|
+
/**
|
|
936
|
+
* Fetch asset price by providing symbol pairing or a list of pairing symbols
|
|
937
|
+
*/
|
|
938
|
+
export const fetchAssetPairPrice = (options) => (options.client ?? client).get({
|
|
939
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
940
|
+
url: '/api/v1/query/get-asset-price',
|
|
941
|
+
...options
|
|
942
|
+
});
|
|
943
|
+
/**
|
|
944
|
+
* Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
|
|
945
|
+
*/
|
|
946
|
+
export const initKeyExchange = (options) => (options.client ?? client).post({
|
|
947
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
948
|
+
url: '/api/v1/mpc/init-key-exchange',
|
|
949
|
+
...options,
|
|
950
|
+
headers: {
|
|
951
|
+
'Content-Type': 'application/json',
|
|
952
|
+
...options.headers
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
/**
|
|
956
|
+
* Request seed phrase split and return shares that can be used later for recovery
|
|
957
|
+
*/
|
|
958
|
+
export const requestSeedphraseSplit = (options) => (options.client ?? client).post({
|
|
959
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
960
|
+
url: '/api/v1/mpc/request-seed-split',
|
|
961
|
+
...options,
|
|
962
|
+
headers: {
|
|
963
|
+
'Content-Type': 'application/json',
|
|
964
|
+
...options.headers
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
/**
|
|
968
|
+
* Pass encrypted shares and return reconstructed encrypted seed phrase
|
|
969
|
+
*/
|
|
970
|
+
export const reconstructSeedPhrase = (options) => (options.client ?? client).post({
|
|
971
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
972
|
+
url: '/api/v1/mpc/reconstruct-seed-phrase',
|
|
973
|
+
...options,
|
|
974
|
+
headers: {
|
|
975
|
+
'Content-Type': 'application/json',
|
|
976
|
+
...options.headers
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
/**
|
|
980
|
+
* Get all users by the admin
|
|
981
|
+
*/
|
|
982
|
+
export const getAllUsers2 = (options) => (options?.client ?? client).get({
|
|
983
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
984
|
+
url: '/api/v1/users',
|
|
985
|
+
...options
|
|
986
|
+
});
|
|
987
|
+
/**
|
|
988
|
+
* Returns current user data
|
|
989
|
+
*/
|
|
990
|
+
export const getCurrentUser = (options) => (options?.client ?? client).get({
|
|
991
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
992
|
+
url: '/api/v1/users/profile',
|
|
993
|
+
...options
|
|
994
|
+
});
|
|
995
|
+
/**
|
|
996
|
+
* Update user profile info
|
|
997
|
+
*/
|
|
998
|
+
export const updateProfile = (options) => (options.client ?? client).put({
|
|
999
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1000
|
+
url: '/api/v1/users/profile',
|
|
1001
|
+
...options,
|
|
1002
|
+
headers: {
|
|
1003
|
+
'Content-Type': 'application/json',
|
|
1004
|
+
...options.headers
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
/**
|
|
1008
|
+
* Get current user's client salt
|
|
1009
|
+
*/
|
|
1010
|
+
export const getCurrentUserSalt = (options) => (options?.client ?? client).get({
|
|
1011
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1012
|
+
url: '/api/v1/users/salt',
|
|
1013
|
+
...options
|
|
1014
|
+
});
|
|
1015
|
+
/**
|
|
1016
|
+
* Returns user wallets by specifying user id
|
|
1017
|
+
*/
|
|
1018
|
+
export const getAllWalletsFromUserId = (options) => (options.client ?? client).get({
|
|
1019
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1020
|
+
url: '/api/v1/users/{userId}/wallets',
|
|
1021
|
+
...options
|
|
1022
|
+
});
|
|
1023
|
+
/**
|
|
1024
|
+
* Returns user's merchant assets
|
|
1025
|
+
*/
|
|
1026
|
+
export const getCurrentUserMerchantAssets = (options) => (options?.client ?? client).get({
|
|
1027
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1028
|
+
url: '/api/v1/users/merchants/assets',
|
|
1029
|
+
...options
|
|
1030
|
+
});
|
|
1031
|
+
/**
|
|
1032
|
+
* Returns user's merchant assets
|
|
1033
|
+
*/
|
|
1034
|
+
export const getCurrentUserMerchantAssets2 = (options) => (options?.client ?? client).get({
|
|
1035
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1036
|
+
url: '/api/v1/users/merchant/assets',
|
|
1037
|
+
...options
|
|
1038
|
+
});
|
|
1039
|
+
/**
|
|
1040
|
+
* Returns user assets by specifying user id
|
|
1041
|
+
*/
|
|
1042
|
+
export const getAssetsByUserId = (options) => (options.client ?? client).get({
|
|
1043
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1044
|
+
url: '/api/v1/users/{userId}/assets',
|
|
1045
|
+
...options
|
|
1046
|
+
});
|
|
1047
|
+
/**
|
|
1048
|
+
* Add a new asset to the user's wallet based on the asset configuration
|
|
1049
|
+
*/
|
|
1050
|
+
export const addAssetToUser = (options) => (options.client ?? client).post({
|
|
1051
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1052
|
+
url: '/api/v1/users/assets/add',
|
|
1053
|
+
...options,
|
|
1054
|
+
headers: {
|
|
1055
|
+
'Content-Type': 'application/json',
|
|
1056
|
+
...options.headers
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
/**
|
|
1060
|
+
* Remove an asset from the user's wallet based on the asset configuration
|
|
1061
|
+
*/
|
|
1062
|
+
export const removeAssetFromUser = (options) => (options.client ?? client).delete({
|
|
1063
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1064
|
+
url: '/api/v1/users/{userId}/wallets/{walletId}/assets/{assetConfigId}',
|
|
1065
|
+
...options
|
|
1066
|
+
});
|
|
1067
|
+
/**
|
|
1068
|
+
* Returns user public data
|
|
1069
|
+
*/
|
|
1070
|
+
export const getUserByUserId = (options) => (options.client ?? client).get({
|
|
1071
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1072
|
+
url: '/api/v1/users/{userId}',
|
|
1073
|
+
...options
|
|
1074
|
+
});
|
|
1075
|
+
export const userControllerGetUserByExternalUserId = (options) => (options.client ?? client).get({
|
|
1076
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1077
|
+
url: '/api/v1/users/{externalUserId}/externalUserId',
|
|
1078
|
+
...options
|
|
1079
|
+
});
|
|
1080
|
+
/**
|
|
1081
|
+
* Returns multisig participants by user id
|
|
1082
|
+
*/
|
|
1083
|
+
export const getParticipantsByUserId = (options) => (options.client ?? client).get({
|
|
1084
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1085
|
+
url: '/api/v1/users/{userId}/multisig-transactions',
|
|
1086
|
+
...options
|
|
1087
|
+
});
|
|
1088
|
+
/**
|
|
1089
|
+
* View a release schedule
|
|
1090
|
+
*/
|
|
1091
|
+
export const viewReleaseSchedule = (options) => (options.client ?? client).get({
|
|
1092
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1093
|
+
url: '/api/v1/transactions/admin/release-schedule',
|
|
1094
|
+
...options
|
|
1095
|
+
});
|
|
1096
|
+
/**
|
|
1097
|
+
* Request the creation of a release schedule
|
|
1098
|
+
*/
|
|
1099
|
+
export const createReleaseSchedule = (options) => (options.client ?? client).post({
|
|
1100
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1101
|
+
url: '/api/v1/transactions/admin/release-schedule',
|
|
1102
|
+
...options,
|
|
1103
|
+
headers: {
|
|
1104
|
+
'Content-Type': 'application/json',
|
|
1105
|
+
...options.headers
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
/**
|
|
1109
|
+
* Request the minting of an asset to addresses either via mint release schedule or directly
|
|
1110
|
+
*/
|
|
1111
|
+
export const mint = (options) => (options.client ?? client).post({
|
|
1112
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1113
|
+
url: '/api/v1/transactions/admin/mint',
|
|
1114
|
+
...options,
|
|
1115
|
+
headers: {
|
|
1116
|
+
'Content-Type': 'application/json',
|
|
1117
|
+
...options.headers
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
/**
|
|
1121
|
+
* Request the burning of an asset to address(es) directly
|
|
1122
|
+
*/
|
|
1123
|
+
export const burn = (options) => (options.client ?? client).post({
|
|
1124
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1125
|
+
url: '/api/v1/transactions/admin/burn',
|
|
1126
|
+
...options,
|
|
1127
|
+
headers: {
|
|
1128
|
+
'Content-Type': 'application/json',
|
|
1129
|
+
...options.headers
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
/**
|
|
1133
|
+
* Request purchase on the purchase contract
|
|
1134
|
+
*/
|
|
1135
|
+
export const executePurchase = (options) => (options.client ?? client).post({
|
|
1136
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1137
|
+
url: '/api/v1/transactions/admin/execute-purchase',
|
|
1138
|
+
...options,
|
|
1139
|
+
headers: {
|
|
1140
|
+
'Content-Type': 'application/json',
|
|
1141
|
+
...options.headers
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
/**
|
|
1145
|
+
* Request purchase with interest on the purchase contract
|
|
1146
|
+
*/
|
|
1147
|
+
export const executePurchaseWithInterest = (options) => (options.client ?? client).post({
|
|
1148
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1149
|
+
url: '/api/v1/transactions/admin/execute-purchase-with-interest',
|
|
1150
|
+
...options,
|
|
1151
|
+
headers: {
|
|
1152
|
+
'Content-Type': 'application/json',
|
|
1153
|
+
...options.headers
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
/**
|
|
1157
|
+
* Set identity via the identity registry contract
|
|
1158
|
+
*/
|
|
1159
|
+
export const setIdentity = (options) => (options.client ?? client).post({
|
|
1160
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1161
|
+
url: '/api/v1/transactions/admin/set-identity',
|
|
1162
|
+
...options,
|
|
1163
|
+
headers: {
|
|
1164
|
+
'Content-Type': 'application/json',
|
|
1165
|
+
...options.headers
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
/**
|
|
1169
|
+
* Force claim interest via the interest payment contract
|
|
1170
|
+
*/
|
|
1171
|
+
export const forceClaim = (options) => (options.client ?? client).post({
|
|
1172
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1173
|
+
url: '/api/v1/transactions/admin/force-claim',
|
|
1174
|
+
...options,
|
|
1175
|
+
headers: {
|
|
1176
|
+
'Content-Type': 'application/json',
|
|
1177
|
+
...options.headers
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
/**
|
|
1181
|
+
* Force claim principal via the interest payment contract
|
|
1182
|
+
*/
|
|
1183
|
+
export const forceClaimPrincipal = (options) => (options.client ?? client).post({
|
|
1184
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1185
|
+
url: '/api/v1/transactions/admin/force-claim-principal',
|
|
1186
|
+
...options,
|
|
1187
|
+
headers: {
|
|
1188
|
+
'Content-Type': 'application/json',
|
|
1189
|
+
...options.headers
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
export const adminTransactionsControllerGetCallbackPublicKey = (options) => (options?.client ?? client).get({
|
|
1193
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1194
|
+
url: '/api/v1/transactions/admin/callback_pk',
|
|
1195
|
+
...options
|
|
1196
|
+
});
|
|
1197
|
+
/**
|
|
1198
|
+
* View an admin transaction
|
|
1199
|
+
*/
|
|
1200
|
+
export const viewAdminTransaction = (options) => (options.client ?? client).get({
|
|
1201
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1202
|
+
url: '/api/v1/transactions/admin/{referenceId}',
|
|
1203
|
+
...options
|
|
1204
|
+
});
|
|
1205
|
+
/**
|
|
1206
|
+
* Upside callback for release schedule
|
|
1207
|
+
*/
|
|
1208
|
+
export const upsideCallback = (options) => (options.client ?? client).post({
|
|
1209
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1210
|
+
url: '/api/v1/transactions/admin/callback',
|
|
1211
|
+
...options,
|
|
1212
|
+
headers: {
|
|
1213
|
+
'Content-Type': 'application/json',
|
|
1214
|
+
...options.headers
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
/**
|
|
1218
|
+
* Create new merchant. This endpoint is only available for super admin and republic admin
|
|
1219
|
+
*/
|
|
1220
|
+
export const getDashboardData = (options) => (options?.client ?? client).get({
|
|
1221
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1222
|
+
url: '/api/v1/dashboard',
|
|
1223
|
+
...options
|
|
1224
|
+
});
|
|
1225
|
+
/**
|
|
1226
|
+
* Get all activities. This endpoint is only available for super admin and republic admin
|
|
1227
|
+
*/
|
|
1228
|
+
export const getActivitiees = (options) => (options?.client ?? client).get({
|
|
1229
|
+
security: [{ name: 'X-API-KEY', type: 'apiKey' }],
|
|
1230
|
+
url: '/api/v1/users-activities',
|
|
1231
|
+
...options
|
|
1232
|
+
});
|