@pollar/core 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +191 -108
- package/dist/index.d.ts +191 -108
- package/dist/index.js +139 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ interface paths {
|
|
|
174
174
|
patch?: never;
|
|
175
175
|
trace?: never;
|
|
176
176
|
};
|
|
177
|
-
"/config": {
|
|
177
|
+
"/applications/config": {
|
|
178
178
|
parameters: {
|
|
179
179
|
query?: never;
|
|
180
180
|
header?: never;
|
|
@@ -185,7 +185,7 @@ interface paths {
|
|
|
185
185
|
* Get application config
|
|
186
186
|
* @description Returns the public configuration and branding for the application.
|
|
187
187
|
*/
|
|
188
|
-
get: operations["
|
|
188
|
+
get: operations["getApplicationsConfig"];
|
|
189
189
|
put?: never;
|
|
190
190
|
post?: never;
|
|
191
191
|
delete?: never;
|
|
@@ -292,8 +292,8 @@ interface operations {
|
|
|
292
292
|
};
|
|
293
293
|
content: {
|
|
294
294
|
"application/json": {
|
|
295
|
-
/** @
|
|
296
|
-
code: "
|
|
295
|
+
/** @constant */
|
|
296
|
+
code: "SDK_API_HEALTH_OK";
|
|
297
297
|
/** @constant */
|
|
298
298
|
success: true;
|
|
299
299
|
content: {
|
|
@@ -322,8 +322,8 @@ interface operations {
|
|
|
322
322
|
};
|
|
323
323
|
content: {
|
|
324
324
|
"application/json": {
|
|
325
|
-
/** @
|
|
326
|
-
code: "
|
|
325
|
+
/** @constant */
|
|
326
|
+
code: "SDK_SESSION_CREATED";
|
|
327
327
|
/** @constant */
|
|
328
328
|
success: true;
|
|
329
329
|
content: {
|
|
@@ -593,8 +593,8 @@ interface operations {
|
|
|
593
593
|
};
|
|
594
594
|
content: {
|
|
595
595
|
"application/json": {
|
|
596
|
-
/** @
|
|
597
|
-
code: "
|
|
596
|
+
/** @constant */
|
|
597
|
+
code: "SDK_EMAIL_CODE_SENT";
|
|
598
598
|
/** @constant */
|
|
599
599
|
success: true;
|
|
600
600
|
content: {
|
|
@@ -681,8 +681,8 @@ interface operations {
|
|
|
681
681
|
};
|
|
682
682
|
content: {
|
|
683
683
|
"application/json": {
|
|
684
|
-
/** @
|
|
685
|
-
code: "
|
|
684
|
+
/** @constant */
|
|
685
|
+
code: "SDK_EMAIL_CODE_VERIFIED";
|
|
686
686
|
/** @constant */
|
|
687
687
|
success: true;
|
|
688
688
|
content: {
|
|
@@ -768,8 +768,8 @@ interface operations {
|
|
|
768
768
|
};
|
|
769
769
|
content: {
|
|
770
770
|
"application/json": {
|
|
771
|
-
/** @
|
|
772
|
-
code: "
|
|
771
|
+
/** @constant */
|
|
772
|
+
code: "SDK_WALLET_AUTHENTICATED";
|
|
773
773
|
/** @constant */
|
|
774
774
|
success: true;
|
|
775
775
|
content: {
|
|
@@ -855,8 +855,8 @@ interface operations {
|
|
|
855
855
|
};
|
|
856
856
|
content: {
|
|
857
857
|
"application/json": {
|
|
858
|
-
/** @
|
|
859
|
-
code: "
|
|
858
|
+
/** @constant */
|
|
859
|
+
code: "SDK_LOGIN_SUCCESS";
|
|
860
860
|
/** @constant */
|
|
861
861
|
success: true;
|
|
862
862
|
content: {
|
|
@@ -955,7 +955,7 @@ interface operations {
|
|
|
955
955
|
};
|
|
956
956
|
};
|
|
957
957
|
};
|
|
958
|
-
|
|
958
|
+
getApplicationsConfig: {
|
|
959
959
|
parameters: {
|
|
960
960
|
query?: never;
|
|
961
961
|
header?: never;
|
|
@@ -971,8 +971,8 @@ interface operations {
|
|
|
971
971
|
};
|
|
972
972
|
content: {
|
|
973
973
|
"application/json": {
|
|
974
|
-
/** @
|
|
975
|
-
code: "
|
|
974
|
+
/** @constant */
|
|
975
|
+
code: "SDK_APPLICATION_CONFIG";
|
|
976
976
|
/** @constant */
|
|
977
977
|
success: true;
|
|
978
978
|
content: {
|
|
@@ -1080,7 +1080,42 @@ interface operations {
|
|
|
1080
1080
|
path?: never;
|
|
1081
1081
|
cookie?: never;
|
|
1082
1082
|
};
|
|
1083
|
-
requestBody?:
|
|
1083
|
+
requestBody?: {
|
|
1084
|
+
content: {
|
|
1085
|
+
"application/json": {
|
|
1086
|
+
/** @enum {string} */
|
|
1087
|
+
network: "testnet" | "mainnet";
|
|
1088
|
+
publicKey: string;
|
|
1089
|
+
/** @constant */
|
|
1090
|
+
operation: "payment";
|
|
1091
|
+
params: {
|
|
1092
|
+
destination: string;
|
|
1093
|
+
amount: string;
|
|
1094
|
+
asset: {
|
|
1095
|
+
/** @constant */
|
|
1096
|
+
type: "native";
|
|
1097
|
+
} | {
|
|
1098
|
+
/** @constant */
|
|
1099
|
+
type: "credit_alphanum4";
|
|
1100
|
+
code: string;
|
|
1101
|
+
issuer: string;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
options?: {
|
|
1105
|
+
timeoutSec?: number;
|
|
1106
|
+
memo?: {
|
|
1107
|
+
/** @constant */
|
|
1108
|
+
type: "text";
|
|
1109
|
+
value: string;
|
|
1110
|
+
} | {
|
|
1111
|
+
/** @constant */
|
|
1112
|
+
type: "id";
|
|
1113
|
+
value: string;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1084
1119
|
responses: {
|
|
1085
1120
|
/** @description Unsigned XDR and summary */
|
|
1086
1121
|
200: {
|
|
@@ -1089,8 +1124,8 @@ interface operations {
|
|
|
1089
1124
|
};
|
|
1090
1125
|
content: {
|
|
1091
1126
|
"application/json": {
|
|
1092
|
-
/** @
|
|
1093
|
-
code: "
|
|
1127
|
+
/** @constant */
|
|
1128
|
+
code: "SDK_TX_BUILD";
|
|
1094
1129
|
/** @constant */
|
|
1095
1130
|
success: true;
|
|
1096
1131
|
content: {
|
|
@@ -1164,8 +1199,8 @@ interface operations {
|
|
|
1164
1199
|
};
|
|
1165
1200
|
content: {
|
|
1166
1201
|
"application/json": {
|
|
1167
|
-
/** @
|
|
1168
|
-
code: "
|
|
1202
|
+
/** @constant */
|
|
1203
|
+
code: "SDK_TX_SUBMIT";
|
|
1169
1204
|
/** @constant */
|
|
1170
1205
|
success: true;
|
|
1171
1206
|
content: {
|
|
@@ -1225,8 +1260,8 @@ interface operations {
|
|
|
1225
1260
|
};
|
|
1226
1261
|
content: {
|
|
1227
1262
|
"application/json": {
|
|
1228
|
-
/** @
|
|
1229
|
-
code: "
|
|
1263
|
+
/** @constant */
|
|
1264
|
+
code: "SDK_TX_STATUS";
|
|
1230
1265
|
/** @constant */
|
|
1231
1266
|
success: true;
|
|
1232
1267
|
content: {
|
|
@@ -1273,6 +1308,70 @@ interface operations {
|
|
|
1273
1308
|
type PollarApiClient = ReturnType<typeof createApiClient>;
|
|
1274
1309
|
declare function createApiClient(baseUrl: string): openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1275
1310
|
|
|
1311
|
+
declare const StateStatus: {
|
|
1312
|
+
readonly NONE: "NONE";
|
|
1313
|
+
readonly LOADING: "LOADING";
|
|
1314
|
+
readonly SUCCESS: "SUCCESS";
|
|
1315
|
+
readonly ERROR: "ERROR";
|
|
1316
|
+
};
|
|
1317
|
+
type StateStatus = (typeof StateStatus)[keyof typeof StateStatus];
|
|
1318
|
+
declare const PollarStateVar: {
|
|
1319
|
+
readonly AUTHENTICATION: "authentication";
|
|
1320
|
+
readonly TRANSACTION: "transaction";
|
|
1321
|
+
};
|
|
1322
|
+
type PollarStateVar = (typeof PollarStateVar)[keyof typeof PollarStateVar];
|
|
1323
|
+
declare const STATE_VAR_CODES: {
|
|
1324
|
+
readonly authentication: {
|
|
1325
|
+
readonly NONE: "NONE";
|
|
1326
|
+
readonly LOGOUT: "LOGOUT";
|
|
1327
|
+
readonly CREATE_SESSION_START: "CREATE_SESSION_START";
|
|
1328
|
+
readonly CREATE_SESSION_ERROR: "CREATE_SESSION_ERROR";
|
|
1329
|
+
readonly CREATE_SESSION_SUCCESS: "CREATE_SESSION_SUCCESS";
|
|
1330
|
+
readonly EMAIL_AUTH_START: "EMAIL_AUTH_START";
|
|
1331
|
+
readonly EMAIL_AUTH_START_ERROR: "EMAIL_AUTH_START_ERROR";
|
|
1332
|
+
readonly EMAIL_AUTH_START_SUCCESS: "EMAIL_AUTH_START_SUCCESS";
|
|
1333
|
+
readonly EMAIL_AUTH_CODE_ERROR: "EMAIL_AUTH_CODE_ERROR";
|
|
1334
|
+
readonly EMAIL_AUTH_CODE_SUCCESS: "EMAIL_AUTH_CODE_SUCCESS";
|
|
1335
|
+
readonly WALLET_AUTH_START: "WALLET_AUTH_START";
|
|
1336
|
+
readonly WALLET_AUTH_FREIGHTER_NOT_INSTALLED: "WALLET_AUTH_FREIGHTER_NOT_INSTALLED";
|
|
1337
|
+
readonly WALLET_AUTH_ALBEDO_NOT_INSTALLED: "WALLET_AUTH_ALBEDO_NOT_INSTALLED";
|
|
1338
|
+
readonly WALLET_AUTH_CONNECTED: "WALLET_AUTH_CONNECTED";
|
|
1339
|
+
readonly WALLET_AUTH_LOGIN_START: "WALLET_AUTH_LOGIN_START";
|
|
1340
|
+
readonly WALLET_AUTH_LOGIN_START_SUCCESS: "WALLET_AUTH_LOGIN_START_SUCCESS";
|
|
1341
|
+
readonly WALLET_AUTH_LOGIN_START_ERROR: "WALLET_AUTH_LOGIN_START_ERROR";
|
|
1342
|
+
readonly WALLET_AUTH_ERROR: "WALLET_AUTH_ERROR";
|
|
1343
|
+
readonly STREAM_POLL_START: "STREAM_POLL_START";
|
|
1344
|
+
readonly STREAM_POLL_EVENT: "STREAM_POLL_EVENT";
|
|
1345
|
+
readonly STREAM_POLL_READY: "STREAM_POLL_READY";
|
|
1346
|
+
readonly FETCH_SESSION_START: "FETCH_SESSION_START";
|
|
1347
|
+
readonly FETCH_SESSION_SUCCESS: "FETCH_SESSION_SUCCESS";
|
|
1348
|
+
readonly FETCH_SESSION_ERROR: "FETCH_SESSION_ERROR";
|
|
1349
|
+
readonly RESTORED_SESSION_SUCCESS: "RESTORED_SESSION_SUCCESS";
|
|
1350
|
+
readonly RESTORED_SESSION_ERROR: "RESTORED_SESSION_ERROR";
|
|
1351
|
+
readonly SESSION_STORED: "SESSION_STORED";
|
|
1352
|
+
readonly ERROR_ABORTED: "ABORTED";
|
|
1353
|
+
readonly ERROR_UNKNOWN: "ERROR_UNKNOWN";
|
|
1354
|
+
};
|
|
1355
|
+
readonly walletAddress: {
|
|
1356
|
+
readonly NONE: "NONE";
|
|
1357
|
+
readonly REMOVED_ADDRESS: "REMOVED_ADDRESS";
|
|
1358
|
+
readonly UPDATED_ADDRESS: "UPDATED_ADDRESS";
|
|
1359
|
+
};
|
|
1360
|
+
readonly transaction: {
|
|
1361
|
+
readonly NONE: "NONE";
|
|
1362
|
+
readonly BUILD_TRANSACTION_ERROR_NO_WALLET: "BUILD_TRANSACTION_ERROR_NO_WALLET";
|
|
1363
|
+
readonly BUILD_TRANSACTION_START: "BUILD_TRANSACTION_START";
|
|
1364
|
+
readonly BUILD_TRANSACTION_SUCCESS: "BUILD_TRANSACTION_SUCCESS";
|
|
1365
|
+
readonly BUILD_TRANSACTION_ERROR: "BUILD_TRANSACTION_ERROR";
|
|
1366
|
+
readonly SIGN_TRANSACTION_START: "SIGN_TRANSACTION_START";
|
|
1367
|
+
readonly SIGN_TRANSACTION_SUCCESS: "SIGN_TRANSACTION_SUCCESS";
|
|
1368
|
+
readonly SIGN_TRANSACTION_ERROR: "SIGN_TRANSACTION_ERROR";
|
|
1369
|
+
readonly SEND_TRANSACTION_START: "SEND_TRANSACTION_START";
|
|
1370
|
+
readonly SEND_TRANSACTION_SUCCESS: "SEND_TRANSACTION_SUCCESS";
|
|
1371
|
+
readonly SEND_TRANSACTION_ERROR: "SEND_TRANSACTION_ERROR";
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1276
1375
|
declare enum WalletType {
|
|
1277
1376
|
FREIGHTER = "freighter",
|
|
1278
1377
|
ALBEDO = "albedo"
|
|
@@ -1327,40 +1426,26 @@ declare class AlbedoAdapter implements WalletAdapter {
|
|
|
1327
1426
|
signAuthEntry(entryXdr: string, _options?: SignAuthEntryOptions): Promise<SignAuthEntryResponse>;
|
|
1328
1427
|
}
|
|
1329
1428
|
|
|
1330
|
-
|
|
1331
|
-
|
|
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'];
|
|
1429
|
+
type PollarApplicationConfigResponse = paths['/auth/login']['post']['responses'][200]['content']['application/json'];
|
|
1430
|
+
type PollarApplicationConfigContent = PollarApplicationConfigResponse['content'];
|
|
1347
1431
|
interface PollarClientConfig {
|
|
1348
1432
|
stellarNetwork?: StellarNetwork;
|
|
1349
1433
|
baseUrl?: string;
|
|
1350
1434
|
apiKey: string;
|
|
1351
1435
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1436
|
+
type SubmitTxResult = {
|
|
1437
|
+
success: true;
|
|
1438
|
+
hash: string;
|
|
1439
|
+
status: 'PENDING' | 'SUCCESS' | 'FAILED';
|
|
1440
|
+
resultCode?: string;
|
|
1441
|
+
message?: string;
|
|
1442
|
+
} | {
|
|
1443
|
+
success: false;
|
|
1444
|
+
error: string;
|
|
1445
|
+
};
|
|
1446
|
+
type TxBuildResponse = paths['/tx/build']['post']['responses'][200]['content']['application/json'];
|
|
1447
|
+
type TxBuildBody = NonNullable<paths['/tx/build']['post']['requestBody']>['content']['application/json'];
|
|
1448
|
+
type TxBuildResponseError = paths['/tx/build']['post']['responses'][400 | 401 | 502]['content']['application/json'];
|
|
1364
1449
|
type PollarLoginOptions = {
|
|
1365
1450
|
provider: 'google';
|
|
1366
1451
|
} | {
|
|
@@ -1372,58 +1457,11 @@ type PollarLoginOptions = {
|
|
|
1372
1457
|
provider: 'wallet';
|
|
1373
1458
|
type: WalletType;
|
|
1374
1459
|
};
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
type
|
|
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];
|
|
1460
|
+
type AuthenticationCodes = (typeof STATE_VAR_CODES)[typeof PollarStateVar.AUTHENTICATION];
|
|
1461
|
+
type StateAuthenticationCodes = AuthenticationCodes[keyof (typeof STATE_VAR_CODES)[typeof PollarStateVar.AUTHENTICATION]];
|
|
1462
|
+
type TransactionCodes = (typeof STATE_VAR_CODES)[typeof PollarStateVar.TRANSACTION];
|
|
1463
|
+
type StateTransactionCodes = TransactionCodes[keyof (typeof STATE_VAR_CODES)[typeof PollarStateVar.TRANSACTION]];
|
|
1464
|
+
type StateVarCodes = StateAuthenticationCodes | StateTransactionCodes;
|
|
1427
1465
|
interface PollarStateEntry {
|
|
1428
1466
|
var: PollarStateVar;
|
|
1429
1467
|
code: StateVarCodes;
|
|
@@ -1432,6 +1470,9 @@ interface PollarStateEntry {
|
|
|
1432
1470
|
data?: unknown;
|
|
1433
1471
|
ts: number;
|
|
1434
1472
|
}
|
|
1473
|
+
type PollarState = {
|
|
1474
|
+
[key in PollarStateVar]: PollarStateEntry[];
|
|
1475
|
+
};
|
|
1435
1476
|
|
|
1436
1477
|
declare class PollarClient {
|
|
1437
1478
|
readonly apiKey: string;
|
|
@@ -1443,13 +1484,55 @@ declare class PollarClient {
|
|
|
1443
1484
|
private _state;
|
|
1444
1485
|
constructor(config: PollarClientConfig);
|
|
1445
1486
|
isAuthenticated(): boolean;
|
|
1446
|
-
getState():
|
|
1487
|
+
getState(): {
|
|
1488
|
+
session: {
|
|
1489
|
+
clientSessionId: string;
|
|
1490
|
+
userId: string | null;
|
|
1491
|
+
status: string;
|
|
1492
|
+
token: {
|
|
1493
|
+
accessToken: string;
|
|
1494
|
+
refreshToken: string;
|
|
1495
|
+
expiresAt: number;
|
|
1496
|
+
};
|
|
1497
|
+
user: {
|
|
1498
|
+
id?: string;
|
|
1499
|
+
ready: boolean;
|
|
1500
|
+
};
|
|
1501
|
+
wallet: {
|
|
1502
|
+
publicKey: string | null;
|
|
1503
|
+
existsOnStellar?: boolean;
|
|
1504
|
+
createdAt?: number;
|
|
1505
|
+
};
|
|
1506
|
+
data: {
|
|
1507
|
+
mail: string;
|
|
1508
|
+
first_name: string;
|
|
1509
|
+
last_name: string;
|
|
1510
|
+
avatar: string;
|
|
1511
|
+
providers: {
|
|
1512
|
+
email: {
|
|
1513
|
+
address: string;
|
|
1514
|
+
} | null;
|
|
1515
|
+
google: {
|
|
1516
|
+
id: string;
|
|
1517
|
+
} | null;
|
|
1518
|
+
github: {
|
|
1519
|
+
id: string;
|
|
1520
|
+
} | null;
|
|
1521
|
+
wallet: {
|
|
1522
|
+
address: string;
|
|
1523
|
+
} | null;
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
} | null;
|
|
1527
|
+
};
|
|
1447
1528
|
getApi(): PollarApiClient;
|
|
1448
1529
|
login(options: PollarLoginOptions): {
|
|
1449
1530
|
cancelLogin: () => void;
|
|
1450
1531
|
};
|
|
1451
1532
|
onStateChange(cb: (state: PollarStateEntry) => void): () => void;
|
|
1452
1533
|
verifyEmailCode(clientSessionId: string, code: string): Promise<void>;
|
|
1534
|
+
buildTx(operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']): Promise<void>;
|
|
1535
|
+
submitTx(signedXdr: string): Promise<SubmitTxResult>;
|
|
1453
1536
|
logout(): void;
|
|
1454
1537
|
private _readStore;
|
|
1455
1538
|
private _storeSession;
|
|
@@ -1457,7 +1540,7 @@ declare class PollarClient {
|
|
|
1457
1540
|
private _emitState;
|
|
1458
1541
|
}
|
|
1459
1542
|
|
|
1460
|
-
declare function isValidSession(value: unknown): value is
|
|
1543
|
+
declare function isValidSession(value: unknown): value is PollarApplicationConfigContent;
|
|
1461
1544
|
|
|
1462
1545
|
type StellarNetwork = 'mainnet' | 'testnet';
|
|
1463
1546
|
type StellarClientConfig = StellarNetwork | {
|
|
@@ -1482,4 +1565,4 @@ declare class StellarClient {
|
|
|
1482
1565
|
getBalances(publicKey: string): Promise<GetBalancesResult>;
|
|
1483
1566
|
}
|
|
1484
1567
|
|
|
1485
|
-
export { AlbedoAdapter, type
|
|
1568
|
+
export { AlbedoAdapter, type ConnectWalletResponse, FreighterAdapter, type GetBalancesResult, type PollarApiClient, type PollarApplicationConfigContent, type PollarApplicationConfigResponse, PollarClient, type PollarClientConfig, type PollarLoginOptions, type PollarState, type PollarStateEntry, PollarStateVar, STATE_VAR_CODES, type SignAuthEntryOptions, type SignAuthEntryResponse, type SignTransactionOptions, type SignTransactionResponse, type StateAuthenticationCodes, StateStatus, type StateTransactionCodes, type StateVarCodes, type StellarBalance, StellarClient, type StellarClientConfig, type StellarNetwork, type SubmitTxResult, type TxBuildBody, type TxBuildResponse, type TxBuildResponseError, type WalletAdapter, WalletType, isValidSession, type paths as pollarPaths };
|