@imtbl/sdk 0.23.2 → 0.24.0-alpha.1

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
@@ -996,6 +996,67 @@ interface Collection$1 {
996
996
  'last_metadata_synced_at': string | null;
997
997
  }
998
998
 
999
+ /**
1000
+ * Immutable zkEVM API
1001
+ * Immutable Multi Rollup API
1002
+ *
1003
+ * The version of the OpenAPI document: 1.0.0
1004
+ * Contact: support@immutable.com
1005
+ *
1006
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1007
+ * https://openapi-generator.tech
1008
+ * Do not edit the class manually.
1009
+ */
1010
+ /**
1011
+ *
1012
+ * @export
1013
+ * @interface CollectionMetadata
1014
+ */
1015
+ interface CollectionMetadata {
1016
+ /**
1017
+ * The name of the collection
1018
+ * @type {string}
1019
+ * @memberof CollectionMetadata
1020
+ */
1021
+ 'name': string | null;
1022
+ /**
1023
+ * The symbol of contract
1024
+ * @type {string}
1025
+ * @memberof CollectionMetadata
1026
+ */
1027
+ 'symbol': string | null;
1028
+ /**
1029
+ * The description of collection
1030
+ * @type {string}
1031
+ * @memberof CollectionMetadata
1032
+ */
1033
+ 'description': string | null;
1034
+ /**
1035
+ * The url of the collection image
1036
+ * @type {string}
1037
+ * @memberof CollectionMetadata
1038
+ */
1039
+ 'image': string | null;
1040
+ /**
1041
+ * The url of external link
1042
+ * @type {string}
1043
+ * @memberof CollectionMetadata
1044
+ */
1045
+ 'external_link': string | null;
1046
+ /**
1047
+ * The uri for the metadata of the collection
1048
+ * @type {string}
1049
+ * @memberof CollectionMetadata
1050
+ */
1051
+ 'contract_uri': string | null;
1052
+ /**
1053
+ * The metadata uri for nft
1054
+ * @type {string}
1055
+ * @memberof CollectionMetadata
1056
+ */
1057
+ 'base_uri': string | null;
1058
+ }
1059
+
999
1060
  /**
1000
1061
  * Immutable zkEVM API
1001
1062
  * Immutable Multi Rollup API
@@ -1628,6 +1689,313 @@ interface ListTokensResult {
1628
1689
  'page': Page$2;
1629
1690
  }
1630
1691
 
1692
+ /**
1693
+ * Immutable zkEVM API
1694
+ * Immutable Multi Rollup API
1695
+ *
1696
+ * The version of the OpenAPI document: 1.0.0
1697
+ * Contact: support@immutable.com
1698
+ *
1699
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1700
+ * https://openapi-generator.tech
1701
+ * Do not edit the class manually.
1702
+ */
1703
+ /**
1704
+ *
1705
+ * @export
1706
+ * @interface MetadataRefreshRateLimitResult
1707
+ */
1708
+ interface MetadataRefreshRateLimitResult {
1709
+ /**
1710
+ *
1711
+ * @type {string}
1712
+ * @memberof MetadataRefreshRateLimitResult
1713
+ */
1714
+ 'imx_refreshes_limit': string;
1715
+ /**
1716
+ *
1717
+ * @type {string}
1718
+ * @memberof MetadataRefreshRateLimitResult
1719
+ */
1720
+ 'imx_refresh_limit_reset': string;
1721
+ /**
1722
+ *
1723
+ * @type {string}
1724
+ * @memberof MetadataRefreshRateLimitResult
1725
+ */
1726
+ 'imx_remaining_refreshes': string;
1727
+ /**
1728
+ *
1729
+ * @type {string}
1730
+ * @memberof MetadataRefreshRateLimitResult
1731
+ */
1732
+ 'retry_after': string;
1733
+ }
1734
+
1735
+ /**
1736
+ * Immutable zkEVM API
1737
+ * Immutable Multi Rollup API
1738
+ *
1739
+ * The version of the OpenAPI document: 1.0.0
1740
+ * Contact: support@immutable.com
1741
+ *
1742
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1743
+ * https://openapi-generator.tech
1744
+ * Do not edit the class manually.
1745
+ */
1746
+
1747
+ /**
1748
+ *
1749
+ * @export
1750
+ * @interface RefreshCollectionMetadataRequest
1751
+ */
1752
+ interface RefreshCollectionMetadataRequest {
1753
+ /**
1754
+ *
1755
+ * @type {CollectionMetadata}
1756
+ * @memberof RefreshCollectionMetadataRequest
1757
+ */
1758
+ 'collection_metadata': CollectionMetadata;
1759
+ }
1760
+
1761
+ /**
1762
+ * Immutable zkEVM API
1763
+ * Immutable Multi Rollup API
1764
+ *
1765
+ * The version of the OpenAPI document: 1.0.0
1766
+ * Contact: support@immutable.com
1767
+ *
1768
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1769
+ * https://openapi-generator.tech
1770
+ * Do not edit the class manually.
1771
+ */
1772
+
1773
+ /**
1774
+ *
1775
+ * @export
1776
+ * @interface RefreshCollectionMetadataResult
1777
+ */
1778
+ interface RefreshCollectionMetadataResult {
1779
+ /**
1780
+ *
1781
+ * @type {string}
1782
+ * @memberof RefreshCollectionMetadataResult
1783
+ */
1784
+ 'contract_address': string;
1785
+ /**
1786
+ *
1787
+ * @type {Chain}
1788
+ * @memberof RefreshCollectionMetadataResult
1789
+ */
1790
+ 'chain': Chain$1;
1791
+ /**
1792
+ *
1793
+ * @type {CollectionMetadata}
1794
+ * @memberof RefreshCollectionMetadataResult
1795
+ */
1796
+ 'collection_metadata': CollectionMetadata;
1797
+ }
1798
+
1799
+ /**
1800
+ * Immutable zkEVM API
1801
+ * Immutable Multi Rollup API
1802
+ *
1803
+ * The version of the OpenAPI document: 1.0.0
1804
+ * Contact: support@immutable.com
1805
+ *
1806
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1807
+ * https://openapi-generator.tech
1808
+ * Do not edit the class manually.
1809
+ */
1810
+ /**
1811
+ *
1812
+ * @export
1813
+ * @interface RefreshMetadataByIDAllOf
1814
+ */
1815
+ interface RefreshMetadataByIDAllOf {
1816
+ /**
1817
+ * Metadata ID in UUIDv4 format
1818
+ * @type {string}
1819
+ * @memberof RefreshMetadataByIDAllOf
1820
+ */
1821
+ 'metadata_id': string;
1822
+ }
1823
+
1824
+ /**
1825
+ * Immutable zkEVM API
1826
+ * Immutable Multi Rollup API
1827
+ *
1828
+ * The version of the OpenAPI document: 1.0.0
1829
+ * Contact: support@immutable.com
1830
+ *
1831
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1832
+ * https://openapi-generator.tech
1833
+ * Do not edit the class manually.
1834
+ */
1835
+
1836
+ /**
1837
+ *
1838
+ * @export
1839
+ * @interface RefreshableNFTAttributes
1840
+ */
1841
+ interface RefreshableNFTAttributes {
1842
+ /**
1843
+ * The name of the NFT
1844
+ * @type {string}
1845
+ * @memberof RefreshableNFTAttributes
1846
+ */
1847
+ 'name': string | null;
1848
+ /**
1849
+ * The description of the NFT
1850
+ * @type {string}
1851
+ * @memberof RefreshableNFTAttributes
1852
+ */
1853
+ 'description': string | null;
1854
+ /**
1855
+ * The image url of the NFT
1856
+ * @type {string}
1857
+ * @memberof RefreshableNFTAttributes
1858
+ */
1859
+ 'image': string | null;
1860
+ /**
1861
+ * The external link of the NFT
1862
+ * @type {string}
1863
+ * @memberof RefreshableNFTAttributes
1864
+ */
1865
+ 'external_url': string | null;
1866
+ /**
1867
+ * The animation url of the NFT
1868
+ * @type {string}
1869
+ * @memberof RefreshableNFTAttributes
1870
+ */
1871
+ 'animation_url': string | null;
1872
+ /**
1873
+ * The youtube link of the NFT
1874
+ * @type {string}
1875
+ * @memberof RefreshableNFTAttributes
1876
+ */
1877
+ 'youtube_url': string | null;
1878
+ /**
1879
+ * List of Metadata attributes
1880
+ * @type {Array<NFTMetadataAttribute>}
1881
+ * @memberof RefreshableNFTAttributes
1882
+ */
1883
+ 'attributes': Array<NFTMetadataAttribute> | null;
1884
+ }
1885
+
1886
+ /**
1887
+ * Immutable zkEVM API
1888
+ * Immutable Multi Rollup API
1889
+ *
1890
+ * The version of the OpenAPI document: 1.0.0
1891
+ * Contact: support@immutable.com
1892
+ *
1893
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1894
+ * https://openapi-generator.tech
1895
+ * Do not edit the class manually.
1896
+ */
1897
+
1898
+ /**
1899
+ * @type RefreshMetadataByID
1900
+ * @export
1901
+ */
1902
+ type RefreshMetadataByID = RefreshMetadataByIDAllOf & RefreshableNFTAttributes;
1903
+
1904
+ /**
1905
+ * Immutable zkEVM API
1906
+ * Immutable Multi Rollup API
1907
+ *
1908
+ * The version of the OpenAPI document: 1.0.0
1909
+ * Contact: support@immutable.com
1910
+ *
1911
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1912
+ * https://openapi-generator.tech
1913
+ * Do not edit the class manually.
1914
+ */
1915
+
1916
+ /**
1917
+ * Request body for refreshing metadata by id
1918
+ * @export
1919
+ * @interface RefreshMetadataByIDRequest
1920
+ */
1921
+ interface RefreshMetadataByIDRequest {
1922
+ /**
1923
+ *
1924
+ * @type {Array<RefreshMetadataByID>}
1925
+ * @memberof RefreshMetadataByIDRequest
1926
+ */
1927
+ 'metadata'?: Array<RefreshMetadataByID>;
1928
+ }
1929
+
1930
+ /**
1931
+ * Immutable zkEVM API
1932
+ * Immutable Multi Rollup API
1933
+ *
1934
+ * The version of the OpenAPI document: 1.0.0
1935
+ * Contact: support@immutable.com
1936
+ *
1937
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1938
+ * https://openapi-generator.tech
1939
+ * Do not edit the class manually.
1940
+ */
1941
+ /**
1942
+ *
1943
+ * @export
1944
+ * @interface RefreshMetadataByTokenIDAllOf
1945
+ */
1946
+ interface RefreshMetadataByTokenIDAllOf {
1947
+ /**
1948
+ * An `uint256` token id as string
1949
+ * @type {string}
1950
+ * @memberof RefreshMetadataByTokenIDAllOf
1951
+ */
1952
+ 'token_id': string;
1953
+ }
1954
+
1955
+ /**
1956
+ * Immutable zkEVM API
1957
+ * Immutable Multi Rollup API
1958
+ *
1959
+ * The version of the OpenAPI document: 1.0.0
1960
+ * Contact: support@immutable.com
1961
+ *
1962
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1963
+ * https://openapi-generator.tech
1964
+ * Do not edit the class manually.
1965
+ */
1966
+
1967
+ /**
1968
+ * @type RefreshMetadataByTokenID
1969
+ * @export
1970
+ */
1971
+ type RefreshMetadataByTokenID = RefreshMetadataByTokenIDAllOf & RefreshableNFTAttributes;
1972
+
1973
+ /**
1974
+ * Immutable zkEVM API
1975
+ * Immutable Multi Rollup API
1976
+ *
1977
+ * The version of the OpenAPI document: 1.0.0
1978
+ * Contact: support@immutable.com
1979
+ *
1980
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1981
+ * https://openapi-generator.tech
1982
+ * Do not edit the class manually.
1983
+ */
1984
+
1985
+ /**
1986
+ *
1987
+ * @export
1988
+ * @interface RefreshNFTMetadataByTokenIDRequest
1989
+ */
1990
+ interface RefreshNFTMetadataByTokenIDRequest {
1991
+ /**
1992
+ * List of nft metadata to be refreshed
1993
+ * @type {Array<RefreshMetadataByTokenID>}
1994
+ * @memberof RefreshNFTMetadataByTokenIDRequest
1995
+ */
1996
+ 'nft_metadata': Array<RefreshMetadataByTokenID>;
1997
+ }
1998
+
1631
1999
  /**
1632
2000
  * Request parameters for getActivity operation in ActivitiesApi.
1633
2001
  * @export
@@ -1810,6 +2178,82 @@ interface CollectionsApiListCollectionsByNFTOwnerRequest {
1810
2178
  */
1811
2179
  readonly pageSize?: number;
1812
2180
  }
2181
+ /**
2182
+ * Request parameters for refreshCollectionMetadata operation in CollectionsApi.
2183
+ * @export
2184
+ * @interface CollectionsApiRefreshCollectionMetadataRequest
2185
+ */
2186
+ interface CollectionsApiRefreshCollectionMetadataRequest {
2187
+ /**
2188
+ * The address contract
2189
+ * @type {string}
2190
+ * @memberof CollectionsApiRefreshCollectionMetadata
2191
+ */
2192
+ readonly contractAddress: string;
2193
+ /**
2194
+ * The name of chain
2195
+ * @type {string}
2196
+ * @memberof CollectionsApiRefreshCollectionMetadata
2197
+ */
2198
+ readonly chainName: string;
2199
+ /**
2200
+ * The request body
2201
+ * @type {RefreshCollectionMetadataRequest}
2202
+ * @memberof CollectionsApiRefreshCollectionMetadata
2203
+ */
2204
+ readonly refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest;
2205
+ }
2206
+
2207
+ /**
2208
+ * Request parameters for refreshMetadataByID operation in MetadataApi.
2209
+ * @export
2210
+ * @interface MetadataApiRefreshMetadataByIDRequest
2211
+ */
2212
+ interface MetadataApiRefreshMetadataByIDRequest {
2213
+ /**
2214
+ * The name of chain
2215
+ * @type {string}
2216
+ * @memberof MetadataApiRefreshMetadataByID
2217
+ */
2218
+ readonly chainName: string;
2219
+ /**
2220
+ * Contract address
2221
+ * @type {string}
2222
+ * @memberof MetadataApiRefreshMetadataByID
2223
+ */
2224
+ readonly contractAddress: string;
2225
+ /**
2226
+ * NFT Metadata Refresh Request
2227
+ * @type {RefreshMetadataByIDRequest}
2228
+ * @memberof MetadataApiRefreshMetadataByID
2229
+ */
2230
+ readonly refreshMetadataByIDRequest: RefreshMetadataByIDRequest;
2231
+ }
2232
+ /**
2233
+ * Request parameters for refreshNFTMetadataByTokenID operation in MetadataApi.
2234
+ * @export
2235
+ * @interface MetadataApiRefreshNFTMetadataByTokenIDRequest
2236
+ */
2237
+ interface MetadataApiRefreshNFTMetadataByTokenIDRequest {
2238
+ /**
2239
+ * The address of contract
2240
+ * @type {string}
2241
+ * @memberof MetadataApiRefreshNFTMetadataByTokenID
2242
+ */
2243
+ readonly contractAddress: string;
2244
+ /**
2245
+ * The name of chain
2246
+ * @type {string}
2247
+ * @memberof MetadataApiRefreshNFTMetadataByTokenID
2248
+ */
2249
+ readonly chainName: string;
2250
+ /**
2251
+ * the request body
2252
+ * @type {RefreshNFTMetadataByTokenIDRequest}
2253
+ * @memberof MetadataApiRefreshNFTMetadataByTokenID
2254
+ */
2255
+ readonly refreshNFTMetadataByTokenIDRequest: RefreshNFTMetadataByTokenIDRequest;
2256
+ }
1813
2257
 
1814
2258
  /**
1815
2259
  * Request parameters for listNFTOwners operation in NftOwnersApi.
@@ -2010,6 +2454,7 @@ declare class APIError$1 extends Error {
2010
2454
  interface APIConfigurationParams {
2011
2455
  basePath: string;
2012
2456
  headers?: Record<string, string>;
2457
+ baseConfig?: ImmutableConfiguration;
2013
2458
  }
2014
2459
  interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfigurationParams> {
2015
2460
  }
@@ -2027,6 +2472,7 @@ declare class BlockchainData {
2027
2472
  private readonly nfts;
2028
2473
  private readonly nftOwners;
2029
2474
  private readonly tokens;
2475
+ private readonly metadata;
2030
2476
  constructor(moduleConfig: BlockchainDataModuleConfiguration);
2031
2477
  /**
2032
2478
  * List all activities
@@ -2112,6 +2558,27 @@ declare class BlockchainData {
2112
2558
  * @throws {@link index.APIError}
2113
2559
  */
2114
2560
  getToken(request: TokensApiGetERC20TokenRequest): Promise<GetTokenResult>;
2561
+ /**
2562
+ * Refresh collection metadata
2563
+ * @param request - the request object containing the parameters to be provided in the API request
2564
+ * @returns a promise that resolves with the updated collection
2565
+ * @throws {@link index.APIError}
2566
+ */
2567
+ refreshCollectionMetadata(request: CollectionsApiRefreshCollectionMetadataRequest): Promise<RefreshCollectionMetadataResult>;
2568
+ /**
2569
+ * Refresh metadata for specific NFTs
2570
+ * @param request - the request object containing the parameters to be provided in the API request
2571
+ * @returns a promise that resolves with the remaining rate limits
2572
+ * @throws {@link index.APIError}
2573
+ */
2574
+ refreshNFTMetadata(request: MetadataApiRefreshNFTMetadataByTokenIDRequest): Promise<MetadataRefreshRateLimitResult>;
2575
+ /**
2576
+ * Refresh metadata by ID. This will refresh metadata for all NFTs that reference the given metadata ID.
2577
+ * @param request - the request object containing the parameters to be provided in the API request
2578
+ * @returns a promise that resolves with the remaining rate limits
2579
+ * @throws {@link index.APIError}
2580
+ */
2581
+ refreshStackedMetadata(request: MetadataApiRefreshMetadataByIDRequest): Promise<MetadataRefreshRateLimitResult>;
2115
2582
  }
2116
2583
 
2117
2584
  type ActivityType = ActivityType$1;
@@ -14645,32 +15112,21 @@ type NoRouteOptions = {
14645
15112
  * Represents a funding route
14646
15113
  * @property {number} priority - The priority of the route
14647
15114
  * @property {FundingStep[]} steps - The steps associated with this funding route
14648
- * @property {TotalFees | undefined} totalFees - The total fees for this route
14649
15115
  */
14650
15116
  type FundingRoute = {
14651
15117
  priority: number;
14652
15118
  steps: FundingStep[];
14653
- totalFees?: TotalFees;
14654
- };
14655
- /**
14656
- * Represents the total fees for a route
14657
- * @property {Fee} gas - The total gas fees for this funding step
14658
- * @property {Fee} other - The total of all other fees associated with this funding step
14659
- * @property {Fee} total - The total combined gas and other fees for this funding step
14660
- */
14661
- type TotalFees = {
14662
- gas: Fee;
14663
- other: Fee;
14664
- total: Fee;
14665
15119
  };
14666
15120
  /**
14667
15121
  * Represents a fee
14668
15122
  * @property {BigNumber} amount - The amount of the fee
14669
15123
  * @property {string} formatted - The formatted amount of the fee
15124
+ * @property {TokenInfo | undefined} token - The token info for the fee
14670
15125
  */
14671
15126
  type Fee = {
14672
15127
  amount: BigNumber;
14673
15128
  formattedAmount: string;
15129
+ token?: TokenInfo;
14674
15130
  };
14675
15131
  type FundingStep = BridgeFundingStep | SwapFundingStep | OnRampFundingStep;
14676
15132
  /**