@avalabs/glacier-sdk 3.1.0-canary.2dd288d.0 → 3.1.0-canary.3390d8f.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 +188 -110
- package/dist/index.js +1 -1
- package/esm/generated/models/Erc20TokenBalance.d.ts +11 -1
- package/esm/generated/models/Erc20TokenBalance.js +1 -1
- package/esm/generated/models/EvmBlock.d.ts +4 -0
- package/esm/generated/models/FullNativeTransactionDetails.d.ts +4 -0
- package/esm/generated/models/GetEvmBlockResponse.d.ts +4 -0
- package/esm/generated/models/NativeTransaction.d.ts +4 -0
- package/esm/generated/services/EvmChainsService.d.ts +47 -0
- package/esm/generated/services/EvmChainsService.js +1 -1
- package/esm/generated/services/EvmTransactionsService.d.ts +9 -1
- package/esm/generated/services/EvmTransactionsService.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -713,12 +713,22 @@ type Erc20TokenBalance = {
|
|
|
713
713
|
* The monetary value of the balance, if a price is available for the token.
|
|
714
714
|
*/
|
|
715
715
|
balanceValue?: Money;
|
|
716
|
-
|
|
716
|
+
/**
|
|
717
|
+
* Indicates the reputation of the token based on a security analysis. 'Benign' suggests the token is likely safe, while 'Malicious' indicates potential security risks. This field is nullable and is only populated for tokens on the C-Chain. Possible values are 'Benign', 'Malicious', or null if the reputation is unknown.
|
|
718
|
+
*/
|
|
719
|
+
tokenReputation: Erc20TokenBalance.tokenReputation | null;
|
|
717
720
|
};
|
|
718
721
|
declare namespace Erc20TokenBalance {
|
|
719
722
|
enum ercType {
|
|
720
723
|
ERC_20 = "ERC-20"
|
|
721
724
|
}
|
|
725
|
+
/**
|
|
726
|
+
* Indicates the reputation of the token based on a security analysis. 'Benign' suggests the token is likely safe, while 'Malicious' indicates potential security risks. This field is nullable and is only populated for tokens on the C-Chain. Possible values are 'Benign', 'Malicious', or null if the reputation is unknown.
|
|
727
|
+
*/
|
|
728
|
+
enum tokenReputation {
|
|
729
|
+
MALICIOUS = "Malicious",
|
|
730
|
+
BENIGN = "Benign"
|
|
731
|
+
}
|
|
722
732
|
}
|
|
723
733
|
|
|
724
734
|
type ListErc20BalancesResponse = {
|
|
@@ -915,6 +925,10 @@ declare class EvmBalancesService {
|
|
|
915
925
|
}
|
|
916
926
|
|
|
917
927
|
type GetEvmBlockResponse = {
|
|
928
|
+
/**
|
|
929
|
+
* The EVM chain ID on which the block was created.
|
|
930
|
+
*/
|
|
931
|
+
chainId: string;
|
|
918
932
|
/**
|
|
919
933
|
* The block number on the chain.
|
|
920
934
|
*/
|
|
@@ -959,6 +973,10 @@ type GetEvmBlockResponse = {
|
|
|
959
973
|
};
|
|
960
974
|
|
|
961
975
|
type EvmBlock = {
|
|
976
|
+
/**
|
|
977
|
+
* The EVM chain ID on which the block was created.
|
|
978
|
+
*/
|
|
979
|
+
chainId: string;
|
|
962
980
|
/**
|
|
963
981
|
* The block number on the chain.
|
|
964
982
|
*/
|
|
@@ -1144,6 +1162,113 @@ type ListChainsResponse = {
|
|
|
1144
1162
|
chains: Array<ChainInfo>;
|
|
1145
1163
|
};
|
|
1146
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
|
|
1167
|
+
*/
|
|
1168
|
+
declare enum TransactionMethodType {
|
|
1169
|
+
NATIVE_TRANSFER = "NATIVE_TRANSFER",
|
|
1170
|
+
CONTRACT_CALL = "CONTRACT_CALL",
|
|
1171
|
+
CONTRACT_CREATION = "CONTRACT_CREATION"
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
type Method = {
|
|
1175
|
+
callType: TransactionMethodType;
|
|
1176
|
+
/**
|
|
1177
|
+
* The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
|
|
1178
|
+
*/
|
|
1179
|
+
methodHash: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'.
|
|
1182
|
+
*/
|
|
1183
|
+
methodName?: string;
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
type RichAddress = {
|
|
1187
|
+
/**
|
|
1188
|
+
* The contract name.
|
|
1189
|
+
*/
|
|
1190
|
+
name?: string;
|
|
1191
|
+
/**
|
|
1192
|
+
* The contract symbol.
|
|
1193
|
+
*/
|
|
1194
|
+
symbol?: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
|
|
1197
|
+
*/
|
|
1198
|
+
decimals?: number;
|
|
1199
|
+
/**
|
|
1200
|
+
* The logo uri for the address.
|
|
1201
|
+
*/
|
|
1202
|
+
logoUri?: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* A wallet or contract address in mixed-case checksum encoding.
|
|
1205
|
+
*/
|
|
1206
|
+
address: string;
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
type NativeTransaction = {
|
|
1210
|
+
/**
|
|
1211
|
+
* The block number on the chain.
|
|
1212
|
+
*/
|
|
1213
|
+
blockNumber: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* The block finality timestamp.
|
|
1216
|
+
*/
|
|
1217
|
+
blockTimestamp: number;
|
|
1218
|
+
/**
|
|
1219
|
+
* The block hash identifier.
|
|
1220
|
+
*/
|
|
1221
|
+
blockHash: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* The EVM chain ID on which the transaction occured.
|
|
1224
|
+
*/
|
|
1225
|
+
chainId: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* The index at which the transaction occured in the block (0-indexed).
|
|
1228
|
+
*/
|
|
1229
|
+
blockIndex: number;
|
|
1230
|
+
/**
|
|
1231
|
+
* The transaction hash identifier.
|
|
1232
|
+
*/
|
|
1233
|
+
txHash: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* The transaction status, which is either 0 (failed) or 1 (successful).
|
|
1236
|
+
*/
|
|
1237
|
+
txStatus: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* The transaction type.
|
|
1240
|
+
*/
|
|
1241
|
+
txType: number;
|
|
1242
|
+
/**
|
|
1243
|
+
* The gas limit set for the transaction.
|
|
1244
|
+
*/
|
|
1245
|
+
gasLimit: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* The amount of gas used.
|
|
1248
|
+
*/
|
|
1249
|
+
gasUsed: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* The gas price denominated by the number of decimals of the native token.
|
|
1252
|
+
*/
|
|
1253
|
+
gasPrice: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* The nonce used by the sender of the transaction.
|
|
1256
|
+
*/
|
|
1257
|
+
nonce: string;
|
|
1258
|
+
from: RichAddress;
|
|
1259
|
+
to: RichAddress;
|
|
1260
|
+
method?: Method;
|
|
1261
|
+
value: string;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
type ListNativeTransactionsResponse = {
|
|
1265
|
+
/**
|
|
1266
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1267
|
+
*/
|
|
1268
|
+
nextPageToken?: string;
|
|
1269
|
+
transactions: Array<NativeTransaction>;
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1147
1272
|
declare enum Network {
|
|
1148
1273
|
MAINNET = "mainnet",
|
|
1149
1274
|
FUJI = "fuji",
|
|
@@ -1151,6 +1276,11 @@ declare enum Network {
|
|
|
1151
1276
|
DEVNET = "devnet"
|
|
1152
1277
|
}
|
|
1153
1278
|
|
|
1279
|
+
declare enum TransactionStatus {
|
|
1280
|
+
FAILED = "failed",
|
|
1281
|
+
SUCCESS = "success"
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1154
1284
|
declare class EvmChainsService {
|
|
1155
1285
|
readonly httpRequest: BaseHttpRequest;
|
|
1156
1286
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -1194,6 +1324,50 @@ declare class EvmChainsService {
|
|
|
1194
1324
|
*/
|
|
1195
1325
|
address: string;
|
|
1196
1326
|
}): CancelablePromise<ListAddressChainsResponse>;
|
|
1327
|
+
/**
|
|
1328
|
+
* List latest transactions for all supported EVM chains
|
|
1329
|
+
* Lists the latest transactions for all supported EVM chains. Filterable by status.
|
|
1330
|
+
* @returns ListNativeTransactionsResponse Successful response
|
|
1331
|
+
* @throws ApiError
|
|
1332
|
+
*/
|
|
1333
|
+
listAllLatestTransactions({ pageToken, pageSize, network, status, }: {
|
|
1334
|
+
/**
|
|
1335
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1336
|
+
*/
|
|
1337
|
+
pageToken?: string;
|
|
1338
|
+
/**
|
|
1339
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
1340
|
+
*/
|
|
1341
|
+
pageSize?: number;
|
|
1342
|
+
/**
|
|
1343
|
+
* Either mainnet or testnet/fuji.
|
|
1344
|
+
*/
|
|
1345
|
+
network?: Network;
|
|
1346
|
+
/**
|
|
1347
|
+
* A status filter for listed transactions.
|
|
1348
|
+
*/
|
|
1349
|
+
status?: TransactionStatus;
|
|
1350
|
+
}): CancelablePromise<ListNativeTransactionsResponse>;
|
|
1351
|
+
/**
|
|
1352
|
+
* List latest blocks for all supported EVM chains
|
|
1353
|
+
* Lists the latest blocks for all supported EVM chains. Filterable by network.
|
|
1354
|
+
* @returns ListEvmBlocksResponse Successful response
|
|
1355
|
+
* @throws ApiError
|
|
1356
|
+
*/
|
|
1357
|
+
listAllLatestBlocks({ pageToken, pageSize, network, }: {
|
|
1358
|
+
/**
|
|
1359
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
1360
|
+
*/
|
|
1361
|
+
pageToken?: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
1364
|
+
*/
|
|
1365
|
+
pageSize?: number;
|
|
1366
|
+
/**
|
|
1367
|
+
* Either mainnet or testnet/fuji.
|
|
1368
|
+
*/
|
|
1369
|
+
network?: Network;
|
|
1370
|
+
}): CancelablePromise<ListEvmBlocksResponse>;
|
|
1197
1371
|
}
|
|
1198
1372
|
|
|
1199
1373
|
type ImageAsset = {
|
|
@@ -1528,29 +1702,6 @@ declare namespace Erc1155Token {
|
|
|
1528
1702
|
}
|
|
1529
1703
|
}
|
|
1530
1704
|
|
|
1531
|
-
type RichAddress = {
|
|
1532
|
-
/**
|
|
1533
|
-
* The contract name.
|
|
1534
|
-
*/
|
|
1535
|
-
name?: string;
|
|
1536
|
-
/**
|
|
1537
|
-
* The contract symbol.
|
|
1538
|
-
*/
|
|
1539
|
-
symbol?: string;
|
|
1540
|
-
/**
|
|
1541
|
-
* The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
|
|
1542
|
-
*/
|
|
1543
|
-
decimals?: number;
|
|
1544
|
-
/**
|
|
1545
|
-
* The logo uri for the address.
|
|
1546
|
-
*/
|
|
1547
|
-
logoUri?: string;
|
|
1548
|
-
/**
|
|
1549
|
-
* A wallet or contract address in mixed-case checksum encoding.
|
|
1550
|
-
*/
|
|
1551
|
-
address: string;
|
|
1552
|
-
};
|
|
1553
|
-
|
|
1554
1705
|
type Erc1155TransferDetails = {
|
|
1555
1706
|
from: RichAddress;
|
|
1556
1707
|
to: RichAddress;
|
|
@@ -1635,27 +1786,6 @@ type Erc721TransferDetails = {
|
|
|
1635
1786
|
erc721Token: Erc721Token;
|
|
1636
1787
|
};
|
|
1637
1788
|
|
|
1638
|
-
/**
|
|
1639
|
-
* The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
|
|
1640
|
-
*/
|
|
1641
|
-
declare enum TransactionMethodType {
|
|
1642
|
-
NATIVE_TRANSFER = "NATIVE_TRANSFER",
|
|
1643
|
-
CONTRACT_CALL = "CONTRACT_CALL",
|
|
1644
|
-
CONTRACT_CREATION = "CONTRACT_CREATION"
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
type Method = {
|
|
1648
|
-
callType: TransactionMethodType;
|
|
1649
|
-
/**
|
|
1650
|
-
* The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
|
|
1651
|
-
*/
|
|
1652
|
-
methodHash: string;
|
|
1653
|
-
/**
|
|
1654
|
-
* The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'.
|
|
1655
|
-
*/
|
|
1656
|
-
methodName?: string;
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
1789
|
type FullNativeTransactionDetails = {
|
|
1660
1790
|
/**
|
|
1661
1791
|
* The block number on the chain.
|
|
@@ -1669,6 +1799,10 @@ type FullNativeTransactionDetails = {
|
|
|
1669
1799
|
* The block hash identifier.
|
|
1670
1800
|
*/
|
|
1671
1801
|
blockHash: string;
|
|
1802
|
+
/**
|
|
1803
|
+
* The EVM chain ID on which the transaction occured.
|
|
1804
|
+
*/
|
|
1805
|
+
chainId: string;
|
|
1672
1806
|
/**
|
|
1673
1807
|
* The index at which the transaction occured in the block (0-indexed).
|
|
1674
1808
|
*/
|
|
@@ -1932,65 +2066,6 @@ type ListInternalTransactionsResponse = {
|
|
|
1932
2066
|
transactions: Array<InternalTransaction>;
|
|
1933
2067
|
};
|
|
1934
2068
|
|
|
1935
|
-
type NativeTransaction = {
|
|
1936
|
-
/**
|
|
1937
|
-
* The block number on the chain.
|
|
1938
|
-
*/
|
|
1939
|
-
blockNumber: string;
|
|
1940
|
-
/**
|
|
1941
|
-
* The block finality timestamp.
|
|
1942
|
-
*/
|
|
1943
|
-
blockTimestamp: number;
|
|
1944
|
-
/**
|
|
1945
|
-
* The block hash identifier.
|
|
1946
|
-
*/
|
|
1947
|
-
blockHash: string;
|
|
1948
|
-
/**
|
|
1949
|
-
* The index at which the transaction occured in the block (0-indexed).
|
|
1950
|
-
*/
|
|
1951
|
-
blockIndex: number;
|
|
1952
|
-
/**
|
|
1953
|
-
* The transaction hash identifier.
|
|
1954
|
-
*/
|
|
1955
|
-
txHash: string;
|
|
1956
|
-
/**
|
|
1957
|
-
* The transaction status, which is either 0 (failed) or 1 (successful).
|
|
1958
|
-
*/
|
|
1959
|
-
txStatus: string;
|
|
1960
|
-
/**
|
|
1961
|
-
* The transaction type.
|
|
1962
|
-
*/
|
|
1963
|
-
txType: number;
|
|
1964
|
-
/**
|
|
1965
|
-
* The gas limit set for the transaction.
|
|
1966
|
-
*/
|
|
1967
|
-
gasLimit: string;
|
|
1968
|
-
/**
|
|
1969
|
-
* The amount of gas used.
|
|
1970
|
-
*/
|
|
1971
|
-
gasUsed: string;
|
|
1972
|
-
/**
|
|
1973
|
-
* The gas price denominated by the number of decimals of the native token.
|
|
1974
|
-
*/
|
|
1975
|
-
gasPrice: string;
|
|
1976
|
-
/**
|
|
1977
|
-
* The nonce used by the sender of the transaction.
|
|
1978
|
-
*/
|
|
1979
|
-
nonce: string;
|
|
1980
|
-
from: RichAddress;
|
|
1981
|
-
to: RichAddress;
|
|
1982
|
-
method?: Method;
|
|
1983
|
-
value: string;
|
|
1984
|
-
};
|
|
1985
|
-
|
|
1986
|
-
type ListNativeTransactionsResponse = {
|
|
1987
|
-
/**
|
|
1988
|
-
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
1989
|
-
*/
|
|
1990
|
-
nextPageToken?: string;
|
|
1991
|
-
transactions: Array<NativeTransaction>;
|
|
1992
|
-
};
|
|
1993
|
-
|
|
1994
2069
|
type TransactionDetails = {
|
|
1995
2070
|
/**
|
|
1996
2071
|
* The native (top-level) transaction details.
|
|
@@ -2035,11 +2110,6 @@ declare enum SortOrder {
|
|
|
2035
2110
|
DESC = "desc"
|
|
2036
2111
|
}
|
|
2037
2112
|
|
|
2038
|
-
declare enum TransactionStatus {
|
|
2039
|
-
FAILED = "failed",
|
|
2040
|
-
SUCCESS = "success"
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
2113
|
declare class EvmTransactionsService {
|
|
2044
2114
|
readonly httpRequest: BaseHttpRequest;
|
|
2045
2115
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -2341,7 +2411,7 @@ declare class EvmTransactionsService {
|
|
|
2341
2411
|
* @returns ListNativeTransactionsResponse Successful response
|
|
2342
2412
|
* @throws ApiError
|
|
2343
2413
|
*/
|
|
2344
|
-
getTransactionsForBlock({ chainId, blockId, }: {
|
|
2414
|
+
getTransactionsForBlock({ chainId, blockId, pageToken, pageSize, }: {
|
|
2345
2415
|
/**
|
|
2346
2416
|
* A supported evm chain id or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
2347
2417
|
*/
|
|
@@ -2350,6 +2420,14 @@ declare class EvmTransactionsService {
|
|
|
2350
2420
|
* A block identifier which is either a block number or the block hash.
|
|
2351
2421
|
*/
|
|
2352
2422
|
blockId: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
2425
|
+
*/
|
|
2426
|
+
pageToken?: string;
|
|
2427
|
+
/**
|
|
2428
|
+
* The maximum number of items to return. The minimum page size is 0. The maximum pageSize is 100.
|
|
2429
|
+
*/
|
|
2430
|
+
pageSize?: number;
|
|
2353
2431
|
}): CancelablePromise<ListNativeTransactionsResponse>;
|
|
2354
2432
|
/**
|
|
2355
2433
|
* List latest transactions
|