@avalabs/glacier-sdk 3.1.0-canary.de1a809.0 → 3.1.0-canary.e4000e6.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 CHANGED
@@ -713,11 +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
+ /**
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;
716
720
  };
717
721
  declare namespace Erc20TokenBalance {
718
722
  enum ercType {
719
723
  ERC_20 = "ERC-20"
720
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
+ }
721
732
  }
722
733
 
723
734
  type ListErc20BalancesResponse = {
@@ -914,6 +925,10 @@ declare class EvmBalancesService {
914
925
  }
915
926
 
916
927
  type GetEvmBlockResponse = {
928
+ /**
929
+ * The EVM chain ID on which the block was created.
930
+ */
931
+ chainId: string;
917
932
  /**
918
933
  * The block number on the chain.
919
934
  */
@@ -958,6 +973,10 @@ type GetEvmBlockResponse = {
958
973
  };
959
974
 
960
975
  type EvmBlock = {
976
+ /**
977
+ * The EVM chain ID on which the block was created.
978
+ */
979
+ chainId: string;
961
980
  /**
962
981
  * The block number on the chain.
963
982
  */
@@ -1143,6 +1162,113 @@ type ListChainsResponse = {
1143
1162
  chains: Array<ChainInfo>;
1144
1163
  };
1145
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
+
1146
1272
  declare enum Network {
1147
1273
  MAINNET = "mainnet",
1148
1274
  FUJI = "fuji",
@@ -1150,6 +1276,11 @@ declare enum Network {
1150
1276
  DEVNET = "devnet"
1151
1277
  }
1152
1278
 
1279
+ declare enum TransactionStatus {
1280
+ FAILED = "failed",
1281
+ SUCCESS = "success"
1282
+ }
1283
+
1153
1284
  declare class EvmChainsService {
1154
1285
  readonly httpRequest: BaseHttpRequest;
1155
1286
  constructor(httpRequest: BaseHttpRequest);
@@ -1183,7 +1314,7 @@ declare class EvmChainsService {
1183
1314
  }): CancelablePromise<GetChainResponse>;
1184
1315
  /**
1185
1316
  * Get chains for address
1186
- * Gets the list of chains an address has interacted with.
1317
+ * Gets a list of all chains where the address was either a sender or receiver in a transaction or ERC transfer. The list is currently updated every 15 minutes.
1187
1318
  * @returns ListAddressChainsResponse Successful response
1188
1319
  * @throws ApiError
1189
1320
  */
@@ -1193,6 +1324,50 @@ declare class EvmChainsService {
1193
1324
  */
1194
1325
  address: string;
1195
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>;
1196
1371
  }
1197
1372
 
1198
1373
  type ImageAsset = {
@@ -1527,29 +1702,6 @@ declare namespace Erc1155Token {
1527
1702
  }
1528
1703
  }
1529
1704
 
1530
- type RichAddress = {
1531
- /**
1532
- * The contract name.
1533
- */
1534
- name?: string;
1535
- /**
1536
- * The contract symbol.
1537
- */
1538
- symbol?: string;
1539
- /**
1540
- * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
1541
- */
1542
- decimals?: number;
1543
- /**
1544
- * The logo uri for the address.
1545
- */
1546
- logoUri?: string;
1547
- /**
1548
- * A wallet or contract address in mixed-case checksum encoding.
1549
- */
1550
- address: string;
1551
- };
1552
-
1553
1705
  type Erc1155TransferDetails = {
1554
1706
  from: RichAddress;
1555
1707
  to: RichAddress;
@@ -1634,27 +1786,6 @@ type Erc721TransferDetails = {
1634
1786
  erc721Token: Erc721Token;
1635
1787
  };
1636
1788
 
1637
- /**
1638
- * 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.
1639
- */
1640
- declare enum TransactionMethodType {
1641
- NATIVE_TRANSFER = "NATIVE_TRANSFER",
1642
- CONTRACT_CALL = "CONTRACT_CALL",
1643
- CONTRACT_CREATION = "CONTRACT_CREATION"
1644
- }
1645
-
1646
- type Method = {
1647
- callType: TransactionMethodType;
1648
- /**
1649
- * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
1650
- */
1651
- methodHash: string;
1652
- /**
1653
- * 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'.
1654
- */
1655
- methodName?: string;
1656
- };
1657
-
1658
1789
  type FullNativeTransactionDetails = {
1659
1790
  /**
1660
1791
  * The block number on the chain.
@@ -1668,6 +1799,10 @@ type FullNativeTransactionDetails = {
1668
1799
  * The block hash identifier.
1669
1800
  */
1670
1801
  blockHash: string;
1802
+ /**
1803
+ * The EVM chain ID on which the transaction occured.
1804
+ */
1805
+ chainId: string;
1671
1806
  /**
1672
1807
  * The index at which the transaction occured in the block (0-indexed).
1673
1808
  */
@@ -1931,65 +2066,6 @@ type ListInternalTransactionsResponse = {
1931
2066
  transactions: Array<InternalTransaction>;
1932
2067
  };
1933
2068
 
1934
- type NativeTransaction = {
1935
- /**
1936
- * The block number on the chain.
1937
- */
1938
- blockNumber: string;
1939
- /**
1940
- * The block finality timestamp.
1941
- */
1942
- blockTimestamp: number;
1943
- /**
1944
- * The block hash identifier.
1945
- */
1946
- blockHash: string;
1947
- /**
1948
- * The index at which the transaction occured in the block (0-indexed).
1949
- */
1950
- blockIndex: number;
1951
- /**
1952
- * The transaction hash identifier.
1953
- */
1954
- txHash: string;
1955
- /**
1956
- * The transaction status, which is either 0 (failed) or 1 (successful).
1957
- */
1958
- txStatus: string;
1959
- /**
1960
- * The transaction type.
1961
- */
1962
- txType: number;
1963
- /**
1964
- * The gas limit set for the transaction.
1965
- */
1966
- gasLimit: string;
1967
- /**
1968
- * The amount of gas used.
1969
- */
1970
- gasUsed: string;
1971
- /**
1972
- * The gas price denominated by the number of decimals of the native token.
1973
- */
1974
- gasPrice: string;
1975
- /**
1976
- * The nonce used by the sender of the transaction.
1977
- */
1978
- nonce: string;
1979
- from: RichAddress;
1980
- to: RichAddress;
1981
- method?: Method;
1982
- value: string;
1983
- };
1984
-
1985
- type ListNativeTransactionsResponse = {
1986
- /**
1987
- * 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.
1988
- */
1989
- nextPageToken?: string;
1990
- transactions: Array<NativeTransaction>;
1991
- };
1992
-
1993
2069
  type TransactionDetails = {
1994
2070
  /**
1995
2071
  * The native (top-level) transaction details.
@@ -2034,11 +2110,6 @@ declare enum SortOrder {
2034
2110
  DESC = "desc"
2035
2111
  }
2036
2112
 
2037
- declare enum TransactionStatus {
2038
- FAILED = "failed",
2039
- SUCCESS = "success"
2040
- }
2041
-
2042
2113
  declare class EvmTransactionsService {
2043
2114
  readonly httpRequest: BaseHttpRequest;
2044
2115
  constructor(httpRequest: BaseHttpRequest);
@@ -2340,7 +2411,7 @@ declare class EvmTransactionsService {
2340
2411
  * @returns ListNativeTransactionsResponse Successful response
2341
2412
  * @throws ApiError
2342
2413
  */
2343
- getTransactionsForBlock({ chainId, blockId, }: {
2414
+ getTransactionsForBlock({ chainId, blockId, pageToken, pageSize, }: {
2344
2415
  /**
2345
2416
  * A supported evm chain id or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
2346
2417
  */
@@ -2349,6 +2420,14 @@ declare class EvmTransactionsService {
2349
2420
  * A block identifier which is either a block number or the block hash.
2350
2421
  */
2351
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;
2352
2431
  }): CancelablePromise<ListNativeTransactionsResponse>;
2353
2432
  /**
2354
2433
  * List latest transactions