ault-sdk-ts 0.17.1 → 0.18.0

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.cjs CHANGED
@@ -637,7 +637,7 @@ __export(index_exports, {
637
637
  module.exports = __toCommonJS(index_exports);
638
638
 
639
639
  // src/core/user-agent.ts
640
- var SDK_VERSION = "0.17.1";
640
+ var SDK_VERSION = "0.18.0";
641
641
  var USER_AGENT = `ault-sdk-ts/${SDK_VERSION}`;
642
642
  function isServerRuntime() {
643
643
  if (typeof document !== "undefined") return false;
@@ -1131,7 +1131,7 @@ var GAS_CONSTANTS = {
1131
1131
  REVOKE_BUILDER: 57e3,
1132
1132
  SET_REFERRAL_CODE: 76e3,
1133
1133
  SET_REFERRAL: 8e4,
1134
- // CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go, v3.0.0-rc.3) exactly:
1134
+ // CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go, v3.0.0-rc.5) exactly:
1135
1135
  // the agent ante enforces MinGasLimit ≤ gas ≤ MinGasLimit×1.2, so any drift
1136
1136
  // makes the SDK over- or under-shoot that window.
1137
1137
  LIMIT_ORDER: 155e3,
@@ -1145,10 +1145,10 @@ var GAS_CONSTANTS = {
1145
1145
  MODIFY_ORDER_PER_ID: 155e3,
1146
1146
  // Conditional and group orders (v3.0.0-rc.3). Modifying conditionals prices
1147
1147
  // each order on top of the base; a group order is flat whatever its shape.
1148
- CONDITIONAL_ORDER: 125e3,
1148
+ CONDITIONAL_ORDER: 14e4,
1149
1149
  MODIFY_CONDITIONAL_BASE: 55e3,
1150
1150
  MODIFY_CONDITIONAL_PER_ORDER: 49e3,
1151
- GROUP_ORDER: 222e3,
1151
+ GROUP_ORDER: 254e3,
1152
1152
  // Accountx module
1153
1153
  OPEN_ACCOUNT: 96e3,
1154
1154
  // Perpetual module (chain v3) — since v3.0.0-rc.2 every fee-free perpetual
@@ -1167,25 +1167,25 @@ var GAS_CONSTANTS = {
1167
1167
  // is not fee-free; its builder simulates like staking.
1168
1168
  LENDING_SUPPLY: 122e3,
1169
1169
  LENDING_WITHDRAW: 115e3,
1170
- LENDING_SUPPLY_COLLATERAL: 11e4,
1171
- LENDING_WITHDRAW_COLLATERAL: 24e4,
1172
- LENDING_BORROW: 26e4,
1170
+ LENDING_SUPPLY_COLLATERAL: 115e3,
1171
+ LENDING_WITHDRAW_COLLATERAL: 26e4,
1172
+ LENDING_BORROW: 28e4,
1173
1173
  LENDING_REPAY: 1e5,
1174
- LENDING_LIQUIDATE: 43e4,
1174
+ LENDING_LIQUIDATE: 49e4,
1175
1175
  LENDING_FUND_INSURANCE_FUND: 15e4,
1176
1176
  // Margin module (x/margin/types/fee_free.go). Deposit and withdraw price
1177
1177
  // each coin on top of the base.
1178
1178
  MARGIN_DEPOSIT_BASE: 88e3,
1179
- MARGIN_DEPOSIT_PER_COIN: 46e3,
1179
+ MARGIN_DEPOSIT_PER_COIN: 53e3,
1180
1180
  MARGIN_WITHDRAW_BASE: 74e3,
1181
- MARGIN_WITHDRAW_PER_COIN: 18e4,
1182
- MARGIN_BORROW: 227e3,
1181
+ MARGIN_WITHDRAW_PER_COIN: 21e4,
1182
+ MARGIN_BORROW: 25e4,
1183
1183
  MARGIN_REPAY: 259e3,
1184
1184
  // Vault module (x/vault/types/fee_free.go). A trading vault's creation adds
1185
1185
  // a per-market cost to its base, a lending vault's a per-pool cost to its own.
1186
- VAULT_CREATE_TRADING_BASE: 19e4,
1186
+ VAULT_CREATE_TRADING_BASE: 22e4,
1187
1187
  VAULT_CREATE_PER_MARKET: 9e3,
1188
- VAULT_CREATE_LENDING_BASE: 124e3,
1188
+ VAULT_CREATE_LENDING_BASE: 16e4,
1189
1189
  VAULT_CREATE_PER_LENDING_POOL: 7e3,
1190
1190
  VAULT_UPDATE_MANAGER: 95e3,
1191
1191
  // A config update is priced like creation: per spot market or per pool.
@@ -5222,6 +5222,7 @@ var EIP712_MSG_TYPES = {
5222
5222
  { name: "manager", type: "string" },
5223
5223
  { name: "initial_deposit", type: "NESTED", jsName: "initialDeposit" },
5224
5224
  { name: "fund_window", type: "NESTED", jsName: "fundWindow" },
5225
+ { name: "description", type: "NESTED" },
5225
5226
  { name: "Terms", type: "NESTED", oneof: true },
5226
5227
  { name: "Config", type: "NESTED", oneof: true }
5227
5228
  ],
@@ -5230,6 +5231,10 @@ var EIP712_MSG_TYPES = {
5230
5231
  { name: "value", type: "NESTED" },
5231
5232
  { name: "type", type: "string" }
5232
5233
  ],
5234
+ description: [
5235
+ { name: "name", type: "string" },
5236
+ { name: "details", type: "string" }
5237
+ ],
5233
5238
  fund_window: [
5234
5239
  { name: "redemption_open_time", type: "string", jsName: "redemptionOpenTime" },
5235
5240
  { name: "deposit_open_time", type: "string", jsName: "depositOpenTime" },
@@ -9735,11 +9740,11 @@ function createBaseAsset() {
9735
9740
  maxBonus: "",
9736
9741
  kinks: [],
9737
9742
  rates: [],
9738
- supplyCap: "",
9743
+ collateralCap: "",
9739
9744
  borrowCap: "",
9740
9745
  oracleAsset: "",
9741
9746
  spotMarketId: new Uint8Array(0),
9742
- spotQuoteOracleDenom: ""
9747
+ availableAt: 0n
9743
9748
  };
9744
9749
  }
9745
9750
  var Asset = {
@@ -9765,8 +9770,8 @@ var Asset = {
9765
9770
  for (const v of message.rates) {
9766
9771
  writer.uint32(58).string(v);
9767
9772
  }
9768
- if (message.supplyCap !== "") {
9769
- writer.uint32(66).string(message.supplyCap);
9773
+ if (message.collateralCap !== "") {
9774
+ writer.uint32(66).string(message.collateralCap);
9770
9775
  }
9771
9776
  if (message.borrowCap !== "") {
9772
9777
  writer.uint32(74).string(message.borrowCap);
@@ -9777,8 +9782,13 @@ var Asset = {
9777
9782
  if (message.spotMarketId.length !== 0) {
9778
9783
  writer.uint32(90).bytes(message.spotMarketId);
9779
9784
  }
9780
- if (message.spotQuoteOracleDenom !== "") {
9781
- writer.uint32(98).string(message.spotQuoteOracleDenom);
9785
+ if (message.availableAt !== 0n) {
9786
+ if (BigInt.asIntN(64, message.availableAt) !== message.availableAt) {
9787
+ throw new globalThis.Error(
9788
+ "value provided for field message.availableAt of type int64 too large"
9789
+ );
9790
+ }
9791
+ writer.uint32(104).int64(message.availableAt);
9782
9792
  }
9783
9793
  return writer;
9784
9794
  },
@@ -9842,7 +9852,7 @@ var Asset = {
9842
9852
  if (tag !== 66) {
9843
9853
  break;
9844
9854
  }
9845
- message.supplyCap = reader.string();
9855
+ message.collateralCap = reader.string();
9846
9856
  continue;
9847
9857
  }
9848
9858
  case 9: {
@@ -9866,11 +9876,11 @@ var Asset = {
9866
9876
  message.spotMarketId = reader.bytes();
9867
9877
  continue;
9868
9878
  }
9869
- case 12: {
9870
- if (tag !== 98) {
9879
+ case 13: {
9880
+ if (tag !== 104) {
9871
9881
  break;
9872
9882
  }
9873
- message.spotQuoteOracleDenom = reader.string();
9883
+ message.availableAt = reader.int64();
9874
9884
  continue;
9875
9885
  }
9876
9886
  }
@@ -9890,11 +9900,11 @@ var Asset = {
9890
9900
  maxBonus: isSet19(object2.maxBonus) ? globalThis.String(object2.maxBonus) : isSet19(object2.max_bonus) ? globalThis.String(object2.max_bonus) : "",
9891
9901
  kinks: globalThis.Array.isArray(object2?.kinks) ? object2.kinks.map((e) => globalThis.String(e)) : [],
9892
9902
  rates: globalThis.Array.isArray(object2?.rates) ? object2.rates.map((e) => globalThis.String(e)) : [],
9893
- supplyCap: isSet19(object2.supplyCap) ? globalThis.String(object2.supplyCap) : isSet19(object2.supply_cap) ? globalThis.String(object2.supply_cap) : "",
9903
+ collateralCap: isSet19(object2.collateralCap) ? globalThis.String(object2.collateralCap) : isSet19(object2.collateral_cap) ? globalThis.String(object2.collateral_cap) : "",
9894
9904
  borrowCap: isSet19(object2.borrowCap) ? globalThis.String(object2.borrowCap) : isSet19(object2.borrow_cap) ? globalThis.String(object2.borrow_cap) : "",
9895
9905
  oracleAsset: isSet19(object2.oracleAsset) ? globalThis.String(object2.oracleAsset) : isSet19(object2.oracle_asset) ? globalThis.String(object2.oracle_asset) : "",
9896
9906
  spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0),
9897
- spotQuoteOracleDenom: isSet19(object2.spotQuoteOracleDenom) ? globalThis.String(object2.spotQuoteOracleDenom) : isSet19(object2.spot_quote_oracle_denom) ? globalThis.String(object2.spot_quote_oracle_denom) : ""
9907
+ availableAt: isSet19(object2.availableAt) ? BigInt(object2.availableAt) : isSet19(object2.available_at) ? BigInt(object2.available_at) : 0n
9898
9908
  };
9899
9909
  },
9900
9910
  toJSON(message) {
@@ -9920,8 +9930,8 @@ var Asset = {
9920
9930
  if (message.rates?.length) {
9921
9931
  obj.rates = message.rates;
9922
9932
  }
9923
- if (message.supplyCap !== "") {
9924
- obj.supplyCap = message.supplyCap;
9933
+ if (message.collateralCap !== "") {
9934
+ obj.collateralCap = message.collateralCap;
9925
9935
  }
9926
9936
  if (message.borrowCap !== "") {
9927
9937
  obj.borrowCap = message.borrowCap;
@@ -9932,8 +9942,8 @@ var Asset = {
9932
9942
  if (message.spotMarketId.length !== 0) {
9933
9943
  obj.spotMarketId = base64FromBytes6(message.spotMarketId);
9934
9944
  }
9935
- if (message.spotQuoteOracleDenom !== "") {
9936
- obj.spotQuoteOracleDenom = message.spotQuoteOracleDenom;
9945
+ if (message.availableAt !== 0n) {
9946
+ obj.availableAt = message.availableAt.toString();
9937
9947
  }
9938
9948
  return obj;
9939
9949
  },
@@ -9949,22 +9959,16 @@ var Asset = {
9949
9959
  message.maxBonus = object2.maxBonus ?? "";
9950
9960
  message.kinks = object2.kinks?.map((e) => e) || [];
9951
9961
  message.rates = object2.rates?.map((e) => e) || [];
9952
- message.supplyCap = object2.supplyCap ?? "";
9962
+ message.collateralCap = object2.collateralCap ?? "";
9953
9963
  message.borrowCap = object2.borrowCap ?? "";
9954
9964
  message.oracleAsset = object2.oracleAsset ?? "";
9955
9965
  message.spotMarketId = object2.spotMarketId ?? new Uint8Array(0);
9956
- message.spotQuoteOracleDenom = object2.spotQuoteOracleDenom ?? "";
9966
+ message.availableAt = object2.availableAt ?? 0n;
9957
9967
  return message;
9958
9968
  }
9959
9969
  };
9960
9970
  function createBaseAssetRisk() {
9961
- return {
9962
- ltv: "",
9963
- lt: "",
9964
- oracleAsset: "",
9965
- spotMarketId: new Uint8Array(0),
9966
- spotQuoteOracleDenom: ""
9967
- };
9971
+ return { ltv: "", lt: "", spotMarketId: new Uint8Array(0) };
9968
9972
  }
9969
9973
  var AssetRisk = {
9970
9974
  encode(message, writer = new import_wire21.BinaryWriter()) {
@@ -9974,15 +9978,9 @@ var AssetRisk = {
9974
9978
  if (message.lt !== "") {
9975
9979
  writer.uint32(18).string(message.lt);
9976
9980
  }
9977
- if (message.oracleAsset !== "") {
9978
- writer.uint32(26).string(message.oracleAsset);
9979
- }
9980
9981
  if (message.spotMarketId.length !== 0) {
9981
9982
  writer.uint32(34).bytes(message.spotMarketId);
9982
9983
  }
9983
- if (message.spotQuoteOracleDenom !== "") {
9984
- writer.uint32(42).string(message.spotQuoteOracleDenom);
9985
- }
9986
9984
  return writer;
9987
9985
  },
9988
9986
  decode(input, length) {
@@ -10006,13 +10004,6 @@ var AssetRisk = {
10006
10004
  message.lt = reader.string();
10007
10005
  continue;
10008
10006
  }
10009
- case 3: {
10010
- if (tag !== 26) {
10011
- break;
10012
- }
10013
- message.oracleAsset = reader.string();
10014
- continue;
10015
- }
10016
10007
  case 4: {
10017
10008
  if (tag !== 34) {
10018
10009
  break;
@@ -10020,13 +10011,6 @@ var AssetRisk = {
10020
10011
  message.spotMarketId = reader.bytes();
10021
10012
  continue;
10022
10013
  }
10023
- case 5: {
10024
- if (tag !== 42) {
10025
- break;
10026
- }
10027
- message.spotQuoteOracleDenom = reader.string();
10028
- continue;
10029
- }
10030
10014
  }
10031
10015
  if ((tag & 7) === 4 || tag === 0) {
10032
10016
  break;
@@ -10039,9 +10023,7 @@ var AssetRisk = {
10039
10023
  return {
10040
10024
  ltv: isSet19(object2.ltv) ? globalThis.String(object2.ltv) : "",
10041
10025
  lt: isSet19(object2.lt) ? globalThis.String(object2.lt) : "",
10042
- oracleAsset: isSet19(object2.oracleAsset) ? globalThis.String(object2.oracleAsset) : isSet19(object2.oracle_asset) ? globalThis.String(object2.oracle_asset) : "",
10043
- spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0),
10044
- spotQuoteOracleDenom: isSet19(object2.spotQuoteOracleDenom) ? globalThis.String(object2.spotQuoteOracleDenom) : isSet19(object2.spot_quote_oracle_denom) ? globalThis.String(object2.spot_quote_oracle_denom) : ""
10026
+ spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0)
10045
10027
  };
10046
10028
  },
10047
10029
  toJSON(message) {
@@ -10052,15 +10034,9 @@ var AssetRisk = {
10052
10034
  if (message.lt !== "") {
10053
10035
  obj.lt = message.lt;
10054
10036
  }
10055
- if (message.oracleAsset !== "") {
10056
- obj.oracleAsset = message.oracleAsset;
10057
- }
10058
10037
  if (message.spotMarketId.length !== 0) {
10059
10038
  obj.spotMarketId = base64FromBytes6(message.spotMarketId);
10060
10039
  }
10061
- if (message.spotQuoteOracleDenom !== "") {
10062
- obj.spotQuoteOracleDenom = message.spotQuoteOracleDenom;
10063
- }
10064
10040
  return obj;
10065
10041
  },
10066
10042
  create(base) {
@@ -10070,9 +10046,7 @@ var AssetRisk = {
10070
10046
  const message = createBaseAssetRisk();
10071
10047
  message.ltv = object2.ltv ?? "";
10072
10048
  message.lt = object2.lt ?? "";
10073
- message.oracleAsset = object2.oracleAsset ?? "";
10074
10049
  message.spotMarketId = object2.spotMarketId ?? new Uint8Array(0);
10075
- message.spotQuoteOracleDenom = object2.spotQuoteOracleDenom ?? "";
10076
10050
  return message;
10077
10051
  }
10078
10052
  };
@@ -10332,7 +10306,8 @@ function createBaseAssetState() {
10332
10306
  totalSupplyShares: "",
10333
10307
  totalBorrowShares: "",
10334
10308
  collectedProtocolFee: "",
10335
- deficit: ""
10309
+ deficit: "",
10310
+ totalCollateral: ""
10336
10311
  };
10337
10312
  }
10338
10313
  var AssetState = {
@@ -10355,6 +10330,9 @@ var AssetState = {
10355
10330
  if (message.deficit !== "") {
10356
10331
  writer.uint32(50).string(message.deficit);
10357
10332
  }
10333
+ if (message.totalCollateral !== "") {
10334
+ writer.uint32(58).string(message.totalCollateral);
10335
+ }
10358
10336
  return writer;
10359
10337
  },
10360
10338
  decode(input, length) {
@@ -10406,6 +10384,13 @@ var AssetState = {
10406
10384
  message.deficit = reader.string();
10407
10385
  continue;
10408
10386
  }
10387
+ case 7: {
10388
+ if (tag !== 58) {
10389
+ break;
10390
+ }
10391
+ message.totalCollateral = reader.string();
10392
+ continue;
10393
+ }
10409
10394
  }
10410
10395
  if ((tag & 7) === 4 || tag === 0) {
10411
10396
  break;
@@ -10421,7 +10406,8 @@ var AssetState = {
10421
10406
  totalSupplyShares: isSet19(object2.totalSupplyShares) ? globalThis.String(object2.totalSupplyShares) : isSet19(object2.total_supply_shares) ? globalThis.String(object2.total_supply_shares) : "",
10422
10407
  totalBorrowShares: isSet19(object2.totalBorrowShares) ? globalThis.String(object2.totalBorrowShares) : isSet19(object2.total_borrow_shares) ? globalThis.String(object2.total_borrow_shares) : "",
10423
10408
  collectedProtocolFee: isSet19(object2.collectedProtocolFee) ? globalThis.String(object2.collectedProtocolFee) : isSet19(object2.collected_protocol_fee) ? globalThis.String(object2.collected_protocol_fee) : "",
10424
- deficit: isSet19(object2.deficit) ? globalThis.String(object2.deficit) : ""
10409
+ deficit: isSet19(object2.deficit) ? globalThis.String(object2.deficit) : "",
10410
+ totalCollateral: isSet19(object2.totalCollateral) ? globalThis.String(object2.totalCollateral) : isSet19(object2.total_collateral) ? globalThis.String(object2.total_collateral) : ""
10425
10411
  };
10426
10412
  },
10427
10413
  toJSON(message) {
@@ -10444,6 +10430,9 @@ var AssetState = {
10444
10430
  if (message.deficit !== "") {
10445
10431
  obj.deficit = message.deficit;
10446
10432
  }
10433
+ if (message.totalCollateral !== "") {
10434
+ obj.totalCollateral = message.totalCollateral;
10435
+ }
10447
10436
  return obj;
10448
10437
  },
10449
10438
  create(base) {
@@ -10457,6 +10446,7 @@ var AssetState = {
10457
10446
  message.totalBorrowShares = object2.totalBorrowShares ?? "";
10458
10447
  message.collectedProtocolFee = object2.collectedProtocolFee ?? "";
10459
10448
  message.deficit = object2.deficit ?? "";
10449
+ message.totalCollateral = object2.totalCollateral ?? "";
10460
10450
  return message;
10461
10451
  }
10462
10452
  };
@@ -17032,6 +17022,74 @@ var OracleFeed = {
17032
17022
  return message;
17033
17023
  }
17034
17024
  };
17025
+ function createBaseDescription() {
17026
+ return { name: "", details: "" };
17027
+ }
17028
+ var Description = {
17029
+ encode(message, writer = new import_wire37.BinaryWriter()) {
17030
+ if (message.name !== "") {
17031
+ writer.uint32(10).string(message.name);
17032
+ }
17033
+ if (message.details !== "") {
17034
+ writer.uint32(18).string(message.details);
17035
+ }
17036
+ return writer;
17037
+ },
17038
+ decode(input, length) {
17039
+ const reader = input instanceof import_wire37.BinaryReader ? input : new import_wire37.BinaryReader(input);
17040
+ const end = length === void 0 ? reader.len : reader.pos + length;
17041
+ const message = createBaseDescription();
17042
+ while (reader.pos < end) {
17043
+ const tag = reader.uint32();
17044
+ switch (tag >>> 3) {
17045
+ case 1: {
17046
+ if (tag !== 10) {
17047
+ break;
17048
+ }
17049
+ message.name = reader.string();
17050
+ continue;
17051
+ }
17052
+ case 2: {
17053
+ if (tag !== 18) {
17054
+ break;
17055
+ }
17056
+ message.details = reader.string();
17057
+ continue;
17058
+ }
17059
+ }
17060
+ if ((tag & 7) === 4 || tag === 0) {
17061
+ break;
17062
+ }
17063
+ reader.skip(tag & 7);
17064
+ }
17065
+ return message;
17066
+ },
17067
+ fromJSON(object2) {
17068
+ return {
17069
+ name: isSet35(object2.name) ? globalThis.String(object2.name) : "",
17070
+ details: isSet35(object2.details) ? globalThis.String(object2.details) : ""
17071
+ };
17072
+ },
17073
+ toJSON(message) {
17074
+ const obj = {};
17075
+ if (message.name !== "") {
17076
+ obj.name = message.name;
17077
+ }
17078
+ if (message.details !== "") {
17079
+ obj.details = message.details;
17080
+ }
17081
+ return obj;
17082
+ },
17083
+ create(base) {
17084
+ return Description.fromPartial(base ?? {});
17085
+ },
17086
+ fromPartial(object2) {
17087
+ const message = createBaseDescription();
17088
+ message.name = object2.name ?? "";
17089
+ message.details = object2.details ?? "";
17090
+ return message;
17091
+ }
17092
+ };
17035
17093
  function bytesFromBase6412(b64) {
17036
17094
  if (globalThis.Buffer) {
17037
17095
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
@@ -17364,7 +17422,8 @@ function createBaseMsgCreateVault() {
17364
17422
  tradingTerms: void 0,
17365
17423
  lending: void 0,
17366
17424
  trading: void 0,
17367
- initialDeposit: void 0
17425
+ initialDeposit: void 0,
17426
+ description: void 0
17368
17427
  };
17369
17428
  }
17370
17429
  var MsgCreateVault = {
@@ -17399,6 +17458,9 @@ var MsgCreateVault = {
17399
17458
  if (message.initialDeposit !== void 0) {
17400
17459
  Coin.encode(message.initialDeposit, writer.uint32(82).fork()).join();
17401
17460
  }
17461
+ if (message.description !== void 0) {
17462
+ Description.encode(message.description, writer.uint32(90).fork()).join();
17463
+ }
17402
17464
  return writer;
17403
17465
  },
17404
17466
  decode(input, length) {
@@ -17478,6 +17540,13 @@ var MsgCreateVault = {
17478
17540
  message.initialDeposit = Coin.decode(reader, reader.uint32());
17479
17541
  continue;
17480
17542
  }
17543
+ case 11: {
17544
+ if (tag !== 90) {
17545
+ break;
17546
+ }
17547
+ message.description = Description.decode(reader, reader.uint32());
17548
+ continue;
17549
+ }
17481
17550
  }
17482
17551
  if ((tag & 7) === 4 || tag === 0) {
17483
17552
  break;
@@ -17497,7 +17566,8 @@ var MsgCreateVault = {
17497
17566
  tradingTerms: isSet37(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet37(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0,
17498
17567
  lending: isSet37(object2.lending) ? LendingVaultConfig.fromJSON(object2.lending) : void 0,
17499
17568
  trading: isSet37(object2.trading) ? TradingVaultConfig.fromJSON(object2.trading) : void 0,
17500
- initialDeposit: isSet37(object2.initialDeposit) ? Coin.fromJSON(object2.initialDeposit) : isSet37(object2.initial_deposit) ? Coin.fromJSON(object2.initial_deposit) : void 0
17569
+ initialDeposit: isSet37(object2.initialDeposit) ? Coin.fromJSON(object2.initialDeposit) : isSet37(object2.initial_deposit) ? Coin.fromJSON(object2.initial_deposit) : void 0,
17570
+ description: isSet37(object2.description) ? Description.fromJSON(object2.description) : void 0
17501
17571
  };
17502
17572
  },
17503
17573
  toJSON(message) {
@@ -17532,6 +17602,9 @@ var MsgCreateVault = {
17532
17602
  if (message.initialDeposit !== void 0) {
17533
17603
  obj.initialDeposit = Coin.toJSON(message.initialDeposit);
17534
17604
  }
17605
+ if (message.description !== void 0) {
17606
+ obj.description = Description.toJSON(message.description);
17607
+ }
17535
17608
  return obj;
17536
17609
  },
17537
17610
  create(base) {
@@ -17549,6 +17622,7 @@ var MsgCreateVault = {
17549
17622
  message.lending = object2.lending !== void 0 && object2.lending !== null ? LendingVaultConfig.fromPartial(object2.lending) : void 0;
17550
17623
  message.trading = object2.trading !== void 0 && object2.trading !== null ? TradingVaultConfig.fromPartial(object2.trading) : void 0;
17551
17624
  message.initialDeposit = object2.initialDeposit !== void 0 && object2.initialDeposit !== null ? Coin.fromPartial(object2.initialDeposit) : void 0;
17625
+ message.description = object2.description !== void 0 && object2.description !== null ? Description.fromPartial(object2.description) : void 0;
17552
17626
  return message;
17553
17627
  }
17554
17628
  };
@@ -18692,10 +18766,10 @@ var Commission = {
18692
18766
  return message;
18693
18767
  }
18694
18768
  };
18695
- function createBaseDescription() {
18769
+ function createBaseDescription2() {
18696
18770
  return { moniker: "", identity: "", website: "", securityContact: "", details: "" };
18697
18771
  }
18698
- var Description = {
18772
+ var Description2 = {
18699
18773
  encode(message, writer = new import_wire42.BinaryWriter()) {
18700
18774
  if (message.moniker !== "") {
18701
18775
  writer.uint32(10).string(message.moniker);
@@ -18717,7 +18791,7 @@ var Description = {
18717
18791
  decode(input, length) {
18718
18792
  const reader = input instanceof import_wire42.BinaryReader ? input : new import_wire42.BinaryReader(input);
18719
18793
  const end = length === void 0 ? reader.len : reader.pos + length;
18720
- const message = createBaseDescription();
18794
+ const message = createBaseDescription2();
18721
18795
  while (reader.pos < end) {
18722
18796
  const tag = reader.uint32();
18723
18797
  switch (tag >>> 3) {
@@ -18793,10 +18867,10 @@ var Description = {
18793
18867
  return obj;
18794
18868
  },
18795
18869
  create(base) {
18796
- return Description.fromPartial(base ?? {});
18870
+ return Description2.fromPartial(base ?? {});
18797
18871
  },
18798
18872
  fromPartial(object2) {
18799
- const message = createBaseDescription();
18873
+ const message = createBaseDescription2();
18800
18874
  message.moniker = object2.moniker ?? "";
18801
18875
  message.identity = object2.identity ?? "";
18802
18876
  message.website = object2.website ?? "";
@@ -18843,7 +18917,7 @@ var Validator = {
18843
18917
  writer.uint32(50).string(message.delegatorShares);
18844
18918
  }
18845
18919
  if (message.description !== void 0) {
18846
- Description.encode(message.description, writer.uint32(58).fork()).join();
18920
+ Description2.encode(message.description, writer.uint32(58).fork()).join();
18847
18921
  }
18848
18922
  if (message.unbondingHeight !== 0n) {
18849
18923
  if (BigInt.asIntN(64, message.unbondingHeight) !== message.unbondingHeight) {
@@ -18935,7 +19009,7 @@ var Validator = {
18935
19009
  if (tag !== 58) {
18936
19010
  break;
18937
19011
  }
18938
- message.description = Description.decode(reader, reader.uint32());
19012
+ message.description = Description2.decode(reader, reader.uint32());
18939
19013
  continue;
18940
19014
  }
18941
19015
  case 8: {
@@ -19003,7 +19077,7 @@ var Validator = {
19003
19077
  status: isSet40(object2.status) ? bondStatusFromJSON(object2.status) : 0,
19004
19078
  tokens: isSet40(object2.tokens) ? globalThis.String(object2.tokens) : "",
19005
19079
  delegatorShares: isSet40(object2.delegatorShares) ? globalThis.String(object2.delegatorShares) : isSet40(object2.delegator_shares) ? globalThis.String(object2.delegator_shares) : "",
19006
- description: isSet40(object2.description) ? Description.fromJSON(object2.description) : void 0,
19080
+ description: isSet40(object2.description) ? Description2.fromJSON(object2.description) : void 0,
19007
19081
  unbondingHeight: isSet40(object2.unbondingHeight) ? BigInt(object2.unbondingHeight) : isSet40(object2.unbonding_height) ? BigInt(object2.unbonding_height) : 0n,
19008
19082
  unbondingTime: isSet40(object2.unbondingTime) ? fromJsonTimestamp7(object2.unbondingTime) : isSet40(object2.unbonding_time) ? fromJsonTimestamp7(object2.unbonding_time) : void 0,
19009
19083
  commission: isSet40(object2.commission) ? Commission.fromJSON(object2.commission) : void 0,
@@ -19033,7 +19107,7 @@ var Validator = {
19033
19107
  obj.delegatorShares = message.delegatorShares;
19034
19108
  }
19035
19109
  if (message.description !== void 0) {
19036
- obj.description = Description.toJSON(message.description);
19110
+ obj.description = Description2.toJSON(message.description);
19037
19111
  }
19038
19112
  if (message.unbondingHeight !== 0n) {
19039
19113
  obj.unbondingHeight = message.unbondingHeight.toString();
@@ -19066,7 +19140,7 @@ var Validator = {
19066
19140
  message.status = object2.status ?? 0;
19067
19141
  message.tokens = object2.tokens ?? "";
19068
19142
  message.delegatorShares = object2.delegatorShares ?? "";
19069
- message.description = object2.description !== void 0 && object2.description !== null ? Description.fromPartial(object2.description) : void 0;
19143
+ message.description = object2.description !== void 0 && object2.description !== null ? Description2.fromPartial(object2.description) : void 0;
19070
19144
  message.unbondingHeight = object2.unbondingHeight ?? 0n;
19071
19145
  message.unbondingTime = object2.unbondingTime ?? void 0;
19072
19146
  message.commission = object2.commission !== void 0 && object2.commission !== null ? Commission.fromPartial(object2.commission) : void 0;
@@ -20729,6 +20803,14 @@ function mapAultVaultV1AllowedMarkets(input, label = "value") {
20729
20803
  lendingPoolIds: requireBigIntArray(record2["lendingPoolIds"], `${prefix}lendingPoolIds`)
20730
20804
  };
20731
20805
  }
20806
+ function mapAultVaultV1Description(input, label = "value") {
20807
+ const record2 = asRecord(input);
20808
+ const prefix = label ? `${label}.` : "";
20809
+ return {
20810
+ name: requireString(record2["name"], `${prefix}name`),
20811
+ details: requireString(record2["details"], `${prefix}details`)
20812
+ };
20813
+ }
20732
20814
  function mapAultVaultV1FundWindow(input, label = "value") {
20733
20815
  const record2 = asRecord(input);
20734
20816
  const prefix = label ? `${label}.` : "";
@@ -20821,7 +20903,8 @@ function mapAultVaultV1MsgCreateVault(input, label = "value") {
20821
20903
  initialDeposit: mapCosmosBaseV1beta1Coin(
20822
20904
  asRecord(record2["initialDeposit"]),
20823
20905
  `${prefix}initialDeposit`
20824
- )
20906
+ ),
20907
+ description: mapAultVaultV1Description(asRecord(record2["description"]), `${prefix}description`)
20825
20908
  };
20826
20909
  }
20827
20910
  function mapAultVaultV1MsgDeposit(input, label = "value") {
@@ -27539,7 +27622,7 @@ var Params14 = {
27539
27622
  }
27540
27623
  };
27541
27624
  function createBaseFeed() {
27542
- return { feedId: "", owner: "", enabled: false, marketId: "", baseDenom: "", quoteDenom: "" };
27625
+ return { feedId: "", owner: "", enabled: false, marketId: "", baseDenom: "" };
27543
27626
  }
27544
27627
  var Feed = {
27545
27628
  encode(message, writer = new import_wire52.BinaryWriter()) {
@@ -27558,9 +27641,6 @@ var Feed = {
27558
27641
  if (message.baseDenom !== "") {
27559
27642
  writer.uint32(42).string(message.baseDenom);
27560
27643
  }
27561
- if (message.quoteDenom !== "") {
27562
- writer.uint32(50).string(message.quoteDenom);
27563
- }
27564
27644
  return writer;
27565
27645
  },
27566
27646
  decode(input, length) {
@@ -27605,13 +27685,6 @@ var Feed = {
27605
27685
  message.baseDenom = reader.string();
27606
27686
  continue;
27607
27687
  }
27608
- case 6: {
27609
- if (tag !== 50) {
27610
- break;
27611
- }
27612
- message.quoteDenom = reader.string();
27613
- continue;
27614
- }
27615
27688
  }
27616
27689
  if ((tag & 7) === 4 || tag === 0) {
27617
27690
  break;
@@ -27626,8 +27699,7 @@ var Feed = {
27626
27699
  owner: isSet50(object2.owner) ? globalThis.String(object2.owner) : "",
27627
27700
  enabled: isSet50(object2.enabled) ? globalThis.Boolean(object2.enabled) : false,
27628
27701
  marketId: isSet50(object2.marketId) ? globalThis.String(object2.marketId) : isSet50(object2.market_id) ? globalThis.String(object2.market_id) : "",
27629
- baseDenom: isSet50(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet50(object2.base_denom) ? globalThis.String(object2.base_denom) : "",
27630
- quoteDenom: isSet50(object2.quoteDenom) ? globalThis.String(object2.quoteDenom) : isSet50(object2.quote_denom) ? globalThis.String(object2.quote_denom) : ""
27702
+ baseDenom: isSet50(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet50(object2.base_denom) ? globalThis.String(object2.base_denom) : ""
27631
27703
  };
27632
27704
  },
27633
27705
  toJSON(message) {
@@ -27647,9 +27719,6 @@ var Feed = {
27647
27719
  if (message.baseDenom !== "") {
27648
27720
  obj.baseDenom = message.baseDenom;
27649
27721
  }
27650
- if (message.quoteDenom !== "") {
27651
- obj.quoteDenom = message.quoteDenom;
27652
- }
27653
27722
  return obj;
27654
27723
  },
27655
27724
  create(base) {
@@ -27662,7 +27731,6 @@ var Feed = {
27662
27731
  message.enabled = object2.enabled ?? false;
27663
27732
  message.marketId = object2.marketId ?? "";
27664
27733
  message.baseDenom = object2.baseDenom ?? "";
27665
- message.quoteDenom = object2.quoteDenom ?? "";
27666
27734
  return message;
27667
27735
  }
27668
27736
  };
@@ -28287,7 +28355,10 @@ function createBaseMarkPriceState() {
28287
28355
  localMedianWeight: "",
28288
28356
  lastLocalMedianUpdateTime: 0n,
28289
28357
  lastPriceDifferenceUpdateTime: 0n,
28290
- lastUpdateTime: 0n
28358
+ lastUpdateTime: 0n,
28359
+ clamped: false,
28360
+ previousMarkPrice: "",
28361
+ lastChangeHeight: 0n
28291
28362
  };
28292
28363
  }
28293
28364
  var MarkPriceState = {
@@ -28331,6 +28402,20 @@ var MarkPriceState = {
28331
28402
  }
28332
28403
  writer.uint32(64).int64(message.lastUpdateTime);
28333
28404
  }
28405
+ if (message.clamped !== false) {
28406
+ writer.uint32(72).bool(message.clamped);
28407
+ }
28408
+ if (message.previousMarkPrice !== "") {
28409
+ writer.uint32(82).string(message.previousMarkPrice);
28410
+ }
28411
+ if (message.lastChangeHeight !== 0n) {
28412
+ if (BigInt.asIntN(64, message.lastChangeHeight) !== message.lastChangeHeight) {
28413
+ throw new globalThis.Error(
28414
+ "value provided for field message.lastChangeHeight of type int64 too large"
28415
+ );
28416
+ }
28417
+ writer.uint32(88).int64(message.lastChangeHeight);
28418
+ }
28334
28419
  return writer;
28335
28420
  },
28336
28421
  decode(input, length) {
@@ -28396,6 +28481,27 @@ var MarkPriceState = {
28396
28481
  message.lastUpdateTime = reader.int64();
28397
28482
  continue;
28398
28483
  }
28484
+ case 9: {
28485
+ if (tag !== 72) {
28486
+ break;
28487
+ }
28488
+ message.clamped = reader.bool();
28489
+ continue;
28490
+ }
28491
+ case 10: {
28492
+ if (tag !== 82) {
28493
+ break;
28494
+ }
28495
+ message.previousMarkPrice = reader.string();
28496
+ continue;
28497
+ }
28498
+ case 11: {
28499
+ if (tag !== 88) {
28500
+ break;
28501
+ }
28502
+ message.lastChangeHeight = reader.int64();
28503
+ continue;
28504
+ }
28399
28505
  }
28400
28506
  if ((tag & 7) === 4 || tag === 0) {
28401
28507
  break;
@@ -28413,7 +28519,10 @@ var MarkPriceState = {
28413
28519
  localMedianWeight: isSet52(object2.localMedianWeight) ? globalThis.String(object2.localMedianWeight) : isSet52(object2.local_median_weight) ? globalThis.String(object2.local_median_weight) : "",
28414
28520
  lastLocalMedianUpdateTime: isSet52(object2.lastLocalMedianUpdateTime) ? BigInt(object2.lastLocalMedianUpdateTime) : isSet52(object2.last_local_median_update_time) ? BigInt(object2.last_local_median_update_time) : 0n,
28415
28521
  lastPriceDifferenceUpdateTime: isSet52(object2.lastPriceDifferenceUpdateTime) ? BigInt(object2.lastPriceDifferenceUpdateTime) : isSet52(object2.last_price_difference_update_time) ? BigInt(object2.last_price_difference_update_time) : 0n,
28416
- lastUpdateTime: isSet52(object2.lastUpdateTime) ? BigInt(object2.lastUpdateTime) : isSet52(object2.last_update_time) ? BigInt(object2.last_update_time) : 0n
28522
+ lastUpdateTime: isSet52(object2.lastUpdateTime) ? BigInt(object2.lastUpdateTime) : isSet52(object2.last_update_time) ? BigInt(object2.last_update_time) : 0n,
28523
+ clamped: isSet52(object2.clamped) ? globalThis.Boolean(object2.clamped) : false,
28524
+ previousMarkPrice: isSet52(object2.previousMarkPrice) ? globalThis.String(object2.previousMarkPrice) : isSet52(object2.previous_mark_price) ? globalThis.String(object2.previous_mark_price) : "",
28525
+ lastChangeHeight: isSet52(object2.lastChangeHeight) ? BigInt(object2.lastChangeHeight) : isSet52(object2.last_change_height) ? BigInt(object2.last_change_height) : 0n
28417
28526
  };
28418
28527
  },
28419
28528
  toJSON(message) {
@@ -28442,6 +28551,15 @@ var MarkPriceState = {
28442
28551
  if (message.lastUpdateTime !== 0n) {
28443
28552
  obj.lastUpdateTime = message.lastUpdateTime.toString();
28444
28553
  }
28554
+ if (message.clamped !== false) {
28555
+ obj.clamped = message.clamped;
28556
+ }
28557
+ if (message.previousMarkPrice !== "") {
28558
+ obj.previousMarkPrice = message.previousMarkPrice;
28559
+ }
28560
+ if (message.lastChangeHeight !== 0n) {
28561
+ obj.lastChangeHeight = message.lastChangeHeight.toString();
28562
+ }
28445
28563
  return obj;
28446
28564
  },
28447
28565
  create(base) {
@@ -28457,6 +28575,9 @@ var MarkPriceState = {
28457
28575
  message.lastLocalMedianUpdateTime = object2.lastLocalMedianUpdateTime ?? 0n;
28458
28576
  message.lastPriceDifferenceUpdateTime = object2.lastPriceDifferenceUpdateTime ?? 0n;
28459
28577
  message.lastUpdateTime = object2.lastUpdateTime ?? 0n;
28578
+ message.clamped = object2.clamped ?? false;
28579
+ message.previousMarkPrice = object2.previousMarkPrice ?? "";
28580
+ message.lastChangeHeight = object2.lastChangeHeight ?? 0n;
28460
28581
  return message;
28461
28582
  }
28462
28583
  };
@@ -34124,7 +34245,8 @@ function createBaseVaultResponse() {
34124
34245
  totalShares: "",
34125
34246
  pendingConfigUpdate: void 0,
34126
34247
  lendingTerms: void 0,
34127
- tradingTerms: void 0
34248
+ tradingTerms: void 0,
34249
+ description: void 0
34128
34250
  };
34129
34251
  }
34130
34252
  var VaultResponse = {
@@ -34168,6 +34290,9 @@ var VaultResponse = {
34168
34290
  if (message.tradingTerms !== void 0) {
34169
34291
  TradingVaultTerms.encode(message.tradingTerms, writer.uint32(106).fork()).join();
34170
34292
  }
34293
+ if (message.description !== void 0) {
34294
+ Description.encode(message.description, writer.uint32(114).fork()).join();
34295
+ }
34171
34296
  return writer;
34172
34297
  },
34173
34298
  decode(input, length) {
@@ -34268,6 +34393,13 @@ var VaultResponse = {
34268
34393
  message.tradingTerms = TradingVaultTerms.decode(reader, reader.uint32());
34269
34394
  continue;
34270
34395
  }
34396
+ case 14: {
34397
+ if (tag !== 114) {
34398
+ break;
34399
+ }
34400
+ message.description = Description.decode(reader, reader.uint32());
34401
+ continue;
34402
+ }
34271
34403
  }
34272
34404
  if ((tag & 7) === 4 || tag === 0) {
34273
34405
  break;
@@ -34290,7 +34422,8 @@ var VaultResponse = {
34290
34422
  totalShares: isSet62(object2.totalShares) ? globalThis.String(object2.totalShares) : isSet62(object2.total_shares) ? globalThis.String(object2.total_shares) : "",
34291
34423
  pendingConfigUpdate: isSet62(object2.pendingConfigUpdate) ? PendingVaultConfigUpdate.fromJSON(object2.pendingConfigUpdate) : isSet62(object2.pending_config_update) ? PendingVaultConfigUpdate.fromJSON(object2.pending_config_update) : void 0,
34292
34424
  lendingTerms: isSet62(object2.lendingTerms) ? LendingVaultTerms.fromJSON(object2.lendingTerms) : isSet62(object2.lending_terms) ? LendingVaultTerms.fromJSON(object2.lending_terms) : void 0,
34293
- tradingTerms: isSet62(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet62(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0
34425
+ tradingTerms: isSet62(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet62(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0,
34426
+ description: isSet62(object2.description) ? Description.fromJSON(object2.description) : void 0
34294
34427
  };
34295
34428
  },
34296
34429
  toJSON(message) {
@@ -34334,6 +34467,9 @@ var VaultResponse = {
34334
34467
  if (message.tradingTerms !== void 0) {
34335
34468
  obj.tradingTerms = TradingVaultTerms.toJSON(message.tradingTerms);
34336
34469
  }
34470
+ if (message.description !== void 0) {
34471
+ obj.description = Description.toJSON(message.description);
34472
+ }
34337
34473
  return obj;
34338
34474
  },
34339
34475
  create(base) {
@@ -34354,6 +34490,7 @@ var VaultResponse = {
34354
34490
  message.pendingConfigUpdate = object2.pendingConfigUpdate !== void 0 && object2.pendingConfigUpdate !== null ? PendingVaultConfigUpdate.fromPartial(object2.pendingConfigUpdate) : void 0;
34355
34491
  message.lendingTerms = object2.lendingTerms !== void 0 && object2.lendingTerms !== null ? LendingVaultTerms.fromPartial(object2.lendingTerms) : void 0;
34356
34492
  message.tradingTerms = object2.tradingTerms !== void 0 && object2.tradingTerms !== null ? TradingVaultTerms.fromPartial(object2.tradingTerms) : void 0;
34493
+ message.description = object2.description !== void 0 && object2.description !== null ? Description.fromPartial(object2.description) : void 0;
34357
34494
  return message;
34358
34495
  }
34359
34496
  };
@@ -38039,6 +38176,21 @@ function checkTradingTerms(performanceFeeBps, exitFeeBps, relationship, fundWind
38039
38176
  throw new Error("performanceFeeBps and exitFeeBps must total less than 10000 bps");
38040
38177
  }
38041
38178
  }
38179
+ var MAX_NAME_BYTES = 70;
38180
+ var MAX_DETAILS_BYTES = 280;
38181
+ function descriptionOf(description) {
38182
+ const name = description?.name ?? "";
38183
+ const details = description?.details ?? "";
38184
+ if (name === "") throw new Error("A vault needs a description.name");
38185
+ const bytes = (text) => new TextEncoder().encode(text).length;
38186
+ if (bytes(name) > MAX_NAME_BYTES) {
38187
+ throw new Error(`description.name exceeds ${MAX_NAME_BYTES} bytes`);
38188
+ }
38189
+ if (bytes(details) > MAX_DETAILS_BYTES) {
38190
+ throw new Error(`description.details exceeds ${MAX_DETAILS_BYTES} bytes`);
38191
+ }
38192
+ return { name, details };
38193
+ }
38042
38194
  function configOf(config) {
38043
38195
  return "lending" in config ? { lending: lendingConfigOf(config.lending) } : { trading: tradingConfigOf(config.trading) };
38044
38196
  }
@@ -38089,7 +38241,8 @@ function buildCreateVaultMsg(owner, params) {
38089
38241
  relationship,
38090
38242
  ...params.fundWindow !== void 0 && { fundWindow: fundWindowOf(params.fundWindow) },
38091
38243
  // The chain treats a coin with no denom and a zero amount as "no deposit".
38092
- initialDeposit: deposit ?? { denom: "", amount: "0" }
38244
+ initialDeposit: deposit ?? { denom: "", amount: "0" },
38245
+ description: descriptionOf(params.description)
38093
38246
  };
38094
38247
  if ("lending" in params.config) {
38095
38248
  if (kind !== "normal") {