@hsuite/smart-engines-sdk 3.0.3 → 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 +437 -67
- package/dist/index.js +602 -68
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.ts +382 -66
- package/dist/nestjs/index.js +555 -68
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +1 -1
package/dist/nestjs/index.d.ts
CHANGED
|
@@ -683,6 +683,19 @@ export interface ValidatorInfo {
|
|
|
683
683
|
registeredAt: string;
|
|
684
684
|
messageType?: "validator.join" | "validator.leave" | "validator.update";
|
|
685
685
|
}
|
|
686
|
+
export interface ClusterEndpointsView {
|
|
687
|
+
clusterId: string;
|
|
688
|
+
gatewayUrl: string;
|
|
689
|
+
harborUrl?: string;
|
|
690
|
+
natsUrl?: string;
|
|
691
|
+
publicIp?: string;
|
|
692
|
+
region?: string;
|
|
693
|
+
}
|
|
694
|
+
export interface ClusterInfo {
|
|
695
|
+
clusterId: string;
|
|
696
|
+
endpoints: ClusterEndpointsView;
|
|
697
|
+
nodeIds: string[];
|
|
698
|
+
}
|
|
686
699
|
export type AuthChain = "hedera" | "xrpl" | "polkadot" | "stellar" | "solana";
|
|
687
700
|
export interface AuthenticateResponse {
|
|
688
701
|
token: string;
|
|
@@ -1002,6 +1015,7 @@ declare class IPFSClient {
|
|
|
1002
1015
|
getStatus(): Promise<IpfsStatusResponse>;
|
|
1003
1016
|
getStorageUsage(): Promise<IpfsStorageUsageResponse>;
|
|
1004
1017
|
}
|
|
1018
|
+
export type SecurityMode = "none" | "partial" | "full";
|
|
1005
1019
|
export type PreparedTransaction = {
|
|
1006
1020
|
success?: boolean;
|
|
1007
1021
|
transactionBytes: string;
|
|
@@ -1017,135 +1031,267 @@ export type PreparedTransaction = {
|
|
|
1017
1031
|
};
|
|
1018
1032
|
export type PrepareTransferRequest = {
|
|
1019
1033
|
chain: ChainType;
|
|
1020
|
-
payerAccountId
|
|
1034
|
+
payerAccountId?: string;
|
|
1021
1035
|
from: string;
|
|
1022
1036
|
to: string;
|
|
1023
1037
|
amount: string;
|
|
1024
1038
|
tokenId?: string;
|
|
1025
1039
|
entityId?: string;
|
|
1026
1040
|
memo?: string;
|
|
1041
|
+
securityMode?: SecurityMode;
|
|
1042
|
+
appOwnerPublicKey?: string;
|
|
1043
|
+
ss58Format?: number;
|
|
1027
1044
|
};
|
|
1028
1045
|
export type PrepareNftMintRequest = {
|
|
1029
1046
|
chain: ChainType;
|
|
1030
|
-
payerAccountId
|
|
1031
|
-
tokenId
|
|
1032
|
-
metadata
|
|
1047
|
+
payerAccountId?: string;
|
|
1048
|
+
tokenId?: string;
|
|
1049
|
+
metadata?: string | string[];
|
|
1033
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;
|
|
1034
1065
|
};
|
|
1035
1066
|
export type PrepareNftBurnRequest = {
|
|
1036
1067
|
chain: ChainType;
|
|
1037
|
-
payerAccountId
|
|
1038
|
-
tokenId
|
|
1039
|
-
serialNumber
|
|
1068
|
+
payerAccountId?: string;
|
|
1069
|
+
tokenId?: string;
|
|
1070
|
+
serialNumber?: number;
|
|
1040
1071
|
entityId?: string;
|
|
1072
|
+
securityMode?: SecurityMode;
|
|
1073
|
+
appOwnerPublicKey?: string;
|
|
1074
|
+
ss58Format?: number;
|
|
1075
|
+
collection?: number;
|
|
1076
|
+
item?: number;
|
|
1077
|
+
mint?: string;
|
|
1078
|
+
owner?: string;
|
|
1041
1079
|
};
|
|
1042
1080
|
export type PrepareNftTransferRequest = {
|
|
1043
1081
|
chain: ChainType;
|
|
1044
|
-
payerAccountId
|
|
1045
|
-
tokenId
|
|
1046
|
-
serialNumber
|
|
1047
|
-
fromAccountId
|
|
1048
|
-
toAccountId
|
|
1082
|
+
payerAccountId?: string;
|
|
1083
|
+
tokenId?: string;
|
|
1084
|
+
serialNumber?: number;
|
|
1085
|
+
fromAccountId?: string;
|
|
1086
|
+
toAccountId?: string;
|
|
1049
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;
|
|
1050
1097
|
};
|
|
1051
1098
|
export type PrepareTokenCreateRequest = {
|
|
1052
|
-
chain:
|
|
1053
|
-
payerAccountId
|
|
1054
|
-
name
|
|
1055
|
-
symbol
|
|
1056
|
-
decimals
|
|
1057
|
-
initialSupply
|
|
1058
|
-
treasuryAccountId
|
|
1059
|
-
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;
|
|
1060
1107
|
memo?: string;
|
|
1061
1108
|
tokenType?: "FUNGIBLE_COMMON" | "NON_FUNGIBLE_UNIQUE";
|
|
1109
|
+
securityMode?: SecurityMode;
|
|
1110
|
+
appOwnerPublicKey?: string;
|
|
1062
1111
|
supplyKey?: string;
|
|
1063
1112
|
adminKey?: string;
|
|
1064
1113
|
pauseKey?: string;
|
|
1065
1114
|
freezeKey?: string;
|
|
1066
1115
|
kycKey?: string;
|
|
1067
1116
|
wipeKey?: string;
|
|
1117
|
+
mintAuthority?: string;
|
|
1118
|
+
assetId?: number;
|
|
1119
|
+
admin?: string;
|
|
1120
|
+
minBalance?: string;
|
|
1121
|
+
assetName?: string;
|
|
1122
|
+
noneOwnerVkeyHex?: string;
|
|
1123
|
+
initialRecipient?: string;
|
|
1068
1124
|
};
|
|
1069
1125
|
export type PrepareTokenMintRequest = {
|
|
1070
1126
|
chain: ChainType;
|
|
1071
|
-
payerAccountId
|
|
1072
|
-
tokenId
|
|
1127
|
+
payerAccountId?: string;
|
|
1128
|
+
tokenId?: string;
|
|
1073
1129
|
amount: string;
|
|
1074
1130
|
recipientAccountId?: string;
|
|
1075
1131
|
entityId?: string;
|
|
1132
|
+
securityMode?: SecurityMode;
|
|
1133
|
+
appOwnerPublicKey?: string;
|
|
1134
|
+
assetId?: number;
|
|
1135
|
+
beneficiary?: string;
|
|
1136
|
+
appOwnerVkeyHex?: string;
|
|
1137
|
+
noneOwnerVkeyHex?: string;
|
|
1138
|
+
destination?: string;
|
|
1076
1139
|
};
|
|
1077
1140
|
export type PrepareTokenBurnRequest = {
|
|
1078
|
-
chain:
|
|
1079
|
-
payerAccountId
|
|
1080
|
-
tokenId
|
|
1141
|
+
chain: ChainType;
|
|
1142
|
+
payerAccountId?: string;
|
|
1143
|
+
tokenId?: string;
|
|
1081
1144
|
amount: string;
|
|
1082
|
-
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;
|
|
1083
1153
|
};
|
|
1084
|
-
export type
|
|
1085
|
-
chain:
|
|
1086
|
-
payerAccountId
|
|
1154
|
+
export type PrepareTokenAssociateRequest = {
|
|
1155
|
+
chain: ChainType;
|
|
1156
|
+
payerAccountId?: string;
|
|
1087
1157
|
accountId: string;
|
|
1088
1158
|
tokenIds: string[];
|
|
1089
|
-
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>;
|
|
1090
1198
|
};
|
|
1091
1199
|
export type PrepareTopicCreateRequest = {
|
|
1092
|
-
|
|
1093
|
-
payerAccountId: string;
|
|
1200
|
+
payerAccountId?: string;
|
|
1094
1201
|
memo?: string;
|
|
1095
1202
|
adminKeyRequired?: boolean;
|
|
1096
1203
|
submitKeyRequired?: boolean;
|
|
1097
1204
|
entityId: string;
|
|
1098
1205
|
};
|
|
1099
1206
|
export type PrepareTopicMessageRequest = {
|
|
1100
|
-
|
|
1101
|
-
payerAccountId: string;
|
|
1207
|
+
payerAccountId?: string;
|
|
1102
1208
|
topicId: string;
|
|
1103
1209
|
message: string | Record<string, unknown>;
|
|
1104
1210
|
entityId: string;
|
|
1105
1211
|
};
|
|
1106
|
-
export type
|
|
1107
|
-
|
|
1108
|
-
payerAccountId: string;
|
|
1109
|
-
tokenId: string;
|
|
1110
|
-
entityId: string;
|
|
1111
|
-
memo?: string;
|
|
1112
|
-
};
|
|
1113
|
-
export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
|
|
1114
|
-
export type PrepareTokenRestrictRequest = {
|
|
1115
|
-
chain: "hedera";
|
|
1116
|
-
payerAccountId: string;
|
|
1212
|
+
export type PrepareTokenComplianceEnableRequest = {
|
|
1213
|
+
payerAccountId?: string;
|
|
1117
1214
|
tokenId: string;
|
|
1118
1215
|
accountId: string;
|
|
1119
1216
|
entityId: string;
|
|
1217
|
+
securityMode?: SecurityMode;
|
|
1218
|
+
appOwnerPublicKey?: string;
|
|
1120
1219
|
memo?: string;
|
|
1121
1220
|
};
|
|
1122
|
-
export type
|
|
1123
|
-
export type PrepareTokenComplianceEnableRequest = PrepareTokenRestrictRequest;
|
|
1124
|
-
export type PrepareTokenComplianceDisableRequest = PrepareTokenRestrictRequest;
|
|
1221
|
+
export type PrepareTokenComplianceDisableRequest = PrepareTokenComplianceEnableRequest;
|
|
1125
1222
|
export type PrepareTokenWipeRequest = {
|
|
1126
|
-
|
|
1127
|
-
payerAccountId: string;
|
|
1223
|
+
payerAccountId?: string;
|
|
1128
1224
|
tokenId: string;
|
|
1129
1225
|
accountId: string;
|
|
1130
1226
|
amount: string;
|
|
1131
1227
|
entityId: string;
|
|
1132
1228
|
memo?: string;
|
|
1133
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
|
+
}
|
|
1134
1239
|
export type PrepareTrustLineRequest = {
|
|
1135
|
-
|
|
1136
|
-
|
|
1240
|
+
accountAddress?: string;
|
|
1241
|
+
payerAccountId?: string;
|
|
1137
1242
|
currency: string;
|
|
1138
1243
|
issuerAddress: string;
|
|
1139
1244
|
limit?: string;
|
|
1140
1245
|
entityId: string;
|
|
1141
1246
|
};
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
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;
|
|
1148
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
|
+
}
|
|
1149
1295
|
declare class TransactionsClient {
|
|
1150
1296
|
private readonly http;
|
|
1151
1297
|
constructor(http: HttpClient);
|
|
@@ -1157,17 +1303,11 @@ declare class TransactionsClient {
|
|
|
1157
1303
|
prepareTokenCreate(request: PrepareTokenCreateRequest): Promise<PreparedTransaction>;
|
|
1158
1304
|
prepareTokenMint(request: PrepareTokenMintRequest): Promise<PreparedTransaction>;
|
|
1159
1305
|
prepareTokenBurn(request: PrepareTokenBurnRequest): Promise<PreparedTransaction>;
|
|
1160
|
-
|
|
1306
|
+
prepareTokenAssociate(request: PrepareTokenAssociateRequest): Promise<PreparedTransaction>;
|
|
1161
1307
|
prepareTokenPause(request: PrepareTokenPauseRequest): Promise<PreparedTransaction>;
|
|
1162
1308
|
prepareTokenUnpause(request: PrepareTokenUnpauseRequest): Promise<PreparedTransaction>;
|
|
1163
1309
|
prepareTokenRestrict(request: PrepareTokenRestrictRequest): Promise<PreparedTransaction>;
|
|
1164
1310
|
prepareTokenUnrestrict(request: PrepareTokenUnrestrictRequest): Promise<PreparedTransaction>;
|
|
1165
|
-
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
1166
|
-
prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
|
|
1167
|
-
prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
|
|
1168
|
-
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
1169
|
-
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
1170
|
-
prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
|
|
1171
1311
|
}
|
|
1172
1312
|
export type SnapshotStatus = "pending" | "generating" | "completed" | "failed";
|
|
1173
1313
|
export type SnapshotFormat = "json" | "csv";
|
|
@@ -1211,6 +1351,43 @@ declare class SnapshotsClient {
|
|
|
1211
1351
|
listByToken(tokenId: string, pagination?: PaginationOptions): Promise<SnapshotListResponse>;
|
|
1212
1352
|
download(snapshotId: string, format?: SnapshotFormat): Promise<any>;
|
|
1213
1353
|
}
|
|
1354
|
+
export type HistoricalBalanceChain = "hedera" | "xrpl" | "polkadot";
|
|
1355
|
+
export type HistoricalBalanceQueryParams = {
|
|
1356
|
+
chain: HistoricalBalanceChain;
|
|
1357
|
+
entityId: string;
|
|
1358
|
+
account: string;
|
|
1359
|
+
atTimestamp: number;
|
|
1360
|
+
};
|
|
1361
|
+
export type HistoricalBalanceResult = {
|
|
1362
|
+
chain: HistoricalBalanceChain;
|
|
1363
|
+
entityId: string;
|
|
1364
|
+
account: string;
|
|
1365
|
+
atTimestamp: number;
|
|
1366
|
+
balance: string;
|
|
1367
|
+
source: "archive";
|
|
1368
|
+
};
|
|
1369
|
+
export type HistoricalBalanceClientConfig = {
|
|
1370
|
+
baseUrl: string;
|
|
1371
|
+
authToken?: string;
|
|
1372
|
+
apiKey?: string;
|
|
1373
|
+
timeoutMs?: number;
|
|
1374
|
+
fetchImpl?: typeof fetch;
|
|
1375
|
+
};
|
|
1376
|
+
declare class HistoricalBalanceClient {
|
|
1377
|
+
private readonly baseUrl?;
|
|
1378
|
+
private readonly authToken?;
|
|
1379
|
+
private readonly apiKey?;
|
|
1380
|
+
private readonly timeoutMs;
|
|
1381
|
+
private readonly fetchImpl?;
|
|
1382
|
+
private readonly http?;
|
|
1383
|
+
constructor(config: HistoricalBalanceClientConfig | {
|
|
1384
|
+
http: HttpClient;
|
|
1385
|
+
});
|
|
1386
|
+
static fromHttp(http: HttpClient): HistoricalBalanceClient;
|
|
1387
|
+
getBalance(params: HistoricalBalanceQueryParams): Promise<HistoricalBalanceResult>;
|
|
1388
|
+
private validateParams;
|
|
1389
|
+
private standaloneFetch;
|
|
1390
|
+
}
|
|
1214
1391
|
export type SettlementPurpose = "subscription" | "deposit" | "fee";
|
|
1215
1392
|
export type SettlementAsset = {
|
|
1216
1393
|
symbol: string;
|
|
@@ -1252,6 +1429,115 @@ declare class SettlementClient {
|
|
|
1252
1429
|
confirmXrpLanded(settlementId: string): Promise<SettlementStatusResponse>;
|
|
1253
1430
|
getHistory(entityId: string): Promise<SettlementHistoryEntry[]>;
|
|
1254
1431
|
}
|
|
1432
|
+
export type GovernanceVotingPowerMethod = "token_balance" | "quadratic" | "one_person_one_vote" | "nft_based" | "time_weighted" | "delegated";
|
|
1433
|
+
export type GovernanceProposalStatus = "pending" | "active" | "passed" | "failed" | "executed" | "cancelled" | "expired" | "vetoed";
|
|
1434
|
+
export type GovernanceVoteType = "for" | "against" | "abstain";
|
|
1435
|
+
export interface GovernanceProposalData {
|
|
1436
|
+
proposalId: string;
|
|
1437
|
+
proposer: string;
|
|
1438
|
+
title: string;
|
|
1439
|
+
description: string;
|
|
1440
|
+
actions: unknown[];
|
|
1441
|
+
status: GovernanceProposalStatus;
|
|
1442
|
+
createdAt: string | Date;
|
|
1443
|
+
votingStartsAt: string | Date;
|
|
1444
|
+
votingEndsAt: string | Date;
|
|
1445
|
+
executionDeadline?: string | Date;
|
|
1446
|
+
votes: {
|
|
1447
|
+
for: string;
|
|
1448
|
+
against: string;
|
|
1449
|
+
abstain: string;
|
|
1450
|
+
totalVotingPower: string;
|
|
1451
|
+
};
|
|
1452
|
+
executionResult?: {
|
|
1453
|
+
success: boolean;
|
|
1454
|
+
transactionId?: string;
|
|
1455
|
+
error?: string;
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
export interface GovernanceConfig {
|
|
1459
|
+
governanceTokenId: string;
|
|
1460
|
+
decimals?: number;
|
|
1461
|
+
votingPowerMethod?: GovernanceVotingPowerMethod;
|
|
1462
|
+
quorumPercent?: number;
|
|
1463
|
+
approvalThresholdPercent?: number;
|
|
1464
|
+
proposalThreshold: string;
|
|
1465
|
+
votingPeriodMs: number;
|
|
1466
|
+
timeLockMs?: number;
|
|
1467
|
+
maxExecutionDelayMs?: number;
|
|
1468
|
+
votingEligibility?: Record<string, unknown>;
|
|
1469
|
+
proposalEligibility?: Record<string, unknown>;
|
|
1470
|
+
allowDelegation?: boolean;
|
|
1471
|
+
allowVoteChange?: boolean;
|
|
1472
|
+
vetoCouncil?: string[];
|
|
1473
|
+
maxActiveProposalsPerAccount?: number;
|
|
1474
|
+
proposalCooldownMs?: number;
|
|
1475
|
+
wisdomWeightFn?: {
|
|
1476
|
+
registryKey: string;
|
|
1477
|
+
};
|
|
1478
|
+
delegation?: {
|
|
1479
|
+
maxHops?: number;
|
|
1480
|
+
decayPerHop?: number;
|
|
1481
|
+
concentrationAlert?: number;
|
|
1482
|
+
};
|
|
1483
|
+
description?: string;
|
|
1484
|
+
}
|
|
1485
|
+
export interface GovernanceValidationContext {
|
|
1486
|
+
chain?: string;
|
|
1487
|
+
network?: "mainnet" | "testnet";
|
|
1488
|
+
callerAccountId: string;
|
|
1489
|
+
timestamp?: string | Date;
|
|
1490
|
+
action: "create_proposal" | "cast_vote" | "execute_proposal" | "cancel_proposal" | "veto" | "delegate";
|
|
1491
|
+
proposal?: GovernanceProposalData;
|
|
1492
|
+
voteType?: GovernanceVoteType;
|
|
1493
|
+
tokenBalance?: string;
|
|
1494
|
+
votingPower?: string;
|
|
1495
|
+
lastProposalAt?: string | Date;
|
|
1496
|
+
activeProposalCount?: number;
|
|
1497
|
+
delegation?: {
|
|
1498
|
+
delegateTo?: string;
|
|
1499
|
+
delegatedPower?: string;
|
|
1500
|
+
};
|
|
1501
|
+
daoId?: string;
|
|
1502
|
+
totalDaoVotingPower?: string;
|
|
1503
|
+
}
|
|
1504
|
+
export interface GovernanceValidationResult {
|
|
1505
|
+
isValid: boolean;
|
|
1506
|
+
reason?: string;
|
|
1507
|
+
metadata?: Record<string, unknown>;
|
|
1508
|
+
validatedAt?: string;
|
|
1509
|
+
}
|
|
1510
|
+
export interface GovernanceSimulateRequest {
|
|
1511
|
+
config: GovernanceConfig;
|
|
1512
|
+
context: GovernanceValidationContext;
|
|
1513
|
+
}
|
|
1514
|
+
declare class GovernanceClient {
|
|
1515
|
+
private readonly http;
|
|
1516
|
+
constructor(http: HttpClient);
|
|
1517
|
+
simulate(params: GovernanceSimulateRequest): Promise<GovernanceValidationResult>;
|
|
1518
|
+
}
|
|
1519
|
+
export type PersonhoodAttestationMethod = "web-of-trust" | "biometric" | "pop-protocol";
|
|
1520
|
+
export interface PersonhoodProof {
|
|
1521
|
+
attestationMethod: PersonhoodAttestationMethod;
|
|
1522
|
+
payload: unknown;
|
|
1523
|
+
}
|
|
1524
|
+
export interface PersonhoodCert {
|
|
1525
|
+
address: string;
|
|
1526
|
+
issuerId: string;
|
|
1527
|
+
attestationMethod: PersonhoodAttestationMethod;
|
|
1528
|
+
issuedAt: number;
|
|
1529
|
+
expiresAt: number;
|
|
1530
|
+
signature: string;
|
|
1531
|
+
}
|
|
1532
|
+
export interface PersonhoodVerifyParams {
|
|
1533
|
+
candidate: string;
|
|
1534
|
+
proof: PersonhoodProof;
|
|
1535
|
+
}
|
|
1536
|
+
declare class PersonhoodClient {
|
|
1537
|
+
private readonly http;
|
|
1538
|
+
constructor(http: HttpClient);
|
|
1539
|
+
verify(params: PersonhoodVerifyParams): Promise<PersonhoodCert | null>;
|
|
1540
|
+
}
|
|
1255
1541
|
export interface SmartEngineClientConfig {
|
|
1256
1542
|
baseUrl: string;
|
|
1257
1543
|
apiKey?: string;
|
|
@@ -1274,6 +1560,28 @@ export interface NetworkConnectionConfig {
|
|
|
1274
1560
|
mirrorNodeUrl?: string;
|
|
1275
1561
|
allowInsecure?: boolean;
|
|
1276
1562
|
}
|
|
1563
|
+
export interface ClusterConnectionConfig {
|
|
1564
|
+
bootstrap: string[];
|
|
1565
|
+
chain: AuthChain;
|
|
1566
|
+
address: string;
|
|
1567
|
+
publicKey: string;
|
|
1568
|
+
signFn: (challenge: string) => string | Promise<string>;
|
|
1569
|
+
metadata?: {
|
|
1570
|
+
appId?: string;
|
|
1571
|
+
appName?: string;
|
|
1572
|
+
};
|
|
1573
|
+
trustAnchor?: {
|
|
1574
|
+
network: "mainnet" | "testnet" | "previewnet";
|
|
1575
|
+
registryTopicId: string;
|
|
1576
|
+
mirrorNodeUrl?: string;
|
|
1577
|
+
};
|
|
1578
|
+
allowInsecure?: boolean;
|
|
1579
|
+
}
|
|
1580
|
+
export interface ClusterConnectionResult {
|
|
1581
|
+
client: SmartEngineClient;
|
|
1582
|
+
cluster: ClusterInfo;
|
|
1583
|
+
session: AuthenticateResponse;
|
|
1584
|
+
}
|
|
1277
1585
|
export interface NetworkConnectionResult {
|
|
1278
1586
|
client: SmartEngineClient;
|
|
1279
1587
|
validator: ValidatorInfo;
|
|
@@ -1289,10 +1597,18 @@ declare class SmartEngineClient {
|
|
|
1289
1597
|
readonly tss: TSSClient;
|
|
1290
1598
|
readonly ipfs: IPFSClient;
|
|
1291
1599
|
readonly transactions: TransactionsClient;
|
|
1600
|
+
readonly hedera: HederaTransactionsClient;
|
|
1601
|
+
readonly xrpl: XrplTransactionsClient;
|
|
1602
|
+
readonly solana: SolanaTransactionsClient;
|
|
1603
|
+
readonly polkadot: PolkadotTransactionsClient;
|
|
1292
1604
|
readonly snapshots: SnapshotsClient;
|
|
1605
|
+
readonly historicalBalance: HistoricalBalanceClient;
|
|
1293
1606
|
readonly settlement: SettlementClient;
|
|
1607
|
+
readonly governance: GovernanceClient;
|
|
1608
|
+
readonly personhood: PersonhoodClient;
|
|
1294
1609
|
constructor(config: SmartEngineClientConfig);
|
|
1295
1610
|
static connectToNetwork(config: NetworkConnectionConfig): Promise<NetworkConnectionResult>;
|
|
1611
|
+
static connectToCluster(config: ClusterConnectionConfig): Promise<ClusterConnectionResult>;
|
|
1296
1612
|
getBaseUrl(): string;
|
|
1297
1613
|
isAuthenticated(): boolean;
|
|
1298
1614
|
getHttpHealth(): {
|
|
@@ -1706,7 +2022,7 @@ declare class SmartGatewayClient {
|
|
|
1706
2022
|
getMetrics(refresh?: boolean): Promise<GatewayMetricsResponse>;
|
|
1707
2023
|
getMetricsSummary(): Promise<GatewayMetricsSummaryResponse>;
|
|
1708
2024
|
}
|
|
1709
|
-
export type BaasService = "auth" | "database" | "storage" | "functions" | "messaging"
|
|
2025
|
+
export type BaasService = "auth" | "database" | "storage" | "functions" | "messaging";
|
|
1710
2026
|
export type BaasSupportedChain = "hedera" | "xrpl" | "polkadot" | "solana";
|
|
1711
2027
|
export type BaasEndpoints = {
|
|
1712
2028
|
auth: string;
|