@avalabs/glacier-sdk 2.8.0-alpha.118 → 2.8.0-alpha.119

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
@@ -1267,6 +1267,11 @@ type ListTransfersResponse = {
1267
1267
  transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
1268
1268
  };
1269
1269
 
1270
+ declare enum NetworkType {
1271
+ MAINNET = "mainnet",
1272
+ TESTNET = "testnet"
1273
+ }
1274
+
1270
1275
  declare enum NftSearchResultTypeOption {
1271
1276
  TOKEN = "token",
1272
1277
  COLLECTION = "collection"
@@ -1382,7 +1387,7 @@ declare class EvmService {
1382
1387
  * @returns ListErc721BalancesResponse
1383
1388
  * @throws ApiError
1384
1389
  */
1385
- listErc721Balances({ chainId, address, pageSize, pageToken, }: {
1390
+ listErc721Balances({ chainId, address, pageSize, pageToken, contractAddress, }: {
1386
1391
  /**
1387
1392
  * A supported evm chain id. Use the `/chains` endpoint to get
1388
1393
  * a list of supported chain ids.
@@ -1401,13 +1406,17 @@ declare class EvmService {
1401
1406
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1402
1407
  */
1403
1408
  pageToken?: string;
1409
+ /**
1410
+ * A contract addresses to filter by.
1411
+ */
1412
+ contractAddress?: string;
1404
1413
  }): CancelablePromise<ListErc721BalancesResponse>;
1405
1414
  /**
1406
1415
  * List ERC-1155 token balances of a wallet address for a given chain.
1407
1416
  * @returns ListErc1155BalancesResponse
1408
1417
  * @throws ApiError
1409
1418
  */
1410
- listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, }: {
1419
+ listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddress, }: {
1411
1420
  /**
1412
1421
  * A supported evm chain id. Use the `/chains` endpoint to get
1413
1422
  * a list of supported chain ids.
@@ -1430,6 +1439,10 @@ declare class EvmService {
1430
1439
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1431
1440
  */
1432
1441
  pageToken?: string;
1442
+ /**
1443
+ * A contract addresses to filter by.
1444
+ */
1445
+ contractAddress?: string;
1433
1446
  }): CancelablePromise<ListErc1155BalancesResponse>;
1434
1447
  /**
1435
1448
  * List ERC-721 and ERC-1155 token balances of a wallet address
@@ -1437,7 +1450,7 @@ declare class EvmService {
1437
1450
  * @returns ListCollectibleBalancesResponse
1438
1451
  * @throws ApiError
1439
1452
  */
1440
- listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
1453
+ listCollectibleBalances({ chainId, address, pageSize, pageToken, contractAddress, }: {
1441
1454
  /**
1442
1455
  * A supported evm chain id. Use the `/chains` endpoint to get
1443
1456
  * a list of supported chain ids.
@@ -1456,6 +1469,10 @@ declare class EvmService {
1456
1469
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1457
1470
  */
1458
1471
  pageToken?: string;
1472
+ /**
1473
+ * A contract addresses to filter by.
1474
+ */
1475
+ contractAddress?: string;
1459
1476
  }): CancelablePromise<ListCollectibleBalancesResponse>;
1460
1477
  /**
1461
1478
  * Returns the latest blocks indexed for the chain.
@@ -1519,7 +1536,12 @@ declare class EvmService {
1519
1536
  * @returns ListChainsResponse
1520
1537
  * @throws ApiError
1521
1538
  */
1522
- supportedChains(): CancelablePromise<ListChainsResponse>;
1539
+ supportedChains({ network, }: {
1540
+ /**
1541
+ * mainnet or testnet.
1542
+ */
1543
+ network?: NetworkType;
1544
+ }): CancelablePromise<ListChainsResponse>;
1523
1545
  /**
1524
1546
  * Gets chain information by chain id.
1525
1547
  * @returns GetChainResponse
@@ -1766,7 +1788,7 @@ declare class EvmService {
1766
1788
  * @returns ListTransfersResponse
1767
1789
  * @throws ApiError
1768
1790
  */
1769
- listTransfers({ chainId, address, pageSize, pageToken, }: {
1791
+ listTransfers({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1770
1792
  /**
1771
1793
  * A supported evm chain id. Use the `/chains` endpoint to get
1772
1794
  * a list of supported chain ids.
@@ -1776,6 +1798,8 @@ declare class EvmService {
1776
1798
  * A wallet address.
1777
1799
  */
1778
1800
  address: string;
1801
+ startBlock?: number;
1802
+ endBlock?: number;
1779
1803
  /**
1780
1804
  * The maximum number of items to return. The minimum page size
1781
1805
  * is 1. The maximum pageSize is 100.
@@ -1820,13 +1844,7 @@ declare class EvmService {
1820
1844
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1821
1845
  */
1822
1846
  pageToken?: string;
1823
- /**
1824
- * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
1825
- */
1826
1847
  startBlock?: number;
1827
- /**
1828
- * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
1829
- */
1830
1848
  endBlock?: number;
1831
1849
  /**
1832
1850
  * The order by which to sort results. Use "asc" for ascending
@@ -1840,7 +1858,7 @@ declare class EvmService {
1840
1858
  * @returns ListNativeTransactionsResponse
1841
1859
  * @throws ApiError
1842
1860
  */
1843
- listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
1861
+ listNativeTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1844
1862
  /**
1845
1863
  * A supported evm chain id. Use the `/chains` endpoint to get
1846
1864
  * a list of supported chain ids.
@@ -1850,6 +1868,8 @@ declare class EvmService {
1850
1868
  * A wallet address.
1851
1869
  */
1852
1870
  address: string;
1871
+ startBlock?: number;
1872
+ endBlock?: number;
1853
1873
  /**
1854
1874
  * The maximum number of items to return. The minimum page size
1855
1875
  * is 1. The maximum pageSize is 100.
@@ -1865,7 +1885,7 @@ declare class EvmService {
1865
1885
  * @returns ListErc20TransactionsResponse
1866
1886
  * @throws ApiError
1867
1887
  */
1868
- listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
1888
+ listErc20Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1869
1889
  /**
1870
1890
  * A supported evm chain id. Use the `/chains` endpoint to get
1871
1891
  * a list of supported chain ids.
@@ -1875,6 +1895,8 @@ declare class EvmService {
1875
1895
  * A wallet address.
1876
1896
  */
1877
1897
  address: string;
1898
+ startBlock?: number;
1899
+ endBlock?: number;
1878
1900
  /**
1879
1901
  * The maximum number of items to return. The minimum page size
1880
1902
  * is 1. The maximum pageSize is 100.
@@ -1890,7 +1912,7 @@ declare class EvmService {
1890
1912
  * @returns ListErc721TransactionsResponse
1891
1913
  * @throws ApiError
1892
1914
  */
1893
- listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
1915
+ listErc721Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1894
1916
  /**
1895
1917
  * A supported evm chain id. Use the `/chains` endpoint to get
1896
1918
  * a list of supported chain ids.
@@ -1900,6 +1922,8 @@ declare class EvmService {
1900
1922
  * A wallet address.
1901
1923
  */
1902
1924
  address: string;
1925
+ startBlock?: number;
1926
+ endBlock?: number;
1903
1927
  /**
1904
1928
  * The maximum number of items to return. The minimum page size
1905
1929
  * is 1. The maximum pageSize is 100.
@@ -1915,7 +1939,7 @@ declare class EvmService {
1915
1939
  * @returns ListErc1155TransactionsResponse
1916
1940
  * @throws ApiError
1917
1941
  */
1918
- listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
1942
+ listErc1155Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1919
1943
  /**
1920
1944
  * A supported evm chain id. Use the `/chains` endpoint to get
1921
1945
  * a list of supported chain ids.
@@ -1925,6 +1949,8 @@ declare class EvmService {
1925
1949
  * A wallet address.
1926
1950
  */
1927
1951
  address: string;
1952
+ startBlock?: number;
1953
+ endBlock?: number;
1928
1954
  /**
1929
1955
  * The maximum number of items to return. The minimum page size
1930
1956
  * is 1. The maximum pageSize is 100.
@@ -1945,7 +1971,7 @@ declare class EvmService {
1945
1971
  * @returns ListInternalTransactionsResponse
1946
1972
  * @throws ApiError
1947
1973
  */
1948
- listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
1974
+ listInternalTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1949
1975
  /**
1950
1976
  * A supported evm chain id. Use the `/chains` endpoint to get
1951
1977
  * a list of supported chain ids.
@@ -1955,6 +1981,8 @@ declare class EvmService {
1955
1981
  * A wallet address.
1956
1982
  */
1957
1983
  address: string;
1984
+ startBlock?: number;
1985
+ endBlock?: number;
1958
1986
  /**
1959
1987
  * The maximum number of items to return. The minimum page size
1960
1988
  * is 1. The maximum pageSize is 100.
@@ -3487,4 +3515,4 @@ declare class ApiError extends Error {
3487
3515
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3488
3516
  }
3489
3517
 
3490
- export { Address, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelListingEventResponse, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CloseAuctionEventResponse, CollectionMetrics, CollectionSortByOption, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, EvmBlock, EvmNetworkOptions, EvmService, FloorPrice, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListInternalTransactionsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListNftCollectionWithMetricsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingResponse, ListingType, ListingsSortByOption, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftCollectionWithMetrics, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OpenListingEventResponse, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainTransaction, PChainTransactionType, PChainUtxo, PaginationParams, PrimaryNetwork, PrimaryNetworkBlock, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkService, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, RewardType, RichAddress, SortOrder, StakingDistribution, Subnet, TokenWithPrice, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, TrendingTimeframe, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
3518
+ export { Address, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelListingEventResponse, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CloseAuctionEventResponse, CollectionMetrics, CollectionSortByOption, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, EvmBlock, EvmNetworkOptions, EvmService, FloorPrice, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListInternalTransactionsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListNftCollectionWithMetricsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingResponse, ListingType, ListingsSortByOption, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NftCollection, NftCollectionWithMetrics, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OpenListingEventResponse, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainTransaction, PChainTransactionType, PChainUtxo, PaginationParams, PrimaryNetwork, PrimaryNetworkBlock, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkService, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, RewardType, RichAddress, SortOrder, StakingDistribution, Subnet, TokenWithPrice, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, TrendingTimeframe, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
package/dist/index.js CHANGED
@@ -404,7 +404,8 @@ class EvmService {
404
404
  chainId,
405
405
  address,
406
406
  pageSize = 10,
407
- pageToken
407
+ pageToken,
408
+ contractAddress
408
409
  }) {
409
410
  return this.httpRequest.request({
410
411
  method: "GET",
@@ -415,7 +416,8 @@ class EvmService {
415
416
  },
416
417
  query: {
417
418
  "pageSize": pageSize,
418
- "pageToken": pageToken
419
+ "pageToken": pageToken,
420
+ "contractAddress": contractAddress
419
421
  }
420
422
  });
421
423
  }
@@ -424,7 +426,8 @@ class EvmService {
424
426
  address,
425
427
  blockNumber,
426
428
  pageSize = 10,
427
- pageToken
429
+ pageToken,
430
+ contractAddress
428
431
  }) {
429
432
  return this.httpRequest.request({
430
433
  method: "GET",
@@ -436,7 +439,8 @@ class EvmService {
436
439
  query: {
437
440
  "blockNumber": blockNumber,
438
441
  "pageSize": pageSize,
439
- "pageToken": pageToken
442
+ "pageToken": pageToken,
443
+ "contractAddress": contractAddress
440
444
  }
441
445
  });
442
446
  }
@@ -444,7 +448,8 @@ class EvmService {
444
448
  chainId,
445
449
  address,
446
450
  pageSize = 10,
447
- pageToken
451
+ pageToken,
452
+ contractAddress
448
453
  }) {
449
454
  return this.httpRequest.request({
450
455
  method: "GET",
@@ -455,7 +460,8 @@ class EvmService {
455
460
  },
456
461
  query: {
457
462
  "pageSize": pageSize,
458
- "pageToken": pageToken
463
+ "pageToken": pageToken,
464
+ "contractAddress": contractAddress
459
465
  }
460
466
  });
461
467
  }
@@ -506,10 +512,15 @@ class EvmService {
506
512
  }
507
513
  });
508
514
  }
509
- supportedChains() {
515
+ supportedChains({
516
+ network
517
+ }) {
510
518
  return this.httpRequest.request({
511
519
  method: "GET",
512
- url: "/v1/chains"
520
+ url: "/v1/chains",
521
+ query: {
522
+ "network": network
523
+ }
513
524
  });
514
525
  }
515
526
  getChainInfo({
@@ -687,6 +698,8 @@ class EvmService {
687
698
  listTransfers({
688
699
  chainId,
689
700
  address,
701
+ startBlock,
702
+ endBlock,
690
703
  pageSize = 10,
691
704
  pageToken
692
705
  }) {
@@ -698,6 +711,8 @@ class EvmService {
698
711
  "address": address
699
712
  },
700
713
  query: {
714
+ "startBlock": startBlock,
715
+ "endBlock": endBlock,
701
716
  "pageSize": pageSize,
702
717
  "pageToken": pageToken
703
718
  }
@@ -731,6 +746,8 @@ class EvmService {
731
746
  listNativeTransactions({
732
747
  chainId,
733
748
  address,
749
+ startBlock,
750
+ endBlock,
734
751
  pageSize = 10,
735
752
  pageToken
736
753
  }) {
@@ -742,6 +759,8 @@ class EvmService {
742
759
  "address": address
743
760
  },
744
761
  query: {
762
+ "startBlock": startBlock,
763
+ "endBlock": endBlock,
745
764
  "pageSize": pageSize,
746
765
  "pageToken": pageToken
747
766
  }
@@ -750,6 +769,8 @@ class EvmService {
750
769
  listErc20Transactions({
751
770
  chainId,
752
771
  address,
772
+ startBlock,
773
+ endBlock,
753
774
  pageSize = 10,
754
775
  pageToken
755
776
  }) {
@@ -761,6 +782,8 @@ class EvmService {
761
782
  "address": address
762
783
  },
763
784
  query: {
785
+ "startBlock": startBlock,
786
+ "endBlock": endBlock,
764
787
  "pageSize": pageSize,
765
788
  "pageToken": pageToken
766
789
  }
@@ -769,6 +792,8 @@ class EvmService {
769
792
  listErc721Transactions({
770
793
  chainId,
771
794
  address,
795
+ startBlock,
796
+ endBlock,
772
797
  pageSize = 10,
773
798
  pageToken
774
799
  }) {
@@ -780,6 +805,8 @@ class EvmService {
780
805
  "address": address
781
806
  },
782
807
  query: {
808
+ "startBlock": startBlock,
809
+ "endBlock": endBlock,
783
810
  "pageSize": pageSize,
784
811
  "pageToken": pageToken
785
812
  }
@@ -788,6 +815,8 @@ class EvmService {
788
815
  listErc1155Transactions({
789
816
  chainId,
790
817
  address,
818
+ startBlock,
819
+ endBlock,
791
820
  pageSize = 10,
792
821
  pageToken
793
822
  }) {
@@ -799,6 +828,8 @@ class EvmService {
799
828
  "address": address
800
829
  },
801
830
  query: {
831
+ "startBlock": startBlock,
832
+ "endBlock": endBlock,
802
833
  "pageSize": pageSize,
803
834
  "pageToken": pageToken
804
835
  }
@@ -807,6 +838,8 @@ class EvmService {
807
838
  listInternalTransactions({
808
839
  chainId,
809
840
  address,
841
+ startBlock,
842
+ endBlock,
810
843
  pageSize = 10,
811
844
  pageToken
812
845
  }) {
@@ -818,6 +851,8 @@ class EvmService {
818
851
  "address": address
819
852
  },
820
853
  query: {
854
+ "startBlock": startBlock,
855
+ "endBlock": endBlock,
821
856
  "pageSize": pageSize,
822
857
  "pageToken": pageToken
823
858
  }
@@ -1442,6 +1477,12 @@ var Network = /* @__PURE__ */ ((Network2) => {
1442
1477
  return Network2;
1443
1478
  })(Network || {});
1444
1479
 
1480
+ var NetworkType = /* @__PURE__ */ ((NetworkType2) => {
1481
+ NetworkType2["MAINNET"] = "mainnet";
1482
+ NetworkType2["TESTNET"] = "testnet";
1483
+ return NetworkType2;
1484
+ })(NetworkType || {});
1485
+
1445
1486
  var NftSearchResultTypeOption = /* @__PURE__ */ ((NftSearchResultTypeOption2) => {
1446
1487
  NftSearchResultTypeOption2["TOKEN"] = "token";
1447
1488
  NftSearchResultTypeOption2["COLLECTION"] = "collection";
@@ -1628,6 +1669,7 @@ exports.ListingEventType = ListingEventType;
1628
1669
  exports.ListingType = ListingType;
1629
1670
  exports.ListingsSortByOption = ListingsSortByOption;
1630
1671
  exports.Network = Network;
1672
+ exports.NetworkType = NetworkType;
1631
1673
  exports.NftSearchResultTypeOption = NftSearchResultTypeOption;
1632
1674
  exports.NftTokenMetadataStatus = NftTokenMetadataStatus;
1633
1675
  exports.OpenAPI = OpenAPI;
@@ -0,0 +1,6 @@
1
+ declare enum NetworkType {
2
+ MAINNET = "mainnet",
3
+ TESTNET = "testnet"
4
+ }
5
+
6
+ export { NetworkType };
@@ -0,0 +1,7 @@
1
+ var NetworkType = /* @__PURE__ */ ((NetworkType2) => {
2
+ NetworkType2["MAINNET"] = "mainnet";
3
+ NetworkType2["TESTNET"] = "testnet";
4
+ return NetworkType2;
5
+ })(NetworkType || {});
6
+
7
+ export { NetworkType };
@@ -23,6 +23,7 @@ import { ListNativeTransactionsResponse } from '../models/ListNativeTransactions
23
23
  import { ListNftCollectionWithMetricsResponse } from '../models/ListNftCollectionWithMetricsResponse.js';
24
24
  import { ListTransactionDetailsResponse } from '../models/ListTransactionDetailsResponse.js';
25
25
  import { ListTransfersResponse } from '../models/ListTransfersResponse.js';
26
+ import { NetworkType } from '../models/NetworkType.js';
26
27
  import { NftCollection } from '../models/NftCollection.js';
27
28
  import { NftCollectionWithMetrics } from '../models/NftCollectionWithMetrics.js';
28
29
  import { NftSearchBody } from '../models/NftSearchBody.js';
@@ -101,7 +102,7 @@ declare class EvmService {
101
102
  * @returns ListErc721BalancesResponse
102
103
  * @throws ApiError
103
104
  */
104
- listErc721Balances({ chainId, address, pageSize, pageToken, }: {
105
+ listErc721Balances({ chainId, address, pageSize, pageToken, contractAddress, }: {
105
106
  /**
106
107
  * A supported evm chain id. Use the `/chains` endpoint to get
107
108
  * a list of supported chain ids.
@@ -120,13 +121,17 @@ declare class EvmService {
120
121
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
121
122
  */
122
123
  pageToken?: string;
124
+ /**
125
+ * A contract addresses to filter by.
126
+ */
127
+ contractAddress?: string;
123
128
  }): CancelablePromise<ListErc721BalancesResponse>;
124
129
  /**
125
130
  * List ERC-1155 token balances of a wallet address for a given chain.
126
131
  * @returns ListErc1155BalancesResponse
127
132
  * @throws ApiError
128
133
  */
129
- listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, }: {
134
+ listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddress, }: {
130
135
  /**
131
136
  * A supported evm chain id. Use the `/chains` endpoint to get
132
137
  * a list of supported chain ids.
@@ -149,6 +154,10 @@ declare class EvmService {
149
154
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
150
155
  */
151
156
  pageToken?: string;
157
+ /**
158
+ * A contract addresses to filter by.
159
+ */
160
+ contractAddress?: string;
152
161
  }): CancelablePromise<ListErc1155BalancesResponse>;
153
162
  /**
154
163
  * List ERC-721 and ERC-1155 token balances of a wallet address
@@ -156,7 +165,7 @@ declare class EvmService {
156
165
  * @returns ListCollectibleBalancesResponse
157
166
  * @throws ApiError
158
167
  */
159
- listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
168
+ listCollectibleBalances({ chainId, address, pageSize, pageToken, contractAddress, }: {
160
169
  /**
161
170
  * A supported evm chain id. Use the `/chains` endpoint to get
162
171
  * a list of supported chain ids.
@@ -175,6 +184,10 @@ declare class EvmService {
175
184
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
176
185
  */
177
186
  pageToken?: string;
187
+ /**
188
+ * A contract addresses to filter by.
189
+ */
190
+ contractAddress?: string;
178
191
  }): CancelablePromise<ListCollectibleBalancesResponse>;
179
192
  /**
180
193
  * Returns the latest blocks indexed for the chain.
@@ -238,7 +251,12 @@ declare class EvmService {
238
251
  * @returns ListChainsResponse
239
252
  * @throws ApiError
240
253
  */
241
- supportedChains(): CancelablePromise<ListChainsResponse>;
254
+ supportedChains({ network, }: {
255
+ /**
256
+ * mainnet or testnet.
257
+ */
258
+ network?: NetworkType;
259
+ }): CancelablePromise<ListChainsResponse>;
242
260
  /**
243
261
  * Gets chain information by chain id.
244
262
  * @returns GetChainResponse
@@ -485,7 +503,7 @@ declare class EvmService {
485
503
  * @returns ListTransfersResponse
486
504
  * @throws ApiError
487
505
  */
488
- listTransfers({ chainId, address, pageSize, pageToken, }: {
506
+ listTransfers({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
489
507
  /**
490
508
  * A supported evm chain id. Use the `/chains` endpoint to get
491
509
  * a list of supported chain ids.
@@ -495,6 +513,8 @@ declare class EvmService {
495
513
  * A wallet address.
496
514
  */
497
515
  address: string;
516
+ startBlock?: number;
517
+ endBlock?: number;
498
518
  /**
499
519
  * The maximum number of items to return. The minimum page size
500
520
  * is 1. The maximum pageSize is 100.
@@ -539,13 +559,7 @@ declare class EvmService {
539
559
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
540
560
  */
541
561
  pageToken?: string;
542
- /**
543
- * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
544
- */
545
562
  startBlock?: number;
546
- /**
547
- * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
548
- */
549
563
  endBlock?: number;
550
564
  /**
551
565
  * The order by which to sort results. Use "asc" for ascending
@@ -559,7 +573,7 @@ declare class EvmService {
559
573
  * @returns ListNativeTransactionsResponse
560
574
  * @throws ApiError
561
575
  */
562
- listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
576
+ listNativeTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
563
577
  /**
564
578
  * A supported evm chain id. Use the `/chains` endpoint to get
565
579
  * a list of supported chain ids.
@@ -569,6 +583,8 @@ declare class EvmService {
569
583
  * A wallet address.
570
584
  */
571
585
  address: string;
586
+ startBlock?: number;
587
+ endBlock?: number;
572
588
  /**
573
589
  * The maximum number of items to return. The minimum page size
574
590
  * is 1. The maximum pageSize is 100.
@@ -584,7 +600,7 @@ declare class EvmService {
584
600
  * @returns ListErc20TransactionsResponse
585
601
  * @throws ApiError
586
602
  */
587
- listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
603
+ listErc20Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
588
604
  /**
589
605
  * A supported evm chain id. Use the `/chains` endpoint to get
590
606
  * a list of supported chain ids.
@@ -594,6 +610,8 @@ declare class EvmService {
594
610
  * A wallet address.
595
611
  */
596
612
  address: string;
613
+ startBlock?: number;
614
+ endBlock?: number;
597
615
  /**
598
616
  * The maximum number of items to return. The minimum page size
599
617
  * is 1. The maximum pageSize is 100.
@@ -609,7 +627,7 @@ declare class EvmService {
609
627
  * @returns ListErc721TransactionsResponse
610
628
  * @throws ApiError
611
629
  */
612
- listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
630
+ listErc721Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
613
631
  /**
614
632
  * A supported evm chain id. Use the `/chains` endpoint to get
615
633
  * a list of supported chain ids.
@@ -619,6 +637,8 @@ declare class EvmService {
619
637
  * A wallet address.
620
638
  */
621
639
  address: string;
640
+ startBlock?: number;
641
+ endBlock?: number;
622
642
  /**
623
643
  * The maximum number of items to return. The minimum page size
624
644
  * is 1. The maximum pageSize is 100.
@@ -634,7 +654,7 @@ declare class EvmService {
634
654
  * @returns ListErc1155TransactionsResponse
635
655
  * @throws ApiError
636
656
  */
637
- listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
657
+ listErc1155Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
638
658
  /**
639
659
  * A supported evm chain id. Use the `/chains` endpoint to get
640
660
  * a list of supported chain ids.
@@ -644,6 +664,8 @@ declare class EvmService {
644
664
  * A wallet address.
645
665
  */
646
666
  address: string;
667
+ startBlock?: number;
668
+ endBlock?: number;
647
669
  /**
648
670
  * The maximum number of items to return. The minimum page size
649
671
  * is 1. The maximum pageSize is 100.
@@ -664,7 +686,7 @@ declare class EvmService {
664
686
  * @returns ListInternalTransactionsResponse
665
687
  * @throws ApiError
666
688
  */
667
- listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
689
+ listInternalTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
668
690
  /**
669
691
  * A supported evm chain id. Use the `/chains` endpoint to get
670
692
  * a list of supported chain ids.
@@ -674,6 +696,8 @@ declare class EvmService {
674
696
  * A wallet address.
675
697
  */
676
698
  address: string;
699
+ startBlock?: number;
700
+ endBlock?: number;
677
701
  /**
678
702
  * The maximum number of items to return. The minimum page size
679
703
  * is 1. The maximum pageSize is 100.
@@ -50,7 +50,8 @@ class EvmService {
50
50
  chainId,
51
51
  address,
52
52
  pageSize = 10,
53
- pageToken
53
+ pageToken,
54
+ contractAddress
54
55
  }) {
55
56
  return this.httpRequest.request({
56
57
  method: "GET",
@@ -61,7 +62,8 @@ class EvmService {
61
62
  },
62
63
  query: {
63
64
  "pageSize": pageSize,
64
- "pageToken": pageToken
65
+ "pageToken": pageToken,
66
+ "contractAddress": contractAddress
65
67
  }
66
68
  });
67
69
  }
@@ -70,7 +72,8 @@ class EvmService {
70
72
  address,
71
73
  blockNumber,
72
74
  pageSize = 10,
73
- pageToken
75
+ pageToken,
76
+ contractAddress
74
77
  }) {
75
78
  return this.httpRequest.request({
76
79
  method: "GET",
@@ -82,7 +85,8 @@ class EvmService {
82
85
  query: {
83
86
  "blockNumber": blockNumber,
84
87
  "pageSize": pageSize,
85
- "pageToken": pageToken
88
+ "pageToken": pageToken,
89
+ "contractAddress": contractAddress
86
90
  }
87
91
  });
88
92
  }
@@ -90,7 +94,8 @@ class EvmService {
90
94
  chainId,
91
95
  address,
92
96
  pageSize = 10,
93
- pageToken
97
+ pageToken,
98
+ contractAddress
94
99
  }) {
95
100
  return this.httpRequest.request({
96
101
  method: "GET",
@@ -101,7 +106,8 @@ class EvmService {
101
106
  },
102
107
  query: {
103
108
  "pageSize": pageSize,
104
- "pageToken": pageToken
109
+ "pageToken": pageToken,
110
+ "contractAddress": contractAddress
105
111
  }
106
112
  });
107
113
  }
@@ -152,10 +158,15 @@ class EvmService {
152
158
  }
153
159
  });
154
160
  }
155
- supportedChains() {
161
+ supportedChains({
162
+ network
163
+ }) {
156
164
  return this.httpRequest.request({
157
165
  method: "GET",
158
- url: "/v1/chains"
166
+ url: "/v1/chains",
167
+ query: {
168
+ "network": network
169
+ }
159
170
  });
160
171
  }
161
172
  getChainInfo({
@@ -333,6 +344,8 @@ class EvmService {
333
344
  listTransfers({
334
345
  chainId,
335
346
  address,
347
+ startBlock,
348
+ endBlock,
336
349
  pageSize = 10,
337
350
  pageToken
338
351
  }) {
@@ -344,6 +357,8 @@ class EvmService {
344
357
  "address": address
345
358
  },
346
359
  query: {
360
+ "startBlock": startBlock,
361
+ "endBlock": endBlock,
347
362
  "pageSize": pageSize,
348
363
  "pageToken": pageToken
349
364
  }
@@ -377,6 +392,8 @@ class EvmService {
377
392
  listNativeTransactions({
378
393
  chainId,
379
394
  address,
395
+ startBlock,
396
+ endBlock,
380
397
  pageSize = 10,
381
398
  pageToken
382
399
  }) {
@@ -388,6 +405,8 @@ class EvmService {
388
405
  "address": address
389
406
  },
390
407
  query: {
408
+ "startBlock": startBlock,
409
+ "endBlock": endBlock,
391
410
  "pageSize": pageSize,
392
411
  "pageToken": pageToken
393
412
  }
@@ -396,6 +415,8 @@ class EvmService {
396
415
  listErc20Transactions({
397
416
  chainId,
398
417
  address,
418
+ startBlock,
419
+ endBlock,
399
420
  pageSize = 10,
400
421
  pageToken
401
422
  }) {
@@ -407,6 +428,8 @@ class EvmService {
407
428
  "address": address
408
429
  },
409
430
  query: {
431
+ "startBlock": startBlock,
432
+ "endBlock": endBlock,
410
433
  "pageSize": pageSize,
411
434
  "pageToken": pageToken
412
435
  }
@@ -415,6 +438,8 @@ class EvmService {
415
438
  listErc721Transactions({
416
439
  chainId,
417
440
  address,
441
+ startBlock,
442
+ endBlock,
418
443
  pageSize = 10,
419
444
  pageToken
420
445
  }) {
@@ -426,6 +451,8 @@ class EvmService {
426
451
  "address": address
427
452
  },
428
453
  query: {
454
+ "startBlock": startBlock,
455
+ "endBlock": endBlock,
429
456
  "pageSize": pageSize,
430
457
  "pageToken": pageToken
431
458
  }
@@ -434,6 +461,8 @@ class EvmService {
434
461
  listErc1155Transactions({
435
462
  chainId,
436
463
  address,
464
+ startBlock,
465
+ endBlock,
437
466
  pageSize = 10,
438
467
  pageToken
439
468
  }) {
@@ -445,6 +474,8 @@ class EvmService {
445
474
  "address": address
446
475
  },
447
476
  query: {
477
+ "startBlock": startBlock,
478
+ "endBlock": endBlock,
448
479
  "pageSize": pageSize,
449
480
  "pageToken": pageToken
450
481
  }
@@ -453,6 +484,8 @@ class EvmService {
453
484
  listInternalTransactions({
454
485
  chainId,
455
486
  address,
487
+ startBlock,
488
+ endBlock,
456
489
  pageSize = 10,
457
490
  pageToken
458
491
  }) {
@@ -464,6 +497,8 @@ class EvmService {
464
497
  "address": address
465
498
  },
466
499
  query: {
500
+ "startBlock": startBlock,
501
+ "endBlock": endBlock,
467
502
  "pageSize": pageSize,
468
503
  "pageToken": pageToken
469
504
  }
package/esm/index.d.ts CHANGED
@@ -94,6 +94,7 @@ export { NativeTransaction } from './generated/models/NativeTransaction.js';
94
94
  export { Network } from './generated/models/Network.js';
95
95
  export { NetworkToken } from './generated/models/NetworkToken.js';
96
96
  export { NetworkTokenDetails } from './generated/models/NetworkTokenDetails.js';
97
+ export { NetworkType } from './generated/models/NetworkType.js';
97
98
  export { NftCollection } from './generated/models/NftCollection.js';
98
99
  export { NftCollectionWithMetrics } from './generated/models/NftCollectionWithMetrics.js';
99
100
  export { NftFilterOptionsProperty } from './generated/models/NftFilterOptionsProperty.js';
package/esm/index.js CHANGED
@@ -25,6 +25,7 @@ export { ListingEventType } from './generated/models/ListingEventType.js';
25
25
  export { ListingsSortByOption } from './generated/models/ListingsSortByOption.js';
26
26
  export { ListingType } from './generated/models/ListingType.js';
27
27
  export { Network } from './generated/models/Network.js';
28
+ export { NetworkType } from './generated/models/NetworkType.js';
28
29
  export { NftSearchResultTypeOption } from './generated/models/NftSearchResultTypeOption.js';
29
30
  export { NftTokenMetadataStatus } from './generated/models/NftTokenMetadataStatus.js';
30
31
  export { OperationStatus } from './generated/models/OperationStatus.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-alpha.118",
3
+ "version": "2.8.0-alpha.119",
4
4
  "description": "sdk for interacting with glacier-api",
5
5
  "author": "Oliver Wang <oliver.wang@avalabs.org>",
6
6
  "homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
@@ -29,5 +29,5 @@
29
29
  "bugs": {
30
30
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
31
31
  },
32
- "gitHead": "923823812836bbc23a06c4753df9be4010f9a9c6"
32
+ "gitHead": "e5665c85742950fae782221255fccecc0bc90757"
33
33
  }