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.
package/dist/index.d.ts CHANGED
@@ -43,4 +43,5 @@ export * from "./rest/types";
43
43
  export * from "./rest/dex";
44
44
  export * from "./rest/dex-types.generated";
45
45
  export * as AultDex from "./rest/dex.generated";
46
+ export * from "./rest/portfolio";
46
47
  export * from "./ws";
package/dist/index.js CHANGED
@@ -450,7 +450,7 @@ var GAS_CONSTANTS = {
450
450
  APPROVE_BUILDER: 81e3,
451
451
  REVOKE_BUILDER: 57e3,
452
452
  SET_REFERRAL_CODE: 76e3,
453
- SET_REFERRAL: 9e4,
453
+ SET_REFERRAL: 8e4,
454
454
  // CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go) exactly:
455
455
  // the agent ante enforces MinGasLimit ≤ gas ≤ MinGasLimit×1.2, so any drift
456
456
  // makes the SDK over- or under-shoot that window.
@@ -459,7 +459,10 @@ var GAS_CONSTANTS = {
459
459
  SCALE_ORDER_BASE: 115e3,
460
460
  SCALE_ORDER_PER_SUB: 13e3,
461
461
  CANCEL_ORDER_BASE: 5e4,
462
- CANCEL_ORDER_PER_ID: 19e3,
462
+ CANCEL_ORDER_PER_ID: 13e3,
463
+ // MsgModifyOrders is gas-per-order with no base (chain MinGasPerModifyOrder).
464
+ // Mirrored for parity; no high-level/agent method consumes it yet.
465
+ MODIFY_ORDER_PER_ID: 113e3,
463
466
  // Accountx module
464
467
  OPEN_ACCOUNT: 96e3,
465
468
  // Staking module (cosmos-sdk standard, NOT fee-free — user pays gas).
@@ -10970,6 +10973,35 @@ var getOpenAPISpec = async (options) => {
10970
10973
  });
10971
10974
  };
10972
10975
 
10976
+ // src/rest/portfolio.ts
10977
+ var enc = (s) => encodeURIComponent(s);
10978
+ function getPortfolioHoldings(address, options) {
10979
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/holdings`, {
10980
+ ...options,
10981
+ method: "GET"
10982
+ });
10983
+ }
10984
+ function getPortfolioFlows(address, range, options) {
10985
+ const query = range ? `?range=${range}` : "";
10986
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/flows${query}`, {
10987
+ ...options,
10988
+ method: "GET"
10989
+ });
10990
+ }
10991
+ function getPortfolioPnl(address, range, options) {
10992
+ const query = range ? `?range=${range}` : "";
10993
+ return dexFetch(`/api/v1/portfolio/${enc(address)}/pnl${query}`, {
10994
+ ...options,
10995
+ method: "GET"
10996
+ });
10997
+ }
10998
+ function getPortfolioTimeSeries(address, range = "day", options) {
10999
+ return dexFetch(
11000
+ `/api/v1/portfolio/${enc(address)}/time?range=${range}`,
11001
+ { ...options, method: "GET" }
11002
+ );
11003
+ }
11004
+
10973
11005
  // src/rest/dex.ts
10974
11006
  function bind(context, fn) {
10975
11007
  return ((...args) => {
@@ -10996,6 +11028,10 @@ function createDexApi(context) {
10996
11028
  listMyTrades: bind(context, listMyTrades),
10997
11029
  getBalance: bind(context, getBalance),
10998
11030
  getStats: bind(context, getStats),
11031
+ getPortfolioHoldings: bind(context, getPortfolioHoldings),
11032
+ getPortfolioFlows: bind(context, getPortfolioFlows),
11033
+ getPortfolioPnl: bind(context, getPortfolioPnl),
11034
+ getPortfolioTimeSeries: bind(context, getPortfolioTimeSeries),
10999
11035
  getUDFConfig: bind(context, getUDFConfig),
11000
11036
  getUDFTime: bind(context, getUDFTime),
11001
11037
  getUDFSymbol: bind(context, getUDFSymbol),
@@ -25258,7 +25294,7 @@ function createDexWs(url, options) {
25258
25294
  }
25259
25295
 
25260
25296
  // src/index.ts
25261
- var SDK_VERSION = "0.0.2-alpha.24";
25297
+ var SDK_VERSION = "0.0.2-alpha.26";
25262
25298
  export {
25263
25299
  AGENT_DEFAULTS,
25264
25300
  AULT_SIGNER_MARKER,
@@ -25437,6 +25473,10 @@ export {
25437
25473
  getOrderbookQueryLimitDefault,
25438
25474
  getOrderbookQueryLimitMax,
25439
25475
  getOrderbookResponseMarketIdRegExp,
25476
+ getPortfolioFlows,
25477
+ getPortfolioHoldings,
25478
+ getPortfolioPnl,
25479
+ getPortfolioTimeSeries,
25440
25480
  getStatsResponseMarketsItemBaseVolumeRegExp,
25441
25481
  getStatsResponseMarketsItemEstimatedFeeRegExp,
25442
25482
  getStatsResponseMarketsItemQuoteVolumeRegExp,