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/README.md +6 -0
- package/dist/core/network.d.ts +11 -11
- package/dist/core/vault-msgs.d.ts +10 -0
- package/dist/high-level/types.d.ts +3 -1
- package/dist/index.cjs +259 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +259 -106
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/clob/v1/group.d.ts +2 -2
- package/dist/proto/gen/ault/lending/v1/genesis.d.ts +1 -0
- package/dist/proto/gen/ault/lending/v1/lending.d.ts +5 -5
- package/dist/proto/gen/ault/lending/v1/query.d.ts +10 -0
- package/dist/proto/gen/ault/margin/v1/margin.d.ts +4 -4
- package/dist/proto/gen/ault/oracle/v1/genesis.d.ts +18 -2
- package/dist/proto/gen/ault/oracle/v1/oracle.d.ts +7 -13
- package/dist/proto/gen/ault/oracle/v1/query.d.ts +53 -0
- package/dist/proto/gen/ault/oracle/v1/tx.d.ts +2 -5
- package/dist/proto/gen/ault/perpetual/v1/perpetual.d.ts +16 -4
- package/dist/proto/gen/ault/perpetual/v1/tx.d.ts +41 -0
- package/dist/proto/gen/ault/vault/v1/params.d.ts +4 -1
- package/dist/proto/gen/ault/vault/v1/query.d.ts +2 -1
- package/dist/proto/gen/ault/vault/v1/tx.d.ts +2 -1
- package/dist/proto/gen/ault/vault/v1/vault.d.ts +13 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/core/user-agent.ts
|
|
8
|
-
var SDK_VERSION = "0.
|
|
8
|
+
var SDK_VERSION = "0.18.0";
|
|
9
9
|
var USER_AGENT = `ault-sdk-ts/${SDK_VERSION}`;
|
|
10
10
|
function isServerRuntime() {
|
|
11
11
|
if (typeof document !== "undefined") return false;
|
|
@@ -499,7 +499,7 @@ var GAS_CONSTANTS = {
|
|
|
499
499
|
REVOKE_BUILDER: 57e3,
|
|
500
500
|
SET_REFERRAL_CODE: 76e3,
|
|
501
501
|
SET_REFERRAL: 8e4,
|
|
502
|
-
// CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go, v3.0.0-rc.
|
|
502
|
+
// CLOB module — mirror the chain's x/clob MinGasLimit* (agent_msg.go, v3.0.0-rc.5) exactly:
|
|
503
503
|
// the agent ante enforces MinGasLimit ≤ gas ≤ MinGasLimit×1.2, so any drift
|
|
504
504
|
// makes the SDK over- or under-shoot that window.
|
|
505
505
|
LIMIT_ORDER: 155e3,
|
|
@@ -513,10 +513,10 @@ var GAS_CONSTANTS = {
|
|
|
513
513
|
MODIFY_ORDER_PER_ID: 155e3,
|
|
514
514
|
// Conditional and group orders (v3.0.0-rc.3). Modifying conditionals prices
|
|
515
515
|
// each order on top of the base; a group order is flat whatever its shape.
|
|
516
|
-
CONDITIONAL_ORDER:
|
|
516
|
+
CONDITIONAL_ORDER: 14e4,
|
|
517
517
|
MODIFY_CONDITIONAL_BASE: 55e3,
|
|
518
518
|
MODIFY_CONDITIONAL_PER_ORDER: 49e3,
|
|
519
|
-
GROUP_ORDER:
|
|
519
|
+
GROUP_ORDER: 254e3,
|
|
520
520
|
// Accountx module
|
|
521
521
|
OPEN_ACCOUNT: 96e3,
|
|
522
522
|
// Perpetual module (chain v3) — since v3.0.0-rc.2 every fee-free perpetual
|
|
@@ -535,25 +535,25 @@ var GAS_CONSTANTS = {
|
|
|
535
535
|
// is not fee-free; its builder simulates like staking.
|
|
536
536
|
LENDING_SUPPLY: 122e3,
|
|
537
537
|
LENDING_WITHDRAW: 115e3,
|
|
538
|
-
LENDING_SUPPLY_COLLATERAL:
|
|
539
|
-
LENDING_WITHDRAW_COLLATERAL:
|
|
540
|
-
LENDING_BORROW:
|
|
538
|
+
LENDING_SUPPLY_COLLATERAL: 115e3,
|
|
539
|
+
LENDING_WITHDRAW_COLLATERAL: 26e4,
|
|
540
|
+
LENDING_BORROW: 28e4,
|
|
541
541
|
LENDING_REPAY: 1e5,
|
|
542
|
-
LENDING_LIQUIDATE:
|
|
542
|
+
LENDING_LIQUIDATE: 49e4,
|
|
543
543
|
LENDING_FUND_INSURANCE_FUND: 15e4,
|
|
544
544
|
// Margin module (x/margin/types/fee_free.go). Deposit and withdraw price
|
|
545
545
|
// each coin on top of the base.
|
|
546
546
|
MARGIN_DEPOSIT_BASE: 88e3,
|
|
547
|
-
MARGIN_DEPOSIT_PER_COIN:
|
|
547
|
+
MARGIN_DEPOSIT_PER_COIN: 53e3,
|
|
548
548
|
MARGIN_WITHDRAW_BASE: 74e3,
|
|
549
|
-
MARGIN_WITHDRAW_PER_COIN:
|
|
550
|
-
MARGIN_BORROW:
|
|
549
|
+
MARGIN_WITHDRAW_PER_COIN: 21e4,
|
|
550
|
+
MARGIN_BORROW: 25e4,
|
|
551
551
|
MARGIN_REPAY: 259e3,
|
|
552
552
|
// Vault module (x/vault/types/fee_free.go). A trading vault's creation adds
|
|
553
553
|
// a per-market cost to its base, a lending vault's a per-pool cost to its own.
|
|
554
|
-
VAULT_CREATE_TRADING_BASE:
|
|
554
|
+
VAULT_CREATE_TRADING_BASE: 22e4,
|
|
555
555
|
VAULT_CREATE_PER_MARKET: 9e3,
|
|
556
|
-
VAULT_CREATE_LENDING_BASE:
|
|
556
|
+
VAULT_CREATE_LENDING_BASE: 16e4,
|
|
557
557
|
VAULT_CREATE_PER_LENDING_POOL: 7e3,
|
|
558
558
|
VAULT_UPDATE_MANAGER: 95e3,
|
|
559
559
|
// A config update is priced like creation: per spot market or per pool.
|
|
@@ -4590,6 +4590,7 @@ var EIP712_MSG_TYPES = {
|
|
|
4590
4590
|
{ name: "manager", type: "string" },
|
|
4591
4591
|
{ name: "initial_deposit", type: "NESTED", jsName: "initialDeposit" },
|
|
4592
4592
|
{ name: "fund_window", type: "NESTED", jsName: "fundWindow" },
|
|
4593
|
+
{ name: "description", type: "NESTED" },
|
|
4593
4594
|
{ name: "Terms", type: "NESTED", oneof: true },
|
|
4594
4595
|
{ name: "Config", type: "NESTED", oneof: true }
|
|
4595
4596
|
],
|
|
@@ -4598,6 +4599,10 @@ var EIP712_MSG_TYPES = {
|
|
|
4598
4599
|
{ name: "value", type: "NESTED" },
|
|
4599
4600
|
{ name: "type", type: "string" }
|
|
4600
4601
|
],
|
|
4602
|
+
description: [
|
|
4603
|
+
{ name: "name", type: "string" },
|
|
4604
|
+
{ name: "details", type: "string" }
|
|
4605
|
+
],
|
|
4601
4606
|
fund_window: [
|
|
4602
4607
|
{ name: "redemption_open_time", type: "string", jsName: "redemptionOpenTime" },
|
|
4603
4608
|
{ name: "deposit_open_time", type: "string", jsName: "depositOpenTime" },
|
|
@@ -9103,11 +9108,11 @@ function createBaseAsset() {
|
|
|
9103
9108
|
maxBonus: "",
|
|
9104
9109
|
kinks: [],
|
|
9105
9110
|
rates: [],
|
|
9106
|
-
|
|
9111
|
+
collateralCap: "",
|
|
9107
9112
|
borrowCap: "",
|
|
9108
9113
|
oracleAsset: "",
|
|
9109
9114
|
spotMarketId: new Uint8Array(0),
|
|
9110
|
-
|
|
9115
|
+
availableAt: 0n
|
|
9111
9116
|
};
|
|
9112
9117
|
}
|
|
9113
9118
|
var Asset = {
|
|
@@ -9133,8 +9138,8 @@ var Asset = {
|
|
|
9133
9138
|
for (const v of message.rates) {
|
|
9134
9139
|
writer.uint32(58).string(v);
|
|
9135
9140
|
}
|
|
9136
|
-
if (message.
|
|
9137
|
-
writer.uint32(66).string(message.
|
|
9141
|
+
if (message.collateralCap !== "") {
|
|
9142
|
+
writer.uint32(66).string(message.collateralCap);
|
|
9138
9143
|
}
|
|
9139
9144
|
if (message.borrowCap !== "") {
|
|
9140
9145
|
writer.uint32(74).string(message.borrowCap);
|
|
@@ -9145,8 +9150,13 @@ var Asset = {
|
|
|
9145
9150
|
if (message.spotMarketId.length !== 0) {
|
|
9146
9151
|
writer.uint32(90).bytes(message.spotMarketId);
|
|
9147
9152
|
}
|
|
9148
|
-
if (message.
|
|
9149
|
-
|
|
9153
|
+
if (message.availableAt !== 0n) {
|
|
9154
|
+
if (BigInt.asIntN(64, message.availableAt) !== message.availableAt) {
|
|
9155
|
+
throw new globalThis.Error(
|
|
9156
|
+
"value provided for field message.availableAt of type int64 too large"
|
|
9157
|
+
);
|
|
9158
|
+
}
|
|
9159
|
+
writer.uint32(104).int64(message.availableAt);
|
|
9150
9160
|
}
|
|
9151
9161
|
return writer;
|
|
9152
9162
|
},
|
|
@@ -9210,7 +9220,7 @@ var Asset = {
|
|
|
9210
9220
|
if (tag !== 66) {
|
|
9211
9221
|
break;
|
|
9212
9222
|
}
|
|
9213
|
-
message.
|
|
9223
|
+
message.collateralCap = reader.string();
|
|
9214
9224
|
continue;
|
|
9215
9225
|
}
|
|
9216
9226
|
case 9: {
|
|
@@ -9234,11 +9244,11 @@ var Asset = {
|
|
|
9234
9244
|
message.spotMarketId = reader.bytes();
|
|
9235
9245
|
continue;
|
|
9236
9246
|
}
|
|
9237
|
-
case
|
|
9238
|
-
if (tag !==
|
|
9247
|
+
case 13: {
|
|
9248
|
+
if (tag !== 104) {
|
|
9239
9249
|
break;
|
|
9240
9250
|
}
|
|
9241
|
-
message.
|
|
9251
|
+
message.availableAt = reader.int64();
|
|
9242
9252
|
continue;
|
|
9243
9253
|
}
|
|
9244
9254
|
}
|
|
@@ -9258,11 +9268,11 @@ var Asset = {
|
|
|
9258
9268
|
maxBonus: isSet19(object2.maxBonus) ? globalThis.String(object2.maxBonus) : isSet19(object2.max_bonus) ? globalThis.String(object2.max_bonus) : "",
|
|
9259
9269
|
kinks: globalThis.Array.isArray(object2?.kinks) ? object2.kinks.map((e) => globalThis.String(e)) : [],
|
|
9260
9270
|
rates: globalThis.Array.isArray(object2?.rates) ? object2.rates.map((e) => globalThis.String(e)) : [],
|
|
9261
|
-
|
|
9271
|
+
collateralCap: isSet19(object2.collateralCap) ? globalThis.String(object2.collateralCap) : isSet19(object2.collateral_cap) ? globalThis.String(object2.collateral_cap) : "",
|
|
9262
9272
|
borrowCap: isSet19(object2.borrowCap) ? globalThis.String(object2.borrowCap) : isSet19(object2.borrow_cap) ? globalThis.String(object2.borrow_cap) : "",
|
|
9263
9273
|
oracleAsset: isSet19(object2.oracleAsset) ? globalThis.String(object2.oracleAsset) : isSet19(object2.oracle_asset) ? globalThis.String(object2.oracle_asset) : "",
|
|
9264
9274
|
spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0),
|
|
9265
|
-
|
|
9275
|
+
availableAt: isSet19(object2.availableAt) ? BigInt(object2.availableAt) : isSet19(object2.available_at) ? BigInt(object2.available_at) : 0n
|
|
9266
9276
|
};
|
|
9267
9277
|
},
|
|
9268
9278
|
toJSON(message) {
|
|
@@ -9288,8 +9298,8 @@ var Asset = {
|
|
|
9288
9298
|
if (message.rates?.length) {
|
|
9289
9299
|
obj.rates = message.rates;
|
|
9290
9300
|
}
|
|
9291
|
-
if (message.
|
|
9292
|
-
obj.
|
|
9301
|
+
if (message.collateralCap !== "") {
|
|
9302
|
+
obj.collateralCap = message.collateralCap;
|
|
9293
9303
|
}
|
|
9294
9304
|
if (message.borrowCap !== "") {
|
|
9295
9305
|
obj.borrowCap = message.borrowCap;
|
|
@@ -9300,8 +9310,8 @@ var Asset = {
|
|
|
9300
9310
|
if (message.spotMarketId.length !== 0) {
|
|
9301
9311
|
obj.spotMarketId = base64FromBytes6(message.spotMarketId);
|
|
9302
9312
|
}
|
|
9303
|
-
if (message.
|
|
9304
|
-
obj.
|
|
9313
|
+
if (message.availableAt !== 0n) {
|
|
9314
|
+
obj.availableAt = message.availableAt.toString();
|
|
9305
9315
|
}
|
|
9306
9316
|
return obj;
|
|
9307
9317
|
},
|
|
@@ -9317,22 +9327,16 @@ var Asset = {
|
|
|
9317
9327
|
message.maxBonus = object2.maxBonus ?? "";
|
|
9318
9328
|
message.kinks = object2.kinks?.map((e) => e) || [];
|
|
9319
9329
|
message.rates = object2.rates?.map((e) => e) || [];
|
|
9320
|
-
message.
|
|
9330
|
+
message.collateralCap = object2.collateralCap ?? "";
|
|
9321
9331
|
message.borrowCap = object2.borrowCap ?? "";
|
|
9322
9332
|
message.oracleAsset = object2.oracleAsset ?? "";
|
|
9323
9333
|
message.spotMarketId = object2.spotMarketId ?? new Uint8Array(0);
|
|
9324
|
-
message.
|
|
9334
|
+
message.availableAt = object2.availableAt ?? 0n;
|
|
9325
9335
|
return message;
|
|
9326
9336
|
}
|
|
9327
9337
|
};
|
|
9328
9338
|
function createBaseAssetRisk() {
|
|
9329
|
-
return {
|
|
9330
|
-
ltv: "",
|
|
9331
|
-
lt: "",
|
|
9332
|
-
oracleAsset: "",
|
|
9333
|
-
spotMarketId: new Uint8Array(0),
|
|
9334
|
-
spotQuoteOracleDenom: ""
|
|
9335
|
-
};
|
|
9339
|
+
return { ltv: "", lt: "", spotMarketId: new Uint8Array(0) };
|
|
9336
9340
|
}
|
|
9337
9341
|
var AssetRisk = {
|
|
9338
9342
|
encode(message, writer = new BinaryWriter21()) {
|
|
@@ -9342,15 +9346,9 @@ var AssetRisk = {
|
|
|
9342
9346
|
if (message.lt !== "") {
|
|
9343
9347
|
writer.uint32(18).string(message.lt);
|
|
9344
9348
|
}
|
|
9345
|
-
if (message.oracleAsset !== "") {
|
|
9346
|
-
writer.uint32(26).string(message.oracleAsset);
|
|
9347
|
-
}
|
|
9348
9349
|
if (message.spotMarketId.length !== 0) {
|
|
9349
9350
|
writer.uint32(34).bytes(message.spotMarketId);
|
|
9350
9351
|
}
|
|
9351
|
-
if (message.spotQuoteOracleDenom !== "") {
|
|
9352
|
-
writer.uint32(42).string(message.spotQuoteOracleDenom);
|
|
9353
|
-
}
|
|
9354
9352
|
return writer;
|
|
9355
9353
|
},
|
|
9356
9354
|
decode(input, length) {
|
|
@@ -9374,13 +9372,6 @@ var AssetRisk = {
|
|
|
9374
9372
|
message.lt = reader.string();
|
|
9375
9373
|
continue;
|
|
9376
9374
|
}
|
|
9377
|
-
case 3: {
|
|
9378
|
-
if (tag !== 26) {
|
|
9379
|
-
break;
|
|
9380
|
-
}
|
|
9381
|
-
message.oracleAsset = reader.string();
|
|
9382
|
-
continue;
|
|
9383
|
-
}
|
|
9384
9375
|
case 4: {
|
|
9385
9376
|
if (tag !== 34) {
|
|
9386
9377
|
break;
|
|
@@ -9388,13 +9379,6 @@ var AssetRisk = {
|
|
|
9388
9379
|
message.spotMarketId = reader.bytes();
|
|
9389
9380
|
continue;
|
|
9390
9381
|
}
|
|
9391
|
-
case 5: {
|
|
9392
|
-
if (tag !== 42) {
|
|
9393
|
-
break;
|
|
9394
|
-
}
|
|
9395
|
-
message.spotQuoteOracleDenom = reader.string();
|
|
9396
|
-
continue;
|
|
9397
|
-
}
|
|
9398
9382
|
}
|
|
9399
9383
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9400
9384
|
break;
|
|
@@ -9407,9 +9391,7 @@ var AssetRisk = {
|
|
|
9407
9391
|
return {
|
|
9408
9392
|
ltv: isSet19(object2.ltv) ? globalThis.String(object2.ltv) : "",
|
|
9409
9393
|
lt: isSet19(object2.lt) ? globalThis.String(object2.lt) : "",
|
|
9410
|
-
|
|
9411
|
-
spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0),
|
|
9412
|
-
spotQuoteOracleDenom: isSet19(object2.spotQuoteOracleDenom) ? globalThis.String(object2.spotQuoteOracleDenom) : isSet19(object2.spot_quote_oracle_denom) ? globalThis.String(object2.spot_quote_oracle_denom) : ""
|
|
9394
|
+
spotMarketId: isSet19(object2.spotMarketId) ? bytesFromBase646(object2.spotMarketId) : isSet19(object2.spot_market_id) ? bytesFromBase646(object2.spot_market_id) : new Uint8Array(0)
|
|
9413
9395
|
};
|
|
9414
9396
|
},
|
|
9415
9397
|
toJSON(message) {
|
|
@@ -9420,15 +9402,9 @@ var AssetRisk = {
|
|
|
9420
9402
|
if (message.lt !== "") {
|
|
9421
9403
|
obj.lt = message.lt;
|
|
9422
9404
|
}
|
|
9423
|
-
if (message.oracleAsset !== "") {
|
|
9424
|
-
obj.oracleAsset = message.oracleAsset;
|
|
9425
|
-
}
|
|
9426
9405
|
if (message.spotMarketId.length !== 0) {
|
|
9427
9406
|
obj.spotMarketId = base64FromBytes6(message.spotMarketId);
|
|
9428
9407
|
}
|
|
9429
|
-
if (message.spotQuoteOracleDenom !== "") {
|
|
9430
|
-
obj.spotQuoteOracleDenom = message.spotQuoteOracleDenom;
|
|
9431
|
-
}
|
|
9432
9408
|
return obj;
|
|
9433
9409
|
},
|
|
9434
9410
|
create(base) {
|
|
@@ -9438,9 +9414,7 @@ var AssetRisk = {
|
|
|
9438
9414
|
const message = createBaseAssetRisk();
|
|
9439
9415
|
message.ltv = object2.ltv ?? "";
|
|
9440
9416
|
message.lt = object2.lt ?? "";
|
|
9441
|
-
message.oracleAsset = object2.oracleAsset ?? "";
|
|
9442
9417
|
message.spotMarketId = object2.spotMarketId ?? new Uint8Array(0);
|
|
9443
|
-
message.spotQuoteOracleDenom = object2.spotQuoteOracleDenom ?? "";
|
|
9444
9418
|
return message;
|
|
9445
9419
|
}
|
|
9446
9420
|
};
|
|
@@ -9700,7 +9674,8 @@ function createBaseAssetState() {
|
|
|
9700
9674
|
totalSupplyShares: "",
|
|
9701
9675
|
totalBorrowShares: "",
|
|
9702
9676
|
collectedProtocolFee: "",
|
|
9703
|
-
deficit: ""
|
|
9677
|
+
deficit: "",
|
|
9678
|
+
totalCollateral: ""
|
|
9704
9679
|
};
|
|
9705
9680
|
}
|
|
9706
9681
|
var AssetState = {
|
|
@@ -9723,6 +9698,9 @@ var AssetState = {
|
|
|
9723
9698
|
if (message.deficit !== "") {
|
|
9724
9699
|
writer.uint32(50).string(message.deficit);
|
|
9725
9700
|
}
|
|
9701
|
+
if (message.totalCollateral !== "") {
|
|
9702
|
+
writer.uint32(58).string(message.totalCollateral);
|
|
9703
|
+
}
|
|
9726
9704
|
return writer;
|
|
9727
9705
|
},
|
|
9728
9706
|
decode(input, length) {
|
|
@@ -9774,6 +9752,13 @@ var AssetState = {
|
|
|
9774
9752
|
message.deficit = reader.string();
|
|
9775
9753
|
continue;
|
|
9776
9754
|
}
|
|
9755
|
+
case 7: {
|
|
9756
|
+
if (tag !== 58) {
|
|
9757
|
+
break;
|
|
9758
|
+
}
|
|
9759
|
+
message.totalCollateral = reader.string();
|
|
9760
|
+
continue;
|
|
9761
|
+
}
|
|
9777
9762
|
}
|
|
9778
9763
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9779
9764
|
break;
|
|
@@ -9789,7 +9774,8 @@ var AssetState = {
|
|
|
9789
9774
|
totalSupplyShares: isSet19(object2.totalSupplyShares) ? globalThis.String(object2.totalSupplyShares) : isSet19(object2.total_supply_shares) ? globalThis.String(object2.total_supply_shares) : "",
|
|
9790
9775
|
totalBorrowShares: isSet19(object2.totalBorrowShares) ? globalThis.String(object2.totalBorrowShares) : isSet19(object2.total_borrow_shares) ? globalThis.String(object2.total_borrow_shares) : "",
|
|
9791
9776
|
collectedProtocolFee: isSet19(object2.collectedProtocolFee) ? globalThis.String(object2.collectedProtocolFee) : isSet19(object2.collected_protocol_fee) ? globalThis.String(object2.collected_protocol_fee) : "",
|
|
9792
|
-
deficit: isSet19(object2.deficit) ? globalThis.String(object2.deficit) : ""
|
|
9777
|
+
deficit: isSet19(object2.deficit) ? globalThis.String(object2.deficit) : "",
|
|
9778
|
+
totalCollateral: isSet19(object2.totalCollateral) ? globalThis.String(object2.totalCollateral) : isSet19(object2.total_collateral) ? globalThis.String(object2.total_collateral) : ""
|
|
9793
9779
|
};
|
|
9794
9780
|
},
|
|
9795
9781
|
toJSON(message) {
|
|
@@ -9812,6 +9798,9 @@ var AssetState = {
|
|
|
9812
9798
|
if (message.deficit !== "") {
|
|
9813
9799
|
obj.deficit = message.deficit;
|
|
9814
9800
|
}
|
|
9801
|
+
if (message.totalCollateral !== "") {
|
|
9802
|
+
obj.totalCollateral = message.totalCollateral;
|
|
9803
|
+
}
|
|
9815
9804
|
return obj;
|
|
9816
9805
|
},
|
|
9817
9806
|
create(base) {
|
|
@@ -9825,6 +9814,7 @@ var AssetState = {
|
|
|
9825
9814
|
message.totalBorrowShares = object2.totalBorrowShares ?? "";
|
|
9826
9815
|
message.collectedProtocolFee = object2.collectedProtocolFee ?? "";
|
|
9827
9816
|
message.deficit = object2.deficit ?? "";
|
|
9817
|
+
message.totalCollateral = object2.totalCollateral ?? "";
|
|
9828
9818
|
return message;
|
|
9829
9819
|
}
|
|
9830
9820
|
};
|
|
@@ -16400,6 +16390,74 @@ var OracleFeed = {
|
|
|
16400
16390
|
return message;
|
|
16401
16391
|
}
|
|
16402
16392
|
};
|
|
16393
|
+
function createBaseDescription() {
|
|
16394
|
+
return { name: "", details: "" };
|
|
16395
|
+
}
|
|
16396
|
+
var Description = {
|
|
16397
|
+
encode(message, writer = new BinaryWriter37()) {
|
|
16398
|
+
if (message.name !== "") {
|
|
16399
|
+
writer.uint32(10).string(message.name);
|
|
16400
|
+
}
|
|
16401
|
+
if (message.details !== "") {
|
|
16402
|
+
writer.uint32(18).string(message.details);
|
|
16403
|
+
}
|
|
16404
|
+
return writer;
|
|
16405
|
+
},
|
|
16406
|
+
decode(input, length) {
|
|
16407
|
+
const reader = input instanceof BinaryReader37 ? input : new BinaryReader37(input);
|
|
16408
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
16409
|
+
const message = createBaseDescription();
|
|
16410
|
+
while (reader.pos < end) {
|
|
16411
|
+
const tag = reader.uint32();
|
|
16412
|
+
switch (tag >>> 3) {
|
|
16413
|
+
case 1: {
|
|
16414
|
+
if (tag !== 10) {
|
|
16415
|
+
break;
|
|
16416
|
+
}
|
|
16417
|
+
message.name = reader.string();
|
|
16418
|
+
continue;
|
|
16419
|
+
}
|
|
16420
|
+
case 2: {
|
|
16421
|
+
if (tag !== 18) {
|
|
16422
|
+
break;
|
|
16423
|
+
}
|
|
16424
|
+
message.details = reader.string();
|
|
16425
|
+
continue;
|
|
16426
|
+
}
|
|
16427
|
+
}
|
|
16428
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
16429
|
+
break;
|
|
16430
|
+
}
|
|
16431
|
+
reader.skip(tag & 7);
|
|
16432
|
+
}
|
|
16433
|
+
return message;
|
|
16434
|
+
},
|
|
16435
|
+
fromJSON(object2) {
|
|
16436
|
+
return {
|
|
16437
|
+
name: isSet35(object2.name) ? globalThis.String(object2.name) : "",
|
|
16438
|
+
details: isSet35(object2.details) ? globalThis.String(object2.details) : ""
|
|
16439
|
+
};
|
|
16440
|
+
},
|
|
16441
|
+
toJSON(message) {
|
|
16442
|
+
const obj = {};
|
|
16443
|
+
if (message.name !== "") {
|
|
16444
|
+
obj.name = message.name;
|
|
16445
|
+
}
|
|
16446
|
+
if (message.details !== "") {
|
|
16447
|
+
obj.details = message.details;
|
|
16448
|
+
}
|
|
16449
|
+
return obj;
|
|
16450
|
+
},
|
|
16451
|
+
create(base) {
|
|
16452
|
+
return Description.fromPartial(base ?? {});
|
|
16453
|
+
},
|
|
16454
|
+
fromPartial(object2) {
|
|
16455
|
+
const message = createBaseDescription();
|
|
16456
|
+
message.name = object2.name ?? "";
|
|
16457
|
+
message.details = object2.details ?? "";
|
|
16458
|
+
return message;
|
|
16459
|
+
}
|
|
16460
|
+
};
|
|
16403
16461
|
function bytesFromBase6412(b64) {
|
|
16404
16462
|
if (globalThis.Buffer) {
|
|
16405
16463
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -16732,7 +16790,8 @@ function createBaseMsgCreateVault() {
|
|
|
16732
16790
|
tradingTerms: void 0,
|
|
16733
16791
|
lending: void 0,
|
|
16734
16792
|
trading: void 0,
|
|
16735
|
-
initialDeposit: void 0
|
|
16793
|
+
initialDeposit: void 0,
|
|
16794
|
+
description: void 0
|
|
16736
16795
|
};
|
|
16737
16796
|
}
|
|
16738
16797
|
var MsgCreateVault = {
|
|
@@ -16767,6 +16826,9 @@ var MsgCreateVault = {
|
|
|
16767
16826
|
if (message.initialDeposit !== void 0) {
|
|
16768
16827
|
Coin.encode(message.initialDeposit, writer.uint32(82).fork()).join();
|
|
16769
16828
|
}
|
|
16829
|
+
if (message.description !== void 0) {
|
|
16830
|
+
Description.encode(message.description, writer.uint32(90).fork()).join();
|
|
16831
|
+
}
|
|
16770
16832
|
return writer;
|
|
16771
16833
|
},
|
|
16772
16834
|
decode(input, length) {
|
|
@@ -16846,6 +16908,13 @@ var MsgCreateVault = {
|
|
|
16846
16908
|
message.initialDeposit = Coin.decode(reader, reader.uint32());
|
|
16847
16909
|
continue;
|
|
16848
16910
|
}
|
|
16911
|
+
case 11: {
|
|
16912
|
+
if (tag !== 90) {
|
|
16913
|
+
break;
|
|
16914
|
+
}
|
|
16915
|
+
message.description = Description.decode(reader, reader.uint32());
|
|
16916
|
+
continue;
|
|
16917
|
+
}
|
|
16849
16918
|
}
|
|
16850
16919
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16851
16920
|
break;
|
|
@@ -16865,7 +16934,8 @@ var MsgCreateVault = {
|
|
|
16865
16934
|
tradingTerms: isSet37(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet37(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0,
|
|
16866
16935
|
lending: isSet37(object2.lending) ? LendingVaultConfig.fromJSON(object2.lending) : void 0,
|
|
16867
16936
|
trading: isSet37(object2.trading) ? TradingVaultConfig.fromJSON(object2.trading) : void 0,
|
|
16868
|
-
initialDeposit: isSet37(object2.initialDeposit) ? Coin.fromJSON(object2.initialDeposit) : isSet37(object2.initial_deposit) ? Coin.fromJSON(object2.initial_deposit) : void 0
|
|
16937
|
+
initialDeposit: isSet37(object2.initialDeposit) ? Coin.fromJSON(object2.initialDeposit) : isSet37(object2.initial_deposit) ? Coin.fromJSON(object2.initial_deposit) : void 0,
|
|
16938
|
+
description: isSet37(object2.description) ? Description.fromJSON(object2.description) : void 0
|
|
16869
16939
|
};
|
|
16870
16940
|
},
|
|
16871
16941
|
toJSON(message) {
|
|
@@ -16900,6 +16970,9 @@ var MsgCreateVault = {
|
|
|
16900
16970
|
if (message.initialDeposit !== void 0) {
|
|
16901
16971
|
obj.initialDeposit = Coin.toJSON(message.initialDeposit);
|
|
16902
16972
|
}
|
|
16973
|
+
if (message.description !== void 0) {
|
|
16974
|
+
obj.description = Description.toJSON(message.description);
|
|
16975
|
+
}
|
|
16903
16976
|
return obj;
|
|
16904
16977
|
},
|
|
16905
16978
|
create(base) {
|
|
@@ -16917,6 +16990,7 @@ var MsgCreateVault = {
|
|
|
16917
16990
|
message.lending = object2.lending !== void 0 && object2.lending !== null ? LendingVaultConfig.fromPartial(object2.lending) : void 0;
|
|
16918
16991
|
message.trading = object2.trading !== void 0 && object2.trading !== null ? TradingVaultConfig.fromPartial(object2.trading) : void 0;
|
|
16919
16992
|
message.initialDeposit = object2.initialDeposit !== void 0 && object2.initialDeposit !== null ? Coin.fromPartial(object2.initialDeposit) : void 0;
|
|
16993
|
+
message.description = object2.description !== void 0 && object2.description !== null ? Description.fromPartial(object2.description) : void 0;
|
|
16920
16994
|
return message;
|
|
16921
16995
|
}
|
|
16922
16996
|
};
|
|
@@ -18060,10 +18134,10 @@ var Commission = {
|
|
|
18060
18134
|
return message;
|
|
18061
18135
|
}
|
|
18062
18136
|
};
|
|
18063
|
-
function
|
|
18137
|
+
function createBaseDescription2() {
|
|
18064
18138
|
return { moniker: "", identity: "", website: "", securityContact: "", details: "" };
|
|
18065
18139
|
}
|
|
18066
|
-
var
|
|
18140
|
+
var Description2 = {
|
|
18067
18141
|
encode(message, writer = new BinaryWriter42()) {
|
|
18068
18142
|
if (message.moniker !== "") {
|
|
18069
18143
|
writer.uint32(10).string(message.moniker);
|
|
@@ -18085,7 +18159,7 @@ var Description = {
|
|
|
18085
18159
|
decode(input, length) {
|
|
18086
18160
|
const reader = input instanceof BinaryReader42 ? input : new BinaryReader42(input);
|
|
18087
18161
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18088
|
-
const message =
|
|
18162
|
+
const message = createBaseDescription2();
|
|
18089
18163
|
while (reader.pos < end) {
|
|
18090
18164
|
const tag = reader.uint32();
|
|
18091
18165
|
switch (tag >>> 3) {
|
|
@@ -18161,10 +18235,10 @@ var Description = {
|
|
|
18161
18235
|
return obj;
|
|
18162
18236
|
},
|
|
18163
18237
|
create(base) {
|
|
18164
|
-
return
|
|
18238
|
+
return Description2.fromPartial(base ?? {});
|
|
18165
18239
|
},
|
|
18166
18240
|
fromPartial(object2) {
|
|
18167
|
-
const message =
|
|
18241
|
+
const message = createBaseDescription2();
|
|
18168
18242
|
message.moniker = object2.moniker ?? "";
|
|
18169
18243
|
message.identity = object2.identity ?? "";
|
|
18170
18244
|
message.website = object2.website ?? "";
|
|
@@ -18211,7 +18285,7 @@ var Validator = {
|
|
|
18211
18285
|
writer.uint32(50).string(message.delegatorShares);
|
|
18212
18286
|
}
|
|
18213
18287
|
if (message.description !== void 0) {
|
|
18214
|
-
|
|
18288
|
+
Description2.encode(message.description, writer.uint32(58).fork()).join();
|
|
18215
18289
|
}
|
|
18216
18290
|
if (message.unbondingHeight !== 0n) {
|
|
18217
18291
|
if (BigInt.asIntN(64, message.unbondingHeight) !== message.unbondingHeight) {
|
|
@@ -18303,7 +18377,7 @@ var Validator = {
|
|
|
18303
18377
|
if (tag !== 58) {
|
|
18304
18378
|
break;
|
|
18305
18379
|
}
|
|
18306
|
-
message.description =
|
|
18380
|
+
message.description = Description2.decode(reader, reader.uint32());
|
|
18307
18381
|
continue;
|
|
18308
18382
|
}
|
|
18309
18383
|
case 8: {
|
|
@@ -18371,7 +18445,7 @@ var Validator = {
|
|
|
18371
18445
|
status: isSet40(object2.status) ? bondStatusFromJSON(object2.status) : 0,
|
|
18372
18446
|
tokens: isSet40(object2.tokens) ? globalThis.String(object2.tokens) : "",
|
|
18373
18447
|
delegatorShares: isSet40(object2.delegatorShares) ? globalThis.String(object2.delegatorShares) : isSet40(object2.delegator_shares) ? globalThis.String(object2.delegator_shares) : "",
|
|
18374
|
-
description: isSet40(object2.description) ?
|
|
18448
|
+
description: isSet40(object2.description) ? Description2.fromJSON(object2.description) : void 0,
|
|
18375
18449
|
unbondingHeight: isSet40(object2.unbondingHeight) ? BigInt(object2.unbondingHeight) : isSet40(object2.unbonding_height) ? BigInt(object2.unbonding_height) : 0n,
|
|
18376
18450
|
unbondingTime: isSet40(object2.unbondingTime) ? fromJsonTimestamp7(object2.unbondingTime) : isSet40(object2.unbonding_time) ? fromJsonTimestamp7(object2.unbonding_time) : void 0,
|
|
18377
18451
|
commission: isSet40(object2.commission) ? Commission.fromJSON(object2.commission) : void 0,
|
|
@@ -18401,7 +18475,7 @@ var Validator = {
|
|
|
18401
18475
|
obj.delegatorShares = message.delegatorShares;
|
|
18402
18476
|
}
|
|
18403
18477
|
if (message.description !== void 0) {
|
|
18404
|
-
obj.description =
|
|
18478
|
+
obj.description = Description2.toJSON(message.description);
|
|
18405
18479
|
}
|
|
18406
18480
|
if (message.unbondingHeight !== 0n) {
|
|
18407
18481
|
obj.unbondingHeight = message.unbondingHeight.toString();
|
|
@@ -18434,7 +18508,7 @@ var Validator = {
|
|
|
18434
18508
|
message.status = object2.status ?? 0;
|
|
18435
18509
|
message.tokens = object2.tokens ?? "";
|
|
18436
18510
|
message.delegatorShares = object2.delegatorShares ?? "";
|
|
18437
|
-
message.description = object2.description !== void 0 && object2.description !== null ?
|
|
18511
|
+
message.description = object2.description !== void 0 && object2.description !== null ? Description2.fromPartial(object2.description) : void 0;
|
|
18438
18512
|
message.unbondingHeight = object2.unbondingHeight ?? 0n;
|
|
18439
18513
|
message.unbondingTime = object2.unbondingTime ?? void 0;
|
|
18440
18514
|
message.commission = object2.commission !== void 0 && object2.commission !== null ? Commission.fromPartial(object2.commission) : void 0;
|
|
@@ -20097,6 +20171,14 @@ function mapAultVaultV1AllowedMarkets(input, label = "value") {
|
|
|
20097
20171
|
lendingPoolIds: requireBigIntArray(record2["lendingPoolIds"], `${prefix}lendingPoolIds`)
|
|
20098
20172
|
};
|
|
20099
20173
|
}
|
|
20174
|
+
function mapAultVaultV1Description(input, label = "value") {
|
|
20175
|
+
const record2 = asRecord(input);
|
|
20176
|
+
const prefix = label ? `${label}.` : "";
|
|
20177
|
+
return {
|
|
20178
|
+
name: requireString(record2["name"], `${prefix}name`),
|
|
20179
|
+
details: requireString(record2["details"], `${prefix}details`)
|
|
20180
|
+
};
|
|
20181
|
+
}
|
|
20100
20182
|
function mapAultVaultV1FundWindow(input, label = "value") {
|
|
20101
20183
|
const record2 = asRecord(input);
|
|
20102
20184
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20189,7 +20271,8 @@ function mapAultVaultV1MsgCreateVault(input, label = "value") {
|
|
|
20189
20271
|
initialDeposit: mapCosmosBaseV1beta1Coin(
|
|
20190
20272
|
asRecord(record2["initialDeposit"]),
|
|
20191
20273
|
`${prefix}initialDeposit`
|
|
20192
|
-
)
|
|
20274
|
+
),
|
|
20275
|
+
description: mapAultVaultV1Description(asRecord(record2["description"]), `${prefix}description`)
|
|
20193
20276
|
};
|
|
20194
20277
|
}
|
|
20195
20278
|
function mapAultVaultV1MsgDeposit(input, label = "value") {
|
|
@@ -26907,7 +26990,7 @@ var Params14 = {
|
|
|
26907
26990
|
}
|
|
26908
26991
|
};
|
|
26909
26992
|
function createBaseFeed() {
|
|
26910
|
-
return { feedId: "", owner: "", enabled: false, marketId: "", baseDenom: ""
|
|
26993
|
+
return { feedId: "", owner: "", enabled: false, marketId: "", baseDenom: "" };
|
|
26911
26994
|
}
|
|
26912
26995
|
var Feed = {
|
|
26913
26996
|
encode(message, writer = new BinaryWriter52()) {
|
|
@@ -26926,9 +27009,6 @@ var Feed = {
|
|
|
26926
27009
|
if (message.baseDenom !== "") {
|
|
26927
27010
|
writer.uint32(42).string(message.baseDenom);
|
|
26928
27011
|
}
|
|
26929
|
-
if (message.quoteDenom !== "") {
|
|
26930
|
-
writer.uint32(50).string(message.quoteDenom);
|
|
26931
|
-
}
|
|
26932
27012
|
return writer;
|
|
26933
27013
|
},
|
|
26934
27014
|
decode(input, length) {
|
|
@@ -26973,13 +27053,6 @@ var Feed = {
|
|
|
26973
27053
|
message.baseDenom = reader.string();
|
|
26974
27054
|
continue;
|
|
26975
27055
|
}
|
|
26976
|
-
case 6: {
|
|
26977
|
-
if (tag !== 50) {
|
|
26978
|
-
break;
|
|
26979
|
-
}
|
|
26980
|
-
message.quoteDenom = reader.string();
|
|
26981
|
-
continue;
|
|
26982
|
-
}
|
|
26983
27056
|
}
|
|
26984
27057
|
if ((tag & 7) === 4 || tag === 0) {
|
|
26985
27058
|
break;
|
|
@@ -26994,8 +27067,7 @@ var Feed = {
|
|
|
26994
27067
|
owner: isSet50(object2.owner) ? globalThis.String(object2.owner) : "",
|
|
26995
27068
|
enabled: isSet50(object2.enabled) ? globalThis.Boolean(object2.enabled) : false,
|
|
26996
27069
|
marketId: isSet50(object2.marketId) ? globalThis.String(object2.marketId) : isSet50(object2.market_id) ? globalThis.String(object2.market_id) : "",
|
|
26997
|
-
baseDenom: isSet50(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet50(object2.base_denom) ? globalThis.String(object2.base_denom) : ""
|
|
26998
|
-
quoteDenom: isSet50(object2.quoteDenom) ? globalThis.String(object2.quoteDenom) : isSet50(object2.quote_denom) ? globalThis.String(object2.quote_denom) : ""
|
|
27070
|
+
baseDenom: isSet50(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet50(object2.base_denom) ? globalThis.String(object2.base_denom) : ""
|
|
26999
27071
|
};
|
|
27000
27072
|
},
|
|
27001
27073
|
toJSON(message) {
|
|
@@ -27015,9 +27087,6 @@ var Feed = {
|
|
|
27015
27087
|
if (message.baseDenom !== "") {
|
|
27016
27088
|
obj.baseDenom = message.baseDenom;
|
|
27017
27089
|
}
|
|
27018
|
-
if (message.quoteDenom !== "") {
|
|
27019
|
-
obj.quoteDenom = message.quoteDenom;
|
|
27020
|
-
}
|
|
27021
27090
|
return obj;
|
|
27022
27091
|
},
|
|
27023
27092
|
create(base) {
|
|
@@ -27030,7 +27099,6 @@ var Feed = {
|
|
|
27030
27099
|
message.enabled = object2.enabled ?? false;
|
|
27031
27100
|
message.marketId = object2.marketId ?? "";
|
|
27032
27101
|
message.baseDenom = object2.baseDenom ?? "";
|
|
27033
|
-
message.quoteDenom = object2.quoteDenom ?? "";
|
|
27034
27102
|
return message;
|
|
27035
27103
|
}
|
|
27036
27104
|
};
|
|
@@ -27655,7 +27723,10 @@ function createBaseMarkPriceState() {
|
|
|
27655
27723
|
localMedianWeight: "",
|
|
27656
27724
|
lastLocalMedianUpdateTime: 0n,
|
|
27657
27725
|
lastPriceDifferenceUpdateTime: 0n,
|
|
27658
|
-
lastUpdateTime: 0n
|
|
27726
|
+
lastUpdateTime: 0n,
|
|
27727
|
+
clamped: false,
|
|
27728
|
+
previousMarkPrice: "",
|
|
27729
|
+
lastChangeHeight: 0n
|
|
27659
27730
|
};
|
|
27660
27731
|
}
|
|
27661
27732
|
var MarkPriceState = {
|
|
@@ -27699,6 +27770,20 @@ var MarkPriceState = {
|
|
|
27699
27770
|
}
|
|
27700
27771
|
writer.uint32(64).int64(message.lastUpdateTime);
|
|
27701
27772
|
}
|
|
27773
|
+
if (message.clamped !== false) {
|
|
27774
|
+
writer.uint32(72).bool(message.clamped);
|
|
27775
|
+
}
|
|
27776
|
+
if (message.previousMarkPrice !== "") {
|
|
27777
|
+
writer.uint32(82).string(message.previousMarkPrice);
|
|
27778
|
+
}
|
|
27779
|
+
if (message.lastChangeHeight !== 0n) {
|
|
27780
|
+
if (BigInt.asIntN(64, message.lastChangeHeight) !== message.lastChangeHeight) {
|
|
27781
|
+
throw new globalThis.Error(
|
|
27782
|
+
"value provided for field message.lastChangeHeight of type int64 too large"
|
|
27783
|
+
);
|
|
27784
|
+
}
|
|
27785
|
+
writer.uint32(88).int64(message.lastChangeHeight);
|
|
27786
|
+
}
|
|
27702
27787
|
return writer;
|
|
27703
27788
|
},
|
|
27704
27789
|
decode(input, length) {
|
|
@@ -27764,6 +27849,27 @@ var MarkPriceState = {
|
|
|
27764
27849
|
message.lastUpdateTime = reader.int64();
|
|
27765
27850
|
continue;
|
|
27766
27851
|
}
|
|
27852
|
+
case 9: {
|
|
27853
|
+
if (tag !== 72) {
|
|
27854
|
+
break;
|
|
27855
|
+
}
|
|
27856
|
+
message.clamped = reader.bool();
|
|
27857
|
+
continue;
|
|
27858
|
+
}
|
|
27859
|
+
case 10: {
|
|
27860
|
+
if (tag !== 82) {
|
|
27861
|
+
break;
|
|
27862
|
+
}
|
|
27863
|
+
message.previousMarkPrice = reader.string();
|
|
27864
|
+
continue;
|
|
27865
|
+
}
|
|
27866
|
+
case 11: {
|
|
27867
|
+
if (tag !== 88) {
|
|
27868
|
+
break;
|
|
27869
|
+
}
|
|
27870
|
+
message.lastChangeHeight = reader.int64();
|
|
27871
|
+
continue;
|
|
27872
|
+
}
|
|
27767
27873
|
}
|
|
27768
27874
|
if ((tag & 7) === 4 || tag === 0) {
|
|
27769
27875
|
break;
|
|
@@ -27781,7 +27887,10 @@ var MarkPriceState = {
|
|
|
27781
27887
|
localMedianWeight: isSet52(object2.localMedianWeight) ? globalThis.String(object2.localMedianWeight) : isSet52(object2.local_median_weight) ? globalThis.String(object2.local_median_weight) : "",
|
|
27782
27888
|
lastLocalMedianUpdateTime: isSet52(object2.lastLocalMedianUpdateTime) ? BigInt(object2.lastLocalMedianUpdateTime) : isSet52(object2.last_local_median_update_time) ? BigInt(object2.last_local_median_update_time) : 0n,
|
|
27783
27889
|
lastPriceDifferenceUpdateTime: isSet52(object2.lastPriceDifferenceUpdateTime) ? BigInt(object2.lastPriceDifferenceUpdateTime) : isSet52(object2.last_price_difference_update_time) ? BigInt(object2.last_price_difference_update_time) : 0n,
|
|
27784
|
-
lastUpdateTime: isSet52(object2.lastUpdateTime) ? BigInt(object2.lastUpdateTime) : isSet52(object2.last_update_time) ? BigInt(object2.last_update_time) : 0n
|
|
27890
|
+
lastUpdateTime: isSet52(object2.lastUpdateTime) ? BigInt(object2.lastUpdateTime) : isSet52(object2.last_update_time) ? BigInt(object2.last_update_time) : 0n,
|
|
27891
|
+
clamped: isSet52(object2.clamped) ? globalThis.Boolean(object2.clamped) : false,
|
|
27892
|
+
previousMarkPrice: isSet52(object2.previousMarkPrice) ? globalThis.String(object2.previousMarkPrice) : isSet52(object2.previous_mark_price) ? globalThis.String(object2.previous_mark_price) : "",
|
|
27893
|
+
lastChangeHeight: isSet52(object2.lastChangeHeight) ? BigInt(object2.lastChangeHeight) : isSet52(object2.last_change_height) ? BigInt(object2.last_change_height) : 0n
|
|
27785
27894
|
};
|
|
27786
27895
|
},
|
|
27787
27896
|
toJSON(message) {
|
|
@@ -27810,6 +27919,15 @@ var MarkPriceState = {
|
|
|
27810
27919
|
if (message.lastUpdateTime !== 0n) {
|
|
27811
27920
|
obj.lastUpdateTime = message.lastUpdateTime.toString();
|
|
27812
27921
|
}
|
|
27922
|
+
if (message.clamped !== false) {
|
|
27923
|
+
obj.clamped = message.clamped;
|
|
27924
|
+
}
|
|
27925
|
+
if (message.previousMarkPrice !== "") {
|
|
27926
|
+
obj.previousMarkPrice = message.previousMarkPrice;
|
|
27927
|
+
}
|
|
27928
|
+
if (message.lastChangeHeight !== 0n) {
|
|
27929
|
+
obj.lastChangeHeight = message.lastChangeHeight.toString();
|
|
27930
|
+
}
|
|
27813
27931
|
return obj;
|
|
27814
27932
|
},
|
|
27815
27933
|
create(base) {
|
|
@@ -27825,6 +27943,9 @@ var MarkPriceState = {
|
|
|
27825
27943
|
message.lastLocalMedianUpdateTime = object2.lastLocalMedianUpdateTime ?? 0n;
|
|
27826
27944
|
message.lastPriceDifferenceUpdateTime = object2.lastPriceDifferenceUpdateTime ?? 0n;
|
|
27827
27945
|
message.lastUpdateTime = object2.lastUpdateTime ?? 0n;
|
|
27946
|
+
message.clamped = object2.clamped ?? false;
|
|
27947
|
+
message.previousMarkPrice = object2.previousMarkPrice ?? "";
|
|
27948
|
+
message.lastChangeHeight = object2.lastChangeHeight ?? 0n;
|
|
27828
27949
|
return message;
|
|
27829
27950
|
}
|
|
27830
27951
|
};
|
|
@@ -33492,7 +33613,8 @@ function createBaseVaultResponse() {
|
|
|
33492
33613
|
totalShares: "",
|
|
33493
33614
|
pendingConfigUpdate: void 0,
|
|
33494
33615
|
lendingTerms: void 0,
|
|
33495
|
-
tradingTerms: void 0
|
|
33616
|
+
tradingTerms: void 0,
|
|
33617
|
+
description: void 0
|
|
33496
33618
|
};
|
|
33497
33619
|
}
|
|
33498
33620
|
var VaultResponse = {
|
|
@@ -33536,6 +33658,9 @@ var VaultResponse = {
|
|
|
33536
33658
|
if (message.tradingTerms !== void 0) {
|
|
33537
33659
|
TradingVaultTerms.encode(message.tradingTerms, writer.uint32(106).fork()).join();
|
|
33538
33660
|
}
|
|
33661
|
+
if (message.description !== void 0) {
|
|
33662
|
+
Description.encode(message.description, writer.uint32(114).fork()).join();
|
|
33663
|
+
}
|
|
33539
33664
|
return writer;
|
|
33540
33665
|
},
|
|
33541
33666
|
decode(input, length) {
|
|
@@ -33636,6 +33761,13 @@ var VaultResponse = {
|
|
|
33636
33761
|
message.tradingTerms = TradingVaultTerms.decode(reader, reader.uint32());
|
|
33637
33762
|
continue;
|
|
33638
33763
|
}
|
|
33764
|
+
case 14: {
|
|
33765
|
+
if (tag !== 114) {
|
|
33766
|
+
break;
|
|
33767
|
+
}
|
|
33768
|
+
message.description = Description.decode(reader, reader.uint32());
|
|
33769
|
+
continue;
|
|
33770
|
+
}
|
|
33639
33771
|
}
|
|
33640
33772
|
if ((tag & 7) === 4 || tag === 0) {
|
|
33641
33773
|
break;
|
|
@@ -33658,7 +33790,8 @@ var VaultResponse = {
|
|
|
33658
33790
|
totalShares: isSet62(object2.totalShares) ? globalThis.String(object2.totalShares) : isSet62(object2.total_shares) ? globalThis.String(object2.total_shares) : "",
|
|
33659
33791
|
pendingConfigUpdate: isSet62(object2.pendingConfigUpdate) ? PendingVaultConfigUpdate.fromJSON(object2.pendingConfigUpdate) : isSet62(object2.pending_config_update) ? PendingVaultConfigUpdate.fromJSON(object2.pending_config_update) : void 0,
|
|
33660
33792
|
lendingTerms: isSet62(object2.lendingTerms) ? LendingVaultTerms.fromJSON(object2.lendingTerms) : isSet62(object2.lending_terms) ? LendingVaultTerms.fromJSON(object2.lending_terms) : void 0,
|
|
33661
|
-
tradingTerms: isSet62(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet62(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0
|
|
33793
|
+
tradingTerms: isSet62(object2.tradingTerms) ? TradingVaultTerms.fromJSON(object2.tradingTerms) : isSet62(object2.trading_terms) ? TradingVaultTerms.fromJSON(object2.trading_terms) : void 0,
|
|
33794
|
+
description: isSet62(object2.description) ? Description.fromJSON(object2.description) : void 0
|
|
33662
33795
|
};
|
|
33663
33796
|
},
|
|
33664
33797
|
toJSON(message) {
|
|
@@ -33702,6 +33835,9 @@ var VaultResponse = {
|
|
|
33702
33835
|
if (message.tradingTerms !== void 0) {
|
|
33703
33836
|
obj.tradingTerms = TradingVaultTerms.toJSON(message.tradingTerms);
|
|
33704
33837
|
}
|
|
33838
|
+
if (message.description !== void 0) {
|
|
33839
|
+
obj.description = Description.toJSON(message.description);
|
|
33840
|
+
}
|
|
33705
33841
|
return obj;
|
|
33706
33842
|
},
|
|
33707
33843
|
create(base) {
|
|
@@ -33722,6 +33858,7 @@ var VaultResponse = {
|
|
|
33722
33858
|
message.pendingConfigUpdate = object2.pendingConfigUpdate !== void 0 && object2.pendingConfigUpdate !== null ? PendingVaultConfigUpdate.fromPartial(object2.pendingConfigUpdate) : void 0;
|
|
33723
33859
|
message.lendingTerms = object2.lendingTerms !== void 0 && object2.lendingTerms !== null ? LendingVaultTerms.fromPartial(object2.lendingTerms) : void 0;
|
|
33724
33860
|
message.tradingTerms = object2.tradingTerms !== void 0 && object2.tradingTerms !== null ? TradingVaultTerms.fromPartial(object2.tradingTerms) : void 0;
|
|
33861
|
+
message.description = object2.description !== void 0 && object2.description !== null ? Description.fromPartial(object2.description) : void 0;
|
|
33725
33862
|
return message;
|
|
33726
33863
|
}
|
|
33727
33864
|
};
|
|
@@ -37407,6 +37544,21 @@ function checkTradingTerms(performanceFeeBps, exitFeeBps, relationship, fundWind
|
|
|
37407
37544
|
throw new Error("performanceFeeBps and exitFeeBps must total less than 10000 bps");
|
|
37408
37545
|
}
|
|
37409
37546
|
}
|
|
37547
|
+
var MAX_NAME_BYTES = 70;
|
|
37548
|
+
var MAX_DETAILS_BYTES = 280;
|
|
37549
|
+
function descriptionOf(description) {
|
|
37550
|
+
const name = description?.name ?? "";
|
|
37551
|
+
const details = description?.details ?? "";
|
|
37552
|
+
if (name === "") throw new Error("A vault needs a description.name");
|
|
37553
|
+
const bytes = (text) => new TextEncoder().encode(text).length;
|
|
37554
|
+
if (bytes(name) > MAX_NAME_BYTES) {
|
|
37555
|
+
throw new Error(`description.name exceeds ${MAX_NAME_BYTES} bytes`);
|
|
37556
|
+
}
|
|
37557
|
+
if (bytes(details) > MAX_DETAILS_BYTES) {
|
|
37558
|
+
throw new Error(`description.details exceeds ${MAX_DETAILS_BYTES} bytes`);
|
|
37559
|
+
}
|
|
37560
|
+
return { name, details };
|
|
37561
|
+
}
|
|
37410
37562
|
function configOf(config) {
|
|
37411
37563
|
return "lending" in config ? { lending: lendingConfigOf(config.lending) } : { trading: tradingConfigOf(config.trading) };
|
|
37412
37564
|
}
|
|
@@ -37457,7 +37609,8 @@ function buildCreateVaultMsg(owner, params) {
|
|
|
37457
37609
|
relationship,
|
|
37458
37610
|
...params.fundWindow !== void 0 && { fundWindow: fundWindowOf(params.fundWindow) },
|
|
37459
37611
|
// The chain treats a coin with no denom and a zero amount as "no deposit".
|
|
37460
|
-
initialDeposit: deposit ?? { denom: "", amount: "0" }
|
|
37612
|
+
initialDeposit: deposit ?? { denom: "", amount: "0" },
|
|
37613
|
+
description: descriptionOf(params.description)
|
|
37461
37614
|
};
|
|
37462
37615
|
if ("lending" in params.config) {
|
|
37463
37616
|
if (kind !== "normal") {
|