@chainstream-io/sdk 0.1.11 → 0.1.13

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.cts CHANGED
@@ -1,2 +1,2 @@
1
- export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-Bm_jrdor.cjs';
2
- import './WatchlistApi-DR7WbVca.cjs';
1
+ export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-VnEIrX1W.cjs';
2
+ import './WatchlistApi-Bs1J8X9y.cjs';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-BzDo82O1.js';
2
- import './WatchlistApi-DR7WbVca.js';
1
+ export { q as DexAggregatorOptions, r as DexClient, p as DexRequestContext, L as LIB_VERSION, P as PostOptions, o as TokenProvider } from './index-BSb_7Tx_.js';
2
+ import './WatchlistApi-Bs1J8X9y.js';
package/dist/index.mjs CHANGED
@@ -1653,11 +1653,11 @@ function CandleFromJSONTyped(json, ignoreDiscriminator) {
1653
1653
  };
1654
1654
  }
1655
1655
 
1656
- // src/openapi/models/ChainSymbol.ts
1657
- function ChainSymbolFromJSON(json) {
1658
- return ChainSymbolFromJSONTyped(json, false);
1656
+ // src/openapi/models/Chain.ts
1657
+ function ChainFromJSON(json) {
1658
+ return ChainFromJSONTyped(json, false);
1659
1659
  }
1660
- function ChainSymbolFromJSONTyped(json, ignoreDiscriminator) {
1660
+ function ChainFromJSONTyped(json, ignoreDiscriminator) {
1661
1661
  return json;
1662
1662
  }
1663
1663
 
@@ -1670,6 +1670,7 @@ function ClaimRedPacketInputToJSONTyped(value, ignoreDiscriminator = false) {
1670
1670
  return value;
1671
1671
  }
1672
1672
  return {
1673
+ "chain": value["chain"],
1673
1674
  "packetId": value["packetId"],
1674
1675
  "shareId": value["shareId"],
1675
1676
  "password": value["password"],
@@ -1686,6 +1687,7 @@ function CreateRedPacketInputToJSONTyped(value, ignoreDiscriminator = false) {
1686
1687
  return value;
1687
1688
  }
1688
1689
  return {
1690
+ "chain": value["chain"],
1689
1691
  "creator": value["creator"],
1690
1692
  "mint": value["mint"],
1691
1693
  "maxClaims": value["maxClaims"],
@@ -1801,6 +1803,36 @@ function DexPoolDTOFromJSONTyped(json, ignoreDiscriminator) {
1801
1803
  };
1802
1804
  }
1803
1805
 
1806
+ // src/openapi/models/EstimateGasLimitInput.ts
1807
+ function EstimateGasLimitInputToJSON(json) {
1808
+ return EstimateGasLimitInputToJSONTyped(json, false);
1809
+ }
1810
+ function EstimateGasLimitInputToJSONTyped(value, ignoreDiscriminator = false) {
1811
+ if (value == null) {
1812
+ return value;
1813
+ }
1814
+ return {
1815
+ "from": value["from"],
1816
+ "to": value["to"],
1817
+ "data": value["data"],
1818
+ "value": value["value"]
1819
+ };
1820
+ }
1821
+
1822
+ // src/openapi/models/EstimateGasLimitResponse.ts
1823
+ function EstimateGasLimitResponseFromJSON(json) {
1824
+ return EstimateGasLimitResponseFromJSONTyped(json, false);
1825
+ }
1826
+ function EstimateGasLimitResponseFromJSONTyped(json, ignoreDiscriminator) {
1827
+ if (json == null) {
1828
+ return json;
1829
+ }
1830
+ return {
1831
+ "gasLimit": json["gasLimit"],
1832
+ "chain": json["chain"]
1833
+ };
1834
+ }
1835
+
1804
1836
  // src/openapi/models/GainersAndLosersDTO.ts
1805
1837
  function GainersAndLosersDTOFromJSON(json) {
1806
1838
  return GainersAndLosersDTOFromJSONTyped(json, false);
@@ -1835,6 +1867,20 @@ function GainersAndLosersPageFromJSONTyped(json, ignoreDiscriminator) {
1835
1867
  };
1836
1868
  }
1837
1869
 
1870
+ // src/openapi/models/GasPriceResponse.ts
1871
+ function GasPriceResponseFromJSON(json) {
1872
+ return GasPriceResponseFromJSONTyped(json, false);
1873
+ }
1874
+ function GasPriceResponseFromJSONTyped(json, ignoreDiscriminator) {
1875
+ if (json == null) {
1876
+ return json;
1877
+ }
1878
+ return {
1879
+ "gasPrice": json["gasPrice"],
1880
+ "chain": json["chain"]
1881
+ };
1882
+ }
1883
+
1838
1884
  // src/openapi/models/JobDTO.ts
1839
1885
  function JobDTOFromJSON(json) {
1840
1886
  return JobDTOFromJSONTyped(json, false);
@@ -2008,7 +2054,7 @@ function RedPacketClaimDTOFromJSONTyped(json, ignoreDiscriminator) {
2008
2054
  }
2009
2055
  return {
2010
2056
  "packetId": json["packetId"],
2011
- "chain": ChainSymbolFromJSON(json["chain"]),
2057
+ "chain": ChainFromJSON(json["chain"]),
2012
2058
  "claimer": json["claimer"],
2013
2059
  "mint": json["mint"],
2014
2060
  "amount": json["amount"],
@@ -2044,7 +2090,7 @@ function RedPacketDTOFromJSONTyped(json, ignoreDiscriminator) {
2044
2090
  return json;
2045
2091
  }
2046
2092
  return {
2047
- "chain": ChainSymbolFromJSON(json["chain"]),
2093
+ "chain": ChainFromJSON(json["chain"]),
2048
2094
  "id": json["id"],
2049
2095
  "shareId": json["shareId"],
2050
2096
  "txHash": json["txHash"],
@@ -2513,7 +2559,7 @@ function TokenFromJSONTyped(json, ignoreDiscriminator) {
2513
2559
  "description": json["description"] == null ? void 0 : json["description"],
2514
2560
  "market": json["market"] == null ? void 0 : json["market"],
2515
2561
  "extension": json["extension"] == null ? void 0 : json["extension"],
2516
- "stats": TokenStatFromJSON(json["stats"]),
2562
+ "stats": json["stats"] == null ? void 0 : TokenStatFromJSON(json["stats"]),
2517
2563
  "liquidity": json["liquidity"] == null ? void 0 : json["liquidity"].map(DexPoolDTOFromJSON),
2518
2564
  "marketData": TokenMarketDataFromJSON(json["marketData"])
2519
2565
  };
@@ -5622,6 +5668,9 @@ var TradeApi = class extends BaseAPI {
5622
5668
  if (requestParameters["afterBlockHeight"] != null) {
5623
5669
  queryParameters["afterBlockHeight"] = requestParameters["afterBlockHeight"];
5624
5670
  }
5671
+ if (requestParameters["transactionsSignature"] != null) {
5672
+ queryParameters["transactionsSignature"] = requestParameters["transactionsSignature"];
5673
+ }
5625
5674
  if (requestParameters["type"] != null) {
5626
5675
  queryParameters["type"] = requestParameters["type"];
5627
5676
  }
@@ -5814,6 +5863,9 @@ var TradeApi = class extends BaseAPI {
5814
5863
  if (requestParameters["afterBlockHeight"] != null) {
5815
5864
  queryParameters["afterBlockHeight"] = requestParameters["afterBlockHeight"];
5816
5865
  }
5866
+ if (requestParameters["transactionsSignature"] != null) {
5867
+ queryParameters["transactionsSignature"] = requestParameters["transactionsSignature"];
5868
+ }
5817
5869
  if (requestParameters["type"] != null) {
5818
5870
  queryParameters["type"] = requestParameters["type"];
5819
5871
  }
@@ -5847,6 +5899,90 @@ var TradeApi = class extends BaseAPI {
5847
5899
 
5848
5900
  // src/openapi/apis/TransactionApi.ts
5849
5901
  var TransactionApi = class extends BaseAPI {
5902
+ /**
5903
+ * CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.DESCRIPTION
5904
+ * CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.SUMMARY
5905
+ */
5906
+ async estimateGasLimitRaw(requestParameters, initOverrides) {
5907
+ if (requestParameters["chain"] == null) {
5908
+ throw new RequiredError(
5909
+ "chain",
5910
+ 'Required parameter "chain" was null or undefined when calling estimateGasLimit().'
5911
+ );
5912
+ }
5913
+ if (requestParameters["estimateGasLimitInput"] == null) {
5914
+ throw new RequiredError(
5915
+ "estimateGasLimitInput",
5916
+ 'Required parameter "estimateGasLimitInput" was null or undefined when calling estimateGasLimit().'
5917
+ );
5918
+ }
5919
+ const queryParameters = {};
5920
+ const headerParameters = {};
5921
+ headerParameters["Content-Type"] = "application/json";
5922
+ if (this.configuration && this.configuration.accessToken) {
5923
+ const token = this.configuration.accessToken;
5924
+ const tokenString = await token("bearer", []);
5925
+ if (tokenString) {
5926
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5927
+ }
5928
+ }
5929
+ let urlPath = `/v1/transaction/{chain}/estimate-gas-limit`;
5930
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
5931
+ const response = await this.request({
5932
+ path: urlPath,
5933
+ method: "POST",
5934
+ headers: headerParameters,
5935
+ query: queryParameters,
5936
+ body: EstimateGasLimitInputToJSON(requestParameters["estimateGasLimitInput"])
5937
+ }, initOverrides);
5938
+ return new JSONApiResponse(response, (jsonValue) => EstimateGasLimitResponseFromJSON(jsonValue));
5939
+ }
5940
+ /**
5941
+ * CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.DESCRIPTION
5942
+ * CONTROLLER.TRANSACTION.ESTIMATE_GAS_LIMIT.SUMMARY
5943
+ */
5944
+ async estimateGasLimit(requestParameters, initOverrides) {
5945
+ const response = await this.estimateGasLimitRaw(requestParameters, initOverrides);
5946
+ return await response.value();
5947
+ }
5948
+ /**
5949
+ * CONTROLLER.TRANSACTION.GET_GAS_PRICE.DESCRIPTION
5950
+ * CONTROLLER.TRANSACTION.GET_GAS_PRICE.SUMMARY
5951
+ */
5952
+ async getGasPriceRaw(requestParameters, initOverrides) {
5953
+ if (requestParameters["chain"] == null) {
5954
+ throw new RequiredError(
5955
+ "chain",
5956
+ 'Required parameter "chain" was null or undefined when calling getGasPrice().'
5957
+ );
5958
+ }
5959
+ const queryParameters = {};
5960
+ const headerParameters = {};
5961
+ if (this.configuration && this.configuration.accessToken) {
5962
+ const token = this.configuration.accessToken;
5963
+ const tokenString = await token("bearer", []);
5964
+ if (tokenString) {
5965
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
5966
+ }
5967
+ }
5968
+ let urlPath = `/v1/transaction/{chain}/gas-price`;
5969
+ urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters["chain"])));
5970
+ const response = await this.request({
5971
+ path: urlPath,
5972
+ method: "GET",
5973
+ headers: headerParameters,
5974
+ query: queryParameters
5975
+ }, initOverrides);
5976
+ return new JSONApiResponse(response, (jsonValue) => GasPriceResponseFromJSON(jsonValue));
5977
+ }
5978
+ /**
5979
+ * CONTROLLER.TRANSACTION.GET_GAS_PRICE.DESCRIPTION
5980
+ * CONTROLLER.TRANSACTION.GET_GAS_PRICE.SUMMARY
5981
+ */
5982
+ async getGasPrice(requestParameters, initOverrides) {
5983
+ const response = await this.getGasPriceRaw(requestParameters, initOverrides);
5984
+ return await response.value();
5985
+ }
5850
5986
  /**
5851
5987
  * CONTROLLER.TRANSACTION.SEND.DESCRIPTION
5852
5988
  * CONTROLLER.TRANSACTION.SEND.SUMMARY