@pollar/core 0.3.9
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/index.d.mts +1485 -0
- package/dist/index.d.ts +1485 -0
- package/dist/index.js +1496 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1485 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +38 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1485 @@
|
|
|
1
|
+
import * as openapi_fetch from 'openapi-fetch';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This file was auto-generated by openapi-typescript.
|
|
5
|
+
* Do not make direct changes to the file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface paths {
|
|
9
|
+
"/health": {
|
|
10
|
+
parameters: {
|
|
11
|
+
query?: never;
|
|
12
|
+
header?: never;
|
|
13
|
+
path?: never;
|
|
14
|
+
cookie?: never;
|
|
15
|
+
};
|
|
16
|
+
/** Health check */
|
|
17
|
+
get: operations["getHealth"];
|
|
18
|
+
put?: never;
|
|
19
|
+
post?: never;
|
|
20
|
+
delete?: never;
|
|
21
|
+
options?: never;
|
|
22
|
+
head?: never;
|
|
23
|
+
patch?: never;
|
|
24
|
+
trace?: never;
|
|
25
|
+
};
|
|
26
|
+
"/auth/session": {
|
|
27
|
+
parameters: {
|
|
28
|
+
query?: never;
|
|
29
|
+
header?: never;
|
|
30
|
+
path?: never;
|
|
31
|
+
cookie?: never;
|
|
32
|
+
};
|
|
33
|
+
get?: never;
|
|
34
|
+
put?: never;
|
|
35
|
+
/**
|
|
36
|
+
* Create a client session
|
|
37
|
+
* @description Creates a pending client session that will be linked to a user after authentication.
|
|
38
|
+
*/
|
|
39
|
+
post: operations["postAuthSession"];
|
|
40
|
+
delete?: never;
|
|
41
|
+
options?: never;
|
|
42
|
+
head?: never;
|
|
43
|
+
patch?: never;
|
|
44
|
+
trace?: never;
|
|
45
|
+
};
|
|
46
|
+
"/auth/session/status/{clientSessionId}": {
|
|
47
|
+
parameters: {
|
|
48
|
+
query?: never;
|
|
49
|
+
header?: never;
|
|
50
|
+
path?: never;
|
|
51
|
+
cookie?: never;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Stream client session status
|
|
55
|
+
* @description Server-Sent Events stream that emits session state every 500 ms. Closes when the session is consumed or expires.
|
|
56
|
+
*/
|
|
57
|
+
get: operations["getAuthSessionStatusByClientSessionId"];
|
|
58
|
+
put?: never;
|
|
59
|
+
post?: never;
|
|
60
|
+
delete?: never;
|
|
61
|
+
options?: never;
|
|
62
|
+
head?: never;
|
|
63
|
+
patch?: never;
|
|
64
|
+
trace?: never;
|
|
65
|
+
};
|
|
66
|
+
"/auth/google": {
|
|
67
|
+
parameters: {
|
|
68
|
+
query?: never;
|
|
69
|
+
header?: never;
|
|
70
|
+
path?: never;
|
|
71
|
+
cookie?: never;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Redirect to Google OAuth
|
|
75
|
+
* @description Redirects the user to the Google OAuth consent screen.
|
|
76
|
+
*/
|
|
77
|
+
get: operations["getAuthGoogle"];
|
|
78
|
+
put?: never;
|
|
79
|
+
post?: never;
|
|
80
|
+
delete?: never;
|
|
81
|
+
options?: never;
|
|
82
|
+
head?: never;
|
|
83
|
+
patch?: never;
|
|
84
|
+
trace?: never;
|
|
85
|
+
};
|
|
86
|
+
"/auth/github": {
|
|
87
|
+
parameters: {
|
|
88
|
+
query?: never;
|
|
89
|
+
header?: never;
|
|
90
|
+
path?: never;
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Redirect to GitHub OAuth
|
|
95
|
+
* @description Redirects the user to the GitHub OAuth consent screen.
|
|
96
|
+
*/
|
|
97
|
+
get: operations["getAuthGithub"];
|
|
98
|
+
put?: never;
|
|
99
|
+
post?: never;
|
|
100
|
+
delete?: never;
|
|
101
|
+
options?: never;
|
|
102
|
+
head?: never;
|
|
103
|
+
patch?: never;
|
|
104
|
+
trace?: never;
|
|
105
|
+
};
|
|
106
|
+
"/auth/email": {
|
|
107
|
+
parameters: {
|
|
108
|
+
query?: never;
|
|
109
|
+
header?: never;
|
|
110
|
+
path?: never;
|
|
111
|
+
cookie?: never;
|
|
112
|
+
};
|
|
113
|
+
get?: never;
|
|
114
|
+
put?: never;
|
|
115
|
+
/** Send email verification code */
|
|
116
|
+
post: operations["postAuthEmail"];
|
|
117
|
+
delete?: never;
|
|
118
|
+
options?: never;
|
|
119
|
+
head?: never;
|
|
120
|
+
patch?: never;
|
|
121
|
+
trace?: never;
|
|
122
|
+
};
|
|
123
|
+
"/auth/email/verify-code": {
|
|
124
|
+
parameters: {
|
|
125
|
+
query?: never;
|
|
126
|
+
header?: never;
|
|
127
|
+
path?: never;
|
|
128
|
+
cookie?: never;
|
|
129
|
+
};
|
|
130
|
+
get?: never;
|
|
131
|
+
put?: never;
|
|
132
|
+
/** Verify email code */
|
|
133
|
+
post: operations["postAuthEmailVerifyCode"];
|
|
134
|
+
delete?: never;
|
|
135
|
+
options?: never;
|
|
136
|
+
head?: never;
|
|
137
|
+
patch?: never;
|
|
138
|
+
trace?: never;
|
|
139
|
+
};
|
|
140
|
+
"/auth/wallet": {
|
|
141
|
+
parameters: {
|
|
142
|
+
query?: never;
|
|
143
|
+
header?: never;
|
|
144
|
+
path?: never;
|
|
145
|
+
cookie?: never;
|
|
146
|
+
};
|
|
147
|
+
get?: never;
|
|
148
|
+
put?: never;
|
|
149
|
+
/** Authenticate with a Stellar wallet */
|
|
150
|
+
post: operations["postAuthWallet"];
|
|
151
|
+
delete?: never;
|
|
152
|
+
options?: never;
|
|
153
|
+
head?: never;
|
|
154
|
+
patch?: never;
|
|
155
|
+
trace?: never;
|
|
156
|
+
};
|
|
157
|
+
"/auth/login": {
|
|
158
|
+
parameters: {
|
|
159
|
+
query?: never;
|
|
160
|
+
header?: never;
|
|
161
|
+
path?: never;
|
|
162
|
+
cookie?: never;
|
|
163
|
+
};
|
|
164
|
+
get?: never;
|
|
165
|
+
put?: never;
|
|
166
|
+
/**
|
|
167
|
+
* Exchange a ready client session for tokens
|
|
168
|
+
* @description Finalizes authentication. The session must be in ready state.
|
|
169
|
+
*/
|
|
170
|
+
post: operations["postAuthLogin"];
|
|
171
|
+
delete?: never;
|
|
172
|
+
options?: never;
|
|
173
|
+
head?: never;
|
|
174
|
+
patch?: never;
|
|
175
|
+
trace?: never;
|
|
176
|
+
};
|
|
177
|
+
"/config": {
|
|
178
|
+
parameters: {
|
|
179
|
+
query?: never;
|
|
180
|
+
header?: never;
|
|
181
|
+
path?: never;
|
|
182
|
+
cookie?: never;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Get application config
|
|
186
|
+
* @description Returns the public configuration and branding for the application.
|
|
187
|
+
*/
|
|
188
|
+
get: operations["getConfig"];
|
|
189
|
+
put?: never;
|
|
190
|
+
post?: never;
|
|
191
|
+
delete?: never;
|
|
192
|
+
options?: never;
|
|
193
|
+
head?: never;
|
|
194
|
+
patch?: never;
|
|
195
|
+
trace?: never;
|
|
196
|
+
};
|
|
197
|
+
"/applications/{id}/logo": {
|
|
198
|
+
parameters: {
|
|
199
|
+
query?: never;
|
|
200
|
+
header?: never;
|
|
201
|
+
path?: never;
|
|
202
|
+
cookie?: never;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Get application logo
|
|
206
|
+
* @description Returns the application logo as a binary image.
|
|
207
|
+
*/
|
|
208
|
+
get: operations["getApplicationsByIdLogo"];
|
|
209
|
+
put?: never;
|
|
210
|
+
post?: never;
|
|
211
|
+
delete?: never;
|
|
212
|
+
options?: never;
|
|
213
|
+
head?: never;
|
|
214
|
+
patch?: never;
|
|
215
|
+
trace?: never;
|
|
216
|
+
};
|
|
217
|
+
"/tx/build": {
|
|
218
|
+
parameters: {
|
|
219
|
+
query?: never;
|
|
220
|
+
header?: never;
|
|
221
|
+
path?: never;
|
|
222
|
+
cookie?: never;
|
|
223
|
+
};
|
|
224
|
+
get?: never;
|
|
225
|
+
put?: never;
|
|
226
|
+
/**
|
|
227
|
+
* Build unsigned payment transaction
|
|
228
|
+
* @description Builds an unsigned XDR for a native XLM payment. Client must sign and submit via POST /tx/submit.
|
|
229
|
+
*/
|
|
230
|
+
post: operations["postTxBuild"];
|
|
231
|
+
delete?: never;
|
|
232
|
+
options?: never;
|
|
233
|
+
head?: never;
|
|
234
|
+
patch?: never;
|
|
235
|
+
trace?: never;
|
|
236
|
+
};
|
|
237
|
+
"/tx/submit": {
|
|
238
|
+
parameters: {
|
|
239
|
+
query?: never;
|
|
240
|
+
header?: never;
|
|
241
|
+
path?: never;
|
|
242
|
+
cookie?: never;
|
|
243
|
+
};
|
|
244
|
+
get?: never;
|
|
245
|
+
put?: never;
|
|
246
|
+
/**
|
|
247
|
+
* Submit signed transaction
|
|
248
|
+
* @description Submits a signed transaction envelope to the Stellar network.
|
|
249
|
+
*/
|
|
250
|
+
post: operations["postTxSubmit"];
|
|
251
|
+
delete?: never;
|
|
252
|
+
options?: never;
|
|
253
|
+
head?: never;
|
|
254
|
+
patch?: never;
|
|
255
|
+
trace?: never;
|
|
256
|
+
};
|
|
257
|
+
"/tx/status": {
|
|
258
|
+
parameters: {
|
|
259
|
+
query?: never;
|
|
260
|
+
header?: never;
|
|
261
|
+
path?: never;
|
|
262
|
+
cookie?: never;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Get transaction status
|
|
266
|
+
* @description Returns transaction status by hash. PENDING = not yet confirmed in Horizon.
|
|
267
|
+
*/
|
|
268
|
+
get: operations["getTxStatus"];
|
|
269
|
+
put?: never;
|
|
270
|
+
post?: never;
|
|
271
|
+
delete?: never;
|
|
272
|
+
options?: never;
|
|
273
|
+
head?: never;
|
|
274
|
+
patch?: never;
|
|
275
|
+
trace?: never;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
interface operations {
|
|
279
|
+
getHealth: {
|
|
280
|
+
parameters: {
|
|
281
|
+
query?: never;
|
|
282
|
+
header?: never;
|
|
283
|
+
path?: never;
|
|
284
|
+
cookie?: never;
|
|
285
|
+
};
|
|
286
|
+
requestBody?: never;
|
|
287
|
+
responses: {
|
|
288
|
+
/** @description Service is healthy */
|
|
289
|
+
200: {
|
|
290
|
+
headers: {
|
|
291
|
+
[name: string]: unknown;
|
|
292
|
+
};
|
|
293
|
+
content: {
|
|
294
|
+
"application/json": {
|
|
295
|
+
/** @enum {string} */
|
|
296
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
297
|
+
/** @constant */
|
|
298
|
+
success: true;
|
|
299
|
+
content: {
|
|
300
|
+
/** @constant */
|
|
301
|
+
status: "ok";
|
|
302
|
+
version: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
postAuthSession: {
|
|
310
|
+
parameters: {
|
|
311
|
+
query?: never;
|
|
312
|
+
header?: never;
|
|
313
|
+
path?: never;
|
|
314
|
+
cookie?: never;
|
|
315
|
+
};
|
|
316
|
+
requestBody?: never;
|
|
317
|
+
responses: {
|
|
318
|
+
/** @description Session created */
|
|
319
|
+
201: {
|
|
320
|
+
headers: {
|
|
321
|
+
[name: string]: unknown;
|
|
322
|
+
};
|
|
323
|
+
content: {
|
|
324
|
+
"application/json": {
|
|
325
|
+
/** @enum {string} */
|
|
326
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
327
|
+
/** @constant */
|
|
328
|
+
success: true;
|
|
329
|
+
content: {
|
|
330
|
+
clientSessionId: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
/** @description Unauthorized */
|
|
336
|
+
401: {
|
|
337
|
+
headers: {
|
|
338
|
+
[name: string]: unknown;
|
|
339
|
+
};
|
|
340
|
+
content: {
|
|
341
|
+
"application/json": {
|
|
342
|
+
/** @constant */
|
|
343
|
+
success: false;
|
|
344
|
+
error: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
/** @description Forbidden */
|
|
349
|
+
403: {
|
|
350
|
+
headers: {
|
|
351
|
+
[name: string]: unknown;
|
|
352
|
+
};
|
|
353
|
+
content: {
|
|
354
|
+
"application/json": {
|
|
355
|
+
/** @constant */
|
|
356
|
+
success: false;
|
|
357
|
+
error: string;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
/** @description Not found */
|
|
362
|
+
404: {
|
|
363
|
+
headers: {
|
|
364
|
+
[name: string]: unknown;
|
|
365
|
+
};
|
|
366
|
+
content: {
|
|
367
|
+
"application/json": {
|
|
368
|
+
/** @constant */
|
|
369
|
+
success: false;
|
|
370
|
+
error: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
getAuthSessionStatusByClientSessionId: {
|
|
377
|
+
parameters: {
|
|
378
|
+
query?: never;
|
|
379
|
+
header?: never;
|
|
380
|
+
path: {
|
|
381
|
+
clientSessionId: string;
|
|
382
|
+
};
|
|
383
|
+
cookie?: never;
|
|
384
|
+
};
|
|
385
|
+
requestBody?: never;
|
|
386
|
+
responses: {
|
|
387
|
+
/** @description SSE stream of session status */
|
|
388
|
+
200: {
|
|
389
|
+
headers: {
|
|
390
|
+
[name: string]: unknown;
|
|
391
|
+
};
|
|
392
|
+
content: {
|
|
393
|
+
"text/event-stream": {
|
|
394
|
+
status: string;
|
|
395
|
+
user: {
|
|
396
|
+
id?: string;
|
|
397
|
+
ready: boolean;
|
|
398
|
+
};
|
|
399
|
+
data: {
|
|
400
|
+
mail: string;
|
|
401
|
+
first_name: string;
|
|
402
|
+
last_name: string;
|
|
403
|
+
avatar: string;
|
|
404
|
+
providers: {
|
|
405
|
+
email: {
|
|
406
|
+
address: string;
|
|
407
|
+
} | null;
|
|
408
|
+
google: {
|
|
409
|
+
id: string;
|
|
410
|
+
} | null;
|
|
411
|
+
github: {
|
|
412
|
+
id: string;
|
|
413
|
+
} | null;
|
|
414
|
+
wallet: {
|
|
415
|
+
address: string;
|
|
416
|
+
} | null;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
getAuthGoogle: {
|
|
425
|
+
parameters: {
|
|
426
|
+
query: {
|
|
427
|
+
api_key: string;
|
|
428
|
+
client_session_id: string;
|
|
429
|
+
redirect_uri: string;
|
|
430
|
+
};
|
|
431
|
+
header?: never;
|
|
432
|
+
path?: never;
|
|
433
|
+
cookie?: never;
|
|
434
|
+
};
|
|
435
|
+
requestBody?: never;
|
|
436
|
+
responses: {
|
|
437
|
+
/** @description Redirect to Google OAuth */
|
|
438
|
+
302: {
|
|
439
|
+
headers: {
|
|
440
|
+
[name: string]: unknown;
|
|
441
|
+
};
|
|
442
|
+
content?: never;
|
|
443
|
+
};
|
|
444
|
+
/** @description Validation error */
|
|
445
|
+
400: {
|
|
446
|
+
headers: {
|
|
447
|
+
[name: string]: unknown;
|
|
448
|
+
};
|
|
449
|
+
content: {
|
|
450
|
+
"application/json": {
|
|
451
|
+
/** @constant */
|
|
452
|
+
success: false;
|
|
453
|
+
error: string;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
/** @description Unauthorized */
|
|
458
|
+
401: {
|
|
459
|
+
headers: {
|
|
460
|
+
[name: string]: unknown;
|
|
461
|
+
};
|
|
462
|
+
content: {
|
|
463
|
+
"application/json": {
|
|
464
|
+
/** @constant */
|
|
465
|
+
success: false;
|
|
466
|
+
error: string;
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
/** @description Forbidden */
|
|
471
|
+
403: {
|
|
472
|
+
headers: {
|
|
473
|
+
[name: string]: unknown;
|
|
474
|
+
};
|
|
475
|
+
content: {
|
|
476
|
+
"application/json": {
|
|
477
|
+
/** @constant */
|
|
478
|
+
success: false;
|
|
479
|
+
error: string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
/** @description Not found */
|
|
484
|
+
404: {
|
|
485
|
+
headers: {
|
|
486
|
+
[name: string]: unknown;
|
|
487
|
+
};
|
|
488
|
+
content: {
|
|
489
|
+
"application/json": {
|
|
490
|
+
/** @constant */
|
|
491
|
+
success: false;
|
|
492
|
+
error: string;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
getAuthGithub: {
|
|
499
|
+
parameters: {
|
|
500
|
+
query: {
|
|
501
|
+
api_key: string;
|
|
502
|
+
client_session_id: string;
|
|
503
|
+
redirect_uri: string;
|
|
504
|
+
};
|
|
505
|
+
header?: never;
|
|
506
|
+
path?: never;
|
|
507
|
+
cookie?: never;
|
|
508
|
+
};
|
|
509
|
+
requestBody?: never;
|
|
510
|
+
responses: {
|
|
511
|
+
/** @description Redirect to GitHub OAuth */
|
|
512
|
+
302: {
|
|
513
|
+
headers: {
|
|
514
|
+
[name: string]: unknown;
|
|
515
|
+
};
|
|
516
|
+
content?: never;
|
|
517
|
+
};
|
|
518
|
+
/** @description Validation error */
|
|
519
|
+
400: {
|
|
520
|
+
headers: {
|
|
521
|
+
[name: string]: unknown;
|
|
522
|
+
};
|
|
523
|
+
content: {
|
|
524
|
+
"application/json": {
|
|
525
|
+
/** @constant */
|
|
526
|
+
success: false;
|
|
527
|
+
error: string;
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
/** @description Unauthorized */
|
|
532
|
+
401: {
|
|
533
|
+
headers: {
|
|
534
|
+
[name: string]: unknown;
|
|
535
|
+
};
|
|
536
|
+
content: {
|
|
537
|
+
"application/json": {
|
|
538
|
+
/** @constant */
|
|
539
|
+
success: false;
|
|
540
|
+
error: string;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
/** @description Forbidden */
|
|
545
|
+
403: {
|
|
546
|
+
headers: {
|
|
547
|
+
[name: string]: unknown;
|
|
548
|
+
};
|
|
549
|
+
content: {
|
|
550
|
+
"application/json": {
|
|
551
|
+
/** @constant */
|
|
552
|
+
success: false;
|
|
553
|
+
error: string;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
/** @description Not found */
|
|
558
|
+
404: {
|
|
559
|
+
headers: {
|
|
560
|
+
[name: string]: unknown;
|
|
561
|
+
};
|
|
562
|
+
content: {
|
|
563
|
+
"application/json": {
|
|
564
|
+
/** @constant */
|
|
565
|
+
success: false;
|
|
566
|
+
error: string;
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
postAuthEmail: {
|
|
573
|
+
parameters: {
|
|
574
|
+
query?: never;
|
|
575
|
+
header?: never;
|
|
576
|
+
path?: never;
|
|
577
|
+
cookie?: never;
|
|
578
|
+
};
|
|
579
|
+
requestBody?: {
|
|
580
|
+
content: {
|
|
581
|
+
"application/json": {
|
|
582
|
+
clientSessionId: string;
|
|
583
|
+
/** Format: email */
|
|
584
|
+
email: string;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
responses: {
|
|
589
|
+
/** @description Code sent */
|
|
590
|
+
200: {
|
|
591
|
+
headers: {
|
|
592
|
+
[name: string]: unknown;
|
|
593
|
+
};
|
|
594
|
+
content: {
|
|
595
|
+
"application/json": {
|
|
596
|
+
/** @enum {string} */
|
|
597
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
598
|
+
/** @constant */
|
|
599
|
+
success: true;
|
|
600
|
+
content: {
|
|
601
|
+
clientSessionId: string;
|
|
602
|
+
email: string;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
/** @description Validation error */
|
|
608
|
+
400: {
|
|
609
|
+
headers: {
|
|
610
|
+
[name: string]: unknown;
|
|
611
|
+
};
|
|
612
|
+
content: {
|
|
613
|
+
"application/json": {
|
|
614
|
+
/** @constant */
|
|
615
|
+
success: false;
|
|
616
|
+
error: string;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
/** @description Unauthorized */
|
|
621
|
+
401: {
|
|
622
|
+
headers: {
|
|
623
|
+
[name: string]: unknown;
|
|
624
|
+
};
|
|
625
|
+
content: {
|
|
626
|
+
"application/json": {
|
|
627
|
+
/** @constant */
|
|
628
|
+
success: false;
|
|
629
|
+
error: string;
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
/** @description Forbidden */
|
|
634
|
+
403: {
|
|
635
|
+
headers: {
|
|
636
|
+
[name: string]: unknown;
|
|
637
|
+
};
|
|
638
|
+
content: {
|
|
639
|
+
"application/json": {
|
|
640
|
+
/** @constant */
|
|
641
|
+
success: false;
|
|
642
|
+
error: string;
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
/** @description Not found */
|
|
647
|
+
404: {
|
|
648
|
+
headers: {
|
|
649
|
+
[name: string]: unknown;
|
|
650
|
+
};
|
|
651
|
+
content: {
|
|
652
|
+
"application/json": {
|
|
653
|
+
/** @constant */
|
|
654
|
+
success: false;
|
|
655
|
+
error: string;
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
postAuthEmailVerifyCode: {
|
|
662
|
+
parameters: {
|
|
663
|
+
query?: never;
|
|
664
|
+
header?: never;
|
|
665
|
+
path?: never;
|
|
666
|
+
cookie?: never;
|
|
667
|
+
};
|
|
668
|
+
requestBody?: {
|
|
669
|
+
content: {
|
|
670
|
+
"application/json": {
|
|
671
|
+
clientSessionId: string;
|
|
672
|
+
code: string;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
responses: {
|
|
677
|
+
/** @description Code verified */
|
|
678
|
+
200: {
|
|
679
|
+
headers: {
|
|
680
|
+
[name: string]: unknown;
|
|
681
|
+
};
|
|
682
|
+
content: {
|
|
683
|
+
"application/json": {
|
|
684
|
+
/** @enum {string} */
|
|
685
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
686
|
+
/** @constant */
|
|
687
|
+
success: true;
|
|
688
|
+
content: {
|
|
689
|
+
clientSessionId: string;
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
/** @description Validation error */
|
|
695
|
+
400: {
|
|
696
|
+
headers: {
|
|
697
|
+
[name: string]: unknown;
|
|
698
|
+
};
|
|
699
|
+
content: {
|
|
700
|
+
"application/json": {
|
|
701
|
+
/** @constant */
|
|
702
|
+
success: false;
|
|
703
|
+
error: string;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
/** @description Unauthorized */
|
|
708
|
+
401: {
|
|
709
|
+
headers: {
|
|
710
|
+
[name: string]: unknown;
|
|
711
|
+
};
|
|
712
|
+
content: {
|
|
713
|
+
"application/json": {
|
|
714
|
+
/** @constant */
|
|
715
|
+
success: false;
|
|
716
|
+
error: string;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
/** @description Forbidden */
|
|
721
|
+
403: {
|
|
722
|
+
headers: {
|
|
723
|
+
[name: string]: unknown;
|
|
724
|
+
};
|
|
725
|
+
content: {
|
|
726
|
+
"application/json": {
|
|
727
|
+
/** @constant */
|
|
728
|
+
success: false;
|
|
729
|
+
error: string;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
/** @description Not found */
|
|
734
|
+
404: {
|
|
735
|
+
headers: {
|
|
736
|
+
[name: string]: unknown;
|
|
737
|
+
};
|
|
738
|
+
content: {
|
|
739
|
+
"application/json": {
|
|
740
|
+
/** @constant */
|
|
741
|
+
success: false;
|
|
742
|
+
error: string;
|
|
743
|
+
};
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
postAuthWallet: {
|
|
749
|
+
parameters: {
|
|
750
|
+
query?: never;
|
|
751
|
+
header?: never;
|
|
752
|
+
path?: never;
|
|
753
|
+
cookie?: never;
|
|
754
|
+
};
|
|
755
|
+
requestBody?: {
|
|
756
|
+
content: {
|
|
757
|
+
"application/json": {
|
|
758
|
+
clientSessionId: string;
|
|
759
|
+
walletAddress: string;
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
responses: {
|
|
764
|
+
/** @description Wallet authenticated */
|
|
765
|
+
200: {
|
|
766
|
+
headers: {
|
|
767
|
+
[name: string]: unknown;
|
|
768
|
+
};
|
|
769
|
+
content: {
|
|
770
|
+
"application/json": {
|
|
771
|
+
/** @enum {string} */
|
|
772
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
773
|
+
/** @constant */
|
|
774
|
+
success: true;
|
|
775
|
+
content: {
|
|
776
|
+
clientSessionId: string;
|
|
777
|
+
walletAddress: string;
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
/** @description Validation error */
|
|
783
|
+
400: {
|
|
784
|
+
headers: {
|
|
785
|
+
[name: string]: unknown;
|
|
786
|
+
};
|
|
787
|
+
content: {
|
|
788
|
+
"application/json": {
|
|
789
|
+
/** @constant */
|
|
790
|
+
success: false;
|
|
791
|
+
error: string;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
/** @description Unauthorized */
|
|
796
|
+
401: {
|
|
797
|
+
headers: {
|
|
798
|
+
[name: string]: unknown;
|
|
799
|
+
};
|
|
800
|
+
content: {
|
|
801
|
+
"application/json": {
|
|
802
|
+
/** @constant */
|
|
803
|
+
success: false;
|
|
804
|
+
error: string;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
/** @description Forbidden */
|
|
809
|
+
403: {
|
|
810
|
+
headers: {
|
|
811
|
+
[name: string]: unknown;
|
|
812
|
+
};
|
|
813
|
+
content: {
|
|
814
|
+
"application/json": {
|
|
815
|
+
/** @constant */
|
|
816
|
+
success: false;
|
|
817
|
+
error: string;
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
};
|
|
821
|
+
/** @description Not found */
|
|
822
|
+
404: {
|
|
823
|
+
headers: {
|
|
824
|
+
[name: string]: unknown;
|
|
825
|
+
};
|
|
826
|
+
content: {
|
|
827
|
+
"application/json": {
|
|
828
|
+
/** @constant */
|
|
829
|
+
success: false;
|
|
830
|
+
error: string;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
postAuthLogin: {
|
|
837
|
+
parameters: {
|
|
838
|
+
query?: never;
|
|
839
|
+
header?: never;
|
|
840
|
+
path?: never;
|
|
841
|
+
cookie?: never;
|
|
842
|
+
};
|
|
843
|
+
requestBody?: {
|
|
844
|
+
content: {
|
|
845
|
+
"application/json": {
|
|
846
|
+
clientSessionId: string;
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
responses: {
|
|
851
|
+
/** @description Authenticated */
|
|
852
|
+
200: {
|
|
853
|
+
headers: {
|
|
854
|
+
[name: string]: unknown;
|
|
855
|
+
};
|
|
856
|
+
content: {
|
|
857
|
+
"application/json": {
|
|
858
|
+
/** @enum {string} */
|
|
859
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
860
|
+
/** @constant */
|
|
861
|
+
success: true;
|
|
862
|
+
content: {
|
|
863
|
+
clientSessionId: string;
|
|
864
|
+
userId: string | null;
|
|
865
|
+
status: string;
|
|
866
|
+
token: {
|
|
867
|
+
accessToken: string;
|
|
868
|
+
refreshToken: string;
|
|
869
|
+
expiresAt: number;
|
|
870
|
+
};
|
|
871
|
+
user: {
|
|
872
|
+
id?: string;
|
|
873
|
+
ready: boolean;
|
|
874
|
+
};
|
|
875
|
+
wallet: {
|
|
876
|
+
publicKey: string | null;
|
|
877
|
+
existsOnStellar?: boolean;
|
|
878
|
+
createdAt?: number;
|
|
879
|
+
};
|
|
880
|
+
data: {
|
|
881
|
+
mail: string;
|
|
882
|
+
first_name: string;
|
|
883
|
+
last_name: string;
|
|
884
|
+
avatar: string;
|
|
885
|
+
providers: {
|
|
886
|
+
email: {
|
|
887
|
+
address: string;
|
|
888
|
+
} | null;
|
|
889
|
+
google: {
|
|
890
|
+
id: string;
|
|
891
|
+
} | null;
|
|
892
|
+
github: {
|
|
893
|
+
id: string;
|
|
894
|
+
} | null;
|
|
895
|
+
wallet: {
|
|
896
|
+
address: string;
|
|
897
|
+
} | null;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
/** @description Validation error */
|
|
905
|
+
400: {
|
|
906
|
+
headers: {
|
|
907
|
+
[name: string]: unknown;
|
|
908
|
+
};
|
|
909
|
+
content: {
|
|
910
|
+
"application/json": {
|
|
911
|
+
/** @constant */
|
|
912
|
+
success: false;
|
|
913
|
+
error: string;
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
/** @description Unauthorized */
|
|
918
|
+
401: {
|
|
919
|
+
headers: {
|
|
920
|
+
[name: string]: unknown;
|
|
921
|
+
};
|
|
922
|
+
content: {
|
|
923
|
+
"application/json": {
|
|
924
|
+
/** @constant */
|
|
925
|
+
success: false;
|
|
926
|
+
error: string;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
/** @description Forbidden */
|
|
931
|
+
403: {
|
|
932
|
+
headers: {
|
|
933
|
+
[name: string]: unknown;
|
|
934
|
+
};
|
|
935
|
+
content: {
|
|
936
|
+
"application/json": {
|
|
937
|
+
/** @constant */
|
|
938
|
+
success: false;
|
|
939
|
+
error: string;
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
/** @description Not found */
|
|
944
|
+
404: {
|
|
945
|
+
headers: {
|
|
946
|
+
[name: string]: unknown;
|
|
947
|
+
};
|
|
948
|
+
content: {
|
|
949
|
+
"application/json": {
|
|
950
|
+
/** @constant */
|
|
951
|
+
success: false;
|
|
952
|
+
error: string;
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
getConfig: {
|
|
959
|
+
parameters: {
|
|
960
|
+
query?: never;
|
|
961
|
+
header?: never;
|
|
962
|
+
path?: never;
|
|
963
|
+
cookie?: never;
|
|
964
|
+
};
|
|
965
|
+
requestBody?: never;
|
|
966
|
+
responses: {
|
|
967
|
+
/** @description Application config */
|
|
968
|
+
200: {
|
|
969
|
+
headers: {
|
|
970
|
+
[name: string]: unknown;
|
|
971
|
+
};
|
|
972
|
+
content: {
|
|
973
|
+
"application/json": {
|
|
974
|
+
/** @enum {string} */
|
|
975
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
976
|
+
/** @constant */
|
|
977
|
+
success: true;
|
|
978
|
+
content: {
|
|
979
|
+
application: {
|
|
980
|
+
name: string;
|
|
981
|
+
};
|
|
982
|
+
styles: {
|
|
983
|
+
theme?: string;
|
|
984
|
+
accentColor?: string;
|
|
985
|
+
logoUrl?: string;
|
|
986
|
+
emailEnabled?: boolean;
|
|
987
|
+
embeddedWallets?: boolean;
|
|
988
|
+
providers?: {
|
|
989
|
+
google?: boolean;
|
|
990
|
+
discord?: boolean;
|
|
991
|
+
x?: boolean;
|
|
992
|
+
github?: boolean;
|
|
993
|
+
apple?: boolean;
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
/** @description Unauthorized */
|
|
1001
|
+
401: {
|
|
1002
|
+
headers: {
|
|
1003
|
+
[name: string]: unknown;
|
|
1004
|
+
};
|
|
1005
|
+
content: {
|
|
1006
|
+
"application/json": {
|
|
1007
|
+
/** @constant */
|
|
1008
|
+
success: false;
|
|
1009
|
+
error: string;
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
1013
|
+
/** @description Forbidden */
|
|
1014
|
+
403: {
|
|
1015
|
+
headers: {
|
|
1016
|
+
[name: string]: unknown;
|
|
1017
|
+
};
|
|
1018
|
+
content: {
|
|
1019
|
+
"application/json": {
|
|
1020
|
+
/** @constant */
|
|
1021
|
+
success: false;
|
|
1022
|
+
error: string;
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
/** @description Not found */
|
|
1027
|
+
404: {
|
|
1028
|
+
headers: {
|
|
1029
|
+
[name: string]: unknown;
|
|
1030
|
+
};
|
|
1031
|
+
content: {
|
|
1032
|
+
"application/json": {
|
|
1033
|
+
/** @constant */
|
|
1034
|
+
success: false;
|
|
1035
|
+
error: string;
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
getApplicationsByIdLogo: {
|
|
1042
|
+
parameters: {
|
|
1043
|
+
query?: never;
|
|
1044
|
+
header?: never;
|
|
1045
|
+
path: {
|
|
1046
|
+
id: string;
|
|
1047
|
+
};
|
|
1048
|
+
cookie?: never;
|
|
1049
|
+
};
|
|
1050
|
+
requestBody?: never;
|
|
1051
|
+
responses: {
|
|
1052
|
+
/** @description Logo image */
|
|
1053
|
+
200: {
|
|
1054
|
+
headers: {
|
|
1055
|
+
[name: string]: unknown;
|
|
1056
|
+
};
|
|
1057
|
+
content: {
|
|
1058
|
+
"image/*": string;
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
/** @description Not found */
|
|
1062
|
+
404: {
|
|
1063
|
+
headers: {
|
|
1064
|
+
[name: string]: unknown;
|
|
1065
|
+
};
|
|
1066
|
+
content: {
|
|
1067
|
+
"application/json": {
|
|
1068
|
+
/** @constant */
|
|
1069
|
+
success: false;
|
|
1070
|
+
error: string;
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
postTxBuild: {
|
|
1077
|
+
parameters: {
|
|
1078
|
+
query?: never;
|
|
1079
|
+
header?: never;
|
|
1080
|
+
path?: never;
|
|
1081
|
+
cookie?: never;
|
|
1082
|
+
};
|
|
1083
|
+
requestBody?: never;
|
|
1084
|
+
responses: {
|
|
1085
|
+
/** @description Unsigned XDR and summary */
|
|
1086
|
+
200: {
|
|
1087
|
+
headers: {
|
|
1088
|
+
[name: string]: unknown;
|
|
1089
|
+
};
|
|
1090
|
+
content: {
|
|
1091
|
+
"application/json": {
|
|
1092
|
+
/** @enum {string} */
|
|
1093
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
1094
|
+
/** @constant */
|
|
1095
|
+
success: true;
|
|
1096
|
+
content: {
|
|
1097
|
+
unsignedXdr: string;
|
|
1098
|
+
networkPassphrase: string;
|
|
1099
|
+
estimatedFee: string;
|
|
1100
|
+
summary: {
|
|
1101
|
+
title: string;
|
|
1102
|
+
lines: string[];
|
|
1103
|
+
network: string;
|
|
1104
|
+
fee: string;
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
};
|
|
1110
|
+
/** @description Validation error */
|
|
1111
|
+
400: {
|
|
1112
|
+
headers: {
|
|
1113
|
+
[name: string]: unknown;
|
|
1114
|
+
};
|
|
1115
|
+
content: {
|
|
1116
|
+
"application/json": {
|
|
1117
|
+
/** @constant */
|
|
1118
|
+
success: false;
|
|
1119
|
+
error: string;
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
/** @description Unauthorized */
|
|
1124
|
+
401: {
|
|
1125
|
+
headers: {
|
|
1126
|
+
[name: string]: unknown;
|
|
1127
|
+
};
|
|
1128
|
+
content: {
|
|
1129
|
+
"application/json": {
|
|
1130
|
+
/** @constant */
|
|
1131
|
+
success: false;
|
|
1132
|
+
error: string;
|
|
1133
|
+
};
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
/** @description Horizon error */
|
|
1137
|
+
502: {
|
|
1138
|
+
headers: {
|
|
1139
|
+
[name: string]: unknown;
|
|
1140
|
+
};
|
|
1141
|
+
content: {
|
|
1142
|
+
"application/json": {
|
|
1143
|
+
/** @constant */
|
|
1144
|
+
success: false;
|
|
1145
|
+
error: string;
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
postTxSubmit: {
|
|
1152
|
+
parameters: {
|
|
1153
|
+
query?: never;
|
|
1154
|
+
header?: never;
|
|
1155
|
+
path?: never;
|
|
1156
|
+
cookie?: never;
|
|
1157
|
+
};
|
|
1158
|
+
requestBody?: never;
|
|
1159
|
+
responses: {
|
|
1160
|
+
/** @description Submit result (PENDING | SUCCESS | FAILED) */
|
|
1161
|
+
200: {
|
|
1162
|
+
headers: {
|
|
1163
|
+
[name: string]: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": {
|
|
1167
|
+
/** @enum {string} */
|
|
1168
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
1169
|
+
/** @constant */
|
|
1170
|
+
success: true;
|
|
1171
|
+
content: {
|
|
1172
|
+
hash: string;
|
|
1173
|
+
/** @enum {string} */
|
|
1174
|
+
status: "PENDING" | "SUCCESS" | "FAILED";
|
|
1175
|
+
resultCode?: string;
|
|
1176
|
+
message?: string;
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
/** @description Validation error */
|
|
1182
|
+
400: {
|
|
1183
|
+
headers: {
|
|
1184
|
+
[name: string]: unknown;
|
|
1185
|
+
};
|
|
1186
|
+
content: {
|
|
1187
|
+
"application/json": {
|
|
1188
|
+
/** @constant */
|
|
1189
|
+
success: false;
|
|
1190
|
+
error: string;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
/** @description Unauthorized */
|
|
1195
|
+
401: {
|
|
1196
|
+
headers: {
|
|
1197
|
+
[name: string]: unknown;
|
|
1198
|
+
};
|
|
1199
|
+
content: {
|
|
1200
|
+
"application/json": {
|
|
1201
|
+
/** @constant */
|
|
1202
|
+
success: false;
|
|
1203
|
+
error: string;
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
getTxStatus: {
|
|
1210
|
+
parameters: {
|
|
1211
|
+
query: {
|
|
1212
|
+
network: "testnet" | "mainnet";
|
|
1213
|
+
hash: string;
|
|
1214
|
+
};
|
|
1215
|
+
header?: never;
|
|
1216
|
+
path?: never;
|
|
1217
|
+
cookie?: never;
|
|
1218
|
+
};
|
|
1219
|
+
requestBody?: never;
|
|
1220
|
+
responses: {
|
|
1221
|
+
/** @description Transaction status (PENDING si no existe aún en Horizon) */
|
|
1222
|
+
200: {
|
|
1223
|
+
headers: {
|
|
1224
|
+
[name: string]: unknown;
|
|
1225
|
+
};
|
|
1226
|
+
content: {
|
|
1227
|
+
"application/json": {
|
|
1228
|
+
/** @enum {string} */
|
|
1229
|
+
code: "APPLICATION_DELETED" | "API_KEY_DELETED" | "EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_SENT" | "SDK_EMAIL_CODE_VERIFIED" | "SDK_WALLET_AUTHENTICATED" | "SDK_SESSION_CREATED" | "SDK_LOGIN_SUCCESS" | "HUB_API_HEALTH_OK" | "HUB_AUTH_CODE_SENT" | "HUB_AUTH_CODE_VERIFIED" | "HUB_AUTH_ME" | "HUB_API_KEY_LIST" | "HUB_API_KEY_CREATED" | "HUB_API_KEY_UPDATED" | "HUB_APPLICATION_LIST" | "HUB_APPLICATION_FOUND" | "HUB_APPLICATION_CREATED" | "HUB_APPLICATION_UPDATED" | "HUB_APPLICATION_WALLET_FUNDED" | "HUB_APPLICATION_USER_WALLET_FUNDED" | "HUB_APPLICATION_WALLET_CREATED" | "HUB_APPLICATION_WALLET_EXISTS" | "HUB_APPLICATION_WALLETS" | "HUB_APPLICATION_SDK_USERS" | "SDK_API_HEALTH_OK" | "SDK_APPLICATION_CONFIG" | "WALLET_SERVICE_HEALTH_OK" | "WALLET_SERVICE_WALLET_CREATED" | "WALLET_SERVICE_WALLET_FOUND" | "WALLET_SERVICE_WALLET_FUNDED" | "WALLET_SERVICE_PAYMENT_IDEMPOTENT" | "WALLET_SERVICE_PAYMENT_EXECUTED" | "WALLET_SERVICE_PAYMENT_SENT" | "WALLET_SERVICE_TRUSTLINE_ESTABLISHED" | "WALLET_SERVICE_BALANCE_FETCHED" | "WALLET_SERVICE_TX_IDEMPOTENT" | "WALLET_SERVICE_TX_EXECUTED" | "WALLET_SERVICE_TX_STATUS" | "HASHER_SERVICE_HEALTH_OK" | "HASHER_SERVICE_HASH_GENERATED" | "STELLAR_WATCHER_HEALTH_OK";
|
|
1230
|
+
/** @constant */
|
|
1231
|
+
success: true;
|
|
1232
|
+
content: {
|
|
1233
|
+
hash: string;
|
|
1234
|
+
/** @enum {string} */
|
|
1235
|
+
status: "PENDING" | "SUCCESS" | "FAILED";
|
|
1236
|
+
resultCode?: string;
|
|
1237
|
+
ledger?: number;
|
|
1238
|
+
message?: string;
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1243
|
+
/** @description Validation error */
|
|
1244
|
+
400: {
|
|
1245
|
+
headers: {
|
|
1246
|
+
[name: string]: unknown;
|
|
1247
|
+
};
|
|
1248
|
+
content: {
|
|
1249
|
+
"application/json": {
|
|
1250
|
+
/** @constant */
|
|
1251
|
+
success: false;
|
|
1252
|
+
error: string;
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
/** @description Unauthorized */
|
|
1257
|
+
401: {
|
|
1258
|
+
headers: {
|
|
1259
|
+
[name: string]: unknown;
|
|
1260
|
+
};
|
|
1261
|
+
content: {
|
|
1262
|
+
"application/json": {
|
|
1263
|
+
/** @constant */
|
|
1264
|
+
success: false;
|
|
1265
|
+
error: string;
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
type PollarApiClient = ReturnType<typeof createApiClient>;
|
|
1274
|
+
declare function createApiClient(baseUrl: string): openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1275
|
+
|
|
1276
|
+
declare enum WalletType {
|
|
1277
|
+
FREIGHTER = "freighter",
|
|
1278
|
+
ALBEDO = "albedo"
|
|
1279
|
+
}
|
|
1280
|
+
interface ConnectWalletResponse {
|
|
1281
|
+
address: string;
|
|
1282
|
+
publicKey: string;
|
|
1283
|
+
}
|
|
1284
|
+
interface SignTransactionOptions {
|
|
1285
|
+
network?: string;
|
|
1286
|
+
networkPassphrase?: string;
|
|
1287
|
+
accountToSign?: string;
|
|
1288
|
+
}
|
|
1289
|
+
interface SignAuthEntryOptions {
|
|
1290
|
+
accountToSign?: string;
|
|
1291
|
+
}
|
|
1292
|
+
interface SignTransactionResponse {
|
|
1293
|
+
signedTxXdr: string;
|
|
1294
|
+
}
|
|
1295
|
+
interface SignAuthEntryResponse {
|
|
1296
|
+
signedAuthEntry: string;
|
|
1297
|
+
}
|
|
1298
|
+
interface WalletAdapter {
|
|
1299
|
+
type: WalletType;
|
|
1300
|
+
isAvailable(): Promise<boolean>;
|
|
1301
|
+
connect(): Promise<ConnectWalletResponse>;
|
|
1302
|
+
disconnect(): Promise<void>;
|
|
1303
|
+
getPublicKey(): Promise<string | null>;
|
|
1304
|
+
signTransaction(xdr: string, options?: SignTransactionOptions): Promise<SignTransactionResponse>;
|
|
1305
|
+
signAuthEntry(entryXdr: string, options?: SignAuthEntryOptions): Promise<SignAuthEntryResponse>;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
declare class FreighterAdapter implements WalletAdapter {
|
|
1309
|
+
readonly type = WalletType.FREIGHTER;
|
|
1310
|
+
isAvailable(): Promise<boolean>;
|
|
1311
|
+
connect(): Promise<ConnectWalletResponse>;
|
|
1312
|
+
disconnect(): Promise<void>;
|
|
1313
|
+
getPublicKey(): Promise<string | null>;
|
|
1314
|
+
getNetwork(): Promise<string>;
|
|
1315
|
+
signTransaction(xdr: string, options?: SignTransactionOptions): Promise<SignTransactionResponse>;
|
|
1316
|
+
signAuthEntry(entryXdr: string, options?: SignAuthEntryOptions): Promise<SignAuthEntryResponse>;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
declare class AlbedoAdapter implements WalletAdapter {
|
|
1320
|
+
readonly type = WalletType.ALBEDO;
|
|
1321
|
+
isAvailable(): Promise<boolean>;
|
|
1322
|
+
connect(): Promise<ConnectWalletResponse>;
|
|
1323
|
+
disconnect(): Promise<void>;
|
|
1324
|
+
getPublicKey(): Promise<string | null>;
|
|
1325
|
+
getNetwork(): Promise<string>;
|
|
1326
|
+
signTransaction(xdr: string, _options?: SignTransactionOptions): Promise<SignTransactionResponse>;
|
|
1327
|
+
signAuthEntry(entryXdr: string, _options?: SignAuthEntryOptions): Promise<SignAuthEntryResponse>;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
interface AuthCredentials {
|
|
1331
|
+
email: string;
|
|
1332
|
+
password: string;
|
|
1333
|
+
}
|
|
1334
|
+
interface AuthToken {
|
|
1335
|
+
accessToken: string;
|
|
1336
|
+
refreshToken: string;
|
|
1337
|
+
expiresAt: number;
|
|
1338
|
+
}
|
|
1339
|
+
interface AuthUser {
|
|
1340
|
+
id: string;
|
|
1341
|
+
}
|
|
1342
|
+
interface AuthWallet {
|
|
1343
|
+
publicKey: string | null;
|
|
1344
|
+
}
|
|
1345
|
+
type ConfigResponse = paths['/auth/login']['post']['responses'][200]['content']['application/json'];
|
|
1346
|
+
type PollarLoginState = ConfigResponse['content'];
|
|
1347
|
+
interface PollarClientConfig {
|
|
1348
|
+
stellarNetwork?: StellarNetwork;
|
|
1349
|
+
baseUrl?: string;
|
|
1350
|
+
apiKey: string;
|
|
1351
|
+
}
|
|
1352
|
+
interface AuthError {
|
|
1353
|
+
code: string;
|
|
1354
|
+
message: string;
|
|
1355
|
+
}
|
|
1356
|
+
declare class PollarError extends Error {
|
|
1357
|
+
readonly code: string;
|
|
1358
|
+
constructor(code: string, message?: string);
|
|
1359
|
+
}
|
|
1360
|
+
type Status = 'unauthenticated' | 'restored' | 'authenticated' | 'awaiting_auth' | 'logging_in';
|
|
1361
|
+
interface PollarState {
|
|
1362
|
+
session: PollarLoginState | null;
|
|
1363
|
+
}
|
|
1364
|
+
type PollarLoginOptions = {
|
|
1365
|
+
provider: 'google';
|
|
1366
|
+
} | {
|
|
1367
|
+
provider: 'github';
|
|
1368
|
+
} | {
|
|
1369
|
+
provider: 'email';
|
|
1370
|
+
email: string;
|
|
1371
|
+
} | {
|
|
1372
|
+
provider: 'wallet';
|
|
1373
|
+
type: WalletType;
|
|
1374
|
+
};
|
|
1375
|
+
declare const PollarStateVar: {
|
|
1376
|
+
readonly WALLET_ADDRESS: "WALLET_ADDRESS";
|
|
1377
|
+
readonly LOGIN: "LOGIN";
|
|
1378
|
+
};
|
|
1379
|
+
type PollarStateVar = (typeof PollarStateVar)[keyof typeof PollarStateVar];
|
|
1380
|
+
declare const STATE_VAR_CODES: {
|
|
1381
|
+
readonly LOGIN: {
|
|
1382
|
+
readonly NONE: "NONE";
|
|
1383
|
+
readonly LOGOUT: "LOGOUT";
|
|
1384
|
+
readonly CREATE_SESSION_START: "CREATE_SESSION_START";
|
|
1385
|
+
readonly CREATE_SESSION_ERROR: "CREATE_SESSION_ERROR";
|
|
1386
|
+
readonly CREATE_SESSION_SUCCESS: "CREATE_SESSION_SUCCESS";
|
|
1387
|
+
readonly EMAIL_AUTH_START: "EMAIL_AUTH_START";
|
|
1388
|
+
readonly EMAIL_AUTH_START_ERROR: "EMAIL_AUTH_START_ERROR";
|
|
1389
|
+
readonly EMAIL_AUTH_START_SUCCESS: "EMAIL_AUTH_START_SUCCESS";
|
|
1390
|
+
readonly EMAIL_AUTH_CODE_ERROR: "EMAIL_AUTH_CODE_ERROR";
|
|
1391
|
+
readonly EMAIL_AUTH_CODE_SUCCESS: "EMAIL_AUTH_CODE_SUCCESS";
|
|
1392
|
+
readonly WALLET_AUTH_START: "WALLET_AUTH_START";
|
|
1393
|
+
readonly WALLET_AUTH_FREIGHTER_NOT_INSTALLED: "WALLET_AUTH_FREIGHTER_NOT_INSTALLED";
|
|
1394
|
+
readonly WALLET_AUTH_ALBEDO_NOT_INSTALLED: "WALLET_AUTH_ALBEDO_NOT_INSTALLED";
|
|
1395
|
+
readonly WALLET_AUTH_CONNECTED: "WALLET_AUTH_CONNECTED";
|
|
1396
|
+
readonly WALLET_AUTH_LOGIN_START: "WALLET_AUTH_LOGIN_START";
|
|
1397
|
+
readonly WALLET_AUTH_LOGIN_START_SUCCESS: "WALLET_AUTH_LOGIN_START_SUCCESS";
|
|
1398
|
+
readonly WALLET_AUTH_LOGIN_START_ERROR: "WALLET_AUTH_LOGIN_START_ERROR";
|
|
1399
|
+
readonly WALLET_AUTH_ERROR: "WALLET_AUTH_ERROR";
|
|
1400
|
+
readonly STREAM_POLL_START: "STREAM_POLL_START";
|
|
1401
|
+
readonly STREAM_POLL_EVENT: "STREAM_POLL_EVENT";
|
|
1402
|
+
readonly STREAM_POLL_READY: "STREAM_POLL_READY";
|
|
1403
|
+
readonly FETCH_SESSION_START: "FETCH_SESSION_START";
|
|
1404
|
+
readonly FETCH_SESSION_SUCCESS: "FETCH_SESSION_SUCCESS";
|
|
1405
|
+
readonly FETCH_SESSION_ERROR: "FETCH_SESSION_ERROR";
|
|
1406
|
+
readonly ERROR_ABORTED: "ABORTED";
|
|
1407
|
+
readonly ERROR_UNKNOWN: "ERROR_UNKNOWN";
|
|
1408
|
+
};
|
|
1409
|
+
readonly WALLET_ADDRESS: {
|
|
1410
|
+
readonly NONE: "NONE";
|
|
1411
|
+
readonly REMOVED_ADDRESS: "REMOVED_ADDRESS";
|
|
1412
|
+
readonly UPDATED_ADDRESS: "UPDATED_ADDRESS";
|
|
1413
|
+
};
|
|
1414
|
+
};
|
|
1415
|
+
type LoginCodes = (typeof STATE_VAR_CODES)[typeof PollarStateVar.LOGIN];
|
|
1416
|
+
type StateLoginCodes = LoginCodes[keyof (typeof STATE_VAR_CODES)[typeof PollarStateVar.LOGIN]];
|
|
1417
|
+
type WalletAddressCodes = (typeof STATE_VAR_CODES)[typeof PollarStateVar.WALLET_ADDRESS];
|
|
1418
|
+
type StateWalletAddressCodes = WalletAddressCodes[keyof (typeof STATE_VAR_CODES)[typeof PollarStateVar.WALLET_ADDRESS]];
|
|
1419
|
+
type StateVarCodes = StateLoginCodes | StateWalletAddressCodes;
|
|
1420
|
+
declare const StateStatus: {
|
|
1421
|
+
readonly NONE: "NONE";
|
|
1422
|
+
readonly LOADING: "LOADING";
|
|
1423
|
+
readonly SUCCESS: "SUCCESS";
|
|
1424
|
+
readonly ERROR: "ERROR";
|
|
1425
|
+
};
|
|
1426
|
+
type StateStatus = (typeof StateStatus)[keyof typeof StateStatus];
|
|
1427
|
+
interface PollarStateEntry {
|
|
1428
|
+
var: PollarStateVar;
|
|
1429
|
+
code: StateVarCodes;
|
|
1430
|
+
status: StateStatus;
|
|
1431
|
+
level: 'info' | 'warn' | 'error';
|
|
1432
|
+
data?: unknown;
|
|
1433
|
+
ts: number;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
declare class PollarClient {
|
|
1437
|
+
readonly apiKey: string;
|
|
1438
|
+
readonly id: string;
|
|
1439
|
+
readonly basePath: string;
|
|
1440
|
+
private readonly _api;
|
|
1441
|
+
private _session;
|
|
1442
|
+
private _stateListeners;
|
|
1443
|
+
private _state;
|
|
1444
|
+
constructor(config: PollarClientConfig);
|
|
1445
|
+
isAuthenticated(): boolean;
|
|
1446
|
+
getState(): PollarState;
|
|
1447
|
+
getApi(): PollarApiClient;
|
|
1448
|
+
login(options: PollarLoginOptions): {
|
|
1449
|
+
cancelLogin: () => void;
|
|
1450
|
+
};
|
|
1451
|
+
onStateChange(cb: (state: PollarStateEntry) => void): () => void;
|
|
1452
|
+
verifyEmailCode(clientSessionId: string, code: string): Promise<void>;
|
|
1453
|
+
logout(): void;
|
|
1454
|
+
private _readStore;
|
|
1455
|
+
private _storeSession;
|
|
1456
|
+
private _clearSession;
|
|
1457
|
+
private _emitState;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
declare function isValidSession(value: unknown): value is PollarLoginState;
|
|
1461
|
+
|
|
1462
|
+
type StellarNetwork = 'mainnet' | 'testnet';
|
|
1463
|
+
type StellarClientConfig = StellarNetwork | {
|
|
1464
|
+
horizonUrl: string;
|
|
1465
|
+
};
|
|
1466
|
+
interface StellarBalance {
|
|
1467
|
+
asset: string;
|
|
1468
|
+
balance: string;
|
|
1469
|
+
assetIssuer?: string;
|
|
1470
|
+
}
|
|
1471
|
+
type GetBalancesResult = {
|
|
1472
|
+
success: true;
|
|
1473
|
+
balances: StellarBalance[];
|
|
1474
|
+
} | {
|
|
1475
|
+
success: false;
|
|
1476
|
+
errorCode: 'ACCOUNT_NOT_FOUND' | 'HORIZON_ERROR' | 'NETWORK_ERROR';
|
|
1477
|
+
balances: [];
|
|
1478
|
+
};
|
|
1479
|
+
declare class StellarClient {
|
|
1480
|
+
private readonly horizonUrl;
|
|
1481
|
+
constructor(config: StellarClientConfig);
|
|
1482
|
+
getBalances(publicKey: string): Promise<GetBalancesResult>;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
export { AlbedoAdapter, type AuthCredentials, type AuthError, type AuthToken, type AuthUser, type AuthWallet, type ConnectWalletResponse, FreighterAdapter, type GetBalancesResult, type PollarApiClient, PollarClient, type PollarClientConfig, PollarError, type PollarLoginOptions, type PollarLoginState, type PollarState, type PollarStateEntry, PollarStateVar, STATE_VAR_CODES, type SignAuthEntryOptions, type SignAuthEntryResponse, type SignTransactionOptions, type SignTransactionResponse, type StateLoginCodes, StateStatus, type Status, type StellarBalance, StellarClient, type StellarClientConfig, type StellarNetwork, type WalletAdapter, WalletType, isValidSession, type paths as pollarPaths };
|