ault-sdk-ts 0.0.2-alpha.21 → 0.0.2-alpha.23
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 +10 -0
- package/dist/core/clob-msgs.d.ts +2 -3
- package/dist/eip712/msg.generated.d.ts +10 -4
- package/dist/eip712/registry.d.ts +2 -0
- package/dist/high-level/types.d.ts +10 -6
- package/dist/index.cjs +618 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +607 -307
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/accountx/v1/query.d.ts +32 -0
- package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +0 -7
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +25 -3
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
- package/dist/proto/gen/ault/license/v1/license.d.ts +0 -14
- package/dist/proto/gen/ault/license/v1/query.d.ts +44 -18
- package/dist/proto/gen/ault/market/v1/market.d.ts +1 -0
- package/dist/proto/gen/ault/market/v1/tx.d.ts +9 -0
- package/dist/proto/gen/ault/miner/v1/genesis.d.ts +52 -84
- package/dist/proto/gen/ault/miner/v1/miner.d.ts +10 -45
- package/dist/proto/gen/ault/miner/v1/query.d.ts +0 -13
- package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -2
- package/dist/proto/gen/ault/spot/v1/order.d.ts +12 -4
- package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +3 -3
- package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +2 -2
- package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +24 -15
- package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +1 -1
- package/dist/rest/dex-types.generated.d.ts +59 -1
- package/dist/rest/dex.d.ts +1 -0
- package/dist/rest/dex.generated.d.ts +151 -4
- package/dist/rest/license.d.ts +1 -2
- package/dist/rest/types.d.ts +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4824,62 +4824,6 @@ var QueryIsKYCApproverResponse = {
|
|
|
4824
4824
|
return message;
|
|
4825
4825
|
}
|
|
4826
4826
|
};
|
|
4827
|
-
function createBaseQueryActiveLicenseCountAtResponse() {
|
|
4828
|
-
return { count: 0n };
|
|
4829
|
-
}
|
|
4830
|
-
var QueryActiveLicenseCountAtResponse = {
|
|
4831
|
-
encode(message, writer = new BinaryWriter18()) {
|
|
4832
|
-
if (message.count !== 0n) {
|
|
4833
|
-
if (BigInt.asUintN(64, message.count) !== message.count) {
|
|
4834
|
-
throw new globalThis.Error(
|
|
4835
|
-
"value provided for field message.count of type uint64 too large"
|
|
4836
|
-
);
|
|
4837
|
-
}
|
|
4838
|
-
writer.uint32(8).uint64(message.count);
|
|
4839
|
-
}
|
|
4840
|
-
return writer;
|
|
4841
|
-
},
|
|
4842
|
-
decode(input, length) {
|
|
4843
|
-
const reader = input instanceof BinaryReader18 ? input : new BinaryReader18(input);
|
|
4844
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4845
|
-
const message = createBaseQueryActiveLicenseCountAtResponse();
|
|
4846
|
-
while (reader.pos < end) {
|
|
4847
|
-
const tag = reader.uint32();
|
|
4848
|
-
switch (tag >>> 3) {
|
|
4849
|
-
case 1: {
|
|
4850
|
-
if (tag !== 8) {
|
|
4851
|
-
break;
|
|
4852
|
-
}
|
|
4853
|
-
message.count = reader.uint64();
|
|
4854
|
-
continue;
|
|
4855
|
-
}
|
|
4856
|
-
}
|
|
4857
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
4858
|
-
break;
|
|
4859
|
-
}
|
|
4860
|
-
reader.skip(tag & 7);
|
|
4861
|
-
}
|
|
4862
|
-
return message;
|
|
4863
|
-
},
|
|
4864
|
-
fromJSON(object2) {
|
|
4865
|
-
return { count: isSet17(object2.count) ? BigInt(object2.count) : 0n };
|
|
4866
|
-
},
|
|
4867
|
-
toJSON(message) {
|
|
4868
|
-
const obj = {};
|
|
4869
|
-
if (message.count !== 0n) {
|
|
4870
|
-
obj.count = message.count.toString();
|
|
4871
|
-
}
|
|
4872
|
-
return obj;
|
|
4873
|
-
},
|
|
4874
|
-
create(base) {
|
|
4875
|
-
return QueryActiveLicenseCountAtResponse.fromPartial(base ?? {});
|
|
4876
|
-
},
|
|
4877
|
-
fromPartial(object2) {
|
|
4878
|
-
const message = createBaseQueryActiveLicenseCountAtResponse();
|
|
4879
|
-
message.count = object2.count ?? 0n;
|
|
4880
|
-
return message;
|
|
4881
|
-
}
|
|
4882
|
-
};
|
|
4883
4827
|
function toTimestamp4(date) {
|
|
4884
4828
|
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
4885
4829
|
const nanos = date.getTime() % 1e3 * 1e6;
|
|
@@ -5003,14 +4947,6 @@ function createLicenseApi(context) {
|
|
|
5003
4947
|
`/ault/license/v1/is_kyc_approver/${address}`,
|
|
5004
4948
|
QueryIsKYCApproverResponse
|
|
5005
4949
|
);
|
|
5006
|
-
},
|
|
5007
|
-
async getActiveLicenseCountAt(owner, snapshotTime) {
|
|
5008
|
-
const query = buildQuery({ snapshot_time: snapshotTime });
|
|
5009
|
-
return fetchProtoJson(
|
|
5010
|
-
context,
|
|
5011
|
-
`/ault/license/v1/active_license_count_at/${owner}${query}`,
|
|
5012
|
-
QueryActiveLicenseCountAtResponse
|
|
5013
|
-
);
|
|
5014
4950
|
}
|
|
5015
4951
|
};
|
|
5016
4952
|
}
|
|
@@ -5063,7 +4999,8 @@ function createBaseMarketResponse() {
|
|
|
5063
4999
|
tickPrecision: 0,
|
|
5064
5000
|
lastPrice: "",
|
|
5065
5001
|
lastMatchingHeight: 0n,
|
|
5066
|
-
halted: false
|
|
5002
|
+
halted: false,
|
|
5003
|
+
deployer: ""
|
|
5067
5004
|
};
|
|
5068
5005
|
}
|
|
5069
5006
|
var MarketResponse = {
|
|
@@ -5106,6 +5043,9 @@ var MarketResponse = {
|
|
|
5106
5043
|
if (message.halted !== false) {
|
|
5107
5044
|
writer.uint32(88).bool(message.halted);
|
|
5108
5045
|
}
|
|
5046
|
+
if (message.deployer !== "") {
|
|
5047
|
+
writer.uint32(98).string(message.deployer);
|
|
5048
|
+
}
|
|
5109
5049
|
return writer;
|
|
5110
5050
|
},
|
|
5111
5051
|
decode(input, length) {
|
|
@@ -5192,6 +5132,13 @@ var MarketResponse = {
|
|
|
5192
5132
|
message.halted = reader.bool();
|
|
5193
5133
|
continue;
|
|
5194
5134
|
}
|
|
5135
|
+
case 12: {
|
|
5136
|
+
if (tag !== 98) {
|
|
5137
|
+
break;
|
|
5138
|
+
}
|
|
5139
|
+
message.deployer = reader.string();
|
|
5140
|
+
continue;
|
|
5141
|
+
}
|
|
5195
5142
|
}
|
|
5196
5143
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5197
5144
|
break;
|
|
@@ -5212,7 +5159,8 @@ var MarketResponse = {
|
|
|
5212
5159
|
tickPrecision: isSet18(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet18(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0,
|
|
5213
5160
|
lastPrice: isSet18(object2.lastPrice) ? globalThis.String(object2.lastPrice) : isSet18(object2.last_price) ? globalThis.String(object2.last_price) : "",
|
|
5214
5161
|
lastMatchingHeight: isSet18(object2.lastMatchingHeight) ? BigInt(object2.lastMatchingHeight) : isSet18(object2.last_matching_height) ? BigInt(object2.last_matching_height) : 0n,
|
|
5215
|
-
halted: isSet18(object2.halted) ? globalThis.Boolean(object2.halted) : false
|
|
5162
|
+
halted: isSet18(object2.halted) ? globalThis.Boolean(object2.halted) : false,
|
|
5163
|
+
deployer: isSet18(object2.deployer) ? globalThis.String(object2.deployer) : ""
|
|
5216
5164
|
};
|
|
5217
5165
|
},
|
|
5218
5166
|
toJSON(message) {
|
|
@@ -5250,6 +5198,9 @@ var MarketResponse = {
|
|
|
5250
5198
|
if (message.halted !== false) {
|
|
5251
5199
|
obj.halted = message.halted;
|
|
5252
5200
|
}
|
|
5201
|
+
if (message.deployer !== "") {
|
|
5202
|
+
obj.deployer = message.deployer;
|
|
5203
|
+
}
|
|
5253
5204
|
return obj;
|
|
5254
5205
|
},
|
|
5255
5206
|
create(base) {
|
|
@@ -5268,6 +5219,7 @@ var MarketResponse = {
|
|
|
5268
5219
|
message.lastPrice = object2.lastPrice ?? "";
|
|
5269
5220
|
message.lastMatchingHeight = object2.lastMatchingHeight ?? 0n;
|
|
5270
5221
|
message.halted = object2.halted ?? false;
|
|
5222
|
+
message.deployer = object2.deployer ?? "";
|
|
5271
5223
|
return message;
|
|
5272
5224
|
}
|
|
5273
5225
|
};
|
|
@@ -5818,7 +5770,7 @@ var EpochInfo = {
|
|
|
5818
5770
|
}
|
|
5819
5771
|
};
|
|
5820
5772
|
function createBaseOperatorInfo() {
|
|
5821
|
-
return { operator: "", commissionRate: 0, commissionRecipient: ""
|
|
5773
|
+
return { operator: "", commissionRate: 0, commissionRecipient: "" };
|
|
5822
5774
|
}
|
|
5823
5775
|
var OperatorInfo = {
|
|
5824
5776
|
encode(message, writer = new BinaryWriter22()) {
|
|
@@ -5831,14 +5783,6 @@ var OperatorInfo = {
|
|
|
5831
5783
|
if (message.commissionRecipient !== "") {
|
|
5832
5784
|
writer.uint32(26).string(message.commissionRecipient);
|
|
5833
5785
|
}
|
|
5834
|
-
if (message.lastUpdateEpoch !== 0n) {
|
|
5835
|
-
if (BigInt.asUintN(64, message.lastUpdateEpoch) !== message.lastUpdateEpoch) {
|
|
5836
|
-
throw new globalThis.Error(
|
|
5837
|
-
"value provided for field message.lastUpdateEpoch of type uint64 too large"
|
|
5838
|
-
);
|
|
5839
|
-
}
|
|
5840
|
-
writer.uint32(32).uint64(message.lastUpdateEpoch);
|
|
5841
|
-
}
|
|
5842
5786
|
return writer;
|
|
5843
5787
|
},
|
|
5844
5788
|
decode(input, length) {
|
|
@@ -5869,13 +5813,6 @@ var OperatorInfo = {
|
|
|
5869
5813
|
message.commissionRecipient = reader.string();
|
|
5870
5814
|
continue;
|
|
5871
5815
|
}
|
|
5872
|
-
case 4: {
|
|
5873
|
-
if (tag !== 32) {
|
|
5874
|
-
break;
|
|
5875
|
-
}
|
|
5876
|
-
message.lastUpdateEpoch = reader.uint64();
|
|
5877
|
-
continue;
|
|
5878
|
-
}
|
|
5879
5816
|
}
|
|
5880
5817
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5881
5818
|
break;
|
|
@@ -5888,8 +5825,7 @@ var OperatorInfo = {
|
|
|
5888
5825
|
return {
|
|
5889
5826
|
operator: isSet21(object2.operator) ? globalThis.String(object2.operator) : "",
|
|
5890
5827
|
commissionRate: isSet21(object2.commissionRate) ? globalThis.Number(object2.commissionRate) : isSet21(object2.commission_rate) ? globalThis.Number(object2.commission_rate) : 0,
|
|
5891
|
-
commissionRecipient: isSet21(object2.commissionRecipient) ? globalThis.String(object2.commissionRecipient) : isSet21(object2.commission_recipient) ? globalThis.String(object2.commission_recipient) : ""
|
|
5892
|
-
lastUpdateEpoch: isSet21(object2.lastUpdateEpoch) ? BigInt(object2.lastUpdateEpoch) : isSet21(object2.last_update_epoch) ? BigInt(object2.last_update_epoch) : 0n
|
|
5828
|
+
commissionRecipient: isSet21(object2.commissionRecipient) ? globalThis.String(object2.commissionRecipient) : isSet21(object2.commission_recipient) ? globalThis.String(object2.commission_recipient) : ""
|
|
5893
5829
|
};
|
|
5894
5830
|
},
|
|
5895
5831
|
toJSON(message) {
|
|
@@ -5903,9 +5839,6 @@ var OperatorInfo = {
|
|
|
5903
5839
|
if (message.commissionRecipient !== "") {
|
|
5904
5840
|
obj.commissionRecipient = message.commissionRecipient;
|
|
5905
5841
|
}
|
|
5906
|
-
if (message.lastUpdateEpoch !== 0n) {
|
|
5907
|
-
obj.lastUpdateEpoch = message.lastUpdateEpoch.toString();
|
|
5908
|
-
}
|
|
5909
5842
|
return obj;
|
|
5910
5843
|
},
|
|
5911
5844
|
create(base) {
|
|
@@ -5916,7 +5849,6 @@ var OperatorInfo = {
|
|
|
5916
5849
|
message.operator = object2.operator ?? "";
|
|
5917
5850
|
message.commissionRate = object2.commissionRate ?? 0;
|
|
5918
5851
|
message.commissionRecipient = object2.commissionRecipient ?? "";
|
|
5919
|
-
message.lastUpdateEpoch = object2.lastUpdateEpoch ?? 0n;
|
|
5920
5852
|
return message;
|
|
5921
5853
|
}
|
|
5922
5854
|
};
|
|
@@ -6558,49 +6490,16 @@ var QueryEpochResponse = {
|
|
|
6558
6490
|
}
|
|
6559
6491
|
};
|
|
6560
6492
|
function createBaseQueryLicenseMinerInfoResponse() {
|
|
6561
|
-
return {
|
|
6562
|
-
vrfPubkey: new Uint8Array(0),
|
|
6563
|
-
lastSubmitEpoch: 0n,
|
|
6564
|
-
eligibleNow: false,
|
|
6565
|
-
quarantinedLocal: false,
|
|
6566
|
-
quarantinedSource: false,
|
|
6567
|
-
allTimeCredits: 0n,
|
|
6568
|
-
allTimePayouts: ""
|
|
6569
|
-
};
|
|
6493
|
+
return { vrfPubkey: new Uint8Array(0), eligibleNow: false };
|
|
6570
6494
|
}
|
|
6571
6495
|
var QueryLicenseMinerInfoResponse = {
|
|
6572
6496
|
encode(message, writer = new BinaryWriter23()) {
|
|
6573
6497
|
if (message.vrfPubkey.length !== 0) {
|
|
6574
6498
|
writer.uint32(10).bytes(message.vrfPubkey);
|
|
6575
6499
|
}
|
|
6576
|
-
if (message.lastSubmitEpoch !== 0n) {
|
|
6577
|
-
if (BigInt.asUintN(64, message.lastSubmitEpoch) !== message.lastSubmitEpoch) {
|
|
6578
|
-
throw new globalThis.Error(
|
|
6579
|
-
"value provided for field message.lastSubmitEpoch of type uint64 too large"
|
|
6580
|
-
);
|
|
6581
|
-
}
|
|
6582
|
-
writer.uint32(16).uint64(message.lastSubmitEpoch);
|
|
6583
|
-
}
|
|
6584
6500
|
if (message.eligibleNow !== false) {
|
|
6585
6501
|
writer.uint32(24).bool(message.eligibleNow);
|
|
6586
6502
|
}
|
|
6587
|
-
if (message.quarantinedLocal !== false) {
|
|
6588
|
-
writer.uint32(32).bool(message.quarantinedLocal);
|
|
6589
|
-
}
|
|
6590
|
-
if (message.quarantinedSource !== false) {
|
|
6591
|
-
writer.uint32(40).bool(message.quarantinedSource);
|
|
6592
|
-
}
|
|
6593
|
-
if (message.allTimeCredits !== 0n) {
|
|
6594
|
-
if (BigInt.asUintN(64, message.allTimeCredits) !== message.allTimeCredits) {
|
|
6595
|
-
throw new globalThis.Error(
|
|
6596
|
-
"value provided for field message.allTimeCredits of type uint64 too large"
|
|
6597
|
-
);
|
|
6598
|
-
}
|
|
6599
|
-
writer.uint32(48).uint64(message.allTimeCredits);
|
|
6600
|
-
}
|
|
6601
|
-
if (message.allTimePayouts !== "") {
|
|
6602
|
-
writer.uint32(58).string(message.allTimePayouts);
|
|
6603
|
-
}
|
|
6604
6503
|
return writer;
|
|
6605
6504
|
},
|
|
6606
6505
|
decode(input, length) {
|
|
@@ -6617,13 +6516,6 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6617
6516
|
message.vrfPubkey = reader.bytes();
|
|
6618
6517
|
continue;
|
|
6619
6518
|
}
|
|
6620
|
-
case 2: {
|
|
6621
|
-
if (tag !== 16) {
|
|
6622
|
-
break;
|
|
6623
|
-
}
|
|
6624
|
-
message.lastSubmitEpoch = reader.uint64();
|
|
6625
|
-
continue;
|
|
6626
|
-
}
|
|
6627
6519
|
case 3: {
|
|
6628
6520
|
if (tag !== 24) {
|
|
6629
6521
|
break;
|
|
@@ -6631,34 +6523,6 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6631
6523
|
message.eligibleNow = reader.bool();
|
|
6632
6524
|
continue;
|
|
6633
6525
|
}
|
|
6634
|
-
case 4: {
|
|
6635
|
-
if (tag !== 32) {
|
|
6636
|
-
break;
|
|
6637
|
-
}
|
|
6638
|
-
message.quarantinedLocal = reader.bool();
|
|
6639
|
-
continue;
|
|
6640
|
-
}
|
|
6641
|
-
case 5: {
|
|
6642
|
-
if (tag !== 40) {
|
|
6643
|
-
break;
|
|
6644
|
-
}
|
|
6645
|
-
message.quarantinedSource = reader.bool();
|
|
6646
|
-
continue;
|
|
6647
|
-
}
|
|
6648
|
-
case 6: {
|
|
6649
|
-
if (tag !== 48) {
|
|
6650
|
-
break;
|
|
6651
|
-
}
|
|
6652
|
-
message.allTimeCredits = reader.uint64();
|
|
6653
|
-
continue;
|
|
6654
|
-
}
|
|
6655
|
-
case 7: {
|
|
6656
|
-
if (tag !== 58) {
|
|
6657
|
-
break;
|
|
6658
|
-
}
|
|
6659
|
-
message.allTimePayouts = reader.string();
|
|
6660
|
-
continue;
|
|
6661
|
-
}
|
|
6662
6526
|
}
|
|
6663
6527
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6664
6528
|
break;
|
|
@@ -6670,12 +6534,7 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6670
6534
|
fromJSON(object2) {
|
|
6671
6535
|
return {
|
|
6672
6536
|
vrfPubkey: isSet22(object2.vrfPubkey) ? bytesFromBase647(object2.vrfPubkey) : isSet22(object2.vrf_pubkey) ? bytesFromBase647(object2.vrf_pubkey) : new Uint8Array(0),
|
|
6673
|
-
|
|
6674
|
-
eligibleNow: isSet22(object2.eligibleNow) ? globalThis.Boolean(object2.eligibleNow) : isSet22(object2.eligible_now) ? globalThis.Boolean(object2.eligible_now) : false,
|
|
6675
|
-
quarantinedLocal: isSet22(object2.quarantinedLocal) ? globalThis.Boolean(object2.quarantinedLocal) : isSet22(object2.quarantined_local) ? globalThis.Boolean(object2.quarantined_local) : false,
|
|
6676
|
-
quarantinedSource: isSet22(object2.quarantinedSource) ? globalThis.Boolean(object2.quarantinedSource) : isSet22(object2.quarantined_source) ? globalThis.Boolean(object2.quarantined_source) : false,
|
|
6677
|
-
allTimeCredits: isSet22(object2.allTimeCredits) ? BigInt(object2.allTimeCredits) : isSet22(object2.all_time_credits) ? BigInt(object2.all_time_credits) : 0n,
|
|
6678
|
-
allTimePayouts: isSet22(object2.allTimePayouts) ? globalThis.String(object2.allTimePayouts) : isSet22(object2.all_time_payouts) ? globalThis.String(object2.all_time_payouts) : ""
|
|
6537
|
+
eligibleNow: isSet22(object2.eligibleNow) ? globalThis.Boolean(object2.eligibleNow) : isSet22(object2.eligible_now) ? globalThis.Boolean(object2.eligible_now) : false
|
|
6679
6538
|
};
|
|
6680
6539
|
},
|
|
6681
6540
|
toJSON(message) {
|
|
@@ -6683,24 +6542,9 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6683
6542
|
if (message.vrfPubkey.length !== 0) {
|
|
6684
6543
|
obj.vrfPubkey = base64FromBytes7(message.vrfPubkey);
|
|
6685
6544
|
}
|
|
6686
|
-
if (message.lastSubmitEpoch !== 0n) {
|
|
6687
|
-
obj.lastSubmitEpoch = message.lastSubmitEpoch.toString();
|
|
6688
|
-
}
|
|
6689
6545
|
if (message.eligibleNow !== false) {
|
|
6690
6546
|
obj.eligibleNow = message.eligibleNow;
|
|
6691
6547
|
}
|
|
6692
|
-
if (message.quarantinedLocal !== false) {
|
|
6693
|
-
obj.quarantinedLocal = message.quarantinedLocal;
|
|
6694
|
-
}
|
|
6695
|
-
if (message.quarantinedSource !== false) {
|
|
6696
|
-
obj.quarantinedSource = message.quarantinedSource;
|
|
6697
|
-
}
|
|
6698
|
-
if (message.allTimeCredits !== 0n) {
|
|
6699
|
-
obj.allTimeCredits = message.allTimeCredits.toString();
|
|
6700
|
-
}
|
|
6701
|
-
if (message.allTimePayouts !== "") {
|
|
6702
|
-
obj.allTimePayouts = message.allTimePayouts;
|
|
6703
|
-
}
|
|
6704
6548
|
return obj;
|
|
6705
6549
|
},
|
|
6706
6550
|
create(base) {
|
|
@@ -6709,12 +6553,7 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6709
6553
|
fromPartial(object2) {
|
|
6710
6554
|
const message = createBaseQueryLicenseMinerInfoResponse();
|
|
6711
6555
|
message.vrfPubkey = object2.vrfPubkey ?? new Uint8Array(0);
|
|
6712
|
-
message.lastSubmitEpoch = object2.lastSubmitEpoch ?? 0n;
|
|
6713
6556
|
message.eligibleNow = object2.eligibleNow ?? false;
|
|
6714
|
-
message.quarantinedLocal = object2.quarantinedLocal ?? false;
|
|
6715
|
-
message.quarantinedSource = object2.quarantinedSource ?? false;
|
|
6716
|
-
message.allTimeCredits = object2.allTimeCredits ?? 0n;
|
|
6717
|
-
message.allTimePayouts = object2.allTimePayouts ?? "";
|
|
6718
6557
|
return message;
|
|
6719
6558
|
}
|
|
6720
6559
|
};
|
|
@@ -10614,6 +10453,7 @@ async function dexFetch(url, init) {
|
|
|
10614
10453
|
// src/rest/dex.generated.ts
|
|
10615
10454
|
var dex_generated_exports = {};
|
|
10616
10455
|
__export(dex_generated_exports, {
|
|
10456
|
+
GetStatsWindow: () => GetStatsWindow,
|
|
10617
10457
|
GetUDFHistoryResolution: () => GetUDFHistoryResolution,
|
|
10618
10458
|
HealthResponseDatabase: () => HealthResponseDatabase,
|
|
10619
10459
|
HealthResponseStatus: () => HealthResponseStatus,
|
|
@@ -10626,6 +10466,7 @@ __export(dex_generated_exports, {
|
|
|
10626
10466
|
OrderResponseStatus: () => OrderResponseStatus,
|
|
10627
10467
|
OrderResponseType: () => OrderResponseType,
|
|
10628
10468
|
ReadyResponseStatus: () => ReadyResponseStatus,
|
|
10469
|
+
StatsResponseWindow: () => StatsResponseWindow,
|
|
10629
10470
|
TradeResponseSide: () => TradeResponseSide,
|
|
10630
10471
|
TradeResponseTakerOrMaker: () => TradeResponseTakerOrMaker,
|
|
10631
10472
|
TradeResponseType: () => TradeResponseType,
|
|
@@ -10645,6 +10486,7 @@ __export(dex_generated_exports, {
|
|
|
10645
10486
|
getGetOrderbookUrl: () => getGetOrderbookUrl,
|
|
10646
10487
|
getGetReadyUrl: () => getGetReadyUrl,
|
|
10647
10488
|
getGetSDKManifestUrl: () => getGetSDKManifestUrl,
|
|
10489
|
+
getGetStatsUrl: () => getGetStatsUrl,
|
|
10648
10490
|
getGetStatusUrl: () => getGetStatusUrl,
|
|
10649
10491
|
getGetTickerUrl: () => getGetTickerUrl,
|
|
10650
10492
|
getGetTradingFeesUrl: () => getGetTradingFeesUrl,
|
|
@@ -10669,6 +10511,7 @@ __export(dex_generated_exports, {
|
|
|
10669
10511
|
getReady: () => getReady,
|
|
10670
10512
|
getSDKManifest: () => getSDKManifest,
|
|
10671
10513
|
getSearchUDFSymbolsUrl: () => getSearchUDFSymbolsUrl,
|
|
10514
|
+
getStats: () => getStats,
|
|
10672
10515
|
getStatus: () => getStatus,
|
|
10673
10516
|
getTicker: () => getTicker,
|
|
10674
10517
|
getTradingFees: () => getTradingFees,
|
|
@@ -10718,6 +10561,9 @@ var LiveResponseStatus = {
|
|
|
10718
10561
|
var MarketResponseType = {
|
|
10719
10562
|
spot: "spot"
|
|
10720
10563
|
};
|
|
10564
|
+
var StatsResponseWindow = {
|
|
10565
|
+
"24h": "24h"
|
|
10566
|
+
};
|
|
10721
10567
|
var TradeResponseType = {
|
|
10722
10568
|
limit: "limit",
|
|
10723
10569
|
market: "market"
|
|
@@ -10761,6 +10607,9 @@ var UDFQuoteDataS = {
|
|
|
10761
10607
|
ok: "ok",
|
|
10762
10608
|
error: "error"
|
|
10763
10609
|
};
|
|
10610
|
+
var GetStatsWindow = {
|
|
10611
|
+
"24h": "24h"
|
|
10612
|
+
};
|
|
10764
10613
|
var ListOrdersStatus = {
|
|
10765
10614
|
open: "open",
|
|
10766
10615
|
closed: "closed",
|
|
@@ -10898,6 +10747,22 @@ var getTradingFees = async (options) => {
|
|
|
10898
10747
|
method: "GET"
|
|
10899
10748
|
});
|
|
10900
10749
|
};
|
|
10750
|
+
var getGetStatsUrl = (params) => {
|
|
10751
|
+
const normalizedParams = new URLSearchParams();
|
|
10752
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
10753
|
+
if (value !== void 0) {
|
|
10754
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
10755
|
+
}
|
|
10756
|
+
});
|
|
10757
|
+
const stringifiedParams = normalizedParams.toString();
|
|
10758
|
+
return stringifiedParams.length > 0 ? `/api/v1/stats?${stringifiedParams}` : `/api/v1/stats`;
|
|
10759
|
+
};
|
|
10760
|
+
var getStats = async (params, options) => {
|
|
10761
|
+
return dexFetch(getGetStatsUrl(params), {
|
|
10762
|
+
...options,
|
|
10763
|
+
method: "GET"
|
|
10764
|
+
});
|
|
10765
|
+
};
|
|
10901
10766
|
var getListOrdersUrl = (params) => {
|
|
10902
10767
|
const normalizedParams = new URLSearchParams();
|
|
10903
10768
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -11120,6 +10985,7 @@ function createDexApi(context) {
|
|
|
11120
10985
|
getOrder: bind(context, getOrder),
|
|
11121
10986
|
listMyTrades: bind(context, listMyTrades),
|
|
11122
10987
|
getBalance: bind(context, getBalance),
|
|
10988
|
+
getStats: bind(context, getStats),
|
|
11123
10989
|
getUDFConfig: bind(context, getUDFConfig),
|
|
11124
10990
|
getUDFTime: bind(context, getUDFTime),
|
|
11125
10991
|
getUDFSymbol: bind(context, getUDFSymbol),
|
|
@@ -11809,74 +11675,6 @@ var Limiter = {
|
|
|
11809
11675
|
return message;
|
|
11810
11676
|
}
|
|
11811
11677
|
};
|
|
11812
|
-
function createBaseTransferLimitConfig() {
|
|
11813
|
-
return { hourly: void 0, daily: void 0 };
|
|
11814
|
-
}
|
|
11815
|
-
var TransferLimitConfig = {
|
|
11816
|
-
encode(message, writer = new BinaryWriter32()) {
|
|
11817
|
-
if (message.hourly !== void 0) {
|
|
11818
|
-
Limiter.encode(message.hourly, writer.uint32(10).fork()).join();
|
|
11819
|
-
}
|
|
11820
|
-
if (message.daily !== void 0) {
|
|
11821
|
-
Limiter.encode(message.daily, writer.uint32(18).fork()).join();
|
|
11822
|
-
}
|
|
11823
|
-
return writer;
|
|
11824
|
-
},
|
|
11825
|
-
decode(input, length) {
|
|
11826
|
-
const reader = input instanceof BinaryReader32 ? input : new BinaryReader32(input);
|
|
11827
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11828
|
-
const message = createBaseTransferLimitConfig();
|
|
11829
|
-
while (reader.pos < end) {
|
|
11830
|
-
const tag = reader.uint32();
|
|
11831
|
-
switch (tag >>> 3) {
|
|
11832
|
-
case 1: {
|
|
11833
|
-
if (tag !== 10) {
|
|
11834
|
-
break;
|
|
11835
|
-
}
|
|
11836
|
-
message.hourly = Limiter.decode(reader, reader.uint32());
|
|
11837
|
-
continue;
|
|
11838
|
-
}
|
|
11839
|
-
case 2: {
|
|
11840
|
-
if (tag !== 18) {
|
|
11841
|
-
break;
|
|
11842
|
-
}
|
|
11843
|
-
message.daily = Limiter.decode(reader, reader.uint32());
|
|
11844
|
-
continue;
|
|
11845
|
-
}
|
|
11846
|
-
}
|
|
11847
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
11848
|
-
break;
|
|
11849
|
-
}
|
|
11850
|
-
reader.skip(tag & 7);
|
|
11851
|
-
}
|
|
11852
|
-
return message;
|
|
11853
|
-
},
|
|
11854
|
-
fromJSON(object2) {
|
|
11855
|
-
return {
|
|
11856
|
-
hourly: isSet30(object2.hourly) ? Limiter.fromJSON(object2.hourly) : void 0,
|
|
11857
|
-
daily: isSet30(object2.daily) ? Limiter.fromJSON(object2.daily) : void 0
|
|
11858
|
-
};
|
|
11859
|
-
},
|
|
11860
|
-
toJSON(message) {
|
|
11861
|
-
const obj = {};
|
|
11862
|
-
if (message.hourly !== void 0) {
|
|
11863
|
-
obj.hourly = Limiter.toJSON(message.hourly);
|
|
11864
|
-
}
|
|
11865
|
-
if (message.daily !== void 0) {
|
|
11866
|
-
obj.daily = Limiter.toJSON(message.daily);
|
|
11867
|
-
}
|
|
11868
|
-
return obj;
|
|
11869
|
-
},
|
|
11870
|
-
create(base) {
|
|
11871
|
-
return TransferLimitConfig.fromPartial(base ?? {});
|
|
11872
|
-
},
|
|
11873
|
-
fromPartial(object2) {
|
|
11874
|
-
const message = createBaseTransferLimitConfig();
|
|
11875
|
-
message.hourly = object2.hourly !== void 0 && object2.hourly !== null ? Limiter.fromPartial(object2.hourly) : void 0;
|
|
11876
|
-
message.daily = object2.daily !== void 0 && object2.daily !== null ? Limiter.fromPartial(object2.daily) : void 0;
|
|
11877
|
-
return message;
|
|
11878
|
-
}
|
|
11879
|
-
};
|
|
11880
11678
|
function createBaseTokenPair() {
|
|
11881
11679
|
return { erc20Address: "", denom: "", erc20Decimals: 0, enabled: false };
|
|
11882
11680
|
}
|
|
@@ -11975,6 +11773,74 @@ var TokenPair = {
|
|
|
11975
11773
|
return message;
|
|
11976
11774
|
}
|
|
11977
11775
|
};
|
|
11776
|
+
function createBaseTransferLimitConfig() {
|
|
11777
|
+
return { hourly: void 0, daily: void 0 };
|
|
11778
|
+
}
|
|
11779
|
+
var TransferLimitConfig = {
|
|
11780
|
+
encode(message, writer = new BinaryWriter32()) {
|
|
11781
|
+
if (message.hourly !== void 0) {
|
|
11782
|
+
Limiter.encode(message.hourly, writer.uint32(10).fork()).join();
|
|
11783
|
+
}
|
|
11784
|
+
if (message.daily !== void 0) {
|
|
11785
|
+
Limiter.encode(message.daily, writer.uint32(18).fork()).join();
|
|
11786
|
+
}
|
|
11787
|
+
return writer;
|
|
11788
|
+
},
|
|
11789
|
+
decode(input, length) {
|
|
11790
|
+
const reader = input instanceof BinaryReader32 ? input : new BinaryReader32(input);
|
|
11791
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11792
|
+
const message = createBaseTransferLimitConfig();
|
|
11793
|
+
while (reader.pos < end) {
|
|
11794
|
+
const tag = reader.uint32();
|
|
11795
|
+
switch (tag >>> 3) {
|
|
11796
|
+
case 1: {
|
|
11797
|
+
if (tag !== 10) {
|
|
11798
|
+
break;
|
|
11799
|
+
}
|
|
11800
|
+
message.hourly = Limiter.decode(reader, reader.uint32());
|
|
11801
|
+
continue;
|
|
11802
|
+
}
|
|
11803
|
+
case 2: {
|
|
11804
|
+
if (tag !== 18) {
|
|
11805
|
+
break;
|
|
11806
|
+
}
|
|
11807
|
+
message.daily = Limiter.decode(reader, reader.uint32());
|
|
11808
|
+
continue;
|
|
11809
|
+
}
|
|
11810
|
+
}
|
|
11811
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
11812
|
+
break;
|
|
11813
|
+
}
|
|
11814
|
+
reader.skip(tag & 7);
|
|
11815
|
+
}
|
|
11816
|
+
return message;
|
|
11817
|
+
},
|
|
11818
|
+
fromJSON(object2) {
|
|
11819
|
+
return {
|
|
11820
|
+
hourly: isSet30(object2.hourly) ? Limiter.fromJSON(object2.hourly) : void 0,
|
|
11821
|
+
daily: isSet30(object2.daily) ? Limiter.fromJSON(object2.daily) : void 0
|
|
11822
|
+
};
|
|
11823
|
+
},
|
|
11824
|
+
toJSON(message) {
|
|
11825
|
+
const obj = {};
|
|
11826
|
+
if (message.hourly !== void 0) {
|
|
11827
|
+
obj.hourly = Limiter.toJSON(message.hourly);
|
|
11828
|
+
}
|
|
11829
|
+
if (message.daily !== void 0) {
|
|
11830
|
+
obj.daily = Limiter.toJSON(message.daily);
|
|
11831
|
+
}
|
|
11832
|
+
return obj;
|
|
11833
|
+
},
|
|
11834
|
+
create(base) {
|
|
11835
|
+
return TransferLimitConfig.fromPartial(base ?? {});
|
|
11836
|
+
},
|
|
11837
|
+
fromPartial(object2) {
|
|
11838
|
+
const message = createBaseTransferLimitConfig();
|
|
11839
|
+
message.hourly = object2.hourly !== void 0 && object2.hourly !== null ? Limiter.fromPartial(object2.hourly) : void 0;
|
|
11840
|
+
message.daily = object2.daily !== void 0 && object2.daily !== null ? Limiter.fromPartial(object2.daily) : void 0;
|
|
11841
|
+
return message;
|
|
11842
|
+
}
|
|
11843
|
+
};
|
|
11978
11844
|
function createBaseParams10() {
|
|
11979
11845
|
return { enabled: false };
|
|
11980
11846
|
}
|
|
@@ -12274,7 +12140,7 @@ var EIP712_MSG_TYPES = {
|
|
|
12274
12140
|
valueFields: [
|
|
12275
12141
|
{ name: "name", type: "string" },
|
|
12276
12142
|
{ name: "master_address", type: "string", jsName: "masterAddress" },
|
|
12277
|
-
{ name: "
|
|
12143
|
+
{ name: "expires_at", type: "string", jsName: "expiresAt" },
|
|
12278
12144
|
{ name: "agent_pubkey", type: "NESTED", jsName: "agentPubkey" }
|
|
12279
12145
|
],
|
|
12280
12146
|
nestedTypes: {
|
|
@@ -12284,8 +12150,8 @@ var EIP712_MSG_TYPES = {
|
|
|
12284
12150
|
],
|
|
12285
12151
|
value: [{ name: "key", type: "string" }]
|
|
12286
12152
|
},
|
|
12287
|
-
|
|
12288
|
-
optionalFields: ["
|
|
12153
|
+
timestampFields: ["expires_at"],
|
|
12154
|
+
optionalFields: ["expires_at"],
|
|
12289
12155
|
fieldSemantics: {
|
|
12290
12156
|
agent_pubkey: { isPubKey: true },
|
|
12291
12157
|
master_address: { isAddress: true }
|
|
@@ -12382,6 +12248,26 @@ var EIP712_MSG_TYPES = {
|
|
|
12382
12248
|
order_ids: { isBinary: true }
|
|
12383
12249
|
}
|
|
12384
12250
|
},
|
|
12251
|
+
"/ault.clob.v1.MsgModifyOrders": {
|
|
12252
|
+
aminoType: "clob/MsgModifyOrders",
|
|
12253
|
+
eip712TypeName: "TypeMsgModifyOrders",
|
|
12254
|
+
valueFields: [
|
|
12255
|
+
{ name: "sender", type: "string" },
|
|
12256
|
+
{ name: "orders", type: "NESTED[]" }
|
|
12257
|
+
],
|
|
12258
|
+
nestedTypes: {
|
|
12259
|
+
orders: [
|
|
12260
|
+
{ name: "order_id", type: "string", jsName: "orderId" },
|
|
12261
|
+
{ name: "new_quantity", type: "string", jsName: "newQuantity" },
|
|
12262
|
+
{ name: "new_price", type: "string", jsName: "newPrice" }
|
|
12263
|
+
]
|
|
12264
|
+
},
|
|
12265
|
+
fieldSemantics: {
|
|
12266
|
+
new_price: { isLegacyDec: true },
|
|
12267
|
+
new_quantity: { isLegacyDec: true },
|
|
12268
|
+
order_id: { isBinary: true }
|
|
12269
|
+
}
|
|
12270
|
+
},
|
|
12385
12271
|
"/ault.clob.v1.MsgPlaceLimitOrder": {
|
|
12386
12272
|
aminoType: "clob/MsgPlaceLimitOrder",
|
|
12387
12273
|
eip712TypeName: "TypeMsgPlaceLimitOrder",
|
|
@@ -12391,12 +12277,12 @@ var EIP712_MSG_TYPES = {
|
|
|
12391
12277
|
{ name: "price", type: "string" },
|
|
12392
12278
|
{ name: "post_only", type: "bool", jsName: "postOnly" },
|
|
12393
12279
|
{ name: "market_id", type: "string", jsName: "marketId" },
|
|
12394
|
-
{ name: "lifespan", type: "string" },
|
|
12395
12280
|
{ name: "is_buy", type: "bool", jsName: "isBuy" },
|
|
12281
|
+
{ name: "deadline", type: "string" },
|
|
12396
12282
|
{ name: "builder_fee_rate", type: "string", jsName: "builderFeeRate" },
|
|
12397
12283
|
{ name: "builder_address", type: "string", jsName: "builderAddress" }
|
|
12398
12284
|
],
|
|
12399
|
-
|
|
12285
|
+
timestampFields: ["deadline"],
|
|
12400
12286
|
optionalFields: ["builder_address", "builder_fee_rate"],
|
|
12401
12287
|
fieldSemantics: {
|
|
12402
12288
|
builder_address: { isAddress: true },
|
|
@@ -12439,13 +12325,13 @@ var EIP712_MSG_TYPES = {
|
|
|
12439
12325
|
{ name: "post_only", type: "bool", jsName: "postOnly" },
|
|
12440
12326
|
{ name: "market_id", type: "string", jsName: "marketId" },
|
|
12441
12327
|
{ name: "low_price", type: "string", jsName: "lowPrice" },
|
|
12442
|
-
{ name: "lifespan", type: "string" },
|
|
12443
12328
|
{ name: "is_buy", type: "bool", jsName: "isBuy" },
|
|
12444
12329
|
{ name: "high_price", type: "string", jsName: "highPrice" },
|
|
12330
|
+
{ name: "deadline", type: "string" },
|
|
12445
12331
|
{ name: "builder_fee_rate", type: "string", jsName: "builderFeeRate" },
|
|
12446
12332
|
{ name: "builder_address", type: "string", jsName: "builderAddress" }
|
|
12447
12333
|
],
|
|
12448
|
-
|
|
12334
|
+
timestampFields: ["deadline"],
|
|
12449
12335
|
optionalFields: ["builder_address", "builder_fee_rate"],
|
|
12450
12336
|
fieldSemantics: {
|
|
12451
12337
|
builder_address: { isAddress: true },
|
|
@@ -12690,9 +12576,11 @@ var EIP712_MSG_TYPES = {
|
|
|
12690
12576
|
eip712TypeName: "TypeMsgCreateMarket",
|
|
12691
12577
|
valueFields: [
|
|
12692
12578
|
{ name: "tick_precision", type: "string", jsName: "tickPrecision", protoHint: "uint32" },
|
|
12579
|
+
{ name: "taker_fee_rate", type: "string", jsName: "takerFeeRate" },
|
|
12693
12580
|
{ name: "sender", type: "string" },
|
|
12694
12581
|
{ name: "quote_denom", type: "string", jsName: "quoteDenom" },
|
|
12695
12582
|
{ name: "market_type", type: "int64", jsName: "marketType" },
|
|
12583
|
+
{ name: "maker_fee_rate", type: "string", jsName: "makerFeeRate" },
|
|
12696
12584
|
{ name: "base_denom", type: "string", jsName: "baseDenom" }
|
|
12697
12585
|
],
|
|
12698
12586
|
enumFieldPaths: {
|
|
@@ -12700,6 +12588,11 @@ var EIP712_MSG_TYPES = {
|
|
|
12700
12588
|
"0": "MARKET_TYPE_UNSPECIFIED",
|
|
12701
12589
|
"1": "MARKET_TYPE_SPOT"
|
|
12702
12590
|
}
|
|
12591
|
+
},
|
|
12592
|
+
optionalFields: ["maker_fee_rate", "taker_fee_rate"],
|
|
12593
|
+
fieldSemantics: {
|
|
12594
|
+
maker_fee_rate: { isLegacyDec: true },
|
|
12595
|
+
taker_fee_rate: { isLegacyDec: true }
|
|
12703
12596
|
}
|
|
12704
12597
|
},
|
|
12705
12598
|
"/ault.market.v1.MsgHaltAllMarkets": {
|
|
@@ -13514,6 +13407,7 @@ var msg = {
|
|
|
13514
13407
|
},
|
|
13515
13408
|
clob: {
|
|
13516
13409
|
cancelOrders: (value) => buildMsg("/ault.clob.v1.MsgCancelOrders", value),
|
|
13410
|
+
modifyOrders: (value) => buildMsg("/ault.clob.v1.MsgModifyOrders", value),
|
|
13517
13411
|
placeLimitOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceLimitOrder", value),
|
|
13518
13412
|
placeMarketOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceMarketOrder", value),
|
|
13519
13413
|
placeScaleOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceScaleOrder", value),
|
|
@@ -13775,13 +13669,58 @@ function durationToNanosecondsString(value, fieldName) {
|
|
|
13775
13669
|
`Duration field "${fieldName}.nanos" must be between -999999999 and 999999999.`
|
|
13776
13670
|
);
|
|
13777
13671
|
}
|
|
13778
|
-
if (seconds > 0n && nanos < 0n) {
|
|
13779
|
-
throw new Error(`Duration field "${fieldName}.nanos" must be >= 0 when seconds is positive.`);
|
|
13672
|
+
if (seconds > 0n && nanos < 0n) {
|
|
13673
|
+
throw new Error(`Duration field "${fieldName}.nanos" must be >= 0 when seconds is positive.`);
|
|
13674
|
+
}
|
|
13675
|
+
if (seconds < 0n && nanos > 0n) {
|
|
13676
|
+
throw new Error(`Duration field "${fieldName}.nanos" must be <= 0 when seconds is negative.`);
|
|
13677
|
+
}
|
|
13678
|
+
return (seconds * 1000000000n + nanos).toString();
|
|
13679
|
+
}
|
|
13680
|
+
var MAX_RFC3339_SECONDS = 253402300799n;
|
|
13681
|
+
function timestampToRfc3339String(value, fieldName) {
|
|
13682
|
+
let seconds;
|
|
13683
|
+
let nanos;
|
|
13684
|
+
if (value instanceof Date) {
|
|
13685
|
+
const ms = value.getTime();
|
|
13686
|
+
if (Number.isNaN(ms)) {
|
|
13687
|
+
throw new Error(`Timestamp field "${fieldName}" must be a valid Date.`);
|
|
13688
|
+
}
|
|
13689
|
+
const secondsNum = Math.floor(ms / 1e3);
|
|
13690
|
+
seconds = BigInt(secondsNum);
|
|
13691
|
+
nanos = BigInt(ms - secondsNum * 1e3) * 1000000n;
|
|
13692
|
+
} else if (typeof value === "string") {
|
|
13693
|
+
const ms = Date.parse(value);
|
|
13694
|
+
if (Number.isNaN(ms)) {
|
|
13695
|
+
throw new Error(`Timestamp field "${fieldName}" must be a valid RFC 3339 date string.`);
|
|
13696
|
+
}
|
|
13697
|
+
return timestampToRfc3339String(new Date(ms), fieldName);
|
|
13698
|
+
} else if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
13699
|
+
const record2 = value;
|
|
13700
|
+
if (record2.seconds === void 0 && record2.nanos === void 0) {
|
|
13701
|
+
throw new Error(`Timestamp field "${fieldName}" must include seconds or nanos.`);
|
|
13702
|
+
}
|
|
13703
|
+
seconds = toBigIntLike(record2.seconds ?? 0n, `${fieldName}.seconds`);
|
|
13704
|
+
nanos = toBigIntLike(record2.nanos ?? 0, `${fieldName}.nanos`);
|
|
13705
|
+
} else {
|
|
13706
|
+
throw new Error(
|
|
13707
|
+
`Timestamp field "${fieldName}" must be a Date, RFC 3339 string, or protobuf Timestamp object.`
|
|
13708
|
+
);
|
|
13709
|
+
}
|
|
13710
|
+
if (nanos < 0n || nanos > 999999999n) {
|
|
13711
|
+
throw new Error(`Timestamp field "${fieldName}.nanos" must be between 0 and 999999999.`);
|
|
13780
13712
|
}
|
|
13781
|
-
if (seconds < 0n
|
|
13782
|
-
throw new Error(
|
|
13713
|
+
if (seconds < 0n || seconds > MAX_RFC3339_SECONDS) {
|
|
13714
|
+
throw new Error(
|
|
13715
|
+
`Timestamp field "${fieldName}.seconds" must be between 1970-01-01 and 9999-12-31.`
|
|
13716
|
+
);
|
|
13783
13717
|
}
|
|
13784
|
-
|
|
13718
|
+
const datePart = new Date(Number(seconds) * 1e3).toISOString().slice(0, 19);
|
|
13719
|
+
if (nanos === 0n) {
|
|
13720
|
+
return `${datePart}Z`;
|
|
13721
|
+
}
|
|
13722
|
+
const fraction = nanos.toString().padStart(9, "0").replace(/0+$/, "");
|
|
13723
|
+
return `${datePart}.${fraction}Z`;
|
|
13785
13724
|
}
|
|
13786
13725
|
function normalizeEnumValue(value, fieldPath, enumFieldPaths) {
|
|
13787
13726
|
const values = enumFieldPaths?.[fieldPath];
|
|
@@ -13808,10 +13747,11 @@ function normalizeEnumValue(value, fieldPath, enumFieldPaths) {
|
|
|
13808
13747
|
}
|
|
13809
13748
|
return value;
|
|
13810
13749
|
}
|
|
13811
|
-
function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPaths, optionalFields, pathPrefix = "", fieldSemantics) {
|
|
13750
|
+
function mapValueToAmino(value, fields, nestedTypes, durationFields, timestampFields, enumFieldPaths, optionalFields, pathPrefix = "", fieldSemantics) {
|
|
13812
13751
|
const record2 = value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
13813
13752
|
const normalized = {};
|
|
13814
13753
|
const durationSet = durationFields ? new Set(durationFields) : void 0;
|
|
13754
|
+
const timestampSet = timestampFields ? new Set(timestampFields) : void 0;
|
|
13815
13755
|
const optionalSet = optionalFields ? new Set(optionalFields) : void 0;
|
|
13816
13756
|
for (const field of fields) {
|
|
13817
13757
|
const jsKey = fieldJsName(field);
|
|
@@ -13844,6 +13784,7 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
13844
13784
|
nestedFields,
|
|
13845
13785
|
nestedTypes,
|
|
13846
13786
|
durationFields,
|
|
13787
|
+
timestampFields,
|
|
13847
13788
|
enumFieldPaths,
|
|
13848
13789
|
optionalFields,
|
|
13849
13790
|
fieldPath,
|
|
@@ -13859,6 +13800,7 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
13859
13800
|
nestedFields,
|
|
13860
13801
|
nestedTypes,
|
|
13861
13802
|
durationFields,
|
|
13803
|
+
timestampFields,
|
|
13862
13804
|
enumFieldPaths,
|
|
13863
13805
|
optionalFields,
|
|
13864
13806
|
fieldPath,
|
|
@@ -13877,6 +13819,16 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
13877
13819
|
normalized[field.name] = durationToNanosecondsString(raw, field.name);
|
|
13878
13820
|
continue;
|
|
13879
13821
|
}
|
|
13822
|
+
if (timestampSet?.has(field.name)) {
|
|
13823
|
+
if (raw === void 0 || raw === null) {
|
|
13824
|
+
if (optionalSet?.has(field.name)) {
|
|
13825
|
+
continue;
|
|
13826
|
+
}
|
|
13827
|
+
throw new Error(`Timestamp field "${field.name}" is required.`);
|
|
13828
|
+
}
|
|
13829
|
+
normalized[field.name] = timestampToRfc3339String(raw, field.name);
|
|
13830
|
+
continue;
|
|
13831
|
+
}
|
|
13880
13832
|
if (raw === void 0) {
|
|
13881
13833
|
continue;
|
|
13882
13834
|
}
|
|
@@ -14021,6 +13973,7 @@ function buildEip712AminoMsg(msg2) {
|
|
|
14021
13973
|
msgConfig.valueFields,
|
|
14022
13974
|
msgConfig.nestedTypes,
|
|
14023
13975
|
msgConfig.durationFields,
|
|
13976
|
+
msgConfig.timestampFields,
|
|
14024
13977
|
msgConfig.enumFieldPaths,
|
|
14025
13978
|
msgConfig.optionalFields,
|
|
14026
13979
|
"",
|
|
@@ -14705,7 +14658,7 @@ function isSet32(value) {
|
|
|
14705
14658
|
// src/proto/gen/ault/agent/v1/tx.ts
|
|
14706
14659
|
import { BinaryReader as BinaryReader35, BinaryWriter as BinaryWriter36 } from "@bufbuild/protobuf/wire";
|
|
14707
14660
|
function createBaseMsgApproveAgent() {
|
|
14708
|
-
return { masterAddress: "", agentPubkey: void 0, name: "",
|
|
14661
|
+
return { masterAddress: "", agentPubkey: void 0, name: "", expiresAt: void 0 };
|
|
14709
14662
|
}
|
|
14710
14663
|
var MsgApproveAgent = {
|
|
14711
14664
|
encode(message, writer = new BinaryWriter36()) {
|
|
@@ -14718,8 +14671,8 @@ var MsgApproveAgent = {
|
|
|
14718
14671
|
if (message.name !== "") {
|
|
14719
14672
|
writer.uint32(26).string(message.name);
|
|
14720
14673
|
}
|
|
14721
|
-
if (message.
|
|
14722
|
-
|
|
14674
|
+
if (message.expiresAt !== void 0) {
|
|
14675
|
+
Timestamp.encode(toTimestamp6(message.expiresAt), writer.uint32(34).fork()).join();
|
|
14723
14676
|
}
|
|
14724
14677
|
return writer;
|
|
14725
14678
|
},
|
|
@@ -14755,7 +14708,7 @@ var MsgApproveAgent = {
|
|
|
14755
14708
|
if (tag !== 34) {
|
|
14756
14709
|
break;
|
|
14757
14710
|
}
|
|
14758
|
-
message.
|
|
14711
|
+
message.expiresAt = fromTimestamp6(Timestamp.decode(reader, reader.uint32()));
|
|
14759
14712
|
continue;
|
|
14760
14713
|
}
|
|
14761
14714
|
}
|
|
@@ -14771,7 +14724,7 @@ var MsgApproveAgent = {
|
|
|
14771
14724
|
masterAddress: isSet33(object2.masterAddress) ? globalThis.String(object2.masterAddress) : isSet33(object2.master_address) ? globalThis.String(object2.master_address) : "",
|
|
14772
14725
|
agentPubkey: isSet33(object2.agentPubkey) ? Any.fromJSON(object2.agentPubkey) : isSet33(object2.agent_pubkey) ? Any.fromJSON(object2.agent_pubkey) : void 0,
|
|
14773
14726
|
name: isSet33(object2.name) ? globalThis.String(object2.name) : "",
|
|
14774
|
-
|
|
14727
|
+
expiresAt: isSet33(object2.expiresAt) ? fromJsonTimestamp6(object2.expiresAt) : isSet33(object2.expires_at) ? fromJsonTimestamp6(object2.expires_at) : void 0
|
|
14775
14728
|
};
|
|
14776
14729
|
},
|
|
14777
14730
|
toJSON(message) {
|
|
@@ -14785,8 +14738,8 @@ var MsgApproveAgent = {
|
|
|
14785
14738
|
if (message.name !== "") {
|
|
14786
14739
|
obj.name = message.name;
|
|
14787
14740
|
}
|
|
14788
|
-
if (message.
|
|
14789
|
-
obj.
|
|
14741
|
+
if (message.expiresAt !== void 0) {
|
|
14742
|
+
obj.expiresAt = message.expiresAt.toISOString();
|
|
14790
14743
|
}
|
|
14791
14744
|
return obj;
|
|
14792
14745
|
},
|
|
@@ -14798,7 +14751,7 @@ var MsgApproveAgent = {
|
|
|
14798
14751
|
message.masterAddress = object2.masterAddress ?? "";
|
|
14799
14752
|
message.agentPubkey = object2.agentPubkey !== void 0 && object2.agentPubkey !== null ? Any.fromPartial(object2.agentPubkey) : void 0;
|
|
14800
14753
|
message.name = object2.name ?? "";
|
|
14801
|
-
message.
|
|
14754
|
+
message.expiresAt = object2.expiresAt ?? void 0;
|
|
14802
14755
|
return message;
|
|
14803
14756
|
}
|
|
14804
14757
|
};
|
|
@@ -14938,6 +14891,25 @@ var MsgUpdateParams2 = {
|
|
|
14938
14891
|
return message;
|
|
14939
14892
|
}
|
|
14940
14893
|
};
|
|
14894
|
+
function toTimestamp6(date) {
|
|
14895
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
14896
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
14897
|
+
return { seconds, nanos };
|
|
14898
|
+
}
|
|
14899
|
+
function fromTimestamp6(t) {
|
|
14900
|
+
let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1e3;
|
|
14901
|
+
millis += (t.nanos || 0) / 1e6;
|
|
14902
|
+
return new globalThis.Date(millis);
|
|
14903
|
+
}
|
|
14904
|
+
function fromJsonTimestamp6(o) {
|
|
14905
|
+
if (o instanceof globalThis.Date) {
|
|
14906
|
+
return o;
|
|
14907
|
+
} else if (typeof o === "string") {
|
|
14908
|
+
return new globalThis.Date(o);
|
|
14909
|
+
} else {
|
|
14910
|
+
return fromTimestamp6(Timestamp.fromJSON(o));
|
|
14911
|
+
}
|
|
14912
|
+
}
|
|
14941
14913
|
function isSet33(value) {
|
|
14942
14914
|
return value !== null && value !== void 0;
|
|
14943
14915
|
}
|
|
@@ -15123,7 +15095,7 @@ function createBaseMsgPlaceLimitOrder() {
|
|
|
15123
15095
|
isBuy: false,
|
|
15124
15096
|
price: "",
|
|
15125
15097
|
quantity: "",
|
|
15126
|
-
|
|
15098
|
+
deadline: void 0,
|
|
15127
15099
|
postOnly: false,
|
|
15128
15100
|
builderAddress: "",
|
|
15129
15101
|
builderFeeRate: ""
|
|
@@ -15146,8 +15118,8 @@ var MsgPlaceLimitOrder = {
|
|
|
15146
15118
|
if (message.quantity !== "") {
|
|
15147
15119
|
writer.uint32(42).string(message.quantity);
|
|
15148
15120
|
}
|
|
15149
|
-
if (message.
|
|
15150
|
-
|
|
15121
|
+
if (message.deadline !== void 0) {
|
|
15122
|
+
Timestamp.encode(toTimestamp7(message.deadline), writer.uint32(50).fork()).join();
|
|
15151
15123
|
}
|
|
15152
15124
|
if (message.postOnly !== false) {
|
|
15153
15125
|
writer.uint32(56).bool(message.postOnly);
|
|
@@ -15206,7 +15178,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15206
15178
|
if (tag !== 50) {
|
|
15207
15179
|
break;
|
|
15208
15180
|
}
|
|
15209
|
-
message.
|
|
15181
|
+
message.deadline = fromTimestamp7(Timestamp.decode(reader, reader.uint32()));
|
|
15210
15182
|
continue;
|
|
15211
15183
|
}
|
|
15212
15184
|
case 7: {
|
|
@@ -15245,7 +15217,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15245
15217
|
isBuy: isSet35(object2.isBuy) ? globalThis.Boolean(object2.isBuy) : isSet35(object2.is_buy) ? globalThis.Boolean(object2.is_buy) : false,
|
|
15246
15218
|
price: isSet35(object2.price) ? globalThis.String(object2.price) : "",
|
|
15247
15219
|
quantity: isSet35(object2.quantity) ? globalThis.String(object2.quantity) : "",
|
|
15248
|
-
|
|
15220
|
+
deadline: isSet35(object2.deadline) ? fromJsonTimestamp7(object2.deadline) : void 0,
|
|
15249
15221
|
postOnly: isSet35(object2.postOnly) ? globalThis.Boolean(object2.postOnly) : isSet35(object2.post_only) ? globalThis.Boolean(object2.post_only) : false,
|
|
15250
15222
|
builderAddress: isSet35(object2.builderAddress) ? globalThis.String(object2.builderAddress) : isSet35(object2.builder_address) ? globalThis.String(object2.builder_address) : "",
|
|
15251
15223
|
builderFeeRate: isSet35(object2.builderFeeRate) ? globalThis.String(object2.builderFeeRate) : isSet35(object2.builder_fee_rate) ? globalThis.String(object2.builder_fee_rate) : ""
|
|
@@ -15268,8 +15240,8 @@ var MsgPlaceLimitOrder = {
|
|
|
15268
15240
|
if (message.quantity !== "") {
|
|
15269
15241
|
obj.quantity = message.quantity;
|
|
15270
15242
|
}
|
|
15271
|
-
if (message.
|
|
15272
|
-
obj.
|
|
15243
|
+
if (message.deadline !== void 0) {
|
|
15244
|
+
obj.deadline = message.deadline.toISOString();
|
|
15273
15245
|
}
|
|
15274
15246
|
if (message.postOnly !== false) {
|
|
15275
15247
|
obj.postOnly = message.postOnly;
|
|
@@ -15292,7 +15264,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15292
15264
|
message.isBuy = object2.isBuy ?? false;
|
|
15293
15265
|
message.price = object2.price ?? "";
|
|
15294
15266
|
message.quantity = object2.quantity ?? "";
|
|
15295
|
-
message.
|
|
15267
|
+
message.deadline = object2.deadline ?? void 0;
|
|
15296
15268
|
message.postOnly = object2.postOnly ?? false;
|
|
15297
15269
|
message.builderAddress = object2.builderAddress ?? "";
|
|
15298
15270
|
message.builderFeeRate = object2.builderFeeRate ?? "";
|
|
@@ -15534,6 +15506,157 @@ var MsgCancelOrders = {
|
|
|
15534
15506
|
return message;
|
|
15535
15507
|
}
|
|
15536
15508
|
};
|
|
15509
|
+
function createBaseMsgModifyOrders() {
|
|
15510
|
+
return { sender: "", orders: [] };
|
|
15511
|
+
}
|
|
15512
|
+
var MsgModifyOrders = {
|
|
15513
|
+
encode(message, writer = new BinaryWriter38()) {
|
|
15514
|
+
if (message.sender !== "") {
|
|
15515
|
+
writer.uint32(10).string(message.sender);
|
|
15516
|
+
}
|
|
15517
|
+
for (const v of message.orders) {
|
|
15518
|
+
ModifyOrder.encode(v, writer.uint32(18).fork()).join();
|
|
15519
|
+
}
|
|
15520
|
+
return writer;
|
|
15521
|
+
},
|
|
15522
|
+
decode(input, length) {
|
|
15523
|
+
const reader = input instanceof BinaryReader37 ? input : new BinaryReader37(input);
|
|
15524
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
15525
|
+
const message = createBaseMsgModifyOrders();
|
|
15526
|
+
while (reader.pos < end) {
|
|
15527
|
+
const tag = reader.uint32();
|
|
15528
|
+
switch (tag >>> 3) {
|
|
15529
|
+
case 1: {
|
|
15530
|
+
if (tag !== 10) {
|
|
15531
|
+
break;
|
|
15532
|
+
}
|
|
15533
|
+
message.sender = reader.string();
|
|
15534
|
+
continue;
|
|
15535
|
+
}
|
|
15536
|
+
case 2: {
|
|
15537
|
+
if (tag !== 18) {
|
|
15538
|
+
break;
|
|
15539
|
+
}
|
|
15540
|
+
message.orders.push(ModifyOrder.decode(reader, reader.uint32()));
|
|
15541
|
+
continue;
|
|
15542
|
+
}
|
|
15543
|
+
}
|
|
15544
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15545
|
+
break;
|
|
15546
|
+
}
|
|
15547
|
+
reader.skip(tag & 7);
|
|
15548
|
+
}
|
|
15549
|
+
return message;
|
|
15550
|
+
},
|
|
15551
|
+
fromJSON(object2) {
|
|
15552
|
+
return {
|
|
15553
|
+
sender: isSet35(object2.sender) ? globalThis.String(object2.sender) : "",
|
|
15554
|
+
orders: globalThis.Array.isArray(object2?.orders) ? object2.orders.map((e) => ModifyOrder.fromJSON(e)) : []
|
|
15555
|
+
};
|
|
15556
|
+
},
|
|
15557
|
+
toJSON(message) {
|
|
15558
|
+
const obj = {};
|
|
15559
|
+
if (message.sender !== "") {
|
|
15560
|
+
obj.sender = message.sender;
|
|
15561
|
+
}
|
|
15562
|
+
if (message.orders?.length) {
|
|
15563
|
+
obj.orders = message.orders.map((e) => ModifyOrder.toJSON(e));
|
|
15564
|
+
}
|
|
15565
|
+
return obj;
|
|
15566
|
+
},
|
|
15567
|
+
create(base) {
|
|
15568
|
+
return MsgModifyOrders.fromPartial(base ?? {});
|
|
15569
|
+
},
|
|
15570
|
+
fromPartial(object2) {
|
|
15571
|
+
const message = createBaseMsgModifyOrders();
|
|
15572
|
+
message.sender = object2.sender ?? "";
|
|
15573
|
+
message.orders = object2.orders?.map((e) => ModifyOrder.fromPartial(e)) || [];
|
|
15574
|
+
return message;
|
|
15575
|
+
}
|
|
15576
|
+
};
|
|
15577
|
+
function createBaseModifyOrder() {
|
|
15578
|
+
return { orderId: new Uint8Array(0), newPrice: "", newQuantity: "" };
|
|
15579
|
+
}
|
|
15580
|
+
var ModifyOrder = {
|
|
15581
|
+
encode(message, writer = new BinaryWriter38()) {
|
|
15582
|
+
if (message.orderId.length !== 0) {
|
|
15583
|
+
writer.uint32(10).bytes(message.orderId);
|
|
15584
|
+
}
|
|
15585
|
+
if (message.newPrice !== "") {
|
|
15586
|
+
writer.uint32(18).string(message.newPrice);
|
|
15587
|
+
}
|
|
15588
|
+
if (message.newQuantity !== "") {
|
|
15589
|
+
writer.uint32(26).string(message.newQuantity);
|
|
15590
|
+
}
|
|
15591
|
+
return writer;
|
|
15592
|
+
},
|
|
15593
|
+
decode(input, length) {
|
|
15594
|
+
const reader = input instanceof BinaryReader37 ? input : new BinaryReader37(input);
|
|
15595
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
15596
|
+
const message = createBaseModifyOrder();
|
|
15597
|
+
while (reader.pos < end) {
|
|
15598
|
+
const tag = reader.uint32();
|
|
15599
|
+
switch (tag >>> 3) {
|
|
15600
|
+
case 1: {
|
|
15601
|
+
if (tag !== 10) {
|
|
15602
|
+
break;
|
|
15603
|
+
}
|
|
15604
|
+
message.orderId = reader.bytes();
|
|
15605
|
+
continue;
|
|
15606
|
+
}
|
|
15607
|
+
case 2: {
|
|
15608
|
+
if (tag !== 18) {
|
|
15609
|
+
break;
|
|
15610
|
+
}
|
|
15611
|
+
message.newPrice = reader.string();
|
|
15612
|
+
continue;
|
|
15613
|
+
}
|
|
15614
|
+
case 3: {
|
|
15615
|
+
if (tag !== 26) {
|
|
15616
|
+
break;
|
|
15617
|
+
}
|
|
15618
|
+
message.newQuantity = reader.string();
|
|
15619
|
+
continue;
|
|
15620
|
+
}
|
|
15621
|
+
}
|
|
15622
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15623
|
+
break;
|
|
15624
|
+
}
|
|
15625
|
+
reader.skip(tag & 7);
|
|
15626
|
+
}
|
|
15627
|
+
return message;
|
|
15628
|
+
},
|
|
15629
|
+
fromJSON(object2) {
|
|
15630
|
+
return {
|
|
15631
|
+
orderId: isSet35(object2.orderId) ? bytesFromBase648(object2.orderId) : isSet35(object2.order_id) ? bytesFromBase648(object2.order_id) : new Uint8Array(0),
|
|
15632
|
+
newPrice: isSet35(object2.newPrice) ? globalThis.String(object2.newPrice) : isSet35(object2.new_price) ? globalThis.String(object2.new_price) : "",
|
|
15633
|
+
newQuantity: isSet35(object2.newQuantity) ? globalThis.String(object2.newQuantity) : isSet35(object2.new_quantity) ? globalThis.String(object2.new_quantity) : ""
|
|
15634
|
+
};
|
|
15635
|
+
},
|
|
15636
|
+
toJSON(message) {
|
|
15637
|
+
const obj = {};
|
|
15638
|
+
if (message.orderId.length !== 0) {
|
|
15639
|
+
obj.orderId = base64FromBytes8(message.orderId);
|
|
15640
|
+
}
|
|
15641
|
+
if (message.newPrice !== "") {
|
|
15642
|
+
obj.newPrice = message.newPrice;
|
|
15643
|
+
}
|
|
15644
|
+
if (message.newQuantity !== "") {
|
|
15645
|
+
obj.newQuantity = message.newQuantity;
|
|
15646
|
+
}
|
|
15647
|
+
return obj;
|
|
15648
|
+
},
|
|
15649
|
+
create(base) {
|
|
15650
|
+
return ModifyOrder.fromPartial(base ?? {});
|
|
15651
|
+
},
|
|
15652
|
+
fromPartial(object2) {
|
|
15653
|
+
const message = createBaseModifyOrder();
|
|
15654
|
+
message.orderId = object2.orderId ?? new Uint8Array(0);
|
|
15655
|
+
message.newPrice = object2.newPrice ?? "";
|
|
15656
|
+
message.newQuantity = object2.newQuantity ?? "";
|
|
15657
|
+
return message;
|
|
15658
|
+
}
|
|
15659
|
+
};
|
|
15537
15660
|
function createBaseMsgPlaceScaleOrder() {
|
|
15538
15661
|
return {
|
|
15539
15662
|
sender: "",
|
|
@@ -15543,7 +15666,7 @@ function createBaseMsgPlaceScaleOrder() {
|
|
|
15543
15666
|
highPrice: "",
|
|
15544
15667
|
totalQuantity: "",
|
|
15545
15668
|
weights: [],
|
|
15546
|
-
|
|
15669
|
+
deadline: void 0,
|
|
15547
15670
|
postOnly: false,
|
|
15548
15671
|
builderAddress: "",
|
|
15549
15672
|
builderFeeRate: ""
|
|
@@ -15574,8 +15697,8 @@ var MsgPlaceScaleOrder = {
|
|
|
15574
15697
|
writer.uint32(v);
|
|
15575
15698
|
}
|
|
15576
15699
|
writer.join();
|
|
15577
|
-
if (message.
|
|
15578
|
-
|
|
15700
|
+
if (message.deadline !== void 0) {
|
|
15701
|
+
Timestamp.encode(toTimestamp7(message.deadline), writer.uint32(66).fork()).join();
|
|
15579
15702
|
}
|
|
15580
15703
|
if (message.postOnly !== false) {
|
|
15581
15704
|
writer.uint32(72).bool(message.postOnly);
|
|
@@ -15655,7 +15778,7 @@ var MsgPlaceScaleOrder = {
|
|
|
15655
15778
|
if (tag !== 66) {
|
|
15656
15779
|
break;
|
|
15657
15780
|
}
|
|
15658
|
-
message.
|
|
15781
|
+
message.deadline = fromTimestamp7(Timestamp.decode(reader, reader.uint32()));
|
|
15659
15782
|
continue;
|
|
15660
15783
|
}
|
|
15661
15784
|
case 9: {
|
|
@@ -15696,7 +15819,7 @@ var MsgPlaceScaleOrder = {
|
|
|
15696
15819
|
highPrice: isSet35(object2.highPrice) ? globalThis.String(object2.highPrice) : isSet35(object2.high_price) ? globalThis.String(object2.high_price) : "",
|
|
15697
15820
|
totalQuantity: isSet35(object2.totalQuantity) ? globalThis.String(object2.totalQuantity) : isSet35(object2.total_quantity) ? globalThis.String(object2.total_quantity) : "",
|
|
15698
15821
|
weights: globalThis.Array.isArray(object2?.weights) ? object2.weights.map((e) => globalThis.Number(e)) : [],
|
|
15699
|
-
|
|
15822
|
+
deadline: isSet35(object2.deadline) ? fromJsonTimestamp7(object2.deadline) : void 0,
|
|
15700
15823
|
postOnly: isSet35(object2.postOnly) ? globalThis.Boolean(object2.postOnly) : isSet35(object2.post_only) ? globalThis.Boolean(object2.post_only) : false,
|
|
15701
15824
|
builderAddress: isSet35(object2.builderAddress) ? globalThis.String(object2.builderAddress) : isSet35(object2.builder_address) ? globalThis.String(object2.builder_address) : "",
|
|
15702
15825
|
builderFeeRate: isSet35(object2.builderFeeRate) ? globalThis.String(object2.builderFeeRate) : isSet35(object2.builder_fee_rate) ? globalThis.String(object2.builder_fee_rate) : ""
|
|
@@ -15725,8 +15848,8 @@ var MsgPlaceScaleOrder = {
|
|
|
15725
15848
|
if (message.weights?.length) {
|
|
15726
15849
|
obj.weights = message.weights.map((e) => Math.round(e));
|
|
15727
15850
|
}
|
|
15728
|
-
if (message.
|
|
15729
|
-
obj.
|
|
15851
|
+
if (message.deadline !== void 0) {
|
|
15852
|
+
obj.deadline = message.deadline.toISOString();
|
|
15730
15853
|
}
|
|
15731
15854
|
if (message.postOnly !== false) {
|
|
15732
15855
|
obj.postOnly = message.postOnly;
|
|
@@ -15751,7 +15874,7 @@ var MsgPlaceScaleOrder = {
|
|
|
15751
15874
|
message.highPrice = object2.highPrice ?? "";
|
|
15752
15875
|
message.totalQuantity = object2.totalQuantity ?? "";
|
|
15753
15876
|
message.weights = object2.weights?.map((e) => e) || [];
|
|
15754
|
-
message.
|
|
15877
|
+
message.deadline = object2.deadline ?? void 0;
|
|
15755
15878
|
message.postOnly = object2.postOnly ?? false;
|
|
15756
15879
|
message.builderAddress = object2.builderAddress ?? "";
|
|
15757
15880
|
message.builderFeeRate = object2.builderFeeRate ?? "";
|
|
@@ -15849,6 +15972,25 @@ function base64FromBytes8(arr) {
|
|
|
15849
15972
|
return globalThis.btoa(bin.join(""));
|
|
15850
15973
|
}
|
|
15851
15974
|
}
|
|
15975
|
+
function toTimestamp7(date) {
|
|
15976
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
15977
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
15978
|
+
return { seconds, nanos };
|
|
15979
|
+
}
|
|
15980
|
+
function fromTimestamp7(t) {
|
|
15981
|
+
let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1e3;
|
|
15982
|
+
millis += (t.nanos || 0) / 1e6;
|
|
15983
|
+
return new globalThis.Date(millis);
|
|
15984
|
+
}
|
|
15985
|
+
function fromJsonTimestamp7(o) {
|
|
15986
|
+
if (o instanceof globalThis.Date) {
|
|
15987
|
+
return o;
|
|
15988
|
+
} else if (typeof o === "string") {
|
|
15989
|
+
return new globalThis.Date(o);
|
|
15990
|
+
} else {
|
|
15991
|
+
return fromTimestamp7(Timestamp.fromJSON(o));
|
|
15992
|
+
}
|
|
15993
|
+
}
|
|
15852
15994
|
function isSet35(value) {
|
|
15853
15995
|
return value !== null && value !== void 0;
|
|
15854
15996
|
}
|
|
@@ -16925,7 +17067,15 @@ function isSet36(value) {
|
|
|
16925
17067
|
// src/proto/gen/ault/market/v1/tx.ts
|
|
16926
17068
|
import { BinaryReader as BinaryReader39, BinaryWriter as BinaryWriter40 } from "@bufbuild/protobuf/wire";
|
|
16927
17069
|
function createBaseMsgCreateMarket() {
|
|
16928
|
-
return {
|
|
17070
|
+
return {
|
|
17071
|
+
sender: "",
|
|
17072
|
+
marketType: 0,
|
|
17073
|
+
baseDenom: "",
|
|
17074
|
+
quoteDenom: "",
|
|
17075
|
+
tickPrecision: 0,
|
|
17076
|
+
makerFeeRate: "",
|
|
17077
|
+
takerFeeRate: ""
|
|
17078
|
+
};
|
|
16929
17079
|
}
|
|
16930
17080
|
var MsgCreateMarket = {
|
|
16931
17081
|
encode(message, writer = new BinaryWriter40()) {
|
|
@@ -16944,6 +17094,12 @@ var MsgCreateMarket = {
|
|
|
16944
17094
|
if (message.tickPrecision !== 0) {
|
|
16945
17095
|
writer.uint32(40).uint32(message.tickPrecision);
|
|
16946
17096
|
}
|
|
17097
|
+
if (message.makerFeeRate !== "") {
|
|
17098
|
+
writer.uint32(50).string(message.makerFeeRate);
|
|
17099
|
+
}
|
|
17100
|
+
if (message.takerFeeRate !== "") {
|
|
17101
|
+
writer.uint32(58).string(message.takerFeeRate);
|
|
17102
|
+
}
|
|
16947
17103
|
return writer;
|
|
16948
17104
|
},
|
|
16949
17105
|
decode(input, length) {
|
|
@@ -16988,6 +17144,20 @@ var MsgCreateMarket = {
|
|
|
16988
17144
|
message.tickPrecision = reader.uint32();
|
|
16989
17145
|
continue;
|
|
16990
17146
|
}
|
|
17147
|
+
case 6: {
|
|
17148
|
+
if (tag !== 50) {
|
|
17149
|
+
break;
|
|
17150
|
+
}
|
|
17151
|
+
message.makerFeeRate = reader.string();
|
|
17152
|
+
continue;
|
|
17153
|
+
}
|
|
17154
|
+
case 7: {
|
|
17155
|
+
if (tag !== 58) {
|
|
17156
|
+
break;
|
|
17157
|
+
}
|
|
17158
|
+
message.takerFeeRate = reader.string();
|
|
17159
|
+
continue;
|
|
17160
|
+
}
|
|
16991
17161
|
}
|
|
16992
17162
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16993
17163
|
break;
|
|
@@ -17002,7 +17172,9 @@ var MsgCreateMarket = {
|
|
|
17002
17172
|
marketType: isSet37(object2.marketType) ? marketTypeFromJSON(object2.marketType) : isSet37(object2.market_type) ? marketTypeFromJSON(object2.market_type) : 0,
|
|
17003
17173
|
baseDenom: isSet37(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet37(object2.base_denom) ? globalThis.String(object2.base_denom) : "",
|
|
17004
17174
|
quoteDenom: isSet37(object2.quoteDenom) ? globalThis.String(object2.quoteDenom) : isSet37(object2.quote_denom) ? globalThis.String(object2.quote_denom) : "",
|
|
17005
|
-
tickPrecision: isSet37(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet37(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0
|
|
17175
|
+
tickPrecision: isSet37(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet37(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0,
|
|
17176
|
+
makerFeeRate: isSet37(object2.makerFeeRate) ? globalThis.String(object2.makerFeeRate) : isSet37(object2.maker_fee_rate) ? globalThis.String(object2.maker_fee_rate) : "",
|
|
17177
|
+
takerFeeRate: isSet37(object2.takerFeeRate) ? globalThis.String(object2.takerFeeRate) : isSet37(object2.taker_fee_rate) ? globalThis.String(object2.taker_fee_rate) : ""
|
|
17006
17178
|
};
|
|
17007
17179
|
},
|
|
17008
17180
|
toJSON(message) {
|
|
@@ -17022,6 +17194,12 @@ var MsgCreateMarket = {
|
|
|
17022
17194
|
if (message.tickPrecision !== 0) {
|
|
17023
17195
|
obj.tickPrecision = Math.round(message.tickPrecision);
|
|
17024
17196
|
}
|
|
17197
|
+
if (message.makerFeeRate !== "") {
|
|
17198
|
+
obj.makerFeeRate = message.makerFeeRate;
|
|
17199
|
+
}
|
|
17200
|
+
if (message.takerFeeRate !== "") {
|
|
17201
|
+
obj.takerFeeRate = message.takerFeeRate;
|
|
17202
|
+
}
|
|
17025
17203
|
return obj;
|
|
17026
17204
|
},
|
|
17027
17205
|
create(base) {
|
|
@@ -17034,6 +17212,8 @@ var MsgCreateMarket = {
|
|
|
17034
17212
|
message.baseDenom = object2.baseDenom ?? "";
|
|
17035
17213
|
message.quoteDenom = object2.quoteDenom ?? "";
|
|
17036
17214
|
message.tickPrecision = object2.tickPrecision ?? 0;
|
|
17215
|
+
message.makerFeeRate = object2.makerFeeRate ?? "";
|
|
17216
|
+
message.takerFeeRate = object2.takerFeeRate ?? "";
|
|
17037
17217
|
return message;
|
|
17038
17218
|
}
|
|
17039
17219
|
};
|
|
@@ -20194,12 +20374,6 @@ function requireRecordArray(value, label) {
|
|
|
20194
20374
|
return item;
|
|
20195
20375
|
});
|
|
20196
20376
|
}
|
|
20197
|
-
function optionalDuration(value, label) {
|
|
20198
|
-
if (value === void 0) {
|
|
20199
|
-
return void 0;
|
|
20200
|
-
}
|
|
20201
|
-
return requireDuration(value, label);
|
|
20202
|
-
}
|
|
20203
20377
|
function requireDuration(value, label) {
|
|
20204
20378
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20205
20379
|
throw new Error(`${label} must be a protobuf Duration object.`);
|
|
@@ -20227,6 +20401,40 @@ function requireDurationOrDefault(value, label, defaultValue = { seconds: 0n, na
|
|
|
20227
20401
|
}
|
|
20228
20402
|
return requireDuration(value, label);
|
|
20229
20403
|
}
|
|
20404
|
+
function optionalTimestamp(value, label) {
|
|
20405
|
+
if (value === void 0 || value === null) {
|
|
20406
|
+
return void 0;
|
|
20407
|
+
}
|
|
20408
|
+
return requireTimestamp(value, label);
|
|
20409
|
+
}
|
|
20410
|
+
function requireTimestamp(value, label) {
|
|
20411
|
+
if (value instanceof Date) {
|
|
20412
|
+
if (Number.isNaN(value.getTime())) {
|
|
20413
|
+
throw new Error(`${label} must be a valid Date.`);
|
|
20414
|
+
}
|
|
20415
|
+
return value;
|
|
20416
|
+
}
|
|
20417
|
+
if (typeof value === "string") {
|
|
20418
|
+
const parsed = new Date(value);
|
|
20419
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
20420
|
+
throw new Error(`${label} must be a valid RFC 3339 date string.`);
|
|
20421
|
+
}
|
|
20422
|
+
return parsed;
|
|
20423
|
+
}
|
|
20424
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
20425
|
+
const record2 = asRecord(value);
|
|
20426
|
+
if (record2.seconds === void 0 && record2.nanos === void 0) {
|
|
20427
|
+
throw new Error(`${label} must include seconds or nanos.`);
|
|
20428
|
+
}
|
|
20429
|
+
const seconds = requireBigIntLike(record2.seconds ?? 0n, `${label}.seconds`);
|
|
20430
|
+
const nanos = requireInt32Like(record2.nanos ?? 0, `${label}.nanos`);
|
|
20431
|
+
if (nanos < 0 || nanos > 999999999) {
|
|
20432
|
+
throw new Error(`${label}.nanos must be between 0 and 999999999.`);
|
|
20433
|
+
}
|
|
20434
|
+
return new Date(Number(seconds) * 1e3 + Math.floor(nanos / 1e6));
|
|
20435
|
+
}
|
|
20436
|
+
throw new Error(`${label} must be a Date, RFC 3339 string, or protobuf Timestamp object.`);
|
|
20437
|
+
}
|
|
20230
20438
|
function mapAultAccountxV1MsgOpenAccount(input, label = "value") {
|
|
20231
20439
|
const record2 = asRecord(input);
|
|
20232
20440
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20260,7 +20468,7 @@ function mapAultAgentV1MsgApproveAgent(input, label = "value") {
|
|
|
20260
20468
|
masterAddress: requireString(record2["masterAddress"], `${prefix}masterAddress`),
|
|
20261
20469
|
agentPubkey: mapGoogleProtobufAny(asRecord(record2["agentPubkey"]), `${prefix}agentPubkey`),
|
|
20262
20470
|
name: requireStringOrDefault(record2["name"], `${prefix}name`),
|
|
20263
|
-
|
|
20471
|
+
expiresAt: optionalTimestamp(record2["expiresAt"], `${prefix}expiresAt`)
|
|
20264
20472
|
};
|
|
20265
20473
|
}
|
|
20266
20474
|
function mapAultAgentV1MsgRevokeAgent(input, label = "value") {
|
|
@@ -20309,6 +20517,17 @@ function mapAultAuthorityV1MsgRevokeRole(input, label = "value") {
|
|
|
20309
20517
|
members: requireStringArray(record2["members"], `${prefix}members`)
|
|
20310
20518
|
};
|
|
20311
20519
|
}
|
|
20520
|
+
function mapAultClobV1ModifyOrder(input, label = "value") {
|
|
20521
|
+
const record2 = asRecord(input);
|
|
20522
|
+
const prefix = label ? `${label}.` : "";
|
|
20523
|
+
return {
|
|
20524
|
+
orderId: requireBytes(record2["orderId"], `${prefix}orderId`),
|
|
20525
|
+
newPrice: cosmosDecToProtoInt(requireStringOrDefault(record2["newPrice"], `${prefix}newPrice`)),
|
|
20526
|
+
newQuantity: cosmosDecToProtoInt(
|
|
20527
|
+
requireStringOrDefault(record2["newQuantity"], `${prefix}newQuantity`)
|
|
20528
|
+
)
|
|
20529
|
+
};
|
|
20530
|
+
}
|
|
20312
20531
|
function mapAultClobV1MsgCancelOrders(input, label = "value") {
|
|
20313
20532
|
const record2 = asRecord(input);
|
|
20314
20533
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20317,6 +20536,16 @@ function mapAultClobV1MsgCancelOrders(input, label = "value") {
|
|
|
20317
20536
|
orderIds: requireBytesArray(record2["orderIds"], `${prefix}orderIds`)
|
|
20318
20537
|
};
|
|
20319
20538
|
}
|
|
20539
|
+
function mapAultClobV1MsgModifyOrders(input, label = "value") {
|
|
20540
|
+
const record2 = asRecord(input);
|
|
20541
|
+
const prefix = label ? `${label}.` : "";
|
|
20542
|
+
return {
|
|
20543
|
+
sender: requireString(record2["sender"], `${prefix}sender`),
|
|
20544
|
+
orders: requireRecordArray(record2["orders"], `${prefix}orders`).map(
|
|
20545
|
+
(item, index) => mapAultClobV1ModifyOrder(item, `${prefix}orders[${index}]`)
|
|
20546
|
+
)
|
|
20547
|
+
};
|
|
20548
|
+
}
|
|
20320
20549
|
function mapAultClobV1MsgPlaceLimitOrder(input, label = "value") {
|
|
20321
20550
|
const record2 = asRecord(input);
|
|
20322
20551
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20326,7 +20555,7 @@ function mapAultClobV1MsgPlaceLimitOrder(input, label = "value") {
|
|
|
20326
20555
|
isBuy: requireBool(record2["isBuy"], `${prefix}isBuy`),
|
|
20327
20556
|
price: cosmosDecToProtoInt(requireString(record2["price"], `${prefix}price`)),
|
|
20328
20557
|
quantity: cosmosDecToProtoInt(requireString(record2["quantity"], `${prefix}quantity`)),
|
|
20329
|
-
|
|
20558
|
+
deadline: requireTimestamp(record2["deadline"], `${prefix}deadline`),
|
|
20330
20559
|
postOnly: requireBoolOrDefault(record2["postOnly"], `${prefix}postOnly`),
|
|
20331
20560
|
builderAddress: requireStringOrDefault(record2["builderAddress"], `${prefix}builderAddress`),
|
|
20332
20561
|
builderFeeRate: cosmosDecToProtoInt(
|
|
@@ -20367,7 +20596,7 @@ function mapAultClobV1MsgPlaceScaleOrder(input, label = "value") {
|
|
|
20367
20596
|
requireString(record2["totalQuantity"], `${prefix}totalQuantity`)
|
|
20368
20597
|
),
|
|
20369
20598
|
weights: requireUint32Array(record2["weights"], `${prefix}weights`),
|
|
20370
|
-
|
|
20599
|
+
deadline: requireTimestamp(record2["deadline"], `${prefix}deadline`),
|
|
20371
20600
|
postOnly: requireBoolOrDefault(record2["postOnly"], `${prefix}postOnly`),
|
|
20372
20601
|
builderAddress: requireStringOrDefault(record2["builderAddress"], `${prefix}builderAddress`),
|
|
20373
20602
|
builderFeeRate: cosmosDecToProtoInt(
|
|
@@ -20598,7 +20827,13 @@ function mapAultMarketV1MsgCreateMarket(input, label = "value") {
|
|
|
20598
20827
|
),
|
|
20599
20828
|
baseDenom: requireString(record2["baseDenom"], `${prefix}baseDenom`),
|
|
20600
20829
|
quoteDenom: requireString(record2["quoteDenom"], `${prefix}quoteDenom`),
|
|
20601
|
-
tickPrecision: requireUint32Like(record2["tickPrecision"], `${prefix}tickPrecision`)
|
|
20830
|
+
tickPrecision: requireUint32Like(record2["tickPrecision"], `${prefix}tickPrecision`),
|
|
20831
|
+
makerFeeRate: cosmosDecToProtoInt(
|
|
20832
|
+
requireStringOrDefault(record2["makerFeeRate"], `${prefix}makerFeeRate`)
|
|
20833
|
+
),
|
|
20834
|
+
takerFeeRate: cosmosDecToProtoInt(
|
|
20835
|
+
requireStringOrDefault(record2["takerFeeRate"], `${prefix}takerFeeRate`)
|
|
20836
|
+
)
|
|
20602
20837
|
};
|
|
20603
20838
|
}
|
|
20604
20839
|
function mapAultMarketV1MsgHaltAllMarkets(input, label = "value") {
|
|
@@ -21132,6 +21367,9 @@ var MSG_ENCODERS = {
|
|
|
21132
21367
|
"/ault.clob.v1.MsgCancelOrders": (value) => MsgCancelOrders.encode(
|
|
21133
21368
|
MsgCancelOrders.fromPartial(mapAultClobV1MsgCancelOrders(value))
|
|
21134
21369
|
).finish(),
|
|
21370
|
+
"/ault.clob.v1.MsgModifyOrders": (value) => MsgModifyOrders.encode(
|
|
21371
|
+
MsgModifyOrders.fromPartial(mapAultClobV1MsgModifyOrders(value))
|
|
21372
|
+
).finish(),
|
|
21135
21373
|
"/ault.clob.v1.MsgPlaceLimitOrder": (value) => MsgPlaceLimitOrder.encode(
|
|
21136
21374
|
MsgPlaceLimitOrder.fromPartial(mapAultClobV1MsgPlaceLimitOrder(value))
|
|
21137
21375
|
).finish(),
|
|
@@ -21860,7 +22098,7 @@ function createAgentTxApi({ signerAddress, exec, getGas }) {
|
|
|
21860
22098
|
async approveAgent({
|
|
21861
22099
|
agentPubkey,
|
|
21862
22100
|
name = "",
|
|
21863
|
-
|
|
22101
|
+
expiresAt,
|
|
21864
22102
|
gasLimit,
|
|
21865
22103
|
feeAmount,
|
|
21866
22104
|
memo,
|
|
@@ -21873,7 +22111,7 @@ function createAgentTxApi({ signerAddress, exec, getGas }) {
|
|
|
21873
22111
|
masterAddress: signerAddress,
|
|
21874
22112
|
agentPubkey,
|
|
21875
22113
|
name,
|
|
21876
|
-
|
|
22114
|
+
expiresAt
|
|
21877
22115
|
})
|
|
21878
22116
|
],
|
|
21879
22117
|
{
|
|
@@ -21953,7 +22191,7 @@ function buildLimitOrderMsg(sender, params) {
|
|
|
21953
22191
|
isBuy: params.isBuy,
|
|
21954
22192
|
price: params.price,
|
|
21955
22193
|
quantity: params.quantity,
|
|
21956
|
-
|
|
22194
|
+
deadline: params.deadline,
|
|
21957
22195
|
...params.postOnly !== void 0 && { postOnly: params.postOnly },
|
|
21958
22196
|
...params.builderAddress !== void 0 && {
|
|
21959
22197
|
builderAddress: normalizeAddress(params.builderAddress)
|
|
@@ -21987,7 +22225,7 @@ function buildScaleOrderMsg(sender, params) {
|
|
|
21987
22225
|
highPrice: params.highPrice,
|
|
21988
22226
|
totalQuantity: params.totalQuantity,
|
|
21989
22227
|
weights: params.weights,
|
|
21990
|
-
|
|
22228
|
+
deadline: params.deadline,
|
|
21991
22229
|
...params.postOnly !== void 0 && { postOnly: params.postOnly },
|
|
21992
22230
|
...params.builderAddress !== void 0 && {
|
|
21993
22231
|
builderAddress: normalizeAddress(params.builderAddress)
|
|
@@ -23989,6 +24227,57 @@ var GetTradingFeesResponse = zod.record(
|
|
|
23989
24227
|
info: zod.looseObject({})
|
|
23990
24228
|
})
|
|
23991
24229
|
);
|
|
24230
|
+
var GetStatsQueryParams = zod.object({
|
|
24231
|
+
window: zod.enum(["24h"]).optional().describe("Rolling window. Only `24h` is supported; defaults to `24h`.")
|
|
24232
|
+
});
|
|
24233
|
+
var getStatsResponseTotalsQuoteVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24234
|
+
var getStatsResponseTotalsEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24235
|
+
var getStatsResponseTotalsAverageSlippageBpsRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24236
|
+
var getStatsResponseTotalsDepositUsdcVolume24hRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24237
|
+
var getStatsResponseTotalsBuilderCodesFee24hRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24238
|
+
var getStatsResponseMarketsItemQuoteVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24239
|
+
var getStatsResponseMarketsItemBaseVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24240
|
+
var getStatsResponseMarketsItemEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24241
|
+
var getStatsResponseMarketsItemTakerFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24242
|
+
var GetStatsResponse = zod.object({
|
|
24243
|
+
window: zod.enum(["24h"]),
|
|
24244
|
+
totals: zod.object({
|
|
24245
|
+
quoteVolume: zod.string().regex(getStatsResponseTotalsQuoteVolumeRegExp).nullable().describe(
|
|
24246
|
+
"Total quote volume over the window as a canonical decimal string.\nNull when contributing markets span more than one quote (then\n`estimatedFee` and `quoteAsset` are null too).\n"
|
|
24247
|
+
),
|
|
24248
|
+
quoteAsset: zod.string().nullable().describe(
|
|
24249
|
+
'Shared quote ticker of the markets that had volume. Null when they\nspan more than one quote, or on an idle window (then `quoteVolume`\nis "0"; a null `quoteVolume` means multi-quote).\n'
|
|
24250
|
+
),
|
|
24251
|
+
estimatedFee: zod.string().regex(getStatsResponseTotalsEstimatedFeeRegExp).nullable().describe(
|
|
24252
|
+
"Estimated total fees (`\u03A3 quoteVolume \xD7 takerFeeRate`) as a decimal\nstring; an estimate, not booked revenue. Null on multi-quote.\n"
|
|
24253
|
+
),
|
|
24254
|
+
tradeCount: zod.number().describe("Number of fills (maker legs) in the window."),
|
|
24255
|
+
traderCount: zod.number().describe("Distinct trading addresses in the window."),
|
|
24256
|
+
activeMarkets: zod.number().describe("Number of markets with at least one fill in the window."),
|
|
24257
|
+
dailyActiveUsers: zod.number().nullable().describe(
|
|
24258
|
+
"Distinct trading addresses in the window. Currently an alias of\n`traderCount`; separate so a precise DAU source can diverge later.\n"
|
|
24259
|
+
),
|
|
24260
|
+
averageSlippageBps: zod.string().regex(getStatsResponseTotalsAverageSlippageBpsRegExp).nullable().describe(
|
|
24261
|
+
"Volume-weighted taker slippage (fill vs book-mid) in bps as a\ndecimal string. Null with no benchmarkable taker fill or when\nfills span more than one quote.\n"
|
|
24262
|
+
),
|
|
24263
|
+
depositUsdcVolume24h: zod.string().regex(getStatsResponseTotalsDepositUsdcVolume24hRegExp).nullable().describe("Reserved. Currently always null."),
|
|
24264
|
+
builderCodesFee24h: zod.string().regex(getStatsResponseTotalsBuilderCodesFee24hRegExp).nullable().describe("Reserved. Currently always null.")
|
|
24265
|
+
}).describe("Protocol-wide aggregates for the window."),
|
|
24266
|
+
markets: zod.array(
|
|
24267
|
+
zod.object({
|
|
24268
|
+
symbol: zod.string(),
|
|
24269
|
+
base: zod.string(),
|
|
24270
|
+
quote: zod.string(),
|
|
24271
|
+
quoteVolume: zod.string().regex(getStatsResponseMarketsItemQuoteVolumeRegExp),
|
|
24272
|
+
baseVolume: zod.string().regex(getStatsResponseMarketsItemBaseVolumeRegExp),
|
|
24273
|
+
estimatedFee: zod.string().regex(getStatsResponseMarketsItemEstimatedFeeRegExp),
|
|
24274
|
+
tradeCount: zod.number(),
|
|
24275
|
+
takerFeeRate: zod.string().regex(getStatsResponseMarketsItemTakerFeeRateRegExp)
|
|
24276
|
+
}).describe("Per-market aggregates for the window.")
|
|
24277
|
+
)
|
|
24278
|
+
}).describe(
|
|
24279
|
+
"Protocol stats overview for a rolling window. Monetary fields are\ncanonical decimal strings; counts are integers.\n"
|
|
24280
|
+
);
|
|
23992
24281
|
var listOrdersQueryAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
|
|
23993
24282
|
var listOrdersQueryAddressTwoRegExp = new RegExp("^0x[a-f0-9]{40}$");
|
|
23994
24283
|
var listOrdersQueryMarketIdRegExp = new RegExp("^[0-9a-fA-F]+$");
|
|
@@ -24045,7 +24334,7 @@ var ListOrdersResponseItem = zod.object({
|
|
|
24045
24334
|
currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
|
|
24046
24335
|
rate: zod.string().regex(listOrdersResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
|
|
24047
24336
|
}).optional().describe(
|
|
24048
|
-
"Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate;
|
|
24337
|
+
"Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"
|
|
24049
24338
|
),
|
|
24050
24339
|
reduceOnly: zod.boolean().optional(),
|
|
24051
24340
|
postOnly: zod.boolean().optional(),
|
|
@@ -24109,7 +24398,7 @@ var GetOrderResponse = zod.object({
|
|
|
24109
24398
|
currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
|
|
24110
24399
|
rate: zod.string().regex(getOrderResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
|
|
24111
24400
|
}).optional().describe(
|
|
24112
|
-
"Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate;
|
|
24401
|
+
"Fee for the order. `cost` is `cost * taker_fee_rate` \u2014 applied to\nthe realized cost above, so it is more accurate than the previous\n`filled * price * taker_fee_rate` approximation. The rate is the\nmarket's taker rate; this stays an estimate because the indexer\nrecords no realized per-trade fee amount to sum.\n"
|
|
24113
24402
|
),
|
|
24114
24403
|
reduceOnly: zod.boolean().optional(),
|
|
24115
24404
|
postOnly: zod.boolean().optional(),
|
|
@@ -24365,7 +24654,7 @@ function createDexWs(url, options) {
|
|
|
24365
24654
|
}
|
|
24366
24655
|
|
|
24367
24656
|
// src/index.ts
|
|
24368
|
-
var SDK_VERSION = "0.0.2-alpha.
|
|
24657
|
+
var SDK_VERSION = "0.0.2-alpha.23";
|
|
24369
24658
|
export {
|
|
24370
24659
|
AGENT_DEFAULTS,
|
|
24371
24660
|
AULT_SIGNER_MARKER,
|
|
@@ -24396,6 +24685,8 @@ export {
|
|
|
24396
24685
|
GetOrderbookResponse,
|
|
24397
24686
|
GetReadyResponse,
|
|
24398
24687
|
GetSDKManifestResponse,
|
|
24688
|
+
GetStatsQueryParams,
|
|
24689
|
+
GetStatsResponse,
|
|
24399
24690
|
GetStatusResponse,
|
|
24400
24691
|
GetTickerParams,
|
|
24401
24692
|
GetTickerResponse,
|
|
@@ -24541,6 +24832,15 @@ export {
|
|
|
24541
24832
|
getOrderbookQueryLimitDefault,
|
|
24542
24833
|
getOrderbookQueryLimitMax,
|
|
24543
24834
|
getOrderbookResponseMarketIdRegExp,
|
|
24835
|
+
getStatsResponseMarketsItemBaseVolumeRegExp,
|
|
24836
|
+
getStatsResponseMarketsItemEstimatedFeeRegExp,
|
|
24837
|
+
getStatsResponseMarketsItemQuoteVolumeRegExp,
|
|
24838
|
+
getStatsResponseMarketsItemTakerFeeRateRegExp,
|
|
24839
|
+
getStatsResponseTotalsAverageSlippageBpsRegExp,
|
|
24840
|
+
getStatsResponseTotalsBuilderCodesFee24hRegExp,
|
|
24841
|
+
getStatsResponseTotalsDepositUsdcVolume24hRegExp,
|
|
24842
|
+
getStatsResponseTotalsEstimatedFeeRegExp,
|
|
24843
|
+
getStatsResponseTotalsQuoteVolumeRegExp,
|
|
24544
24844
|
getTradingFeesResponseMakerRegExp,
|
|
24545
24845
|
getTradingFeesResponseTakerRegExp,
|
|
24546
24846
|
getUDFHistoryQueryCountbackMax,
|