ault-sdk-ts 0.0.2-alpha.24 → 0.0.2-alpha.26

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.
@@ -58,13 +58,14 @@ export declare const GAS_CONSTANTS: {
58
58
  readonly APPROVE_BUILDER: 81000;
59
59
  readonly REVOKE_BUILDER: 57000;
60
60
  readonly SET_REFERRAL_CODE: 76000;
61
- readonly SET_REFERRAL: 90000;
61
+ readonly SET_REFERRAL: 80000;
62
62
  readonly LIMIT_ORDER: 125000;
63
63
  readonly MARKET_ORDER: 119000;
64
64
  readonly SCALE_ORDER_BASE: 115000;
65
65
  readonly SCALE_ORDER_PER_SUB: 13000;
66
66
  readonly CANCEL_ORDER_BASE: 50000;
67
- readonly CANCEL_ORDER_PER_ID: 19000;
67
+ readonly CANCEL_ORDER_PER_ID: 13000;
68
+ readonly MODIFY_ORDER_PER_ID: 113000;
68
69
  readonly OPEN_ACCOUNT: 96000;
69
70
  readonly DELEGATE: 220000;
70
71
  readonly UNDELEGATE: 220000;
package/dist/index.cjs CHANGED
@@ -207,6 +207,10 @@ __export(index_exports, {
207
207
  getOrderbookQueryLimitDefault: () => getOrderbookQueryLimitDefault,
208
208
  getOrderbookQueryLimitMax: () => getOrderbookQueryLimitMax,
209
209
  getOrderbookResponseMarketIdRegExp: () => getOrderbookResponseMarketIdRegExp,
210
+ getPortfolioFlows: () => getPortfolioFlows,
211
+ getPortfolioHoldings: () => getPortfolioHoldings,
212
+ getPortfolioPnl: () => getPortfolioPnl,
213
+ getPortfolioTimeSeries: () => getPortfolioTimeSeries,
210
214
  getStatsResponseMarketsItemBaseVolumeRegExp: () => getStatsResponseMarketsItemBaseVolumeRegExp,
211
215
  getStatsResponseMarketsItemEstimatedFeeRegExp: () => getStatsResponseMarketsItemEstimatedFeeRegExp,
212
216
  getStatsResponseMarketsItemQuoteVolumeRegExp: () => getStatsResponseMarketsItemQuoteVolumeRegExp,
@@ -726,7 +730,7 @@ var GAS_CONSTANTS = {
726
730
  APPROVE_BUILDER: 81e3,
727
731
  REVOKE_BUILDER: 57e3,
728
732
  SET_REFERRAL_CODE: 76e3,
729
- SET_REFERRAL: 9e4,
733
+ SET_REFERRAL: 8e4,
730
734
  // CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go) exactly:
731
735
  // the agent ante enforces MinGasLimit ≤ gas ≤ MinGasLimit×1.2, so any drift
732
736
  // makes the SDK over- or under-shoot that window.
@@ -735,7 +739,10 @@ var GAS_CONSTANTS = {
735
739
  SCALE_ORDER_BASE: 115e3,
736
740
  SCALE_ORDER_PER_SUB: 13e3,
737
741
  CANCEL_ORDER_BASE: 5e4,
738
- CANCEL_ORDER_PER_ID: 19e3,
742
+ CANCEL_ORDER_PER_ID: 13e3,
743
+ // MsgModifyOrders is gas-per-order with no base (chain MinGasPerModifyOrder).
744
+ // Mirrored for parity; no high-level/agent method consumes it yet.
745
+ MODIFY_ORDER_PER_ID: 113e3,
739
746
  // Accountx module
740
747
  OPEN_ACCOUNT: 96e3,
741
748
  // Staking module (cosmos-sdk standard, NOT fee-free — user pays gas).
@@ -11246,6 +11253,35 @@ var getOpenAPISpec = async (options) => {
11246
11253
  });
11247
11254
  };
11248
11255
 
11256
+ // src/rest/portfolio.ts
11257
+ var enc = (s) => encodeURIComponent(s);
11258
+ function getPortfolioHoldings(address, options) {
11259
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/holdings`, {
11260
+ ...options,
11261
+ method: "GET"
11262
+ });
11263
+ }
11264
+ function getPortfolioFlows(address, range, options) {
11265
+ const query = range ? `?range=${range}` : "";
11266
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/flows${query}`, {
11267
+ ...options,
11268
+ method: "GET"
11269
+ });
11270
+ }
11271
+ function getPortfolioPnl(address, range, options) {
11272
+ const query = range ? `?range=${range}` : "";
11273
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/pnl${query}`, {
11274
+ ...options,
11275
+ method: "GET"
11276
+ });
11277
+ }
11278
+ function getPortfolioTimeSeries(address, range = "day", options) {
11279
+ return dexFetch(
11280
+ `/api/v1/portfolio/${enc(address)}/time?range=${range}`,
11281
+ { ...options, method: "GET" }
11282
+ );
11283
+ }
11284
+
11249
11285
  // src/rest/dex.ts
11250
11286
  function bind(context, fn) {
11251
11287
  return ((...args) => {
@@ -11272,6 +11308,10 @@ function createDexApi(context) {
11272
11308
  listMyTrades: bind(context, listMyTrades),
11273
11309
  getBalance: bind(context, getBalance),
11274
11310
  getStats: bind(context, getStats),
11311
+ getPortfolioHoldings: bind(context, getPortfolioHoldings),
11312
+ getPortfolioFlows: bind(context, getPortfolioFlows),
11313
+ getPortfolioPnl: bind(context, getPortfolioPnl),
11314
+ getPortfolioTimeSeries: bind(context, getPortfolioTimeSeries),
11275
11315
  getUDFConfig: bind(context, getUDFConfig),
11276
11316
  getUDFTime: bind(context, getUDFTime),
11277
11317
  getUDFSymbol: bind(context, getUDFSymbol),
@@ -25534,7 +25574,7 @@ function createDexWs(url, options) {
25534
25574
  }
25535
25575
 
25536
25576
  // src/index.ts
25537
- var SDK_VERSION = "0.0.2-alpha.24";
25577
+ var SDK_VERSION = "0.0.2-alpha.26";
25538
25578
  // Annotate the CommonJS export names for ESM import in node:
25539
25579
  0 && (module.exports = {
25540
25580
  AGENT_DEFAULTS,
@@ -25714,6 +25754,10 @@ var SDK_VERSION = "0.0.2-alpha.24";
25714
25754
  getOrderbookQueryLimitDefault,
25715
25755
  getOrderbookQueryLimitMax,
25716
25756
  getOrderbookResponseMarketIdRegExp,
25757
+ getPortfolioFlows,
25758
+ getPortfolioHoldings,
25759
+ getPortfolioPnl,
25760
+ getPortfolioTimeSeries,
25717
25761
  getStatsResponseMarketsItemBaseVolumeRegExp,
25718
25762
  getStatsResponseMarketsItemEstimatedFeeRegExp,
25719
25763
  getStatsResponseMarketsItemQuoteVolumeRegExp,