@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/nestjs/index.d.ts
CHANGED
|
@@ -1015,6 +1015,7 @@ declare class IPFSClient {
|
|
|
1015
1015
|
getStatus(): Promise<IpfsStatusResponse>;
|
|
1016
1016
|
getStorageUsage(): Promise<IpfsStorageUsageResponse>;
|
|
1017
1017
|
}
|
|
1018
|
+
export type SecurityMode = "none" | "partial" | "full";
|
|
1018
1019
|
export type PreparedTransaction = {
|
|
1019
1020
|
success?: boolean;
|
|
1020
1021
|
transactionBytes: string;
|
|
@@ -1030,135 +1031,267 @@ export type PreparedTransaction = {
|
|
|
1030
1031
|
};
|
|
1031
1032
|
export type PrepareTransferRequest = {
|
|
1032
1033
|
chain: ChainType;
|
|
1033
|
-
payerAccountId
|
|
1034
|
+
payerAccountId?: string;
|
|
1034
1035
|
from: string;
|
|
1035
1036
|
to: string;
|
|
1036
1037
|
amount: string;
|
|
1037
1038
|
tokenId?: string;
|
|
1038
1039
|
entityId?: string;
|
|
1039
1040
|
memo?: string;
|
|
1041
|
+
securityMode?: SecurityMode;
|
|
1042
|
+
appOwnerPublicKey?: string;
|
|
1043
|
+
ss58Format?: number;
|
|
1040
1044
|
};
|
|
1041
1045
|
export type PrepareNftMintRequest = {
|
|
1042
1046
|
chain: ChainType;
|
|
1043
|
-
payerAccountId
|
|
1044
|
-
tokenId
|
|
1045
|
-
metadata
|
|
1047
|
+
payerAccountId?: string;
|
|
1048
|
+
tokenId?: string;
|
|
1049
|
+
metadata?: string | string[];
|
|
1046
1050
|
entityId?: string;
|
|
1051
|
+
securityMode?: SecurityMode;
|
|
1052
|
+
appOwnerPublicKey?: string;
|
|
1053
|
+
ss58Format?: number;
|
|
1054
|
+
collection?: number;
|
|
1055
|
+
item?: number;
|
|
1056
|
+
mintTo?: string;
|
|
1057
|
+
witnessData?: unknown;
|
|
1058
|
+
recipient?: string;
|
|
1059
|
+
collectionMint?: string;
|
|
1060
|
+
name?: string;
|
|
1061
|
+
symbol?: string;
|
|
1062
|
+
uri?: string;
|
|
1063
|
+
sellerFeeBasisPoints?: number;
|
|
1064
|
+
mintAuthority?: string;
|
|
1047
1065
|
};
|
|
1048
1066
|
export type PrepareNftBurnRequest = {
|
|
1049
1067
|
chain: ChainType;
|
|
1050
|
-
payerAccountId
|
|
1051
|
-
tokenId
|
|
1052
|
-
serialNumber
|
|
1068
|
+
payerAccountId?: string;
|
|
1069
|
+
tokenId?: string;
|
|
1070
|
+
serialNumber?: number;
|
|
1053
1071
|
entityId?: string;
|
|
1072
|
+
securityMode?: SecurityMode;
|
|
1073
|
+
appOwnerPublicKey?: string;
|
|
1074
|
+
ss58Format?: number;
|
|
1075
|
+
collection?: number;
|
|
1076
|
+
item?: number;
|
|
1077
|
+
mint?: string;
|
|
1078
|
+
owner?: string;
|
|
1054
1079
|
};
|
|
1055
1080
|
export type PrepareNftTransferRequest = {
|
|
1056
1081
|
chain: ChainType;
|
|
1057
|
-
payerAccountId
|
|
1058
|
-
tokenId
|
|
1059
|
-
serialNumber
|
|
1060
|
-
fromAccountId
|
|
1061
|
-
toAccountId
|
|
1082
|
+
payerAccountId?: string;
|
|
1083
|
+
tokenId?: string;
|
|
1084
|
+
serialNumber?: number;
|
|
1085
|
+
fromAccountId?: string;
|
|
1086
|
+
toAccountId?: string;
|
|
1062
1087
|
entityId?: string;
|
|
1088
|
+
securityMode?: SecurityMode;
|
|
1089
|
+
appOwnerPublicKey?: string;
|
|
1090
|
+
ss58Format?: number;
|
|
1091
|
+
collection?: number;
|
|
1092
|
+
item?: number;
|
|
1093
|
+
dest?: string;
|
|
1094
|
+
mint?: string;
|
|
1095
|
+
fromOwner?: string;
|
|
1096
|
+
toOwner?: string;
|
|
1063
1097
|
};
|
|
1064
1098
|
export type PrepareTokenCreateRequest = {
|
|
1065
|
-
chain:
|
|
1066
|
-
payerAccountId
|
|
1067
|
-
name
|
|
1068
|
-
symbol
|
|
1069
|
-
decimals
|
|
1070
|
-
initialSupply
|
|
1071
|
-
treasuryAccountId
|
|
1072
|
-
entityId
|
|
1099
|
+
chain: ChainType;
|
|
1100
|
+
payerAccountId?: string;
|
|
1101
|
+
name?: string;
|
|
1102
|
+
symbol?: string;
|
|
1103
|
+
decimals?: number;
|
|
1104
|
+
initialSupply?: string;
|
|
1105
|
+
treasuryAccountId?: string;
|
|
1106
|
+
entityId?: string;
|
|
1073
1107
|
memo?: string;
|
|
1074
1108
|
tokenType?: "FUNGIBLE_COMMON" | "NON_FUNGIBLE_UNIQUE";
|
|
1109
|
+
securityMode?: SecurityMode;
|
|
1110
|
+
appOwnerPublicKey?: string;
|
|
1075
1111
|
supplyKey?: string;
|
|
1076
1112
|
adminKey?: string;
|
|
1077
1113
|
pauseKey?: string;
|
|
1078
1114
|
freezeKey?: string;
|
|
1079
1115
|
kycKey?: string;
|
|
1080
1116
|
wipeKey?: string;
|
|
1117
|
+
mintAuthority?: string;
|
|
1118
|
+
assetId?: number;
|
|
1119
|
+
admin?: string;
|
|
1120
|
+
minBalance?: string;
|
|
1121
|
+
assetName?: string;
|
|
1122
|
+
noneOwnerVkeyHex?: string;
|
|
1123
|
+
initialRecipient?: string;
|
|
1081
1124
|
};
|
|
1082
1125
|
export type PrepareTokenMintRequest = {
|
|
1083
1126
|
chain: ChainType;
|
|
1084
|
-
payerAccountId
|
|
1085
|
-
tokenId
|
|
1127
|
+
payerAccountId?: string;
|
|
1128
|
+
tokenId?: string;
|
|
1086
1129
|
amount: string;
|
|
1087
1130
|
recipientAccountId?: string;
|
|
1088
1131
|
entityId?: string;
|
|
1132
|
+
securityMode?: SecurityMode;
|
|
1133
|
+
appOwnerPublicKey?: string;
|
|
1134
|
+
assetId?: number;
|
|
1135
|
+
beneficiary?: string;
|
|
1136
|
+
appOwnerVkeyHex?: string;
|
|
1137
|
+
noneOwnerVkeyHex?: string;
|
|
1138
|
+
destination?: string;
|
|
1089
1139
|
};
|
|
1090
1140
|
export type PrepareTokenBurnRequest = {
|
|
1091
|
-
chain:
|
|
1092
|
-
payerAccountId
|
|
1093
|
-
tokenId
|
|
1141
|
+
chain: ChainType;
|
|
1142
|
+
payerAccountId?: string;
|
|
1143
|
+
tokenId?: string;
|
|
1094
1144
|
amount: string;
|
|
1095
|
-
entityId
|
|
1145
|
+
entityId?: string;
|
|
1146
|
+
securityMode?: SecurityMode;
|
|
1147
|
+
appOwnerPublicKey?: string;
|
|
1148
|
+
assetId?: number;
|
|
1149
|
+
who?: string;
|
|
1150
|
+
appOwnerVkeyHex?: string;
|
|
1151
|
+
noneOwnerVkeyHex?: string;
|
|
1152
|
+
source?: string;
|
|
1096
1153
|
};
|
|
1097
|
-
export type
|
|
1098
|
-
chain:
|
|
1099
|
-
payerAccountId
|
|
1154
|
+
export type PrepareTokenAssociateRequest = {
|
|
1155
|
+
chain: ChainType;
|
|
1156
|
+
payerAccountId?: string;
|
|
1100
1157
|
accountId: string;
|
|
1101
1158
|
tokenIds: string[];
|
|
1102
|
-
entityId
|
|
1159
|
+
entityId?: string;
|
|
1160
|
+
owner?: string;
|
|
1161
|
+
};
|
|
1162
|
+
export type PrepareTokenPauseRequest = {
|
|
1163
|
+
chain: ChainType;
|
|
1164
|
+
payerAccountId?: string;
|
|
1165
|
+
tokenId?: string;
|
|
1166
|
+
assetId?: number;
|
|
1167
|
+
entityId?: string;
|
|
1168
|
+
securityMode?: SecurityMode;
|
|
1169
|
+
appOwnerPublicKey?: string;
|
|
1170
|
+
ss58Format?: number;
|
|
1171
|
+
currentAuthority?: string;
|
|
1172
|
+
newMintAuthority?: string | null;
|
|
1173
|
+
memo?: string;
|
|
1174
|
+
};
|
|
1175
|
+
export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
|
|
1176
|
+
export type PrepareTokenRestrictRequest = {
|
|
1177
|
+
chain: ChainType;
|
|
1178
|
+
payerAccountId?: string;
|
|
1179
|
+
tokenId?: string;
|
|
1180
|
+
accountId?: string;
|
|
1181
|
+
entityId?: string;
|
|
1182
|
+
securityMode?: SecurityMode;
|
|
1183
|
+
appOwnerPublicKey?: string;
|
|
1184
|
+
ss58Format?: number;
|
|
1185
|
+
assetId?: number;
|
|
1186
|
+
who?: string;
|
|
1187
|
+
account?: string;
|
|
1188
|
+
freezeAuthority?: string;
|
|
1189
|
+
memo?: string;
|
|
1190
|
+
};
|
|
1191
|
+
export type PrepareTokenUnrestrictRequest = PrepareTokenRestrictRequest;
|
|
1192
|
+
export type TransactionInfoResponse = {
|
|
1193
|
+
model?: string;
|
|
1194
|
+
description?: string;
|
|
1195
|
+
principles?: string[];
|
|
1196
|
+
supportedChains: string[];
|
|
1197
|
+
responseFormat?: Record<string, string>;
|
|
1103
1198
|
};
|
|
1104
1199
|
export type PrepareTopicCreateRequest = {
|
|
1105
|
-
|
|
1106
|
-
payerAccountId: string;
|
|
1200
|
+
payerAccountId?: string;
|
|
1107
1201
|
memo?: string;
|
|
1108
1202
|
adminKeyRequired?: boolean;
|
|
1109
1203
|
submitKeyRequired?: boolean;
|
|
1110
1204
|
entityId: string;
|
|
1111
1205
|
};
|
|
1112
1206
|
export type PrepareTopicMessageRequest = {
|
|
1113
|
-
|
|
1114
|
-
payerAccountId: string;
|
|
1207
|
+
payerAccountId?: string;
|
|
1115
1208
|
topicId: string;
|
|
1116
1209
|
message: string | Record<string, unknown>;
|
|
1117
1210
|
entityId: string;
|
|
1118
1211
|
};
|
|
1119
|
-
export type
|
|
1120
|
-
|
|
1121
|
-
payerAccountId: string;
|
|
1122
|
-
tokenId: string;
|
|
1123
|
-
entityId: string;
|
|
1124
|
-
memo?: string;
|
|
1125
|
-
};
|
|
1126
|
-
export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
|
|
1127
|
-
export type PrepareTokenRestrictRequest = {
|
|
1128
|
-
chain: "hedera";
|
|
1129
|
-
payerAccountId: string;
|
|
1212
|
+
export type PrepareTokenComplianceEnableRequest = {
|
|
1213
|
+
payerAccountId?: string;
|
|
1130
1214
|
tokenId: string;
|
|
1131
1215
|
accountId: string;
|
|
1132
1216
|
entityId: string;
|
|
1217
|
+
securityMode?: SecurityMode;
|
|
1218
|
+
appOwnerPublicKey?: string;
|
|
1133
1219
|
memo?: string;
|
|
1134
1220
|
};
|
|
1135
|
-
export type
|
|
1136
|
-
export type PrepareTokenComplianceEnableRequest = PrepareTokenRestrictRequest;
|
|
1137
|
-
export type PrepareTokenComplianceDisableRequest = PrepareTokenRestrictRequest;
|
|
1221
|
+
export type PrepareTokenComplianceDisableRequest = PrepareTokenComplianceEnableRequest;
|
|
1138
1222
|
export type PrepareTokenWipeRequest = {
|
|
1139
|
-
|
|
1140
|
-
payerAccountId: string;
|
|
1223
|
+
payerAccountId?: string;
|
|
1141
1224
|
tokenId: string;
|
|
1142
1225
|
accountId: string;
|
|
1143
1226
|
amount: string;
|
|
1144
1227
|
entityId: string;
|
|
1145
1228
|
memo?: string;
|
|
1146
1229
|
};
|
|
1230
|
+
declare class HederaTransactionsClient {
|
|
1231
|
+
private readonly http;
|
|
1232
|
+
constructor(http: HttpClient);
|
|
1233
|
+
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
1234
|
+
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
1235
|
+
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
1236
|
+
prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
|
|
1237
|
+
prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
|
|
1238
|
+
}
|
|
1147
1239
|
export type PrepareTrustLineRequest = {
|
|
1148
|
-
|
|
1149
|
-
|
|
1240
|
+
accountAddress?: string;
|
|
1241
|
+
payerAccountId?: string;
|
|
1150
1242
|
currency: string;
|
|
1151
1243
|
issuerAddress: string;
|
|
1152
1244
|
limit?: string;
|
|
1153
1245
|
entityId: string;
|
|
1154
1246
|
};
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1247
|
+
declare class XrplTransactionsClient {
|
|
1248
|
+
private readonly http;
|
|
1249
|
+
constructor(http: HttpClient);
|
|
1250
|
+
prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
|
|
1251
|
+
}
|
|
1252
|
+
export type PrepareTokenCloseAccountRequest = {
|
|
1253
|
+
payerAccountId?: string;
|
|
1254
|
+
account: string;
|
|
1255
|
+
destination: string;
|
|
1256
|
+
owner?: string;
|
|
1257
|
+
entityId?: string;
|
|
1258
|
+
securityMode?: SecurityMode;
|
|
1259
|
+
appOwnerPublicKey?: string;
|
|
1260
|
+
memo?: string;
|
|
1161
1261
|
};
|
|
1262
|
+
declare class SolanaTransactionsClient {
|
|
1263
|
+
private readonly http;
|
|
1264
|
+
constructor(http: HttpClient);
|
|
1265
|
+
prepareTokenCloseAccount(request: PrepareTokenCloseAccountRequest): Promise<PreparedTransaction>;
|
|
1266
|
+
}
|
|
1267
|
+
export type PrepareAssetSetTeamRequest = {
|
|
1268
|
+
payerAccountId?: string;
|
|
1269
|
+
assetId: number;
|
|
1270
|
+
issuer: string;
|
|
1271
|
+
admin: string;
|
|
1272
|
+
freezer: string;
|
|
1273
|
+
entityId?: string;
|
|
1274
|
+
securityMode?: SecurityMode;
|
|
1275
|
+
appOwnerPublicKey?: string;
|
|
1276
|
+
ss58Format?: number;
|
|
1277
|
+
};
|
|
1278
|
+
export type PrepareAssetSetMetadataRequest = {
|
|
1279
|
+
payerAccountId?: string;
|
|
1280
|
+
assetId: number;
|
|
1281
|
+
name: string;
|
|
1282
|
+
symbol: string;
|
|
1283
|
+
decimals: number;
|
|
1284
|
+
entityId?: string;
|
|
1285
|
+
securityMode?: SecurityMode;
|
|
1286
|
+
appOwnerPublicKey?: string;
|
|
1287
|
+
ss58Format?: number;
|
|
1288
|
+
};
|
|
1289
|
+
declare class PolkadotTransactionsClient {
|
|
1290
|
+
private readonly http;
|
|
1291
|
+
constructor(http: HttpClient);
|
|
1292
|
+
prepareAssetSetTeam(request: PrepareAssetSetTeamRequest): Promise<PreparedTransaction>;
|
|
1293
|
+
prepareAssetSetMetadata(request: PrepareAssetSetMetadataRequest): Promise<PreparedTransaction>;
|
|
1294
|
+
}
|
|
1162
1295
|
declare class TransactionsClient {
|
|
1163
1296
|
private readonly http;
|
|
1164
1297
|
constructor(http: HttpClient);
|
|
@@ -1170,17 +1303,11 @@ declare class TransactionsClient {
|
|
|
1170
1303
|
prepareTokenCreate(request: PrepareTokenCreateRequest): Promise<PreparedTransaction>;
|
|
1171
1304
|
prepareTokenMint(request: PrepareTokenMintRequest): Promise<PreparedTransaction>;
|
|
1172
1305
|
prepareTokenBurn(request: PrepareTokenBurnRequest): Promise<PreparedTransaction>;
|
|
1173
|
-
|
|
1306
|
+
prepareTokenAssociate(request: PrepareTokenAssociateRequest): Promise<PreparedTransaction>;
|
|
1174
1307
|
prepareTokenPause(request: PrepareTokenPauseRequest): Promise<PreparedTransaction>;
|
|
1175
1308
|
prepareTokenUnpause(request: PrepareTokenUnpauseRequest): Promise<PreparedTransaction>;
|
|
1176
1309
|
prepareTokenRestrict(request: PrepareTokenRestrictRequest): Promise<PreparedTransaction>;
|
|
1177
1310
|
prepareTokenUnrestrict(request: PrepareTokenUnrestrictRequest): Promise<PreparedTransaction>;
|
|
1178
|
-
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
1179
|
-
prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
|
|
1180
|
-
prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
|
|
1181
|
-
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
1182
|
-
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
1183
|
-
prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
|
|
1184
1311
|
}
|
|
1185
1312
|
export type SnapshotStatus = "pending" | "generating" | "completed" | "failed";
|
|
1186
1313
|
export type SnapshotFormat = "json" | "csv";
|
|
@@ -1470,6 +1597,10 @@ declare class SmartEngineClient {
|
|
|
1470
1597
|
readonly tss: TSSClient;
|
|
1471
1598
|
readonly ipfs: IPFSClient;
|
|
1472
1599
|
readonly transactions: TransactionsClient;
|
|
1600
|
+
readonly hedera: HederaTransactionsClient;
|
|
1601
|
+
readonly xrpl: XrplTransactionsClient;
|
|
1602
|
+
readonly solana: SolanaTransactionsClient;
|
|
1603
|
+
readonly polkadot: PolkadotTransactionsClient;
|
|
1473
1604
|
readonly snapshots: SnapshotsClient;
|
|
1474
1605
|
readonly historicalBalance: HistoricalBalanceClient;
|
|
1475
1606
|
readonly settlement: SettlementClient;
|
package/dist/nestjs/index.js
CHANGED
|
@@ -1841,80 +1841,134 @@ var IPFSClient = class {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
};
|
|
1843
1843
|
|
|
1844
|
+
// src/transactions/chains/hedera.ts
|
|
1845
|
+
var HederaTransactionsClient = class {
|
|
1846
|
+
constructor(http) {
|
|
1847
|
+
this.http = http;
|
|
1848
|
+
}
|
|
1849
|
+
http;
|
|
1850
|
+
/** Prepare an HCS topic creation transaction. */
|
|
1851
|
+
async prepareTopicCreate(request) {
|
|
1852
|
+
return this.http.post("/topic/create/prepare", { ...request, chain: "hedera" });
|
|
1853
|
+
}
|
|
1854
|
+
/** Prepare an HCS topic message submission. */
|
|
1855
|
+
async prepareTopicMessage(request) {
|
|
1856
|
+
return this.http.post("/topic/message/prepare", { ...request, chain: "hedera" });
|
|
1857
|
+
}
|
|
1858
|
+
/** Prepare a token compliance-enable (KYC grant) transaction. */
|
|
1859
|
+
async prepareTokenComplianceEnable(request) {
|
|
1860
|
+
return this.http.post("/token/compliance/enable/prepare", { ...request, chain: "hedera" });
|
|
1861
|
+
}
|
|
1862
|
+
/** Prepare a token compliance-disable (KYC revoke) transaction. */
|
|
1863
|
+
async prepareTokenComplianceDisable(request) {
|
|
1864
|
+
return this.http.post("/token/compliance/disable/prepare", { ...request, chain: "hedera" });
|
|
1865
|
+
}
|
|
1866
|
+
/** Prepare a token wipe transaction (force-remove tokens from an account). */
|
|
1867
|
+
async prepareTokenWipe(request) {
|
|
1868
|
+
return this.http.post("/token/wipe/prepare", { ...request, chain: "hedera" });
|
|
1869
|
+
}
|
|
1870
|
+
};
|
|
1871
|
+
|
|
1872
|
+
// src/transactions/chains/xrpl.ts
|
|
1873
|
+
var XrplTransactionsClient = class {
|
|
1874
|
+
constructor(http) {
|
|
1875
|
+
this.http = http;
|
|
1876
|
+
}
|
|
1877
|
+
http;
|
|
1878
|
+
/** Prepare an XRPL TrustSet (trust line) transaction. */
|
|
1879
|
+
async prepareTrustLine(request) {
|
|
1880
|
+
return this.http.post("/trustline/prepare", { ...request, chain: "xrpl" });
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
// src/transactions/chains/solana.ts
|
|
1885
|
+
var SolanaTransactionsClient = class {
|
|
1886
|
+
constructor(http) {
|
|
1887
|
+
this.http = http;
|
|
1888
|
+
}
|
|
1889
|
+
http;
|
|
1890
|
+
/** Prepare an SPL Token close-account transaction. */
|
|
1891
|
+
async prepareTokenCloseAccount(request) {
|
|
1892
|
+
return this.http.post("/token/close-account/prepare", { ...request, chain: "solana" });
|
|
1893
|
+
}
|
|
1894
|
+
};
|
|
1895
|
+
|
|
1896
|
+
// src/transactions/chains/polkadot.ts
|
|
1897
|
+
var PolkadotTransactionsClient = class {
|
|
1898
|
+
constructor(http) {
|
|
1899
|
+
this.http = http;
|
|
1900
|
+
}
|
|
1901
|
+
http;
|
|
1902
|
+
/** Prepare a pallet-assets.setTeam transaction. */
|
|
1903
|
+
async prepareAssetSetTeam(request) {
|
|
1904
|
+
return this.http.post("/token/set-team/prepare", { ...request, chain: "polkadot" });
|
|
1905
|
+
}
|
|
1906
|
+
/** Prepare a pallet-assets.setMetadata transaction. */
|
|
1907
|
+
async prepareAssetSetMetadata(request) {
|
|
1908
|
+
return this.http.post("/token/set-metadata/prepare", { ...request, chain: "polkadot" });
|
|
1909
|
+
}
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1844
1912
|
// src/transactions/index.ts
|
|
1845
1913
|
var TransactionsClient = class {
|
|
1846
1914
|
constructor(http) {
|
|
1847
1915
|
this.http = http;
|
|
1848
1916
|
}
|
|
1849
1917
|
http;
|
|
1850
|
-
/**
|
|
1851
|
-
* Get transaction preparation service info
|
|
1852
|
-
*/
|
|
1918
|
+
/** Get transaction preparation service info. */
|
|
1853
1919
|
async getInfo() {
|
|
1854
1920
|
return this.http.get("/info");
|
|
1855
1921
|
}
|
|
1856
|
-
/**
|
|
1857
|
-
* Prepare a transfer transaction for local signing
|
|
1858
|
-
*/
|
|
1922
|
+
/** Prepare a transfer transaction (any supported chain). */
|
|
1859
1923
|
async prepareTransfer(request) {
|
|
1860
1924
|
return this.http.post("/transfer/prepare", request);
|
|
1861
1925
|
}
|
|
1862
|
-
/**
|
|
1863
|
-
* Prepare an NFT mint transaction
|
|
1864
|
-
*/
|
|
1926
|
+
/** Prepare an NFT mint transaction (any supported chain). */
|
|
1865
1927
|
async prepareNftMint(request) {
|
|
1866
1928
|
return this.http.post("/nft/mint/prepare", request);
|
|
1867
1929
|
}
|
|
1868
|
-
/**
|
|
1869
|
-
* Prepare an NFT burn transaction
|
|
1870
|
-
*/
|
|
1930
|
+
/** Prepare an NFT burn transaction (any supported chain). */
|
|
1871
1931
|
async prepareNftBurn(request) {
|
|
1872
1932
|
return this.http.post("/nft/burn/prepare", request);
|
|
1873
1933
|
}
|
|
1874
|
-
/**
|
|
1875
|
-
* Prepare an NFT transfer transaction
|
|
1876
|
-
*/
|
|
1934
|
+
/** Prepare an NFT transfer transaction (any supported chain). */
|
|
1877
1935
|
async prepareNftTransfer(request) {
|
|
1878
1936
|
return this.http.post("/nft/transfer/prepare", request);
|
|
1879
1937
|
}
|
|
1880
|
-
/**
|
|
1881
|
-
* Prepare a token creation transaction
|
|
1882
|
-
*/
|
|
1938
|
+
/** Prepare a token creation transaction (Hedera, Solana, Polkadot, Cardano). */
|
|
1883
1939
|
async prepareTokenCreate(request) {
|
|
1884
1940
|
return this.http.post("/token/create/prepare", request);
|
|
1885
1941
|
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Prepare a token mint transaction
|
|
1888
|
-
*/
|
|
1942
|
+
/** Prepare a token mint transaction (any supported chain). */
|
|
1889
1943
|
async prepareTokenMint(request) {
|
|
1890
1944
|
return this.http.post("/token/mint/prepare", request);
|
|
1891
1945
|
}
|
|
1892
1946
|
/**
|
|
1893
|
-
* Prepare a fungible token burn transaction (Hedera
|
|
1894
|
-
*
|
|
1895
|
-
* For NFT burn use `prepareNftBurn` with a serialNumber.
|
|
1947
|
+
* Prepare a fungible token burn transaction (Hedera, Solana, Polkadot,
|
|
1948
|
+
* Cardano). For NFT burn use `prepareNftBurn` with a `serialNumber`.
|
|
1896
1949
|
*/
|
|
1897
1950
|
async prepareTokenBurn(request) {
|
|
1898
1951
|
return this.http.post("/token/burn/prepare", request);
|
|
1899
1952
|
}
|
|
1900
1953
|
/**
|
|
1901
|
-
* Prepare a token association transaction
|
|
1954
|
+
* Prepare a token association transaction (Hedera HTS associate / Solana
|
|
1955
|
+
* ATA create). On chains that don't need explicit association (XRPL uses
|
|
1956
|
+
* trustlines — see `client.xrpl.prepareTrustLine`), the server returns 400.
|
|
1902
1957
|
*/
|
|
1903
|
-
async
|
|
1958
|
+
async prepareTokenAssociate(request) {
|
|
1904
1959
|
return this.http.post("/token/associate/prepare", request);
|
|
1905
1960
|
}
|
|
1906
|
-
|
|
1907
|
-
/** Prepare a token pause transaction (capability: pausable). */
|
|
1961
|
+
/** Prepare a token pause transaction (Hedera, Polkadot, Solana). */
|
|
1908
1962
|
async prepareTokenPause(request) {
|
|
1909
1963
|
return this.http.post("/token/pause/prepare", request);
|
|
1910
1964
|
}
|
|
1911
|
-
/** Prepare a token unpause transaction (
|
|
1965
|
+
/** Prepare a token unpause transaction (Hedera, Polkadot, Solana). */
|
|
1912
1966
|
async prepareTokenUnpause(request) {
|
|
1913
1967
|
return this.http.post("/token/unpause/prepare", request);
|
|
1914
1968
|
}
|
|
1915
1969
|
/**
|
|
1916
|
-
* Prepare a token restrict (freeze account) transaction (
|
|
1917
|
-
*
|
|
1970
|
+
* Prepare a token restrict (freeze account) transaction (Hedera, Polkadot,
|
|
1971
|
+
* Solana). Freezes `accountId`/`who`/`account` from transacting the token.
|
|
1918
1972
|
*/
|
|
1919
1973
|
async prepareTokenRestrict(request) {
|
|
1920
1974
|
return this.http.post("/token/restrict/prepare", request);
|
|
@@ -1923,42 +1977,6 @@ var TransactionsClient = class {
|
|
|
1923
1977
|
async prepareTokenUnrestrict(request) {
|
|
1924
1978
|
return this.http.post("/token/unrestrict/prepare", request);
|
|
1925
1979
|
}
|
|
1926
|
-
/**
|
|
1927
|
-
* Prepare a token compliance-enable (grant KYC) transaction (capability:
|
|
1928
|
-
* compliant).
|
|
1929
|
-
*/
|
|
1930
|
-
async prepareTokenComplianceEnable(request) {
|
|
1931
|
-
return this.http.post("/token/compliance/enable/prepare", request);
|
|
1932
|
-
}
|
|
1933
|
-
/** Prepare a token compliance-disable (revoke KYC) transaction. */
|
|
1934
|
-
async prepareTokenComplianceDisable(request) {
|
|
1935
|
-
return this.http.post("/token/compliance/disable/prepare", request);
|
|
1936
|
-
}
|
|
1937
|
-
/**
|
|
1938
|
-
* Prepare a token wipe transaction (capability: wipeable). Force-removes
|
|
1939
|
-
* `amount` of `tokenId` from `accountId`.
|
|
1940
|
-
*/
|
|
1941
|
-
async prepareTokenWipe(request) {
|
|
1942
|
-
return this.http.post("/token/wipe/prepare", request);
|
|
1943
|
-
}
|
|
1944
|
-
/**
|
|
1945
|
-
* Prepare a topic creation transaction
|
|
1946
|
-
*/
|
|
1947
|
-
async prepareTopicCreate(request) {
|
|
1948
|
-
return this.http.post("/topic/create/prepare", request);
|
|
1949
|
-
}
|
|
1950
|
-
/**
|
|
1951
|
-
* Prepare a topic message submission transaction
|
|
1952
|
-
*/
|
|
1953
|
-
async prepareTopicMessage(request) {
|
|
1954
|
-
return this.http.post("/topic/message/prepare", request);
|
|
1955
|
-
}
|
|
1956
|
-
/**
|
|
1957
|
-
* Prepare a trust line transaction (e.g. XRPL trust lines)
|
|
1958
|
-
*/
|
|
1959
|
-
async prepareTrustLine(request) {
|
|
1960
|
-
return this.http.post("/trustline/prepare", request);
|
|
1961
|
-
}
|
|
1962
1980
|
};
|
|
1963
1981
|
|
|
1964
1982
|
// src/snapshots/index.ts
|
|
@@ -2269,8 +2287,16 @@ var SmartEngineClient = class _SmartEngineClient {
|
|
|
2269
2287
|
tss;
|
|
2270
2288
|
/** IPFS decentralized file storage */
|
|
2271
2289
|
ipfs;
|
|
2272
|
-
/** Transaction preparation for local signing (sovereignty model) */
|
|
2290
|
+
/** Transaction preparation for local signing (sovereignty model) — chain-agnostic */
|
|
2273
2291
|
transactions;
|
|
2292
|
+
/** Hedera-specific transaction preparation (HCS topics, KYC, wipe) */
|
|
2293
|
+
hedera;
|
|
2294
|
+
/** XRPL-specific transaction preparation (trust lines) */
|
|
2295
|
+
xrpl;
|
|
2296
|
+
/** Solana-specific transaction preparation (close-account) */
|
|
2297
|
+
solana;
|
|
2298
|
+
/** Polkadot-specific transaction preparation (asset setTeam/setMetadata) */
|
|
2299
|
+
polkadot;
|
|
2274
2300
|
/** Token holder snapshot generation and retrieval */
|
|
2275
2301
|
snapshots;
|
|
2276
2302
|
/** Historical balance archive reads (chain-native bigint, returned as decimal string) */
|
|
@@ -2300,6 +2326,10 @@ var SmartEngineClient = class _SmartEngineClient {
|
|
|
2300
2326
|
this.tss = new TSSClient(this.http);
|
|
2301
2327
|
this.ipfs = new IPFSClient(this.http);
|
|
2302
2328
|
this.transactions = new TransactionsClient(this.txHttp);
|
|
2329
|
+
this.hedera = new HederaTransactionsClient(this.txHttp);
|
|
2330
|
+
this.xrpl = new XrplTransactionsClient(this.txHttp);
|
|
2331
|
+
this.solana = new SolanaTransactionsClient(this.txHttp);
|
|
2332
|
+
this.polkadot = new PolkadotTransactionsClient(this.txHttp);
|
|
2303
2333
|
this.snapshots = new SnapshotsClient(this.http);
|
|
2304
2334
|
this.historicalBalance = HistoricalBalanceClient.fromHttp(this.http);
|
|
2305
2335
|
this.settlement = new SettlementClient(this.http);
|