@ecency/wallets 1.4.25 → 1.4.27
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/browser/index.d.ts +33 -6
- package/dist/browser/index.js +693 -249
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +696 -248
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +693 -249
- package/dist/node/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -635,6 +635,30 @@ function rewardSpk(data, sstats) {
|
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
+
// src/internal/hive-auth.ts
|
|
639
|
+
var broadcastHandler = null;
|
|
640
|
+
function registerHiveAuthBroadcastHandler(handler) {
|
|
641
|
+
broadcastHandler = handler;
|
|
642
|
+
}
|
|
643
|
+
function getHiveAuthBroadcastHandler() {
|
|
644
|
+
return broadcastHandler;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// src/modules/assets/utils/hive-auth.ts
|
|
648
|
+
function registerWalletHiveAuthBroadcast(handler) {
|
|
649
|
+
registerHiveAuthBroadcastHandler(handler);
|
|
650
|
+
}
|
|
651
|
+
function broadcastWithWalletHiveAuth(username, operations, keyType) {
|
|
652
|
+
const handler = getHiveAuthBroadcastHandler();
|
|
653
|
+
if (!handler) {
|
|
654
|
+
throw new Error("HiveAuth broadcast handler is not registered");
|
|
655
|
+
}
|
|
656
|
+
return handler(username, operations, keyType);
|
|
657
|
+
}
|
|
658
|
+
function hasWalletHiveAuthBroadcast() {
|
|
659
|
+
return typeof getHiveAuthBroadcastHandler() === "function";
|
|
660
|
+
}
|
|
661
|
+
|
|
638
662
|
// src/modules/assets/hive/queries/get-hive-asset-general-info-query-options.ts
|
|
639
663
|
function getHiveAssetGeneralInfoQueryOptions(username) {
|
|
640
664
|
return queryOptions({
|
|
@@ -1196,6 +1220,15 @@ async function transferHive(payload) {
|
|
|
1196
1220
|
const precision = token === "VESTS" /* VESTS */ ? 6 : 3;
|
|
1197
1221
|
const formattedAmount = parsedAsset.amount.toFixed(precision);
|
|
1198
1222
|
const amountWithSymbol = `${formattedAmount} ${token}`;
|
|
1223
|
+
const operation = [
|
|
1224
|
+
"transfer",
|
|
1225
|
+
{
|
|
1226
|
+
from: payload.from,
|
|
1227
|
+
to: payload.to,
|
|
1228
|
+
amount: amountWithSymbol,
|
|
1229
|
+
memo: payload.memo
|
|
1230
|
+
}
|
|
1231
|
+
];
|
|
1199
1232
|
if (payload.type === "key" && "key" in payload) {
|
|
1200
1233
|
const { key, type, ...params } = payload;
|
|
1201
1234
|
return CONFIG.hiveClient.broadcast.transfer(
|
|
@@ -1225,17 +1258,11 @@ async function transferHive(payload) {
|
|
|
1225
1258
|
null
|
|
1226
1259
|
)
|
|
1227
1260
|
);
|
|
1261
|
+
} else if (payload.type === "hiveauth") {
|
|
1262
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1228
1263
|
} else {
|
|
1229
1264
|
return hs.sendOperation(
|
|
1230
|
-
|
|
1231
|
-
"transfer",
|
|
1232
|
-
{
|
|
1233
|
-
from: payload.from,
|
|
1234
|
-
to: payload.to,
|
|
1235
|
-
amount: amountWithSymbol,
|
|
1236
|
-
memo: payload.memo
|
|
1237
|
-
}
|
|
1238
|
-
],
|
|
1265
|
+
operation,
|
|
1239
1266
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1240
1267
|
() => {
|
|
1241
1268
|
}
|
|
@@ -1243,6 +1270,13 @@ async function transferHive(payload) {
|
|
|
1243
1270
|
}
|
|
1244
1271
|
}
|
|
1245
1272
|
async function transferToSavingsHive(payload) {
|
|
1273
|
+
const operationPayload = {
|
|
1274
|
+
from: payload.from,
|
|
1275
|
+
to: payload.to,
|
|
1276
|
+
amount: payload.amount,
|
|
1277
|
+
memo: payload.memo
|
|
1278
|
+
};
|
|
1279
|
+
const operation = ["transfer_to_savings", operationPayload];
|
|
1246
1280
|
if (payload.type === "key" && "key" in payload) {
|
|
1247
1281
|
const { key, type, ...params } = payload;
|
|
1248
1282
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
@@ -1250,18 +1284,12 @@ async function transferToSavingsHive(payload) {
|
|
|
1250
1284
|
key
|
|
1251
1285
|
);
|
|
1252
1286
|
} else if (payload.type === "keychain") {
|
|
1253
|
-
return Keychain.broadcast(
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
"Active"
|
|
1257
|
-
);
|
|
1287
|
+
return Keychain.broadcast(payload.from, [operation], "Active");
|
|
1288
|
+
} else if (payload.type === "hiveauth") {
|
|
1289
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1258
1290
|
} else {
|
|
1259
|
-
return hs.sendOperation(
|
|
1260
|
-
|
|
1261
|
-
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1262
|
-
() => {
|
|
1263
|
-
}
|
|
1264
|
-
);
|
|
1291
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1292
|
+
});
|
|
1265
1293
|
}
|
|
1266
1294
|
}
|
|
1267
1295
|
async function transferFromSavingsHive(payload) {
|
|
@@ -1273,28 +1301,31 @@ async function transferFromSavingsHive(payload) {
|
|
|
1273
1301
|
memo: payload.memo,
|
|
1274
1302
|
request_id: requestId
|
|
1275
1303
|
};
|
|
1304
|
+
const operation = ["transfer_from_savings", operationPayload];
|
|
1276
1305
|
if (payload.type === "key" && "key" in payload) {
|
|
1277
1306
|
const { key } = payload;
|
|
1278
1307
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
1279
|
-
[
|
|
1308
|
+
[operation],
|
|
1280
1309
|
key
|
|
1281
1310
|
);
|
|
1282
1311
|
}
|
|
1283
1312
|
if (payload.type === "keychain") {
|
|
1284
|
-
return Keychain.broadcast(
|
|
1285
|
-
payload.from,
|
|
1286
|
-
[["transfer_from_savings", operationPayload]],
|
|
1287
|
-
"Active"
|
|
1288
|
-
);
|
|
1313
|
+
return Keychain.broadcast(payload.from, [operation], "Active");
|
|
1289
1314
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
);
|
|
1315
|
+
if (payload.type === "hiveauth") {
|
|
1316
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1317
|
+
}
|
|
1318
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1319
|
+
});
|
|
1296
1320
|
}
|
|
1297
1321
|
async function powerUpHive(payload) {
|
|
1322
|
+
const operationPayload = {
|
|
1323
|
+
from: payload.from,
|
|
1324
|
+
to: payload.to,
|
|
1325
|
+
amount: payload.amount,
|
|
1326
|
+
memo: payload.memo
|
|
1327
|
+
};
|
|
1328
|
+
const operation = ["transfer_to_vesting", operationPayload];
|
|
1298
1329
|
if (payload.type === "key" && "key" in payload) {
|
|
1299
1330
|
const { key, type, ...params } = payload;
|
|
1300
1331
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
@@ -1302,18 +1333,12 @@ async function powerUpHive(payload) {
|
|
|
1302
1333
|
key
|
|
1303
1334
|
);
|
|
1304
1335
|
} else if (payload.type === "keychain") {
|
|
1305
|
-
return Keychain.broadcast(
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
"Active"
|
|
1309
|
-
);
|
|
1336
|
+
return Keychain.broadcast(payload.from, [operation], "Active");
|
|
1337
|
+
} else if (payload.type === "hiveauth") {
|
|
1338
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1310
1339
|
} else {
|
|
1311
|
-
return hs.sendOperation(
|
|
1312
|
-
|
|
1313
|
-
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1314
|
-
() => {
|
|
1315
|
-
}
|
|
1316
|
-
);
|
|
1340
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1341
|
+
});
|
|
1317
1342
|
}
|
|
1318
1343
|
}
|
|
1319
1344
|
async function delegateHive(payload) {
|
|
@@ -1322,25 +1347,20 @@ async function delegateHive(payload) {
|
|
|
1322
1347
|
delegatee: payload.to,
|
|
1323
1348
|
vesting_shares: payload.amount
|
|
1324
1349
|
};
|
|
1350
|
+
const operation = ["delegate_vesting_shares", operationPayload];
|
|
1325
1351
|
if (payload.type === "key" && "key" in payload) {
|
|
1326
1352
|
const { key } = payload;
|
|
1327
1353
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
1328
|
-
[
|
|
1354
|
+
[operation],
|
|
1329
1355
|
key
|
|
1330
1356
|
);
|
|
1331
1357
|
} else if (payload.type === "keychain") {
|
|
1332
|
-
return Keychain.broadcast(
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
"Active"
|
|
1336
|
-
);
|
|
1358
|
+
return Keychain.broadcast(payload.from, [operation], "Active");
|
|
1359
|
+
} else if (payload.type === "hiveauth") {
|
|
1360
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1337
1361
|
} else {
|
|
1338
|
-
return hs.sendOperation(
|
|
1339
|
-
|
|
1340
|
-
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1341
|
-
() => {
|
|
1342
|
-
}
|
|
1343
|
-
);
|
|
1362
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1363
|
+
});
|
|
1344
1364
|
}
|
|
1345
1365
|
}
|
|
1346
1366
|
async function powerDownHive(payload) {
|
|
@@ -1348,28 +1368,30 @@ async function powerDownHive(payload) {
|
|
|
1348
1368
|
account: payload.from,
|
|
1349
1369
|
vesting_shares: payload.amount
|
|
1350
1370
|
};
|
|
1371
|
+
const operation = ["withdraw_vesting", operationPayload];
|
|
1351
1372
|
if (payload.type === "key" && "key" in payload) {
|
|
1352
1373
|
const { key } = payload;
|
|
1353
1374
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
1354
|
-
[
|
|
1375
|
+
[operation],
|
|
1355
1376
|
key
|
|
1356
1377
|
);
|
|
1357
1378
|
} else if (payload.type === "keychain") {
|
|
1358
|
-
return Keychain.broadcast(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
"Active"
|
|
1362
|
-
);
|
|
1379
|
+
return Keychain.broadcast(payload.from, [operation], "Active");
|
|
1380
|
+
} else if (payload.type === "hiveauth") {
|
|
1381
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1363
1382
|
} else {
|
|
1364
|
-
return hs.sendOperation(
|
|
1365
|
-
|
|
1366
|
-
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1367
|
-
() => {
|
|
1368
|
-
}
|
|
1369
|
-
);
|
|
1383
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1384
|
+
});
|
|
1370
1385
|
}
|
|
1371
1386
|
}
|
|
1372
1387
|
async function withdrawVestingRouteHive(payload) {
|
|
1388
|
+
const baseParams = {
|
|
1389
|
+
from_account: payload.from_account,
|
|
1390
|
+
to_account: payload.to_account,
|
|
1391
|
+
percent: payload.percent,
|
|
1392
|
+
auto_vest: payload.auto_vest
|
|
1393
|
+
};
|
|
1394
|
+
const operation = ["set_withdraw_vesting_route", baseParams];
|
|
1373
1395
|
if (payload.type === "key" && "key" in payload) {
|
|
1374
1396
|
const { key, type: type2, ...params2 } = payload;
|
|
1375
1397
|
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
@@ -1379,19 +1401,14 @@ async function withdrawVestingRouteHive(payload) {
|
|
|
1379
1401
|
}
|
|
1380
1402
|
if (payload.type === "keychain") {
|
|
1381
1403
|
const { type: type2, ...params2 } = payload;
|
|
1382
|
-
return Keychain.broadcast(
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
);
|
|
1404
|
+
return Keychain.broadcast(params2.from_account, [operation], "Active");
|
|
1405
|
+
}
|
|
1406
|
+
if (payload.type === "hiveauth") {
|
|
1407
|
+
return broadcastWithWalletHiveAuth(payload.from_account, [operation], "active");
|
|
1387
1408
|
}
|
|
1388
1409
|
const { type, ...params } = payload;
|
|
1389
|
-
return hs.sendOperation(
|
|
1390
|
-
|
|
1391
|
-
{ callback: `https://ecency.com/@${params.from_account}/wallet` },
|
|
1392
|
-
() => {
|
|
1393
|
-
}
|
|
1394
|
-
);
|
|
1410
|
+
return hs.sendOperation(operation, { callback: `https://ecency.com/@${params.from_account}/wallet` }, () => {
|
|
1411
|
+
});
|
|
1395
1412
|
}
|
|
1396
1413
|
function useClaimRewards(username, onSuccess) {
|
|
1397
1414
|
const { data } = useQuery(getAccountFullQueryOptions(username));
|
|
@@ -1445,35 +1462,22 @@ async function claimInterestHive(payload) {
|
|
|
1445
1462
|
from: payload.from,
|
|
1446
1463
|
request_id: requestId
|
|
1447
1464
|
};
|
|
1465
|
+
const operations = [
|
|
1466
|
+
["transfer_from_savings", baseOperation],
|
|
1467
|
+
["cancel_transfer_from_savings", cancelOperation]
|
|
1468
|
+
];
|
|
1448
1469
|
if (payload.type === "key" && "key" in payload) {
|
|
1449
1470
|
const { key } = payload;
|
|
1450
|
-
return CONFIG.hiveClient.broadcast.sendOperations(
|
|
1451
|
-
[
|
|
1452
|
-
["transfer_from_savings", baseOperation],
|
|
1453
|
-
["cancel_transfer_from_savings", cancelOperation]
|
|
1454
|
-
],
|
|
1455
|
-
key
|
|
1456
|
-
);
|
|
1471
|
+
return CONFIG.hiveClient.broadcast.sendOperations(operations, key);
|
|
1457
1472
|
}
|
|
1458
1473
|
if (payload.type === "keychain") {
|
|
1459
|
-
return Keychain.broadcast(
|
|
1460
|
-
payload.from,
|
|
1461
|
-
[
|
|
1462
|
-
["transfer_from_savings", baseOperation],
|
|
1463
|
-
["cancel_transfer_from_savings", cancelOperation]
|
|
1464
|
-
],
|
|
1465
|
-
"Active"
|
|
1466
|
-
);
|
|
1474
|
+
return Keychain.broadcast(payload.from, operations, "Active");
|
|
1467
1475
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
1474
|
-
() => {
|
|
1475
|
-
}
|
|
1476
|
-
);
|
|
1476
|
+
if (payload.type === "hiveauth") {
|
|
1477
|
+
return broadcastWithWalletHiveAuth(payload.from, operations, "active");
|
|
1478
|
+
}
|
|
1479
|
+
return hs.sendOperations(operations, { callback: `https://ecency.com/@${payload.from}/wallet` }, () => {
|
|
1480
|
+
});
|
|
1477
1481
|
}
|
|
1478
1482
|
|
|
1479
1483
|
// src/modules/assets/types/asset-operation.ts
|
|
@@ -1509,6 +1513,15 @@ async function transferSpk(payload) {
|
|
|
1509
1513
|
required_auths: [payload.from],
|
|
1510
1514
|
required_posting_auths: []
|
|
1511
1515
|
};
|
|
1516
|
+
const operation = [
|
|
1517
|
+
"custom_json",
|
|
1518
|
+
{
|
|
1519
|
+
id: op.id,
|
|
1520
|
+
required_auths: [payload.from],
|
|
1521
|
+
required_posting_auths: [],
|
|
1522
|
+
json
|
|
1523
|
+
}
|
|
1524
|
+
];
|
|
1512
1525
|
if (payload.type === "key" && "key" in payload) {
|
|
1513
1526
|
const { key } = payload;
|
|
1514
1527
|
return CONFIG.hiveClient.broadcast.json(op, key);
|
|
@@ -1520,6 +1533,8 @@ async function transferSpk(payload) {
|
|
|
1520
1533
|
json,
|
|
1521
1534
|
payload.to
|
|
1522
1535
|
);
|
|
1536
|
+
} else if (payload.type === "hiveauth") {
|
|
1537
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1523
1538
|
} else {
|
|
1524
1539
|
const { amount } = parseAsset(payload.amount);
|
|
1525
1540
|
return hs.sign(
|
|
@@ -1547,6 +1562,15 @@ var lockLarynx = async (payload) => {
|
|
|
1547
1562
|
required_auths: [payload.from],
|
|
1548
1563
|
required_posting_auths: []
|
|
1549
1564
|
};
|
|
1565
|
+
const operation = [
|
|
1566
|
+
"custom_json",
|
|
1567
|
+
{
|
|
1568
|
+
id: op.id,
|
|
1569
|
+
required_auths: [payload.from],
|
|
1570
|
+
required_posting_auths: [],
|
|
1571
|
+
json
|
|
1572
|
+
}
|
|
1573
|
+
];
|
|
1550
1574
|
if (payload.type === "key" && "key" in payload) {
|
|
1551
1575
|
const { key } = payload;
|
|
1552
1576
|
return CONFIG.hiveClient.broadcast.json(op, key);
|
|
@@ -1558,6 +1582,8 @@ var lockLarynx = async (payload) => {
|
|
|
1558
1582
|
json,
|
|
1559
1583
|
payload.from
|
|
1560
1584
|
);
|
|
1585
|
+
} else if (payload.type === "hiveauth") {
|
|
1586
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1561
1587
|
} else {
|
|
1562
1588
|
const { amount } = parseAsset(payload.amount);
|
|
1563
1589
|
return hs.sign(
|
|
@@ -1581,6 +1607,15 @@ async function powerUpLarynx(payload) {
|
|
|
1581
1607
|
required_auths: [payload.from],
|
|
1582
1608
|
required_posting_auths: []
|
|
1583
1609
|
};
|
|
1610
|
+
const operation = [
|
|
1611
|
+
"custom_json",
|
|
1612
|
+
{
|
|
1613
|
+
id: `spkcc_power_${payload.mode}`,
|
|
1614
|
+
required_auths: [payload.from],
|
|
1615
|
+
required_posting_auths: [],
|
|
1616
|
+
json
|
|
1617
|
+
}
|
|
1618
|
+
];
|
|
1584
1619
|
if (payload.type === "key" && "key" in payload) {
|
|
1585
1620
|
const { key } = payload;
|
|
1586
1621
|
return CONFIG.hiveClient.broadcast.json(op, key);
|
|
@@ -1592,6 +1627,8 @@ async function powerUpLarynx(payload) {
|
|
|
1592
1627
|
json,
|
|
1593
1628
|
""
|
|
1594
1629
|
);
|
|
1630
|
+
} else if (payload.type === "hiveauth") {
|
|
1631
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1595
1632
|
} else {
|
|
1596
1633
|
const { amount } = parseAsset(payload.amount);
|
|
1597
1634
|
return hs.sign(
|
|
@@ -1619,6 +1656,15 @@ async function transferLarynx(payload) {
|
|
|
1619
1656
|
required_auths: [payload.from],
|
|
1620
1657
|
required_posting_auths: []
|
|
1621
1658
|
};
|
|
1659
|
+
const operation = [
|
|
1660
|
+
"custom_json",
|
|
1661
|
+
{
|
|
1662
|
+
id: "spkcc_send",
|
|
1663
|
+
required_auths: [payload.from],
|
|
1664
|
+
required_posting_auths: [],
|
|
1665
|
+
json
|
|
1666
|
+
}
|
|
1667
|
+
];
|
|
1622
1668
|
if (payload.type === "key" && "key" in payload) {
|
|
1623
1669
|
const { key } = payload;
|
|
1624
1670
|
return CONFIG.hiveClient.broadcast.json(op, key);
|
|
@@ -1630,6 +1676,8 @@ async function transferLarynx(payload) {
|
|
|
1630
1676
|
json,
|
|
1631
1677
|
payload.to
|
|
1632
1678
|
);
|
|
1679
|
+
} else if (payload.type === "hiveauth") {
|
|
1680
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
1633
1681
|
} else {
|
|
1634
1682
|
const { amount } = parseAsset(payload.amount);
|
|
1635
1683
|
return hs.sign(
|
|
@@ -2030,6 +2078,23 @@ function getHiveEngineTokensMetricsQueryOptions(symbol, interval = "daily") {
|
|
|
2030
2078
|
async function delegateEngineToken(payload) {
|
|
2031
2079
|
const parsedAsset = parseAsset(payload.amount);
|
|
2032
2080
|
const quantity = parsedAsset.amount.toString();
|
|
2081
|
+
const operation = [
|
|
2082
|
+
"custom_json",
|
|
2083
|
+
{
|
|
2084
|
+
id: "ssc-mainnet-hive",
|
|
2085
|
+
required_auths: [payload.from],
|
|
2086
|
+
required_posting_auths: [],
|
|
2087
|
+
json: JSON.stringify({
|
|
2088
|
+
contractName: "tokens",
|
|
2089
|
+
contractAction: "delegate",
|
|
2090
|
+
contractPayload: {
|
|
2091
|
+
symbol: payload.asset,
|
|
2092
|
+
to: payload.to,
|
|
2093
|
+
quantity
|
|
2094
|
+
}
|
|
2095
|
+
})
|
|
2096
|
+
}
|
|
2097
|
+
];
|
|
2033
2098
|
if (payload.type === "key" && "key" in payload) {
|
|
2034
2099
|
const { key, type, ...params } = payload;
|
|
2035
2100
|
const op = {
|
|
@@ -2053,15 +2118,7 @@ async function delegateEngineToken(payload) {
|
|
|
2053
2118
|
payload.from,
|
|
2054
2119
|
"ssc-mainnet-hive",
|
|
2055
2120
|
"Active",
|
|
2056
|
-
|
|
2057
|
-
contractName: "tokens",
|
|
2058
|
-
contractAction: "delegate",
|
|
2059
|
-
contractPayload: {
|
|
2060
|
-
symbol: payload.asset,
|
|
2061
|
-
to: payload.to,
|
|
2062
|
-
quantity
|
|
2063
|
-
}
|
|
2064
|
-
}),
|
|
2121
|
+
operation[1].json,
|
|
2065
2122
|
"Token Delegation",
|
|
2066
2123
|
(resp) => {
|
|
2067
2124
|
if (!resp.success) {
|
|
@@ -2071,25 +2128,11 @@ async function delegateEngineToken(payload) {
|
|
|
2071
2128
|
}
|
|
2072
2129
|
)
|
|
2073
2130
|
);
|
|
2131
|
+
} else if (payload.type === "hiveauth") {
|
|
2132
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
2074
2133
|
} else {
|
|
2075
2134
|
return hs.sendOperation(
|
|
2076
|
-
|
|
2077
|
-
"custom_json",
|
|
2078
|
-
{
|
|
2079
|
-
id: "ssc-mainnet-hive",
|
|
2080
|
-
required_auths: [payload.from],
|
|
2081
|
-
required_posting_auths: [],
|
|
2082
|
-
json: JSON.stringify({
|
|
2083
|
-
contractName: "tokens",
|
|
2084
|
-
contractAction: "delegate",
|
|
2085
|
-
contractPayload: {
|
|
2086
|
-
symbol: payload.asset,
|
|
2087
|
-
to: payload.to,
|
|
2088
|
-
quantity
|
|
2089
|
-
}
|
|
2090
|
-
})
|
|
2091
|
-
}
|
|
2092
|
-
],
|
|
2135
|
+
operation,
|
|
2093
2136
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
2094
2137
|
() => {
|
|
2095
2138
|
}
|
|
@@ -2099,6 +2142,23 @@ async function delegateEngineToken(payload) {
|
|
|
2099
2142
|
async function undelegateEngineToken(payload) {
|
|
2100
2143
|
const parsedAsset = parseAsset(payload.amount);
|
|
2101
2144
|
const quantity = parsedAsset.amount.toString();
|
|
2145
|
+
const operation = [
|
|
2146
|
+
"custom_json",
|
|
2147
|
+
{
|
|
2148
|
+
id: "ssc-mainnet-hive",
|
|
2149
|
+
required_auths: [payload.from],
|
|
2150
|
+
required_posting_auths: [],
|
|
2151
|
+
json: JSON.stringify({
|
|
2152
|
+
contractName: "tokens",
|
|
2153
|
+
contractAction: "undelegate",
|
|
2154
|
+
contractPayload: {
|
|
2155
|
+
symbol: payload.asset,
|
|
2156
|
+
from: payload.to,
|
|
2157
|
+
quantity
|
|
2158
|
+
}
|
|
2159
|
+
})
|
|
2160
|
+
}
|
|
2161
|
+
];
|
|
2102
2162
|
if (payload.type === "key" && "key" in payload) {
|
|
2103
2163
|
const { key, type, ...params } = payload;
|
|
2104
2164
|
const op = {
|
|
@@ -2122,15 +2182,7 @@ async function undelegateEngineToken(payload) {
|
|
|
2122
2182
|
payload.from,
|
|
2123
2183
|
"ssc-mainnet-hive",
|
|
2124
2184
|
"Active",
|
|
2125
|
-
|
|
2126
|
-
contractName: "tokens",
|
|
2127
|
-
contractAction: "undelegate",
|
|
2128
|
-
contractPayload: {
|
|
2129
|
-
symbol: payload.asset,
|
|
2130
|
-
from: payload.to,
|
|
2131
|
-
quantity
|
|
2132
|
-
}
|
|
2133
|
-
}),
|
|
2185
|
+
operation[1].json,
|
|
2134
2186
|
"Token Undelegation",
|
|
2135
2187
|
(resp) => {
|
|
2136
2188
|
if (!resp.success) {
|
|
@@ -2140,25 +2192,11 @@ async function undelegateEngineToken(payload) {
|
|
|
2140
2192
|
}
|
|
2141
2193
|
)
|
|
2142
2194
|
);
|
|
2195
|
+
} else if (payload.type === "hiveauth") {
|
|
2196
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
2143
2197
|
} else {
|
|
2144
2198
|
return hs.sendOperation(
|
|
2145
|
-
|
|
2146
|
-
"custom_json",
|
|
2147
|
-
{
|
|
2148
|
-
id: "ssc-mainnet-hive",
|
|
2149
|
-
required_auths: [payload.from],
|
|
2150
|
-
required_posting_auths: [],
|
|
2151
|
-
json: JSON.stringify({
|
|
2152
|
-
contractName: "tokens",
|
|
2153
|
-
contractAction: "undelegate",
|
|
2154
|
-
contractPayload: {
|
|
2155
|
-
symbol: payload.asset,
|
|
2156
|
-
from: payload.to,
|
|
2157
|
-
quantity
|
|
2158
|
-
}
|
|
2159
|
-
})
|
|
2160
|
-
}
|
|
2161
|
-
],
|
|
2199
|
+
operation,
|
|
2162
2200
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
2163
2201
|
() => {
|
|
2164
2202
|
}
|
|
@@ -2168,6 +2206,23 @@ async function undelegateEngineToken(payload) {
|
|
|
2168
2206
|
async function stakeEngineToken(payload) {
|
|
2169
2207
|
const parsedAsset = parseAsset(payload.amount);
|
|
2170
2208
|
const quantity = parsedAsset.amount.toString();
|
|
2209
|
+
const operation = [
|
|
2210
|
+
"custom_json",
|
|
2211
|
+
{
|
|
2212
|
+
id: "ssc-mainnet-hive",
|
|
2213
|
+
required_auths: [payload.from],
|
|
2214
|
+
required_posting_auths: [],
|
|
2215
|
+
json: JSON.stringify({
|
|
2216
|
+
contractName: "tokens",
|
|
2217
|
+
contractAction: "stake",
|
|
2218
|
+
contractPayload: {
|
|
2219
|
+
symbol: payload.asset,
|
|
2220
|
+
to: payload.to,
|
|
2221
|
+
quantity
|
|
2222
|
+
}
|
|
2223
|
+
})
|
|
2224
|
+
}
|
|
2225
|
+
];
|
|
2171
2226
|
if (payload.type === "key" && "key" in payload) {
|
|
2172
2227
|
const { key, type, ...params } = payload;
|
|
2173
2228
|
const op = {
|
|
@@ -2191,15 +2246,7 @@ async function stakeEngineToken(payload) {
|
|
|
2191
2246
|
payload.from,
|
|
2192
2247
|
"ssc-mainnet-hive",
|
|
2193
2248
|
"Active",
|
|
2194
|
-
|
|
2195
|
-
contractName: "tokens",
|
|
2196
|
-
contractAction: "stake",
|
|
2197
|
-
contractPayload: {
|
|
2198
|
-
symbol: payload.asset,
|
|
2199
|
-
to: payload.to,
|
|
2200
|
-
quantity
|
|
2201
|
-
}
|
|
2202
|
-
}),
|
|
2249
|
+
operation[1].json,
|
|
2203
2250
|
"Token Staking",
|
|
2204
2251
|
(resp) => {
|
|
2205
2252
|
if (!resp.success) {
|
|
@@ -2209,25 +2256,11 @@ async function stakeEngineToken(payload) {
|
|
|
2209
2256
|
}
|
|
2210
2257
|
)
|
|
2211
2258
|
);
|
|
2259
|
+
} else if (payload.type === "hiveauth") {
|
|
2260
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
2212
2261
|
} else {
|
|
2213
2262
|
return hs.sendOperation(
|
|
2214
|
-
|
|
2215
|
-
"custom_json",
|
|
2216
|
-
{
|
|
2217
|
-
id: "ssc-mainnet-hive",
|
|
2218
|
-
required_auths: [payload.from],
|
|
2219
|
-
required_posting_auths: [],
|
|
2220
|
-
json: JSON.stringify({
|
|
2221
|
-
contractName: "tokens",
|
|
2222
|
-
contractAction: "stake",
|
|
2223
|
-
contractPayload: {
|
|
2224
|
-
symbol: payload.asset,
|
|
2225
|
-
to: payload.to,
|
|
2226
|
-
quantity
|
|
2227
|
-
}
|
|
2228
|
-
})
|
|
2229
|
-
}
|
|
2230
|
-
],
|
|
2263
|
+
operation,
|
|
2231
2264
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
2232
2265
|
() => {
|
|
2233
2266
|
}
|
|
@@ -2237,6 +2270,23 @@ async function stakeEngineToken(payload) {
|
|
|
2237
2270
|
async function unstakeEngineToken(payload) {
|
|
2238
2271
|
const parsedAsset = parseAsset(payload.amount);
|
|
2239
2272
|
const quantity = parsedAsset.amount.toString();
|
|
2273
|
+
const operation = [
|
|
2274
|
+
"custom_json",
|
|
2275
|
+
{
|
|
2276
|
+
id: "ssc-mainnet-hive",
|
|
2277
|
+
required_auths: [payload.from],
|
|
2278
|
+
required_posting_auths: [],
|
|
2279
|
+
json: JSON.stringify({
|
|
2280
|
+
contractName: "tokens",
|
|
2281
|
+
contractAction: "unstake",
|
|
2282
|
+
contractPayload: {
|
|
2283
|
+
symbol: payload.asset,
|
|
2284
|
+
to: payload.to,
|
|
2285
|
+
quantity
|
|
2286
|
+
}
|
|
2287
|
+
})
|
|
2288
|
+
}
|
|
2289
|
+
];
|
|
2240
2290
|
if (payload.type === "key" && "key" in payload) {
|
|
2241
2291
|
const { key, type, ...params } = payload;
|
|
2242
2292
|
const op = {
|
|
@@ -2260,15 +2310,7 @@ async function unstakeEngineToken(payload) {
|
|
|
2260
2310
|
payload.from,
|
|
2261
2311
|
"ssc-mainnet-hive",
|
|
2262
2312
|
"Active",
|
|
2263
|
-
|
|
2264
|
-
contractName: "tokens",
|
|
2265
|
-
contractAction: "unstake",
|
|
2266
|
-
contractPayload: {
|
|
2267
|
-
symbol: payload.asset,
|
|
2268
|
-
to: payload.to,
|
|
2269
|
-
quantity
|
|
2270
|
-
}
|
|
2271
|
-
}),
|
|
2313
|
+
operation[1].json,
|
|
2272
2314
|
"Token Unstaking",
|
|
2273
2315
|
(resp) => {
|
|
2274
2316
|
if (!resp.success) {
|
|
@@ -2278,25 +2320,11 @@ async function unstakeEngineToken(payload) {
|
|
|
2278
2320
|
}
|
|
2279
2321
|
)
|
|
2280
2322
|
);
|
|
2323
|
+
} else if (payload.type === "hiveauth") {
|
|
2324
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
2281
2325
|
} else {
|
|
2282
2326
|
return hs.sendOperation(
|
|
2283
|
-
|
|
2284
|
-
"custom_json",
|
|
2285
|
-
{
|
|
2286
|
-
id: "ssc-mainnet-hive",
|
|
2287
|
-
required_auths: [payload.from],
|
|
2288
|
-
required_posting_auths: [],
|
|
2289
|
-
json: JSON.stringify({
|
|
2290
|
-
contractName: "tokens",
|
|
2291
|
-
contractAction: "unstake",
|
|
2292
|
-
contractPayload: {
|
|
2293
|
-
symbol: payload.asset,
|
|
2294
|
-
to: payload.to,
|
|
2295
|
-
quantity
|
|
2296
|
-
}
|
|
2297
|
-
})
|
|
2298
|
-
}
|
|
2299
|
-
],
|
|
2327
|
+
operation,
|
|
2300
2328
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
2301
2329
|
() => {
|
|
2302
2330
|
}
|
|
@@ -2306,6 +2334,24 @@ async function unstakeEngineToken(payload) {
|
|
|
2306
2334
|
async function transferEngineToken(payload) {
|
|
2307
2335
|
const parsedAsset = parseAsset(payload.amount);
|
|
2308
2336
|
const quantity = parsedAsset.amount.toString();
|
|
2337
|
+
const operation = [
|
|
2338
|
+
"custom_json",
|
|
2339
|
+
{
|
|
2340
|
+
id: "ssc-mainnet-hive",
|
|
2341
|
+
required_auths: [payload.from],
|
|
2342
|
+
required_posting_auths: [],
|
|
2343
|
+
json: JSON.stringify({
|
|
2344
|
+
contractName: "tokens",
|
|
2345
|
+
contractAction: "transfer",
|
|
2346
|
+
contractPayload: {
|
|
2347
|
+
symbol: payload.asset,
|
|
2348
|
+
to: payload.to,
|
|
2349
|
+
quantity,
|
|
2350
|
+
memo: payload.memo
|
|
2351
|
+
}
|
|
2352
|
+
})
|
|
2353
|
+
}
|
|
2354
|
+
];
|
|
2309
2355
|
if (payload.type === "key" && "key" in payload) {
|
|
2310
2356
|
const { key, type, ...params } = payload;
|
|
2311
2357
|
const op = {
|
|
@@ -2330,16 +2376,7 @@ async function transferEngineToken(payload) {
|
|
|
2330
2376
|
payload.from,
|
|
2331
2377
|
"ssc-mainnet-hive",
|
|
2332
2378
|
"Active",
|
|
2333
|
-
|
|
2334
|
-
contractName: "tokens",
|
|
2335
|
-
contractAction: "transfer",
|
|
2336
|
-
contractPayload: {
|
|
2337
|
-
symbol: payload.asset,
|
|
2338
|
-
to: payload.to,
|
|
2339
|
-
quantity,
|
|
2340
|
-
memo: payload.memo
|
|
2341
|
-
}
|
|
2342
|
-
}),
|
|
2379
|
+
operation[1].json,
|
|
2343
2380
|
"Token Transfer",
|
|
2344
2381
|
(resp) => {
|
|
2345
2382
|
if (!resp.success) {
|
|
@@ -2349,26 +2386,11 @@ async function transferEngineToken(payload) {
|
|
|
2349
2386
|
}
|
|
2350
2387
|
)
|
|
2351
2388
|
);
|
|
2389
|
+
} else if (payload.type === "hiveauth") {
|
|
2390
|
+
return broadcastWithWalletHiveAuth(payload.from, [operation], "active");
|
|
2352
2391
|
} else {
|
|
2353
2392
|
return hs.sendOperation(
|
|
2354
|
-
|
|
2355
|
-
"custom_json",
|
|
2356
|
-
{
|
|
2357
|
-
id: "ssc-mainnet-hive",
|
|
2358
|
-
required_auths: [payload.from],
|
|
2359
|
-
required_posting_auths: [],
|
|
2360
|
-
json: JSON.stringify({
|
|
2361
|
-
contractName: "tokens",
|
|
2362
|
-
contractAction: "transfer",
|
|
2363
|
-
contractPayload: {
|
|
2364
|
-
symbol: payload.asset,
|
|
2365
|
-
to: payload.to,
|
|
2366
|
-
quantity,
|
|
2367
|
-
memo: payload.memo
|
|
2368
|
-
}
|
|
2369
|
-
})
|
|
2370
|
-
}
|
|
2371
|
-
],
|
|
2393
|
+
operation,
|
|
2372
2394
|
{ callback: `https://ecency.com/@${payload.from}/wallet` },
|
|
2373
2395
|
() => {
|
|
2374
2396
|
}
|
|
@@ -2531,12 +2553,11 @@ async function transferPoint({
|
|
|
2531
2553
|
if (type === "keychain") {
|
|
2532
2554
|
return Keychain.broadcast(from, [op], "Active");
|
|
2533
2555
|
}
|
|
2534
|
-
|
|
2535
|
-
op,
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
);
|
|
2556
|
+
if (type === "hiveauth") {
|
|
2557
|
+
return broadcastWithWalletHiveAuth(from, [op], "active");
|
|
2558
|
+
}
|
|
2559
|
+
return hs.sendOperation(op, { callback: `https://ecency.com/@${from}/wallet` }, () => {
|
|
2560
|
+
});
|
|
2540
2561
|
}
|
|
2541
2562
|
|
|
2542
2563
|
// src/modules/assets/points/types/point-transaction-type.ts
|
|
@@ -2627,16 +2648,400 @@ function getAllTokensListQueryOptions(username) {
|
|
|
2627
2648
|
}
|
|
2628
2649
|
});
|
|
2629
2650
|
}
|
|
2651
|
+
var ACTION_ALIAS_MAP = {
|
|
2652
|
+
"transfer-to-savings": "transfer-saving" /* TransferToSavings */,
|
|
2653
|
+
"transfer-savings": "transfer-saving" /* TransferToSavings */,
|
|
2654
|
+
"savings-transfer": "transfer-saving" /* TransferToSavings */,
|
|
2655
|
+
"withdraw-from-savings": "withdraw-saving" /* WithdrawFromSavings */,
|
|
2656
|
+
"withdraw-savings": "withdraw-saving" /* WithdrawFromSavings */,
|
|
2657
|
+
"savings-withdraw": "withdraw-saving" /* WithdrawFromSavings */,
|
|
2658
|
+
"powerup": "power-up" /* PowerUp */,
|
|
2659
|
+
"power-down": "power-down" /* PowerDown */,
|
|
2660
|
+
"powerdown": "power-down" /* PowerDown */,
|
|
2661
|
+
"hp-delegate": "delegate" /* Delegate */,
|
|
2662
|
+
"delegate-hp": "delegate" /* Delegate */,
|
|
2663
|
+
"delegate-power": "delegate" /* Delegate */,
|
|
2664
|
+
"undelegate-power": "undelegate" /* Undelegate */,
|
|
2665
|
+
"undelegate-token": "undelegate" /* Undelegate */,
|
|
2666
|
+
"stake-token": "stake" /* Stake */,
|
|
2667
|
+
"stake-power": "stake" /* Stake */,
|
|
2668
|
+
"unstake-token": "unstake" /* Unstake */,
|
|
2669
|
+
"unstake-power": "unstake" /* Unstake */,
|
|
2670
|
+
"lock-liquidity": "lock" /* LockLiquidity */,
|
|
2671
|
+
"lock-liq": "lock" /* LockLiquidity */,
|
|
2672
|
+
"gift-points": "gift" /* Gift */,
|
|
2673
|
+
"points-gift": "gift" /* Gift */,
|
|
2674
|
+
"promote-post": "promote" /* Promote */,
|
|
2675
|
+
"promote-entry": "promote" /* Promote */,
|
|
2676
|
+
"claim-points": "claim" /* Claim */,
|
|
2677
|
+
"claim-rewards": "claim" /* Claim */,
|
|
2678
|
+
"buy-points": "buy" /* Buy */,
|
|
2679
|
+
"swap-token": "swap" /* Swap */,
|
|
2680
|
+
"swap-tokens": "swap" /* Swap */,
|
|
2681
|
+
"withdraw-routes": "withdraw-routes" /* WithdrawRoutes */,
|
|
2682
|
+
"withdrawroutes": "withdraw-routes" /* WithdrawRoutes */,
|
|
2683
|
+
"claim-interest": "claim-interest" /* ClaimInterest */
|
|
2684
|
+
};
|
|
2685
|
+
var KNOWN_OPERATION_VALUES = new Map(
|
|
2686
|
+
Object.values(AssetOperation).map((value) => [value, value])
|
|
2687
|
+
);
|
|
2688
|
+
var DERIVED_PART_KEY_MAP = {
|
|
2689
|
+
liquid: ["liquid", "liquidBalance", "liquid_amount", "liquidTokens"],
|
|
2690
|
+
savings: ["savings", "savingsBalance", "savings_amount"],
|
|
2691
|
+
staked: ["staked", "stakedBalance", "staking", "stake", "power"],
|
|
2692
|
+
delegated: ["delegated", "delegatedBalance", "delegationsOut"],
|
|
2693
|
+
received: ["received", "receivedBalance", "delegationsIn"],
|
|
2694
|
+
pending: [
|
|
2695
|
+
"pending",
|
|
2696
|
+
"pendingRewards",
|
|
2697
|
+
"unclaimed",
|
|
2698
|
+
"unclaimedBalance",
|
|
2699
|
+
"pendingReward"
|
|
2700
|
+
]
|
|
2701
|
+
};
|
|
2702
|
+
var EXTRA_DATA_PART_KEY_MAP = {
|
|
2703
|
+
delegated: "outgoing_delegations",
|
|
2704
|
+
outgoing: "outgoing_delegations",
|
|
2705
|
+
delegations_out: "outgoing_delegations",
|
|
2706
|
+
delegated_hive_power: "outgoing_delegations",
|
|
2707
|
+
delegated_hp: "outgoing_delegations",
|
|
2708
|
+
received: "incoming_delegations",
|
|
2709
|
+
incoming: "incoming_delegations",
|
|
2710
|
+
delegations_in: "incoming_delegations",
|
|
2711
|
+
received_hive_power: "incoming_delegations",
|
|
2712
|
+
received_hp: "incoming_delegations",
|
|
2713
|
+
powering_down: "pending_power_down",
|
|
2714
|
+
power_down: "pending_power_down",
|
|
2715
|
+
powering_down_hive_power: "pending_power_down"
|
|
2716
|
+
};
|
|
2717
|
+
function normalizeString(value) {
|
|
2718
|
+
if (typeof value === "string") {
|
|
2719
|
+
const trimmed = value.trim();
|
|
2720
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
2721
|
+
}
|
|
2722
|
+
return void 0;
|
|
2723
|
+
}
|
|
2724
|
+
function normalizeNumber(value) {
|
|
2725
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
2726
|
+
return value;
|
|
2727
|
+
}
|
|
2728
|
+
if (typeof value === "string") {
|
|
2729
|
+
const trimmed = value.trim();
|
|
2730
|
+
if (!trimmed) {
|
|
2731
|
+
return void 0;
|
|
2732
|
+
}
|
|
2733
|
+
const direct = Number.parseFloat(trimmed);
|
|
2734
|
+
if (Number.isFinite(direct)) {
|
|
2735
|
+
return direct;
|
|
2736
|
+
}
|
|
2737
|
+
const sanitized = trimmed.replace(/,/g, "");
|
|
2738
|
+
const match = sanitized.match(/[-+]?\d+(?:\.\d+)?/);
|
|
2739
|
+
if (match) {
|
|
2740
|
+
const parsed = Number.parseFloat(match[0]);
|
|
2741
|
+
if (Number.isFinite(parsed)) {
|
|
2742
|
+
return parsed;
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
return void 0;
|
|
2747
|
+
}
|
|
2748
|
+
function normalizeApr(value) {
|
|
2749
|
+
const numeric = normalizeNumber(value);
|
|
2750
|
+
if (numeric === void 0) {
|
|
2751
|
+
if (typeof value === "string") {
|
|
2752
|
+
const trimmed = value.trim();
|
|
2753
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
2754
|
+
}
|
|
2755
|
+
return void 0;
|
|
2756
|
+
}
|
|
2757
|
+
return numeric.toString();
|
|
2758
|
+
}
|
|
2759
|
+
function normalizeParts(rawParts) {
|
|
2760
|
+
if (Array.isArray(rawParts)) {
|
|
2761
|
+
const parsed = rawParts.map((item) => {
|
|
2762
|
+
if (!item || typeof item !== "object") {
|
|
2763
|
+
return void 0;
|
|
2764
|
+
}
|
|
2765
|
+
const name = normalizeString(
|
|
2766
|
+
item.name ?? item.label ?? item.type ?? item.part
|
|
2767
|
+
);
|
|
2768
|
+
const balance = normalizeNumber(
|
|
2769
|
+
item.balance ?? item.amount ?? item.value
|
|
2770
|
+
);
|
|
2771
|
+
if (!name || balance === void 0) {
|
|
2772
|
+
return void 0;
|
|
2773
|
+
}
|
|
2774
|
+
return { name, balance };
|
|
2775
|
+
}).filter((item) => Boolean(item));
|
|
2776
|
+
return parsed.length ? parsed : void 0;
|
|
2777
|
+
}
|
|
2778
|
+
if (rawParts && typeof rawParts === "object") {
|
|
2779
|
+
const parsed = Object.entries(rawParts).map(([name, amount]) => {
|
|
2780
|
+
const balance = normalizeNumber(amount);
|
|
2781
|
+
if (!name || balance === void 0) {
|
|
2782
|
+
return void 0;
|
|
2783
|
+
}
|
|
2784
|
+
return { name, balance };
|
|
2785
|
+
}).filter((item) => Boolean(item));
|
|
2786
|
+
return parsed.length ? parsed : void 0;
|
|
2787
|
+
}
|
|
2788
|
+
return void 0;
|
|
2789
|
+
}
|
|
2790
|
+
function deriveParts(record) {
|
|
2791
|
+
const derived = Object.entries(DERIVED_PART_KEY_MAP).map(([name, keys]) => {
|
|
2792
|
+
for (const key of keys) {
|
|
2793
|
+
const value = normalizeNumber(record[key]);
|
|
2794
|
+
if (value !== void 0) {
|
|
2795
|
+
return { name, balance: value };
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
return void 0;
|
|
2799
|
+
}).filter((item) => Boolean(item));
|
|
2800
|
+
return derived.length ? derived : void 0;
|
|
2801
|
+
}
|
|
2802
|
+
function normalizePartKey(value) {
|
|
2803
|
+
return value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
2804
|
+
}
|
|
2805
|
+
function mergeParts(...sources) {
|
|
2806
|
+
const order = [];
|
|
2807
|
+
const values2 = /* @__PURE__ */ new Map();
|
|
2808
|
+
for (const parts of sources) {
|
|
2809
|
+
if (!parts) {
|
|
2810
|
+
continue;
|
|
2811
|
+
}
|
|
2812
|
+
for (const part of parts) {
|
|
2813
|
+
if (!part?.name || typeof part.balance !== "number") {
|
|
2814
|
+
continue;
|
|
2815
|
+
}
|
|
2816
|
+
const existing = values2.get(part.name);
|
|
2817
|
+
if (existing === void 0) {
|
|
2818
|
+
order.push(part.name);
|
|
2819
|
+
values2.set(part.name, part.balance);
|
|
2820
|
+
} else {
|
|
2821
|
+
values2.set(part.name, existing + part.balance);
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
return order.length ? order.map((name) => ({ name, balance: values2.get(name) })) : void 0;
|
|
2826
|
+
}
|
|
2827
|
+
function normalizeExtraDataParts(rawExtraData) {
|
|
2828
|
+
const items = Array.isArray(rawExtraData) ? rawExtraData : rawExtraData && typeof rawExtraData === "object" ? Object.values(rawExtraData) : [];
|
|
2829
|
+
const parts = items.map((item) => {
|
|
2830
|
+
if (!item || typeof item !== "object") {
|
|
2831
|
+
return void 0;
|
|
2832
|
+
}
|
|
2833
|
+
const record = item;
|
|
2834
|
+
const keyCandidate = normalizeString(record.dataKey) ?? normalizeString(record.key) ?? normalizeString(record.name);
|
|
2835
|
+
if (!keyCandidate) {
|
|
2836
|
+
return void 0;
|
|
2837
|
+
}
|
|
2838
|
+
const canonical = normalizePartKey(keyCandidate);
|
|
2839
|
+
const partName = EXTRA_DATA_PART_KEY_MAP[canonical];
|
|
2840
|
+
if (!partName) {
|
|
2841
|
+
return void 0;
|
|
2842
|
+
}
|
|
2843
|
+
const balance = normalizeNumber(
|
|
2844
|
+
record.balance ?? record.amount ?? record.value ?? record.displayValue ?? record.text
|
|
2845
|
+
);
|
|
2846
|
+
if (balance === void 0) {
|
|
2847
|
+
return void 0;
|
|
2848
|
+
}
|
|
2849
|
+
return { name: partName, balance: Math.abs(balance) };
|
|
2850
|
+
}).filter((part) => Boolean(part));
|
|
2851
|
+
return parts.length ? parts : void 0;
|
|
2852
|
+
}
|
|
2853
|
+
function normalizeActionKey(value) {
|
|
2854
|
+
return value.trim().toLowerCase().replace(/[\s_]+/g, "-");
|
|
2855
|
+
}
|
|
2856
|
+
function mapActions(rawActions) {
|
|
2857
|
+
if (!rawActions) {
|
|
2858
|
+
return [];
|
|
2859
|
+
}
|
|
2860
|
+
const rawList = Array.isArray(rawActions) ? rawActions : [rawActions];
|
|
2861
|
+
const result = [];
|
|
2862
|
+
for (const raw of rawList) {
|
|
2863
|
+
let candidate;
|
|
2864
|
+
if (typeof raw === "string") {
|
|
2865
|
+
candidate = raw;
|
|
2866
|
+
} else if (raw && typeof raw === "object") {
|
|
2867
|
+
const record = raw;
|
|
2868
|
+
candidate = normalizeString(record.code) ?? normalizeString(record.name) ?? normalizeString(record.action);
|
|
2869
|
+
}
|
|
2870
|
+
if (!candidate) {
|
|
2871
|
+
continue;
|
|
2872
|
+
}
|
|
2873
|
+
const canonical = normalizeActionKey(candidate);
|
|
2874
|
+
const operation = KNOWN_OPERATION_VALUES.get(canonical) ?? ACTION_ALIAS_MAP[canonical];
|
|
2875
|
+
if (operation && !result.includes(operation)) {
|
|
2876
|
+
result.push(operation);
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
return result;
|
|
2880
|
+
}
|
|
2881
|
+
function parseToken(rawToken) {
|
|
2882
|
+
if (!rawToken || typeof rawToken !== "object") {
|
|
2883
|
+
return void 0;
|
|
2884
|
+
}
|
|
2885
|
+
const token = rawToken;
|
|
2886
|
+
const symbol = normalizeString(token.symbol) ?? normalizeString(token.asset) ?? normalizeString(token.name);
|
|
2887
|
+
if (!symbol) {
|
|
2888
|
+
return void 0;
|
|
2889
|
+
}
|
|
2890
|
+
const normalizedSymbol = symbol.toUpperCase();
|
|
2891
|
+
const title = normalizeString(token.title) ?? normalizeString(token.display) ?? normalizeString(token.label) ?? normalizeString(token.friendlyName) ?? normalizeString(token.name) ?? normalizedSymbol;
|
|
2892
|
+
const price = normalizeNumber(token.fiatRate) ?? normalizeNumber(token.price) ?? normalizeNumber(token.priceUsd) ?? normalizeNumber(token.usdPrice) ?? normalizeNumber(token.metrics?.price) ?? normalizeNumber(
|
|
2893
|
+
token.metrics?.priceUsd
|
|
2894
|
+
) ?? 0;
|
|
2895
|
+
const apr = normalizeApr(token.apr) ?? normalizeApr(token.aprPercent) ?? normalizeApr(token.metrics?.apr) ?? normalizeApr(
|
|
2896
|
+
token.metrics?.aprPercent
|
|
2897
|
+
);
|
|
2898
|
+
const baseParts = normalizeParts(
|
|
2899
|
+
token.parts ?? token.balances ?? token.sections ?? token.breakdown ?? token.accountBreakdown ?? token.walletParts
|
|
2900
|
+
) ?? deriveParts(token);
|
|
2901
|
+
const parts = mergeParts(
|
|
2902
|
+
baseParts,
|
|
2903
|
+
normalizeExtraDataParts(
|
|
2904
|
+
token.extraData ?? token.extra_data ?? token.extra ?? token.badges
|
|
2905
|
+
)
|
|
2906
|
+
);
|
|
2907
|
+
const accountBalance = normalizeNumber(token.balance) ?? normalizeNumber(token.accountBalance) ?? normalizeNumber(token.totalBalance) ?? normalizeNumber(token.total) ?? normalizeNumber(token.amount) ?? (baseParts ? baseParts.reduce((total, part) => total + (part.balance ?? 0), 0) : parts ? parts.reduce((total, part) => total + (part.balance ?? 0), 0) : 0);
|
|
2908
|
+
const layer = normalizeString(token.layer) ?? normalizeString(token.chain) ?? normalizeString(token.category) ?? normalizeString(token.type);
|
|
2909
|
+
return {
|
|
2910
|
+
symbol: normalizedSymbol,
|
|
2911
|
+
info: {
|
|
2912
|
+
name: normalizedSymbol,
|
|
2913
|
+
title,
|
|
2914
|
+
price,
|
|
2915
|
+
accountBalance,
|
|
2916
|
+
apr: apr ?? void 0,
|
|
2917
|
+
layer: layer ?? void 0,
|
|
2918
|
+
parts
|
|
2919
|
+
},
|
|
2920
|
+
operations: mapActions(
|
|
2921
|
+
token.actions ?? token.available_actions ?? token.availableActions ?? token.operations ?? token.supportedActions
|
|
2922
|
+
)
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
function extractTokens(payload) {
|
|
2926
|
+
if (!payload || typeof payload !== "object") {
|
|
2927
|
+
return [];
|
|
2928
|
+
}
|
|
2929
|
+
const containers = [payload];
|
|
2930
|
+
const record = payload;
|
|
2931
|
+
if (record.data && typeof record.data === "object") {
|
|
2932
|
+
containers.push(record.data);
|
|
2933
|
+
}
|
|
2934
|
+
if (record.result && typeof record.result === "object") {
|
|
2935
|
+
containers.push(record.result);
|
|
2936
|
+
}
|
|
2937
|
+
if (record.portfolio && typeof record.portfolio === "object") {
|
|
2938
|
+
containers.push(record.portfolio);
|
|
2939
|
+
}
|
|
2940
|
+
for (const container of containers) {
|
|
2941
|
+
if (Array.isArray(container)) {
|
|
2942
|
+
return container;
|
|
2943
|
+
}
|
|
2944
|
+
if (container && typeof container === "object") {
|
|
2945
|
+
for (const key of [
|
|
2946
|
+
"wallets",
|
|
2947
|
+
"tokens",
|
|
2948
|
+
"assets",
|
|
2949
|
+
"items",
|
|
2950
|
+
"portfolio",
|
|
2951
|
+
"balances"
|
|
2952
|
+
]) {
|
|
2953
|
+
const value = container[key];
|
|
2954
|
+
if (Array.isArray(value)) {
|
|
2955
|
+
return value;
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
return [];
|
|
2961
|
+
}
|
|
2962
|
+
function resolveUsername(payload) {
|
|
2963
|
+
if (!payload || typeof payload !== "object") {
|
|
2964
|
+
return void 0;
|
|
2965
|
+
}
|
|
2966
|
+
const record = payload;
|
|
2967
|
+
return normalizeString(record.username) ?? normalizeString(record.name) ?? normalizeString(record.account);
|
|
2968
|
+
}
|
|
2969
|
+
function getVisionPortfolioQueryOptions(username) {
|
|
2970
|
+
return queryOptions({
|
|
2971
|
+
queryKey: [
|
|
2972
|
+
"ecency-wallets",
|
|
2973
|
+
"portfolio",
|
|
2974
|
+
"v2",
|
|
2975
|
+
username,
|
|
2976
|
+
"only-enabled"
|
|
2977
|
+
],
|
|
2978
|
+
enabled: Boolean(username),
|
|
2979
|
+
staleTime: 6e4,
|
|
2980
|
+
refetchInterval: 12e4,
|
|
2981
|
+
queryFn: async () => {
|
|
2982
|
+
if (!username) {
|
|
2983
|
+
throw new Error("[SDK][Wallets] \u2013 username is required");
|
|
2984
|
+
}
|
|
2985
|
+
if (!CONFIG.privateApiHost) {
|
|
2986
|
+
throw new Error(
|
|
2987
|
+
"[SDK][Wallets] \u2013 privateApiHost isn't configured for portfolio"
|
|
2988
|
+
);
|
|
2989
|
+
}
|
|
2990
|
+
const endpoint = `${CONFIG.privateApiHost}/wallet-api/portfolio-v2`;
|
|
2991
|
+
const response = await fetch(endpoint, {
|
|
2992
|
+
method: "POST",
|
|
2993
|
+
headers: {
|
|
2994
|
+
Accept: "application/json",
|
|
2995
|
+
"Content-Type": "application/json"
|
|
2996
|
+
},
|
|
2997
|
+
body: JSON.stringify({ username, onlyEnabled: true })
|
|
2998
|
+
});
|
|
2999
|
+
if (!response.ok) {
|
|
3000
|
+
throw new Error(
|
|
3001
|
+
`[SDK][Wallets] \u2013 Vision portfolio request failed(${response.status})`
|
|
3002
|
+
);
|
|
3003
|
+
}
|
|
3004
|
+
const payload = await response.json();
|
|
3005
|
+
const tokens = extractTokens(payload).map((item) => parseToken(item)).filter((item) => Boolean(item));
|
|
3006
|
+
if (!tokens.length) {
|
|
3007
|
+
throw new Error(
|
|
3008
|
+
"[SDK][Wallets] \u2013 Vision portfolio payload contained no tokens"
|
|
3009
|
+
);
|
|
3010
|
+
}
|
|
3011
|
+
return {
|
|
3012
|
+
username: resolveUsername(payload) ?? username,
|
|
3013
|
+
currency: normalizeString(
|
|
3014
|
+
payload?.currency
|
|
3015
|
+
)?.toUpperCase(),
|
|
3016
|
+
wallets: tokens
|
|
3017
|
+
};
|
|
3018
|
+
}
|
|
3019
|
+
});
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
// src/modules/wallets/queries/use-get-account-wallet-list-query.ts
|
|
2630
3023
|
function getAccountWalletListQueryOptions(username) {
|
|
2631
3024
|
return queryOptions({
|
|
2632
3025
|
queryKey: ["ecency-wallets", "list", username],
|
|
2633
3026
|
enabled: !!username,
|
|
2634
3027
|
queryFn: async () => {
|
|
3028
|
+
const portfolioQuery = getVisionPortfolioQueryOptions(username);
|
|
3029
|
+
const queryClient = getQueryClient();
|
|
3030
|
+
try {
|
|
3031
|
+
const portfolio = await queryClient.fetchQuery(portfolioQuery);
|
|
3032
|
+
const tokensFromPortfolio = portfolio.wallets.map(
|
|
3033
|
+
(asset) => asset.info.name
|
|
3034
|
+
);
|
|
3035
|
+
if (tokensFromPortfolio.length > 0) {
|
|
3036
|
+
return Array.from(new Set(tokensFromPortfolio));
|
|
3037
|
+
}
|
|
3038
|
+
} catch {
|
|
3039
|
+
}
|
|
2635
3040
|
const accountQuery = getAccountFullQueryOptions(username);
|
|
2636
|
-
await
|
|
3041
|
+
await queryClient.fetchQuery({
|
|
2637
3042
|
queryKey: accountQuery.queryKey
|
|
2638
3043
|
});
|
|
2639
|
-
const account =
|
|
3044
|
+
const account = queryClient.getQueryData(
|
|
2640
3045
|
accountQuery.queryKey
|
|
2641
3046
|
);
|
|
2642
3047
|
if (account?.profile?.tokens instanceof Array) {
|
|
@@ -3082,17 +3487,33 @@ function getTronAssetGeneralInfoQueryOptions(username) {
|
|
|
3082
3487
|
// src/modules/wallets/queries/get-account-wallet-asset-info-query-options.ts
|
|
3083
3488
|
function getAccountWalletAssetInfoQueryOptions(username, asset, options2 = { refetch: false }) {
|
|
3084
3489
|
const queryClient = getQueryClient();
|
|
3085
|
-
const fetchQuery = async (
|
|
3490
|
+
const fetchQuery = async (queryOptions40) => {
|
|
3086
3491
|
if (options2.refetch) {
|
|
3087
|
-
await queryClient.fetchQuery(
|
|
3492
|
+
await queryClient.fetchQuery(queryOptions40);
|
|
3088
3493
|
} else {
|
|
3089
|
-
await queryClient.prefetchQuery(
|
|
3494
|
+
await queryClient.prefetchQuery(queryOptions40);
|
|
3495
|
+
}
|
|
3496
|
+
return queryClient.getQueryData(queryOptions40.queryKey);
|
|
3497
|
+
};
|
|
3498
|
+
const portfolioQuery = getVisionPortfolioQueryOptions(username);
|
|
3499
|
+
const getPortfolioAssetInfo = async () => {
|
|
3500
|
+
try {
|
|
3501
|
+
const portfolio = await queryClient.fetchQuery(portfolioQuery);
|
|
3502
|
+
const assetInfo = portfolio.wallets.find(
|
|
3503
|
+
(assetItem) => assetItem.info.name === asset.toUpperCase()
|
|
3504
|
+
);
|
|
3505
|
+
return assetInfo?.info;
|
|
3506
|
+
} catch {
|
|
3507
|
+
return void 0;
|
|
3090
3508
|
}
|
|
3091
|
-
return queryClient.getQueryData(queryOptions39.queryKey);
|
|
3092
3509
|
};
|
|
3093
3510
|
return queryOptions({
|
|
3094
3511
|
queryKey: ["ecency-wallets", "asset-info", username, asset],
|
|
3095
3512
|
queryFn: async () => {
|
|
3513
|
+
const portfolioAssetInfo = await getPortfolioAssetInfo();
|
|
3514
|
+
if (portfolioAssetInfo) {
|
|
3515
|
+
return portfolioAssetInfo;
|
|
3516
|
+
}
|
|
3096
3517
|
if (asset === "HIVE") {
|
|
3097
3518
|
return fetchQuery(getHiveAssetGeneralInfoQueryOptions(username));
|
|
3098
3519
|
} else if (asset === "HP") {
|
|
@@ -3142,15 +3563,38 @@ function getTokenOperationsQueryOptions(token, username, isForOwner = false) {
|
|
|
3142
3563
|
queryKey: ["wallets", "token-operations", token, username, isForOwner],
|
|
3143
3564
|
queryFn: async () => {
|
|
3144
3565
|
const queryClient = getQueryClient();
|
|
3566
|
+
const normalizedToken = token.toUpperCase();
|
|
3567
|
+
const portfolioOperations = await (async () => {
|
|
3568
|
+
if (!isForOwner || !username) {
|
|
3569
|
+
return void 0;
|
|
3570
|
+
}
|
|
3571
|
+
try {
|
|
3572
|
+
const portfolio = await queryClient.fetchQuery(
|
|
3573
|
+
getVisionPortfolioQueryOptions(username)
|
|
3574
|
+
);
|
|
3575
|
+
const assetEntry = portfolio.wallets.find(
|
|
3576
|
+
(assetItem) => assetItem.info.name === normalizedToken
|
|
3577
|
+
);
|
|
3578
|
+
if (assetEntry?.operations.length) {
|
|
3579
|
+
return assetEntry.operations;
|
|
3580
|
+
}
|
|
3581
|
+
} catch {
|
|
3582
|
+
return void 0;
|
|
3583
|
+
}
|
|
3584
|
+
return void 0;
|
|
3585
|
+
})();
|
|
3586
|
+
if (portfolioOperations && portfolioOperations.length > 0) {
|
|
3587
|
+
return portfolioOperations;
|
|
3588
|
+
}
|
|
3145
3589
|
const ensureAssetInfo = async () => {
|
|
3146
3590
|
if (!isForOwner || !username) {
|
|
3147
3591
|
return void 0;
|
|
3148
3592
|
}
|
|
3149
3593
|
return await queryClient.ensureQueryData(
|
|
3150
|
-
getAccountWalletAssetInfoQueryOptions(username,
|
|
3594
|
+
getAccountWalletAssetInfoQueryOptions(username, normalizedToken)
|
|
3151
3595
|
);
|
|
3152
3596
|
};
|
|
3153
|
-
switch (
|
|
3597
|
+
switch (normalizedToken) {
|
|
3154
3598
|
case "HIVE" /* Hive */: {
|
|
3155
3599
|
const assetInfo = await ensureAssetInfo();
|
|
3156
3600
|
const savingsBalance = assetInfo?.parts?.find(
|
|
@@ -3710,6 +4154,6 @@ function useWalletOperation(username, asset, operation) {
|
|
|
3710
4154
|
// src/index.ts
|
|
3711
4155
|
rememberScryptBsvVersion();
|
|
3712
4156
|
|
|
3713
|
-
export { AssetOperation, EcencyWalletBasicTokens, EcencyWalletCurrency, private_api_exports as EcencyWalletsPrivateApi, HIVE_ACCOUNT_OPERATION_GROUPS, HIVE_OPERATION_LIST, HIVE_OPERATION_NAME_BY_ID, HIVE_OPERATION_ORDERS, NaiMap, PointTransactionType, Symbol2 as Symbol, buildAptTx, buildEthTx, buildExternalTx, buildPsbt, buildSolTx, buildTonTx, buildTronTx, claimInterestHive, decryptMemoWithAccounts, decryptMemoWithKeys, delay, delegateEngineToken, delegateHive, deriveHiveKey, deriveHiveKeys, deriveHiveMasterPasswordKey, deriveHiveMasterPasswordKeys, detectHiveKeyDerivation, encryptMemoWithAccounts, encryptMemoWithKeys, getAccountWalletAssetInfoQueryOptions, getAccountWalletListQueryOptions, getAllTokensListQueryOptions, getBoundFetch, getHbdAssetGeneralInfoQueryOptions, getHbdAssetTransactionsQueryOptions, getHiveAssetGeneralInfoQueryOptions, getHiveAssetMetricQueryOptions, getHiveAssetTransactionsQueryOptions, getHiveAssetWithdrawalRoutesQueryOptions, getHiveEngineTokenGeneralInfoQueryOptions, getHiveEngineTokenTransactionsQueryOptions, getHiveEngineTokensBalancesQueryOptions, getHiveEngineTokensMarketQueryOptions, getHiveEngineTokensMetadataQueryOptions, getHiveEngineTokensMetricsQueryOptions, getHivePowerAssetGeneralInfoQueryOptions, getHivePowerAssetTransactionsQueryOptions, getHivePowerDelegatesInfiniteQueryOptions, getHivePowerDelegatingsQueryOptions, getLarynxAssetGeneralInfoQueryOptions, getLarynxPowerAssetGeneralInfoQueryOptions, getPointsAssetGeneralInfoQueryOptions, getPointsAssetTransactionsQueryOptions, getPointsQueryOptions, getSpkAssetGeneralInfoQueryOptions, getSpkMarketsQueryOptions, getTokenOperationsQueryOptions, getTokenPriceQueryOptions, getWallet, isEmptyDate, lockLarynx, mnemonicToSeedBip39, parseAsset, powerDownHive, powerUpHive, powerUpLarynx, resolveHiveOperationFilters, rewardSpk, signDigest, signExternalTx, signExternalTxAndBroadcast, signTx, signTxAndBroadcast, stakeEngineToken, transferEngineToken, transferFromSavingsHive, transferHive, transferLarynx, transferPoint, transferSpk, transferToSavingsHive, undelegateEngineToken, unstakeEngineToken, useClaimPoints, useClaimRewards, useGetExternalWalletBalanceQuery, useHiveKeysQuery, useImportWallet, useSaveWalletInformationToMetadata, useSeedPhrase, useWalletCreate, useWalletOperation, useWalletsCacheQuery, vestsToHp, withdrawVestingRouteHive };
|
|
4157
|
+
export { AssetOperation, EcencyWalletBasicTokens, EcencyWalletCurrency, private_api_exports as EcencyWalletsPrivateApi, HIVE_ACCOUNT_OPERATION_GROUPS, HIVE_OPERATION_LIST, HIVE_OPERATION_NAME_BY_ID, HIVE_OPERATION_ORDERS, NaiMap, PointTransactionType, Symbol2 as Symbol, broadcastWithWalletHiveAuth, buildAptTx, buildEthTx, buildExternalTx, buildPsbt, buildSolTx, buildTonTx, buildTronTx, claimInterestHive, decryptMemoWithAccounts, decryptMemoWithKeys, delay, delegateEngineToken, delegateHive, deriveHiveKey, deriveHiveKeys, deriveHiveMasterPasswordKey, deriveHiveMasterPasswordKeys, detectHiveKeyDerivation, encryptMemoWithAccounts, encryptMemoWithKeys, getAccountWalletAssetInfoQueryOptions, getAccountWalletListQueryOptions, getAllTokensListQueryOptions, getBoundFetch, getHbdAssetGeneralInfoQueryOptions, getHbdAssetTransactionsQueryOptions, getHiveAssetGeneralInfoQueryOptions, getHiveAssetMetricQueryOptions, getHiveAssetTransactionsQueryOptions, getHiveAssetWithdrawalRoutesQueryOptions, getHiveEngineTokenGeneralInfoQueryOptions, getHiveEngineTokenTransactionsQueryOptions, getHiveEngineTokensBalancesQueryOptions, getHiveEngineTokensMarketQueryOptions, getHiveEngineTokensMetadataQueryOptions, getHiveEngineTokensMetricsQueryOptions, getHivePowerAssetGeneralInfoQueryOptions, getHivePowerAssetTransactionsQueryOptions, getHivePowerDelegatesInfiniteQueryOptions, getHivePowerDelegatingsQueryOptions, getLarynxAssetGeneralInfoQueryOptions, getLarynxPowerAssetGeneralInfoQueryOptions, getPointsAssetGeneralInfoQueryOptions, getPointsAssetTransactionsQueryOptions, getPointsQueryOptions, getSpkAssetGeneralInfoQueryOptions, getSpkMarketsQueryOptions, getTokenOperationsQueryOptions, getTokenPriceQueryOptions, getVisionPortfolioQueryOptions, getWallet, hasWalletHiveAuthBroadcast, isEmptyDate, lockLarynx, mnemonicToSeedBip39, parseAsset, powerDownHive, powerUpHive, powerUpLarynx, registerWalletHiveAuthBroadcast, resolveHiveOperationFilters, rewardSpk, signDigest, signExternalTx, signExternalTxAndBroadcast, signTx, signTxAndBroadcast, stakeEngineToken, transferEngineToken, transferFromSavingsHive, transferHive, transferLarynx, transferPoint, transferSpk, transferToSavingsHive, undelegateEngineToken, unstakeEngineToken, useClaimPoints, useClaimRewards, useGetExternalWalletBalanceQuery, useHiveKeysQuery, useImportWallet, useSaveWalletInformationToMetadata, useSeedPhrase, useWalletCreate, useWalletOperation, useWalletsCacheQuery, vestsToHp, withdrawVestingRouteHive };
|
|
3714
4158
|
//# sourceMappingURL=index.js.map
|
|
3715
4159
|
//# sourceMappingURL=index.js.map
|