@hsuite/smart-engines-sdk 3.1.0 → 3.2.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.ts +196 -65
- package/dist/index.js +102 -68
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.ts +196 -65
- package/dist/nestjs/index.js +98 -68
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1409,6 +1409,7 @@ export declare class IPFSClient {
|
|
|
1409
1409
|
getStatus(): Promise<IpfsStatusResponse>;
|
|
1410
1410
|
getStorageUsage(): Promise<IpfsStorageUsageResponse>;
|
|
1411
1411
|
}
|
|
1412
|
+
export type SecurityMode = "none" | "partial" | "full";
|
|
1412
1413
|
export type PreparedTransaction = {
|
|
1413
1414
|
success?: boolean;
|
|
1414
1415
|
transactionBytes: string;
|
|
@@ -1424,135 +1425,267 @@ export type PreparedTransaction = {
|
|
|
1424
1425
|
};
|
|
1425
1426
|
export type PrepareTransferRequest = {
|
|
1426
1427
|
chain: ChainType;
|
|
1427
|
-
payerAccountId
|
|
1428
|
+
payerAccountId?: string;
|
|
1428
1429
|
from: string;
|
|
1429
1430
|
to: string;
|
|
1430
1431
|
amount: string;
|
|
1431
1432
|
tokenId?: string;
|
|
1432
1433
|
entityId?: string;
|
|
1433
1434
|
memo?: string;
|
|
1435
|
+
securityMode?: SecurityMode;
|
|
1436
|
+
appOwnerPublicKey?: string;
|
|
1437
|
+
ss58Format?: number;
|
|
1434
1438
|
};
|
|
1435
1439
|
export type PrepareNftMintRequest = {
|
|
1436
1440
|
chain: ChainType;
|
|
1437
|
-
payerAccountId
|
|
1438
|
-
tokenId
|
|
1439
|
-
metadata
|
|
1441
|
+
payerAccountId?: string;
|
|
1442
|
+
tokenId?: string;
|
|
1443
|
+
metadata?: string | string[];
|
|
1440
1444
|
entityId?: string;
|
|
1445
|
+
securityMode?: SecurityMode;
|
|
1446
|
+
appOwnerPublicKey?: string;
|
|
1447
|
+
ss58Format?: number;
|
|
1448
|
+
collection?: number;
|
|
1449
|
+
item?: number;
|
|
1450
|
+
mintTo?: string;
|
|
1451
|
+
witnessData?: unknown;
|
|
1452
|
+
recipient?: string;
|
|
1453
|
+
collectionMint?: string;
|
|
1454
|
+
name?: string;
|
|
1455
|
+
symbol?: string;
|
|
1456
|
+
uri?: string;
|
|
1457
|
+
sellerFeeBasisPoints?: number;
|
|
1458
|
+
mintAuthority?: string;
|
|
1441
1459
|
};
|
|
1442
1460
|
export type PrepareNftBurnRequest = {
|
|
1443
1461
|
chain: ChainType;
|
|
1444
|
-
payerAccountId
|
|
1445
|
-
tokenId
|
|
1446
|
-
serialNumber
|
|
1462
|
+
payerAccountId?: string;
|
|
1463
|
+
tokenId?: string;
|
|
1464
|
+
serialNumber?: number;
|
|
1447
1465
|
entityId?: string;
|
|
1466
|
+
securityMode?: SecurityMode;
|
|
1467
|
+
appOwnerPublicKey?: string;
|
|
1468
|
+
ss58Format?: number;
|
|
1469
|
+
collection?: number;
|
|
1470
|
+
item?: number;
|
|
1471
|
+
mint?: string;
|
|
1472
|
+
owner?: string;
|
|
1448
1473
|
};
|
|
1449
1474
|
export type PrepareNftTransferRequest = {
|
|
1450
1475
|
chain: ChainType;
|
|
1451
|
-
payerAccountId
|
|
1452
|
-
tokenId
|
|
1453
|
-
serialNumber
|
|
1454
|
-
fromAccountId
|
|
1455
|
-
toAccountId
|
|
1476
|
+
payerAccountId?: string;
|
|
1477
|
+
tokenId?: string;
|
|
1478
|
+
serialNumber?: number;
|
|
1479
|
+
fromAccountId?: string;
|
|
1480
|
+
toAccountId?: string;
|
|
1456
1481
|
entityId?: string;
|
|
1482
|
+
securityMode?: SecurityMode;
|
|
1483
|
+
appOwnerPublicKey?: string;
|
|
1484
|
+
ss58Format?: number;
|
|
1485
|
+
collection?: number;
|
|
1486
|
+
item?: number;
|
|
1487
|
+
dest?: string;
|
|
1488
|
+
mint?: string;
|
|
1489
|
+
fromOwner?: string;
|
|
1490
|
+
toOwner?: string;
|
|
1457
1491
|
};
|
|
1458
1492
|
export type PrepareTokenCreateRequest = {
|
|
1459
|
-
chain:
|
|
1460
|
-
payerAccountId
|
|
1461
|
-
name
|
|
1462
|
-
symbol
|
|
1463
|
-
decimals
|
|
1464
|
-
initialSupply
|
|
1465
|
-
treasuryAccountId
|
|
1466
|
-
entityId
|
|
1493
|
+
chain: ChainType;
|
|
1494
|
+
payerAccountId?: string;
|
|
1495
|
+
name?: string;
|
|
1496
|
+
symbol?: string;
|
|
1497
|
+
decimals?: number;
|
|
1498
|
+
initialSupply?: string;
|
|
1499
|
+
treasuryAccountId?: string;
|
|
1500
|
+
entityId?: string;
|
|
1467
1501
|
memo?: string;
|
|
1468
1502
|
tokenType?: "FUNGIBLE_COMMON" | "NON_FUNGIBLE_UNIQUE";
|
|
1503
|
+
securityMode?: SecurityMode;
|
|
1504
|
+
appOwnerPublicKey?: string;
|
|
1469
1505
|
supplyKey?: string;
|
|
1470
1506
|
adminKey?: string;
|
|
1471
1507
|
pauseKey?: string;
|
|
1472
1508
|
freezeKey?: string;
|
|
1473
1509
|
kycKey?: string;
|
|
1474
1510
|
wipeKey?: string;
|
|
1511
|
+
mintAuthority?: string;
|
|
1512
|
+
assetId?: number;
|
|
1513
|
+
admin?: string;
|
|
1514
|
+
minBalance?: string;
|
|
1515
|
+
assetName?: string;
|
|
1516
|
+
noneOwnerVkeyHex?: string;
|
|
1517
|
+
initialRecipient?: string;
|
|
1475
1518
|
};
|
|
1476
1519
|
export type PrepareTokenMintRequest = {
|
|
1477
1520
|
chain: ChainType;
|
|
1478
|
-
payerAccountId
|
|
1479
|
-
tokenId
|
|
1521
|
+
payerAccountId?: string;
|
|
1522
|
+
tokenId?: string;
|
|
1480
1523
|
amount: string;
|
|
1481
1524
|
recipientAccountId?: string;
|
|
1482
1525
|
entityId?: string;
|
|
1526
|
+
securityMode?: SecurityMode;
|
|
1527
|
+
appOwnerPublicKey?: string;
|
|
1528
|
+
assetId?: number;
|
|
1529
|
+
beneficiary?: string;
|
|
1530
|
+
appOwnerVkeyHex?: string;
|
|
1531
|
+
noneOwnerVkeyHex?: string;
|
|
1532
|
+
destination?: string;
|
|
1483
1533
|
};
|
|
1484
1534
|
export type PrepareTokenBurnRequest = {
|
|
1485
|
-
chain:
|
|
1486
|
-
payerAccountId
|
|
1487
|
-
tokenId
|
|
1535
|
+
chain: ChainType;
|
|
1536
|
+
payerAccountId?: string;
|
|
1537
|
+
tokenId?: string;
|
|
1488
1538
|
amount: string;
|
|
1489
|
-
entityId
|
|
1539
|
+
entityId?: string;
|
|
1540
|
+
securityMode?: SecurityMode;
|
|
1541
|
+
appOwnerPublicKey?: string;
|
|
1542
|
+
assetId?: number;
|
|
1543
|
+
who?: string;
|
|
1544
|
+
appOwnerVkeyHex?: string;
|
|
1545
|
+
noneOwnerVkeyHex?: string;
|
|
1546
|
+
source?: string;
|
|
1490
1547
|
};
|
|
1491
|
-
export type
|
|
1492
|
-
chain:
|
|
1493
|
-
payerAccountId
|
|
1548
|
+
export type PrepareTokenAssociateRequest = {
|
|
1549
|
+
chain: ChainType;
|
|
1550
|
+
payerAccountId?: string;
|
|
1494
1551
|
accountId: string;
|
|
1495
1552
|
tokenIds: string[];
|
|
1496
|
-
entityId
|
|
1553
|
+
entityId?: string;
|
|
1554
|
+
owner?: string;
|
|
1555
|
+
};
|
|
1556
|
+
export type PrepareTokenPauseRequest = {
|
|
1557
|
+
chain: ChainType;
|
|
1558
|
+
payerAccountId?: string;
|
|
1559
|
+
tokenId?: string;
|
|
1560
|
+
assetId?: number;
|
|
1561
|
+
entityId?: string;
|
|
1562
|
+
securityMode?: SecurityMode;
|
|
1563
|
+
appOwnerPublicKey?: string;
|
|
1564
|
+
ss58Format?: number;
|
|
1565
|
+
currentAuthority?: string;
|
|
1566
|
+
newMintAuthority?: string | null;
|
|
1567
|
+
memo?: string;
|
|
1568
|
+
};
|
|
1569
|
+
export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
|
|
1570
|
+
export type PrepareTokenRestrictRequest = {
|
|
1571
|
+
chain: ChainType;
|
|
1572
|
+
payerAccountId?: string;
|
|
1573
|
+
tokenId?: string;
|
|
1574
|
+
accountId?: string;
|
|
1575
|
+
entityId?: string;
|
|
1576
|
+
securityMode?: SecurityMode;
|
|
1577
|
+
appOwnerPublicKey?: string;
|
|
1578
|
+
ss58Format?: number;
|
|
1579
|
+
assetId?: number;
|
|
1580
|
+
who?: string;
|
|
1581
|
+
account?: string;
|
|
1582
|
+
freezeAuthority?: string;
|
|
1583
|
+
memo?: string;
|
|
1584
|
+
};
|
|
1585
|
+
export type PrepareTokenUnrestrictRequest = PrepareTokenRestrictRequest;
|
|
1586
|
+
export type TransactionInfoResponse = {
|
|
1587
|
+
model?: string;
|
|
1588
|
+
description?: string;
|
|
1589
|
+
principles?: string[];
|
|
1590
|
+
supportedChains: string[];
|
|
1591
|
+
responseFormat?: Record<string, string>;
|
|
1497
1592
|
};
|
|
1498
1593
|
export type PrepareTopicCreateRequest = {
|
|
1499
|
-
|
|
1500
|
-
payerAccountId: string;
|
|
1594
|
+
payerAccountId?: string;
|
|
1501
1595
|
memo?: string;
|
|
1502
1596
|
adminKeyRequired?: boolean;
|
|
1503
1597
|
submitKeyRequired?: boolean;
|
|
1504
1598
|
entityId: string;
|
|
1505
1599
|
};
|
|
1506
1600
|
export type PrepareTopicMessageRequest = {
|
|
1507
|
-
|
|
1508
|
-
payerAccountId: string;
|
|
1601
|
+
payerAccountId?: string;
|
|
1509
1602
|
topicId: string;
|
|
1510
1603
|
message: string | Record<string, unknown>;
|
|
1511
1604
|
entityId: string;
|
|
1512
1605
|
};
|
|
1513
|
-
export type
|
|
1514
|
-
|
|
1515
|
-
payerAccountId: string;
|
|
1516
|
-
tokenId: string;
|
|
1517
|
-
entityId: string;
|
|
1518
|
-
memo?: string;
|
|
1519
|
-
};
|
|
1520
|
-
export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
|
|
1521
|
-
export type PrepareTokenRestrictRequest = {
|
|
1522
|
-
chain: "hedera";
|
|
1523
|
-
payerAccountId: string;
|
|
1606
|
+
export type PrepareTokenComplianceEnableRequest = {
|
|
1607
|
+
payerAccountId?: string;
|
|
1524
1608
|
tokenId: string;
|
|
1525
1609
|
accountId: string;
|
|
1526
1610
|
entityId: string;
|
|
1611
|
+
securityMode?: SecurityMode;
|
|
1612
|
+
appOwnerPublicKey?: string;
|
|
1527
1613
|
memo?: string;
|
|
1528
1614
|
};
|
|
1529
|
-
export type
|
|
1530
|
-
export type PrepareTokenComplianceEnableRequest = PrepareTokenRestrictRequest;
|
|
1531
|
-
export type PrepareTokenComplianceDisableRequest = PrepareTokenRestrictRequest;
|
|
1615
|
+
export type PrepareTokenComplianceDisableRequest = PrepareTokenComplianceEnableRequest;
|
|
1532
1616
|
export type PrepareTokenWipeRequest = {
|
|
1533
|
-
|
|
1534
|
-
payerAccountId: string;
|
|
1617
|
+
payerAccountId?: string;
|
|
1535
1618
|
tokenId: string;
|
|
1536
1619
|
accountId: string;
|
|
1537
1620
|
amount: string;
|
|
1538
1621
|
entityId: string;
|
|
1539
1622
|
memo?: string;
|
|
1540
1623
|
};
|
|
1624
|
+
export declare class HederaTransactionsClient {
|
|
1625
|
+
private readonly http;
|
|
1626
|
+
constructor(http: HttpClient);
|
|
1627
|
+
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
1628
|
+
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
1629
|
+
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
1630
|
+
prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
|
|
1631
|
+
prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
|
|
1632
|
+
}
|
|
1541
1633
|
export type PrepareTrustLineRequest = {
|
|
1542
|
-
|
|
1543
|
-
|
|
1634
|
+
accountAddress?: string;
|
|
1635
|
+
payerAccountId?: string;
|
|
1544
1636
|
currency: string;
|
|
1545
1637
|
issuerAddress: string;
|
|
1546
1638
|
limit?: string;
|
|
1547
1639
|
entityId: string;
|
|
1548
1640
|
};
|
|
1549
|
-
export
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1641
|
+
export declare class XrplTransactionsClient {
|
|
1642
|
+
private readonly http;
|
|
1643
|
+
constructor(http: HttpClient);
|
|
1644
|
+
prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
|
|
1645
|
+
}
|
|
1646
|
+
export type PrepareTokenCloseAccountRequest = {
|
|
1647
|
+
payerAccountId?: string;
|
|
1648
|
+
account: string;
|
|
1649
|
+
destination: string;
|
|
1650
|
+
owner?: string;
|
|
1651
|
+
entityId?: string;
|
|
1652
|
+
securityMode?: SecurityMode;
|
|
1653
|
+
appOwnerPublicKey?: string;
|
|
1654
|
+
memo?: string;
|
|
1555
1655
|
};
|
|
1656
|
+
export declare class SolanaTransactionsClient {
|
|
1657
|
+
private readonly http;
|
|
1658
|
+
constructor(http: HttpClient);
|
|
1659
|
+
prepareTokenCloseAccount(request: PrepareTokenCloseAccountRequest): Promise<PreparedTransaction>;
|
|
1660
|
+
}
|
|
1661
|
+
export type PrepareAssetSetTeamRequest = {
|
|
1662
|
+
payerAccountId?: string;
|
|
1663
|
+
assetId: number;
|
|
1664
|
+
issuer: string;
|
|
1665
|
+
admin: string;
|
|
1666
|
+
freezer: string;
|
|
1667
|
+
entityId?: string;
|
|
1668
|
+
securityMode?: SecurityMode;
|
|
1669
|
+
appOwnerPublicKey?: string;
|
|
1670
|
+
ss58Format?: number;
|
|
1671
|
+
};
|
|
1672
|
+
export type PrepareAssetSetMetadataRequest = {
|
|
1673
|
+
payerAccountId?: string;
|
|
1674
|
+
assetId: number;
|
|
1675
|
+
name: string;
|
|
1676
|
+
symbol: string;
|
|
1677
|
+
decimals: number;
|
|
1678
|
+
entityId?: string;
|
|
1679
|
+
securityMode?: SecurityMode;
|
|
1680
|
+
appOwnerPublicKey?: string;
|
|
1681
|
+
ss58Format?: number;
|
|
1682
|
+
};
|
|
1683
|
+
export declare class PolkadotTransactionsClient {
|
|
1684
|
+
private readonly http;
|
|
1685
|
+
constructor(http: HttpClient);
|
|
1686
|
+
prepareAssetSetTeam(request: PrepareAssetSetTeamRequest): Promise<PreparedTransaction>;
|
|
1687
|
+
prepareAssetSetMetadata(request: PrepareAssetSetMetadataRequest): Promise<PreparedTransaction>;
|
|
1688
|
+
}
|
|
1556
1689
|
export declare class TransactionsClient {
|
|
1557
1690
|
private readonly http;
|
|
1558
1691
|
constructor(http: HttpClient);
|
|
@@ -1564,17 +1697,11 @@ export declare class TransactionsClient {
|
|
|
1564
1697
|
prepareTokenCreate(request: PrepareTokenCreateRequest): Promise<PreparedTransaction>;
|
|
1565
1698
|
prepareTokenMint(request: PrepareTokenMintRequest): Promise<PreparedTransaction>;
|
|
1566
1699
|
prepareTokenBurn(request: PrepareTokenBurnRequest): Promise<PreparedTransaction>;
|
|
1567
|
-
|
|
1700
|
+
prepareTokenAssociate(request: PrepareTokenAssociateRequest): Promise<PreparedTransaction>;
|
|
1568
1701
|
prepareTokenPause(request: PrepareTokenPauseRequest): Promise<PreparedTransaction>;
|
|
1569
1702
|
prepareTokenUnpause(request: PrepareTokenUnpauseRequest): Promise<PreparedTransaction>;
|
|
1570
1703
|
prepareTokenRestrict(request: PrepareTokenRestrictRequest): Promise<PreparedTransaction>;
|
|
1571
1704
|
prepareTokenUnrestrict(request: PrepareTokenUnrestrictRequest): Promise<PreparedTransaction>;
|
|
1572
|
-
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
1573
|
-
prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
|
|
1574
|
-
prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
|
|
1575
|
-
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
1576
|
-
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
1577
|
-
prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
|
|
1578
1705
|
}
|
|
1579
1706
|
export type SnapshotStatus = "pending" | "generating" | "completed" | "failed";
|
|
1580
1707
|
export type SnapshotFormat = "json" | "csv";
|
|
@@ -1875,6 +2002,10 @@ export declare class SmartEngineClient {
|
|
|
1875
2002
|
readonly tss: TSSClient;
|
|
1876
2003
|
readonly ipfs: IPFSClient;
|
|
1877
2004
|
readonly transactions: TransactionsClient;
|
|
2005
|
+
readonly hedera: HederaTransactionsClient;
|
|
2006
|
+
readonly xrpl: XrplTransactionsClient;
|
|
2007
|
+
readonly solana: SolanaTransactionsClient;
|
|
2008
|
+
readonly polkadot: PolkadotTransactionsClient;
|
|
1878
2009
|
readonly snapshots: SnapshotsClient;
|
|
1879
2010
|
readonly historicalBalance: HistoricalBalanceClient;
|
|
1880
2011
|
readonly settlement: SettlementClient;
|
package/dist/index.js
CHANGED
|
@@ -2228,80 +2228,134 @@ var IPFSClient = class {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
};
|
|
2230
2230
|
|
|
2231
|
+
// src/transactions/chains/hedera.ts
|
|
2232
|
+
var HederaTransactionsClient = class {
|
|
2233
|
+
constructor(http) {
|
|
2234
|
+
this.http = http;
|
|
2235
|
+
}
|
|
2236
|
+
http;
|
|
2237
|
+
/** Prepare an HCS topic creation transaction. */
|
|
2238
|
+
async prepareTopicCreate(request) {
|
|
2239
|
+
return this.http.post("/topic/create/prepare", { ...request, chain: "hedera" });
|
|
2240
|
+
}
|
|
2241
|
+
/** Prepare an HCS topic message submission. */
|
|
2242
|
+
async prepareTopicMessage(request) {
|
|
2243
|
+
return this.http.post("/topic/message/prepare", { ...request, chain: "hedera" });
|
|
2244
|
+
}
|
|
2245
|
+
/** Prepare a token compliance-enable (KYC grant) transaction. */
|
|
2246
|
+
async prepareTokenComplianceEnable(request) {
|
|
2247
|
+
return this.http.post("/token/compliance/enable/prepare", { ...request, chain: "hedera" });
|
|
2248
|
+
}
|
|
2249
|
+
/** Prepare a token compliance-disable (KYC revoke) transaction. */
|
|
2250
|
+
async prepareTokenComplianceDisable(request) {
|
|
2251
|
+
return this.http.post("/token/compliance/disable/prepare", { ...request, chain: "hedera" });
|
|
2252
|
+
}
|
|
2253
|
+
/** Prepare a token wipe transaction (force-remove tokens from an account). */
|
|
2254
|
+
async prepareTokenWipe(request) {
|
|
2255
|
+
return this.http.post("/token/wipe/prepare", { ...request, chain: "hedera" });
|
|
2256
|
+
}
|
|
2257
|
+
};
|
|
2258
|
+
|
|
2259
|
+
// src/transactions/chains/xrpl.ts
|
|
2260
|
+
var XrplTransactionsClient = class {
|
|
2261
|
+
constructor(http) {
|
|
2262
|
+
this.http = http;
|
|
2263
|
+
}
|
|
2264
|
+
http;
|
|
2265
|
+
/** Prepare an XRPL TrustSet (trust line) transaction. */
|
|
2266
|
+
async prepareTrustLine(request) {
|
|
2267
|
+
return this.http.post("/trustline/prepare", { ...request, chain: "xrpl" });
|
|
2268
|
+
}
|
|
2269
|
+
};
|
|
2270
|
+
|
|
2271
|
+
// src/transactions/chains/solana.ts
|
|
2272
|
+
var SolanaTransactionsClient = class {
|
|
2273
|
+
constructor(http) {
|
|
2274
|
+
this.http = http;
|
|
2275
|
+
}
|
|
2276
|
+
http;
|
|
2277
|
+
/** Prepare an SPL Token close-account transaction. */
|
|
2278
|
+
async prepareTokenCloseAccount(request) {
|
|
2279
|
+
return this.http.post("/token/close-account/prepare", { ...request, chain: "solana" });
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
|
|
2283
|
+
// src/transactions/chains/polkadot.ts
|
|
2284
|
+
var PolkadotTransactionsClient = class {
|
|
2285
|
+
constructor(http) {
|
|
2286
|
+
this.http = http;
|
|
2287
|
+
}
|
|
2288
|
+
http;
|
|
2289
|
+
/** Prepare a pallet-assets.setTeam transaction. */
|
|
2290
|
+
async prepareAssetSetTeam(request) {
|
|
2291
|
+
return this.http.post("/token/set-team/prepare", { ...request, chain: "polkadot" });
|
|
2292
|
+
}
|
|
2293
|
+
/** Prepare a pallet-assets.setMetadata transaction. */
|
|
2294
|
+
async prepareAssetSetMetadata(request) {
|
|
2295
|
+
return this.http.post("/token/set-metadata/prepare", { ...request, chain: "polkadot" });
|
|
2296
|
+
}
|
|
2297
|
+
};
|
|
2298
|
+
|
|
2231
2299
|
// src/transactions/index.ts
|
|
2232
2300
|
var TransactionsClient = class {
|
|
2233
2301
|
constructor(http) {
|
|
2234
2302
|
this.http = http;
|
|
2235
2303
|
}
|
|
2236
2304
|
http;
|
|
2237
|
-
/**
|
|
2238
|
-
* Get transaction preparation service info
|
|
2239
|
-
*/
|
|
2305
|
+
/** Get transaction preparation service info. */
|
|
2240
2306
|
async getInfo() {
|
|
2241
2307
|
return this.http.get("/info");
|
|
2242
2308
|
}
|
|
2243
|
-
/**
|
|
2244
|
-
* Prepare a transfer transaction for local signing
|
|
2245
|
-
*/
|
|
2309
|
+
/** Prepare a transfer transaction (any supported chain). */
|
|
2246
2310
|
async prepareTransfer(request) {
|
|
2247
2311
|
return this.http.post("/transfer/prepare", request);
|
|
2248
2312
|
}
|
|
2249
|
-
/**
|
|
2250
|
-
* Prepare an NFT mint transaction
|
|
2251
|
-
*/
|
|
2313
|
+
/** Prepare an NFT mint transaction (any supported chain). */
|
|
2252
2314
|
async prepareNftMint(request) {
|
|
2253
2315
|
return this.http.post("/nft/mint/prepare", request);
|
|
2254
2316
|
}
|
|
2255
|
-
/**
|
|
2256
|
-
* Prepare an NFT burn transaction
|
|
2257
|
-
*/
|
|
2317
|
+
/** Prepare an NFT burn transaction (any supported chain). */
|
|
2258
2318
|
async prepareNftBurn(request) {
|
|
2259
2319
|
return this.http.post("/nft/burn/prepare", request);
|
|
2260
2320
|
}
|
|
2261
|
-
/**
|
|
2262
|
-
* Prepare an NFT transfer transaction
|
|
2263
|
-
*/
|
|
2321
|
+
/** Prepare an NFT transfer transaction (any supported chain). */
|
|
2264
2322
|
async prepareNftTransfer(request) {
|
|
2265
2323
|
return this.http.post("/nft/transfer/prepare", request);
|
|
2266
2324
|
}
|
|
2267
|
-
/**
|
|
2268
|
-
* Prepare a token creation transaction
|
|
2269
|
-
*/
|
|
2325
|
+
/** Prepare a token creation transaction (Hedera, Solana, Polkadot, Cardano). */
|
|
2270
2326
|
async prepareTokenCreate(request) {
|
|
2271
2327
|
return this.http.post("/token/create/prepare", request);
|
|
2272
2328
|
}
|
|
2273
|
-
/**
|
|
2274
|
-
* Prepare a token mint transaction
|
|
2275
|
-
*/
|
|
2329
|
+
/** Prepare a token mint transaction (any supported chain). */
|
|
2276
2330
|
async prepareTokenMint(request) {
|
|
2277
2331
|
return this.http.post("/token/mint/prepare", request);
|
|
2278
2332
|
}
|
|
2279
2333
|
/**
|
|
2280
|
-
* Prepare a fungible token burn transaction (Hedera
|
|
2281
|
-
*
|
|
2282
|
-
* For NFT burn use `prepareNftBurn` with a serialNumber.
|
|
2334
|
+
* Prepare a fungible token burn transaction (Hedera, Solana, Polkadot,
|
|
2335
|
+
* Cardano). For NFT burn use `prepareNftBurn` with a `serialNumber`.
|
|
2283
2336
|
*/
|
|
2284
2337
|
async prepareTokenBurn(request) {
|
|
2285
2338
|
return this.http.post("/token/burn/prepare", request);
|
|
2286
2339
|
}
|
|
2287
2340
|
/**
|
|
2288
|
-
* Prepare a token association transaction
|
|
2341
|
+
* Prepare a token association transaction (Hedera HTS associate / Solana
|
|
2342
|
+
* ATA create). On chains that don't need explicit association (XRPL uses
|
|
2343
|
+
* trustlines — see `client.xrpl.prepareTrustLine`), the server returns 400.
|
|
2289
2344
|
*/
|
|
2290
|
-
async
|
|
2345
|
+
async prepareTokenAssociate(request) {
|
|
2291
2346
|
return this.http.post("/token/associate/prepare", request);
|
|
2292
2347
|
}
|
|
2293
|
-
|
|
2294
|
-
/** Prepare a token pause transaction (capability: pausable). */
|
|
2348
|
+
/** Prepare a token pause transaction (Hedera, Polkadot, Solana). */
|
|
2295
2349
|
async prepareTokenPause(request) {
|
|
2296
2350
|
return this.http.post("/token/pause/prepare", request);
|
|
2297
2351
|
}
|
|
2298
|
-
/** Prepare a token unpause transaction (
|
|
2352
|
+
/** Prepare a token unpause transaction (Hedera, Polkadot, Solana). */
|
|
2299
2353
|
async prepareTokenUnpause(request) {
|
|
2300
2354
|
return this.http.post("/token/unpause/prepare", request);
|
|
2301
2355
|
}
|
|
2302
2356
|
/**
|
|
2303
|
-
* Prepare a token restrict (freeze account) transaction (
|
|
2304
|
-
*
|
|
2357
|
+
* Prepare a token restrict (freeze account) transaction (Hedera, Polkadot,
|
|
2358
|
+
* Solana). Freezes `accountId`/`who`/`account` from transacting the token.
|
|
2305
2359
|
*/
|
|
2306
2360
|
async prepareTokenRestrict(request) {
|
|
2307
2361
|
return this.http.post("/token/restrict/prepare", request);
|
|
@@ -2310,42 +2364,6 @@ var TransactionsClient = class {
|
|
|
2310
2364
|
async prepareTokenUnrestrict(request) {
|
|
2311
2365
|
return this.http.post("/token/unrestrict/prepare", request);
|
|
2312
2366
|
}
|
|
2313
|
-
/**
|
|
2314
|
-
* Prepare a token compliance-enable (grant KYC) transaction (capability:
|
|
2315
|
-
* compliant).
|
|
2316
|
-
*/
|
|
2317
|
-
async prepareTokenComplianceEnable(request) {
|
|
2318
|
-
return this.http.post("/token/compliance/enable/prepare", request);
|
|
2319
|
-
}
|
|
2320
|
-
/** Prepare a token compliance-disable (revoke KYC) transaction. */
|
|
2321
|
-
async prepareTokenComplianceDisable(request) {
|
|
2322
|
-
return this.http.post("/token/compliance/disable/prepare", request);
|
|
2323
|
-
}
|
|
2324
|
-
/**
|
|
2325
|
-
* Prepare a token wipe transaction (capability: wipeable). Force-removes
|
|
2326
|
-
* `amount` of `tokenId` from `accountId`.
|
|
2327
|
-
*/
|
|
2328
|
-
async prepareTokenWipe(request) {
|
|
2329
|
-
return this.http.post("/token/wipe/prepare", request);
|
|
2330
|
-
}
|
|
2331
|
-
/**
|
|
2332
|
-
* Prepare a topic creation transaction
|
|
2333
|
-
*/
|
|
2334
|
-
async prepareTopicCreate(request) {
|
|
2335
|
-
return this.http.post("/topic/create/prepare", request);
|
|
2336
|
-
}
|
|
2337
|
-
/**
|
|
2338
|
-
* Prepare a topic message submission transaction
|
|
2339
|
-
*/
|
|
2340
|
-
async prepareTopicMessage(request) {
|
|
2341
|
-
return this.http.post("/topic/message/prepare", request);
|
|
2342
|
-
}
|
|
2343
|
-
/**
|
|
2344
|
-
* Prepare a trust line transaction (e.g. XRPL trust lines)
|
|
2345
|
-
*/
|
|
2346
|
-
async prepareTrustLine(request) {
|
|
2347
|
-
return this.http.post("/trustline/prepare", request);
|
|
2348
|
-
}
|
|
2349
2367
|
};
|
|
2350
2368
|
|
|
2351
2369
|
// src/snapshots/index.ts
|
|
@@ -2682,8 +2700,16 @@ var SmartEngineClient = class _SmartEngineClient {
|
|
|
2682
2700
|
tss;
|
|
2683
2701
|
/** IPFS decentralized file storage */
|
|
2684
2702
|
ipfs;
|
|
2685
|
-
/** Transaction preparation for local signing (sovereignty model) */
|
|
2703
|
+
/** Transaction preparation for local signing (sovereignty model) — chain-agnostic */
|
|
2686
2704
|
transactions;
|
|
2705
|
+
/** Hedera-specific transaction preparation (HCS topics, KYC, wipe) */
|
|
2706
|
+
hedera;
|
|
2707
|
+
/** XRPL-specific transaction preparation (trust lines) */
|
|
2708
|
+
xrpl;
|
|
2709
|
+
/** Solana-specific transaction preparation (close-account) */
|
|
2710
|
+
solana;
|
|
2711
|
+
/** Polkadot-specific transaction preparation (asset setTeam/setMetadata) */
|
|
2712
|
+
polkadot;
|
|
2687
2713
|
/** Token holder snapshot generation and retrieval */
|
|
2688
2714
|
snapshots;
|
|
2689
2715
|
/** Historical balance archive reads (chain-native bigint, returned as decimal string) */
|
|
@@ -2713,6 +2739,10 @@ var SmartEngineClient = class _SmartEngineClient {
|
|
|
2713
2739
|
this.tss = new TSSClient(this.http);
|
|
2714
2740
|
this.ipfs = new IPFSClient(this.http);
|
|
2715
2741
|
this.transactions = new TransactionsClient(this.txHttp);
|
|
2742
|
+
this.hedera = new HederaTransactionsClient(this.txHttp);
|
|
2743
|
+
this.xrpl = new XrplTransactionsClient(this.txHttp);
|
|
2744
|
+
this.solana = new SolanaTransactionsClient(this.txHttp);
|
|
2745
|
+
this.polkadot = new PolkadotTransactionsClient(this.txHttp);
|
|
2716
2746
|
this.snapshots = new SnapshotsClient(this.http);
|
|
2717
2747
|
this.historicalBalance = HistoricalBalanceClient.fromHttp(this.http);
|
|
2718
2748
|
this.settlement = new SettlementClient(this.http);
|
|
@@ -4629,6 +4659,7 @@ exports.DomainsClient = DomainsClient;
|
|
|
4629
4659
|
exports.ErrorCode = ErrorCode;
|
|
4630
4660
|
exports.FunctionsClient = FunctionsClient;
|
|
4631
4661
|
exports.GovernanceClient = GovernanceClient;
|
|
4662
|
+
exports.HederaTransactionsClient = HederaTransactionsClient;
|
|
4632
4663
|
exports.HistoricalBalanceClient = HistoricalBalanceClient;
|
|
4633
4664
|
exports.HistoricalBalanceClientError = HistoricalBalanceClientError;
|
|
4634
4665
|
exports.IPFSClient = IPFSClient;
|
|
@@ -4638,6 +4669,7 @@ exports.MirrorNodeClient = MirrorNodeClient;
|
|
|
4638
4669
|
exports.MirrorNodeError = MirrorNodeError;
|
|
4639
4670
|
exports.PERSONHOOD_VERIFIER_NOT_CONFIGURED = PERSONHOOD_VERIFIER_NOT_CONFIGURED;
|
|
4640
4671
|
exports.PersonhoodClient = PersonhoodClient;
|
|
4672
|
+
exports.PolkadotTransactionsClient = PolkadotTransactionsClient;
|
|
4641
4673
|
exports.RateLimiter = RateLimiter;
|
|
4642
4674
|
exports.RoutingClient = RoutingClient;
|
|
4643
4675
|
exports.SdkHttpError = SdkHttpError;
|
|
@@ -4646,6 +4678,7 @@ exports.SmartEngineClient = SmartEngineClient;
|
|
|
4646
4678
|
exports.SmartEngineError = SmartEngineError;
|
|
4647
4679
|
exports.SmartGatewayClient = SmartGatewayClient;
|
|
4648
4680
|
exports.SnapshotsClient = SnapshotsClient;
|
|
4681
|
+
exports.SolanaTransactionsClient = SolanaTransactionsClient;
|
|
4649
4682
|
exports.StorageClient = StorageClient;
|
|
4650
4683
|
exports.SubscriptionClient = SubscriptionClient;
|
|
4651
4684
|
exports.TSSClient = TSSClient;
|
|
@@ -4654,6 +4687,7 @@ exports.UnsupportedCapabilityError = UnsupportedCapabilityError;
|
|
|
4654
4687
|
exports.ValidatorAuthClient = ValidatorAuthClient;
|
|
4655
4688
|
exports.ValidatorAuthError = ValidatorAuthError;
|
|
4656
4689
|
exports.ValidatorDiscoveryClient = ValidatorDiscoveryClient;
|
|
4690
|
+
exports.XrplTransactionsClient = XrplTransactionsClient;
|
|
4657
4691
|
exports.auth = auth_exports;
|
|
4658
4692
|
exports.baas = baas_exports;
|
|
4659
4693
|
exports.chains = chains_exports;
|