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.cjs
CHANGED
|
@@ -59,6 +59,8 @@ __export(index_exports, {
|
|
|
59
59
|
GetOrderbookResponse: () => GetOrderbookResponse,
|
|
60
60
|
GetReadyResponse: () => GetReadyResponse,
|
|
61
61
|
GetSDKManifestResponse: () => GetSDKManifestResponse,
|
|
62
|
+
GetStatsQueryParams: () => GetStatsQueryParams,
|
|
63
|
+
GetStatsResponse: () => GetStatsResponse,
|
|
62
64
|
GetStatusResponse: () => GetStatusResponse,
|
|
63
65
|
GetTickerParams: () => GetTickerParams,
|
|
64
66
|
GetTickerResponse: () => GetTickerResponse,
|
|
@@ -204,6 +206,15 @@ __export(index_exports, {
|
|
|
204
206
|
getOrderbookQueryLimitDefault: () => getOrderbookQueryLimitDefault,
|
|
205
207
|
getOrderbookQueryLimitMax: () => getOrderbookQueryLimitMax,
|
|
206
208
|
getOrderbookResponseMarketIdRegExp: () => getOrderbookResponseMarketIdRegExp,
|
|
209
|
+
getStatsResponseMarketsItemBaseVolumeRegExp: () => getStatsResponseMarketsItemBaseVolumeRegExp,
|
|
210
|
+
getStatsResponseMarketsItemEstimatedFeeRegExp: () => getStatsResponseMarketsItemEstimatedFeeRegExp,
|
|
211
|
+
getStatsResponseMarketsItemQuoteVolumeRegExp: () => getStatsResponseMarketsItemQuoteVolumeRegExp,
|
|
212
|
+
getStatsResponseMarketsItemTakerFeeRateRegExp: () => getStatsResponseMarketsItemTakerFeeRateRegExp,
|
|
213
|
+
getStatsResponseTotalsAverageSlippageBpsRegExp: () => getStatsResponseTotalsAverageSlippageBpsRegExp,
|
|
214
|
+
getStatsResponseTotalsBuilderCodesFee24hRegExp: () => getStatsResponseTotalsBuilderCodesFee24hRegExp,
|
|
215
|
+
getStatsResponseTotalsDepositUsdcVolume24hRegExp: () => getStatsResponseTotalsDepositUsdcVolume24hRegExp,
|
|
216
|
+
getStatsResponseTotalsEstimatedFeeRegExp: () => getStatsResponseTotalsEstimatedFeeRegExp,
|
|
217
|
+
getStatsResponseTotalsQuoteVolumeRegExp: () => getStatsResponseTotalsQuoteVolumeRegExp,
|
|
207
218
|
getTradingFeesResponseMakerRegExp: () => getTradingFeesResponseMakerRegExp,
|
|
208
219
|
getTradingFeesResponseTakerRegExp: () => getTradingFeesResponseTakerRegExp,
|
|
209
220
|
getUDFHistoryQueryCountbackMax: () => getUDFHistoryQueryCountbackMax,
|
|
@@ -5088,62 +5099,6 @@ var QueryIsKYCApproverResponse = {
|
|
|
5088
5099
|
return message;
|
|
5089
5100
|
}
|
|
5090
5101
|
};
|
|
5091
|
-
function createBaseQueryActiveLicenseCountAtResponse() {
|
|
5092
|
-
return { count: 0n };
|
|
5093
|
-
}
|
|
5094
|
-
var QueryActiveLicenseCountAtResponse = {
|
|
5095
|
-
encode(message, writer = new import_wire18.BinaryWriter()) {
|
|
5096
|
-
if (message.count !== 0n) {
|
|
5097
|
-
if (BigInt.asUintN(64, message.count) !== message.count) {
|
|
5098
|
-
throw new globalThis.Error(
|
|
5099
|
-
"value provided for field message.count of type uint64 too large"
|
|
5100
|
-
);
|
|
5101
|
-
}
|
|
5102
|
-
writer.uint32(8).uint64(message.count);
|
|
5103
|
-
}
|
|
5104
|
-
return writer;
|
|
5105
|
-
},
|
|
5106
|
-
decode(input, length) {
|
|
5107
|
-
const reader = input instanceof import_wire18.BinaryReader ? input : new import_wire18.BinaryReader(input);
|
|
5108
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5109
|
-
const message = createBaseQueryActiveLicenseCountAtResponse();
|
|
5110
|
-
while (reader.pos < end) {
|
|
5111
|
-
const tag = reader.uint32();
|
|
5112
|
-
switch (tag >>> 3) {
|
|
5113
|
-
case 1: {
|
|
5114
|
-
if (tag !== 8) {
|
|
5115
|
-
break;
|
|
5116
|
-
}
|
|
5117
|
-
message.count = reader.uint64();
|
|
5118
|
-
continue;
|
|
5119
|
-
}
|
|
5120
|
-
}
|
|
5121
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5122
|
-
break;
|
|
5123
|
-
}
|
|
5124
|
-
reader.skip(tag & 7);
|
|
5125
|
-
}
|
|
5126
|
-
return message;
|
|
5127
|
-
},
|
|
5128
|
-
fromJSON(object2) {
|
|
5129
|
-
return { count: isSet17(object2.count) ? BigInt(object2.count) : 0n };
|
|
5130
|
-
},
|
|
5131
|
-
toJSON(message) {
|
|
5132
|
-
const obj = {};
|
|
5133
|
-
if (message.count !== 0n) {
|
|
5134
|
-
obj.count = message.count.toString();
|
|
5135
|
-
}
|
|
5136
|
-
return obj;
|
|
5137
|
-
},
|
|
5138
|
-
create(base) {
|
|
5139
|
-
return QueryActiveLicenseCountAtResponse.fromPartial(base ?? {});
|
|
5140
|
-
},
|
|
5141
|
-
fromPartial(object2) {
|
|
5142
|
-
const message = createBaseQueryActiveLicenseCountAtResponse();
|
|
5143
|
-
message.count = object2.count ?? 0n;
|
|
5144
|
-
return message;
|
|
5145
|
-
}
|
|
5146
|
-
};
|
|
5147
5102
|
function toTimestamp4(date) {
|
|
5148
5103
|
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
5149
5104
|
const nanos = date.getTime() % 1e3 * 1e6;
|
|
@@ -5267,14 +5222,6 @@ function createLicenseApi(context) {
|
|
|
5267
5222
|
`/ault/license/v1/is_kyc_approver/${address}`,
|
|
5268
5223
|
QueryIsKYCApproverResponse
|
|
5269
5224
|
);
|
|
5270
|
-
},
|
|
5271
|
-
async getActiveLicenseCountAt(owner, snapshotTime) {
|
|
5272
|
-
const query = buildQuery({ snapshot_time: snapshotTime });
|
|
5273
|
-
return fetchProtoJson(
|
|
5274
|
-
context,
|
|
5275
|
-
`/ault/license/v1/active_license_count_at/${owner}${query}`,
|
|
5276
|
-
QueryActiveLicenseCountAtResponse
|
|
5277
|
-
);
|
|
5278
5225
|
}
|
|
5279
5226
|
};
|
|
5280
5227
|
}
|
|
@@ -5327,7 +5274,8 @@ function createBaseMarketResponse() {
|
|
|
5327
5274
|
tickPrecision: 0,
|
|
5328
5275
|
lastPrice: "",
|
|
5329
5276
|
lastMatchingHeight: 0n,
|
|
5330
|
-
halted: false
|
|
5277
|
+
halted: false,
|
|
5278
|
+
deployer: ""
|
|
5331
5279
|
};
|
|
5332
5280
|
}
|
|
5333
5281
|
var MarketResponse = {
|
|
@@ -5370,6 +5318,9 @@ var MarketResponse = {
|
|
|
5370
5318
|
if (message.halted !== false) {
|
|
5371
5319
|
writer.uint32(88).bool(message.halted);
|
|
5372
5320
|
}
|
|
5321
|
+
if (message.deployer !== "") {
|
|
5322
|
+
writer.uint32(98).string(message.deployer);
|
|
5323
|
+
}
|
|
5373
5324
|
return writer;
|
|
5374
5325
|
},
|
|
5375
5326
|
decode(input, length) {
|
|
@@ -5456,6 +5407,13 @@ var MarketResponse = {
|
|
|
5456
5407
|
message.halted = reader.bool();
|
|
5457
5408
|
continue;
|
|
5458
5409
|
}
|
|
5410
|
+
case 12: {
|
|
5411
|
+
if (tag !== 98) {
|
|
5412
|
+
break;
|
|
5413
|
+
}
|
|
5414
|
+
message.deployer = reader.string();
|
|
5415
|
+
continue;
|
|
5416
|
+
}
|
|
5459
5417
|
}
|
|
5460
5418
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5461
5419
|
break;
|
|
@@ -5476,7 +5434,8 @@ var MarketResponse = {
|
|
|
5476
5434
|
tickPrecision: isSet18(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet18(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0,
|
|
5477
5435
|
lastPrice: isSet18(object2.lastPrice) ? globalThis.String(object2.lastPrice) : isSet18(object2.last_price) ? globalThis.String(object2.last_price) : "",
|
|
5478
5436
|
lastMatchingHeight: isSet18(object2.lastMatchingHeight) ? BigInt(object2.lastMatchingHeight) : isSet18(object2.last_matching_height) ? BigInt(object2.last_matching_height) : 0n,
|
|
5479
|
-
halted: isSet18(object2.halted) ? globalThis.Boolean(object2.halted) : false
|
|
5437
|
+
halted: isSet18(object2.halted) ? globalThis.Boolean(object2.halted) : false,
|
|
5438
|
+
deployer: isSet18(object2.deployer) ? globalThis.String(object2.deployer) : ""
|
|
5480
5439
|
};
|
|
5481
5440
|
},
|
|
5482
5441
|
toJSON(message) {
|
|
@@ -5514,6 +5473,9 @@ var MarketResponse = {
|
|
|
5514
5473
|
if (message.halted !== false) {
|
|
5515
5474
|
obj.halted = message.halted;
|
|
5516
5475
|
}
|
|
5476
|
+
if (message.deployer !== "") {
|
|
5477
|
+
obj.deployer = message.deployer;
|
|
5478
|
+
}
|
|
5517
5479
|
return obj;
|
|
5518
5480
|
},
|
|
5519
5481
|
create(base) {
|
|
@@ -5532,6 +5494,7 @@ var MarketResponse = {
|
|
|
5532
5494
|
message.lastPrice = object2.lastPrice ?? "";
|
|
5533
5495
|
message.lastMatchingHeight = object2.lastMatchingHeight ?? 0n;
|
|
5534
5496
|
message.halted = object2.halted ?? false;
|
|
5497
|
+
message.deployer = object2.deployer ?? "";
|
|
5535
5498
|
return message;
|
|
5536
5499
|
}
|
|
5537
5500
|
};
|
|
@@ -6082,7 +6045,7 @@ var EpochInfo = {
|
|
|
6082
6045
|
}
|
|
6083
6046
|
};
|
|
6084
6047
|
function createBaseOperatorInfo() {
|
|
6085
|
-
return { operator: "", commissionRate: 0, commissionRecipient: ""
|
|
6048
|
+
return { operator: "", commissionRate: 0, commissionRecipient: "" };
|
|
6086
6049
|
}
|
|
6087
6050
|
var OperatorInfo = {
|
|
6088
6051
|
encode(message, writer = new import_wire22.BinaryWriter()) {
|
|
@@ -6095,14 +6058,6 @@ var OperatorInfo = {
|
|
|
6095
6058
|
if (message.commissionRecipient !== "") {
|
|
6096
6059
|
writer.uint32(26).string(message.commissionRecipient);
|
|
6097
6060
|
}
|
|
6098
|
-
if (message.lastUpdateEpoch !== 0n) {
|
|
6099
|
-
if (BigInt.asUintN(64, message.lastUpdateEpoch) !== message.lastUpdateEpoch) {
|
|
6100
|
-
throw new globalThis.Error(
|
|
6101
|
-
"value provided for field message.lastUpdateEpoch of type uint64 too large"
|
|
6102
|
-
);
|
|
6103
|
-
}
|
|
6104
|
-
writer.uint32(32).uint64(message.lastUpdateEpoch);
|
|
6105
|
-
}
|
|
6106
6061
|
return writer;
|
|
6107
6062
|
},
|
|
6108
6063
|
decode(input, length) {
|
|
@@ -6133,13 +6088,6 @@ var OperatorInfo = {
|
|
|
6133
6088
|
message.commissionRecipient = reader.string();
|
|
6134
6089
|
continue;
|
|
6135
6090
|
}
|
|
6136
|
-
case 4: {
|
|
6137
|
-
if (tag !== 32) {
|
|
6138
|
-
break;
|
|
6139
|
-
}
|
|
6140
|
-
message.lastUpdateEpoch = reader.uint64();
|
|
6141
|
-
continue;
|
|
6142
|
-
}
|
|
6143
6091
|
}
|
|
6144
6092
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6145
6093
|
break;
|
|
@@ -6152,8 +6100,7 @@ var OperatorInfo = {
|
|
|
6152
6100
|
return {
|
|
6153
6101
|
operator: isSet21(object2.operator) ? globalThis.String(object2.operator) : "",
|
|
6154
6102
|
commissionRate: isSet21(object2.commissionRate) ? globalThis.Number(object2.commissionRate) : isSet21(object2.commission_rate) ? globalThis.Number(object2.commission_rate) : 0,
|
|
6155
|
-
commissionRecipient: isSet21(object2.commissionRecipient) ? globalThis.String(object2.commissionRecipient) : isSet21(object2.commission_recipient) ? globalThis.String(object2.commission_recipient) : ""
|
|
6156
|
-
lastUpdateEpoch: isSet21(object2.lastUpdateEpoch) ? BigInt(object2.lastUpdateEpoch) : isSet21(object2.last_update_epoch) ? BigInt(object2.last_update_epoch) : 0n
|
|
6103
|
+
commissionRecipient: isSet21(object2.commissionRecipient) ? globalThis.String(object2.commissionRecipient) : isSet21(object2.commission_recipient) ? globalThis.String(object2.commission_recipient) : ""
|
|
6157
6104
|
};
|
|
6158
6105
|
},
|
|
6159
6106
|
toJSON(message) {
|
|
@@ -6167,9 +6114,6 @@ var OperatorInfo = {
|
|
|
6167
6114
|
if (message.commissionRecipient !== "") {
|
|
6168
6115
|
obj.commissionRecipient = message.commissionRecipient;
|
|
6169
6116
|
}
|
|
6170
|
-
if (message.lastUpdateEpoch !== 0n) {
|
|
6171
|
-
obj.lastUpdateEpoch = message.lastUpdateEpoch.toString();
|
|
6172
|
-
}
|
|
6173
6117
|
return obj;
|
|
6174
6118
|
},
|
|
6175
6119
|
create(base) {
|
|
@@ -6180,7 +6124,6 @@ var OperatorInfo = {
|
|
|
6180
6124
|
message.operator = object2.operator ?? "";
|
|
6181
6125
|
message.commissionRate = object2.commissionRate ?? 0;
|
|
6182
6126
|
message.commissionRecipient = object2.commissionRecipient ?? "";
|
|
6183
|
-
message.lastUpdateEpoch = object2.lastUpdateEpoch ?? 0n;
|
|
6184
6127
|
return message;
|
|
6185
6128
|
}
|
|
6186
6129
|
};
|
|
@@ -6822,49 +6765,16 @@ var QueryEpochResponse = {
|
|
|
6822
6765
|
}
|
|
6823
6766
|
};
|
|
6824
6767
|
function createBaseQueryLicenseMinerInfoResponse() {
|
|
6825
|
-
return {
|
|
6826
|
-
vrfPubkey: new Uint8Array(0),
|
|
6827
|
-
lastSubmitEpoch: 0n,
|
|
6828
|
-
eligibleNow: false,
|
|
6829
|
-
quarantinedLocal: false,
|
|
6830
|
-
quarantinedSource: false,
|
|
6831
|
-
allTimeCredits: 0n,
|
|
6832
|
-
allTimePayouts: ""
|
|
6833
|
-
};
|
|
6768
|
+
return { vrfPubkey: new Uint8Array(0), eligibleNow: false };
|
|
6834
6769
|
}
|
|
6835
6770
|
var QueryLicenseMinerInfoResponse = {
|
|
6836
6771
|
encode(message, writer = new import_wire23.BinaryWriter()) {
|
|
6837
6772
|
if (message.vrfPubkey.length !== 0) {
|
|
6838
6773
|
writer.uint32(10).bytes(message.vrfPubkey);
|
|
6839
6774
|
}
|
|
6840
|
-
if (message.lastSubmitEpoch !== 0n) {
|
|
6841
|
-
if (BigInt.asUintN(64, message.lastSubmitEpoch) !== message.lastSubmitEpoch) {
|
|
6842
|
-
throw new globalThis.Error(
|
|
6843
|
-
"value provided for field message.lastSubmitEpoch of type uint64 too large"
|
|
6844
|
-
);
|
|
6845
|
-
}
|
|
6846
|
-
writer.uint32(16).uint64(message.lastSubmitEpoch);
|
|
6847
|
-
}
|
|
6848
6775
|
if (message.eligibleNow !== false) {
|
|
6849
6776
|
writer.uint32(24).bool(message.eligibleNow);
|
|
6850
6777
|
}
|
|
6851
|
-
if (message.quarantinedLocal !== false) {
|
|
6852
|
-
writer.uint32(32).bool(message.quarantinedLocal);
|
|
6853
|
-
}
|
|
6854
|
-
if (message.quarantinedSource !== false) {
|
|
6855
|
-
writer.uint32(40).bool(message.quarantinedSource);
|
|
6856
|
-
}
|
|
6857
|
-
if (message.allTimeCredits !== 0n) {
|
|
6858
|
-
if (BigInt.asUintN(64, message.allTimeCredits) !== message.allTimeCredits) {
|
|
6859
|
-
throw new globalThis.Error(
|
|
6860
|
-
"value provided for field message.allTimeCredits of type uint64 too large"
|
|
6861
|
-
);
|
|
6862
|
-
}
|
|
6863
|
-
writer.uint32(48).uint64(message.allTimeCredits);
|
|
6864
|
-
}
|
|
6865
|
-
if (message.allTimePayouts !== "") {
|
|
6866
|
-
writer.uint32(58).string(message.allTimePayouts);
|
|
6867
|
-
}
|
|
6868
6778
|
return writer;
|
|
6869
6779
|
},
|
|
6870
6780
|
decode(input, length) {
|
|
@@ -6881,13 +6791,6 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6881
6791
|
message.vrfPubkey = reader.bytes();
|
|
6882
6792
|
continue;
|
|
6883
6793
|
}
|
|
6884
|
-
case 2: {
|
|
6885
|
-
if (tag !== 16) {
|
|
6886
|
-
break;
|
|
6887
|
-
}
|
|
6888
|
-
message.lastSubmitEpoch = reader.uint64();
|
|
6889
|
-
continue;
|
|
6890
|
-
}
|
|
6891
6794
|
case 3: {
|
|
6892
6795
|
if (tag !== 24) {
|
|
6893
6796
|
break;
|
|
@@ -6895,34 +6798,6 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6895
6798
|
message.eligibleNow = reader.bool();
|
|
6896
6799
|
continue;
|
|
6897
6800
|
}
|
|
6898
|
-
case 4: {
|
|
6899
|
-
if (tag !== 32) {
|
|
6900
|
-
break;
|
|
6901
|
-
}
|
|
6902
|
-
message.quarantinedLocal = reader.bool();
|
|
6903
|
-
continue;
|
|
6904
|
-
}
|
|
6905
|
-
case 5: {
|
|
6906
|
-
if (tag !== 40) {
|
|
6907
|
-
break;
|
|
6908
|
-
}
|
|
6909
|
-
message.quarantinedSource = reader.bool();
|
|
6910
|
-
continue;
|
|
6911
|
-
}
|
|
6912
|
-
case 6: {
|
|
6913
|
-
if (tag !== 48) {
|
|
6914
|
-
break;
|
|
6915
|
-
}
|
|
6916
|
-
message.allTimeCredits = reader.uint64();
|
|
6917
|
-
continue;
|
|
6918
|
-
}
|
|
6919
|
-
case 7: {
|
|
6920
|
-
if (tag !== 58) {
|
|
6921
|
-
break;
|
|
6922
|
-
}
|
|
6923
|
-
message.allTimePayouts = reader.string();
|
|
6924
|
-
continue;
|
|
6925
|
-
}
|
|
6926
6801
|
}
|
|
6927
6802
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6928
6803
|
break;
|
|
@@ -6934,12 +6809,7 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6934
6809
|
fromJSON(object2) {
|
|
6935
6810
|
return {
|
|
6936
6811
|
vrfPubkey: isSet22(object2.vrfPubkey) ? bytesFromBase647(object2.vrfPubkey) : isSet22(object2.vrf_pubkey) ? bytesFromBase647(object2.vrf_pubkey) : new Uint8Array(0),
|
|
6937
|
-
|
|
6938
|
-
eligibleNow: isSet22(object2.eligibleNow) ? globalThis.Boolean(object2.eligibleNow) : isSet22(object2.eligible_now) ? globalThis.Boolean(object2.eligible_now) : false,
|
|
6939
|
-
quarantinedLocal: isSet22(object2.quarantinedLocal) ? globalThis.Boolean(object2.quarantinedLocal) : isSet22(object2.quarantined_local) ? globalThis.Boolean(object2.quarantined_local) : false,
|
|
6940
|
-
quarantinedSource: isSet22(object2.quarantinedSource) ? globalThis.Boolean(object2.quarantinedSource) : isSet22(object2.quarantined_source) ? globalThis.Boolean(object2.quarantined_source) : false,
|
|
6941
|
-
allTimeCredits: isSet22(object2.allTimeCredits) ? BigInt(object2.allTimeCredits) : isSet22(object2.all_time_credits) ? BigInt(object2.all_time_credits) : 0n,
|
|
6942
|
-
allTimePayouts: isSet22(object2.allTimePayouts) ? globalThis.String(object2.allTimePayouts) : isSet22(object2.all_time_payouts) ? globalThis.String(object2.all_time_payouts) : ""
|
|
6812
|
+
eligibleNow: isSet22(object2.eligibleNow) ? globalThis.Boolean(object2.eligibleNow) : isSet22(object2.eligible_now) ? globalThis.Boolean(object2.eligible_now) : false
|
|
6943
6813
|
};
|
|
6944
6814
|
},
|
|
6945
6815
|
toJSON(message) {
|
|
@@ -6947,24 +6817,9 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6947
6817
|
if (message.vrfPubkey.length !== 0) {
|
|
6948
6818
|
obj.vrfPubkey = base64FromBytes7(message.vrfPubkey);
|
|
6949
6819
|
}
|
|
6950
|
-
if (message.lastSubmitEpoch !== 0n) {
|
|
6951
|
-
obj.lastSubmitEpoch = message.lastSubmitEpoch.toString();
|
|
6952
|
-
}
|
|
6953
6820
|
if (message.eligibleNow !== false) {
|
|
6954
6821
|
obj.eligibleNow = message.eligibleNow;
|
|
6955
6822
|
}
|
|
6956
|
-
if (message.quarantinedLocal !== false) {
|
|
6957
|
-
obj.quarantinedLocal = message.quarantinedLocal;
|
|
6958
|
-
}
|
|
6959
|
-
if (message.quarantinedSource !== false) {
|
|
6960
|
-
obj.quarantinedSource = message.quarantinedSource;
|
|
6961
|
-
}
|
|
6962
|
-
if (message.allTimeCredits !== 0n) {
|
|
6963
|
-
obj.allTimeCredits = message.allTimeCredits.toString();
|
|
6964
|
-
}
|
|
6965
|
-
if (message.allTimePayouts !== "") {
|
|
6966
|
-
obj.allTimePayouts = message.allTimePayouts;
|
|
6967
|
-
}
|
|
6968
6823
|
return obj;
|
|
6969
6824
|
},
|
|
6970
6825
|
create(base) {
|
|
@@ -6973,12 +6828,7 @@ var QueryLicenseMinerInfoResponse = {
|
|
|
6973
6828
|
fromPartial(object2) {
|
|
6974
6829
|
const message = createBaseQueryLicenseMinerInfoResponse();
|
|
6975
6830
|
message.vrfPubkey = object2.vrfPubkey ?? new Uint8Array(0);
|
|
6976
|
-
message.lastSubmitEpoch = object2.lastSubmitEpoch ?? 0n;
|
|
6977
6831
|
message.eligibleNow = object2.eligibleNow ?? false;
|
|
6978
|
-
message.quarantinedLocal = object2.quarantinedLocal ?? false;
|
|
6979
|
-
message.quarantinedSource = object2.quarantinedSource ?? false;
|
|
6980
|
-
message.allTimeCredits = object2.allTimeCredits ?? 0n;
|
|
6981
|
-
message.allTimePayouts = object2.allTimePayouts ?? "";
|
|
6982
6832
|
return message;
|
|
6983
6833
|
}
|
|
6984
6834
|
};
|
|
@@ -10878,6 +10728,7 @@ async function dexFetch(url, init) {
|
|
|
10878
10728
|
// src/rest/dex.generated.ts
|
|
10879
10729
|
var dex_generated_exports = {};
|
|
10880
10730
|
__export(dex_generated_exports, {
|
|
10731
|
+
GetStatsWindow: () => GetStatsWindow,
|
|
10881
10732
|
GetUDFHistoryResolution: () => GetUDFHistoryResolution,
|
|
10882
10733
|
HealthResponseDatabase: () => HealthResponseDatabase,
|
|
10883
10734
|
HealthResponseStatus: () => HealthResponseStatus,
|
|
@@ -10890,6 +10741,7 @@ __export(dex_generated_exports, {
|
|
|
10890
10741
|
OrderResponseStatus: () => OrderResponseStatus,
|
|
10891
10742
|
OrderResponseType: () => OrderResponseType,
|
|
10892
10743
|
ReadyResponseStatus: () => ReadyResponseStatus,
|
|
10744
|
+
StatsResponseWindow: () => StatsResponseWindow,
|
|
10893
10745
|
TradeResponseSide: () => TradeResponseSide,
|
|
10894
10746
|
TradeResponseTakerOrMaker: () => TradeResponseTakerOrMaker,
|
|
10895
10747
|
TradeResponseType: () => TradeResponseType,
|
|
@@ -10909,6 +10761,7 @@ __export(dex_generated_exports, {
|
|
|
10909
10761
|
getGetOrderbookUrl: () => getGetOrderbookUrl,
|
|
10910
10762
|
getGetReadyUrl: () => getGetReadyUrl,
|
|
10911
10763
|
getGetSDKManifestUrl: () => getGetSDKManifestUrl,
|
|
10764
|
+
getGetStatsUrl: () => getGetStatsUrl,
|
|
10912
10765
|
getGetStatusUrl: () => getGetStatusUrl,
|
|
10913
10766
|
getGetTickerUrl: () => getGetTickerUrl,
|
|
10914
10767
|
getGetTradingFeesUrl: () => getGetTradingFeesUrl,
|
|
@@ -10933,6 +10786,7 @@ __export(dex_generated_exports, {
|
|
|
10933
10786
|
getReady: () => getReady,
|
|
10934
10787
|
getSDKManifest: () => getSDKManifest,
|
|
10935
10788
|
getSearchUDFSymbolsUrl: () => getSearchUDFSymbolsUrl,
|
|
10789
|
+
getStats: () => getStats,
|
|
10936
10790
|
getStatus: () => getStatus,
|
|
10937
10791
|
getTicker: () => getTicker,
|
|
10938
10792
|
getTradingFees: () => getTradingFees,
|
|
@@ -10982,6 +10836,9 @@ var LiveResponseStatus = {
|
|
|
10982
10836
|
var MarketResponseType = {
|
|
10983
10837
|
spot: "spot"
|
|
10984
10838
|
};
|
|
10839
|
+
var StatsResponseWindow = {
|
|
10840
|
+
"24h": "24h"
|
|
10841
|
+
};
|
|
10985
10842
|
var TradeResponseType = {
|
|
10986
10843
|
limit: "limit",
|
|
10987
10844
|
market: "market"
|
|
@@ -11025,6 +10882,9 @@ var UDFQuoteDataS = {
|
|
|
11025
10882
|
ok: "ok",
|
|
11026
10883
|
error: "error"
|
|
11027
10884
|
};
|
|
10885
|
+
var GetStatsWindow = {
|
|
10886
|
+
"24h": "24h"
|
|
10887
|
+
};
|
|
11028
10888
|
var ListOrdersStatus = {
|
|
11029
10889
|
open: "open",
|
|
11030
10890
|
closed: "closed",
|
|
@@ -11162,6 +11022,22 @@ var getTradingFees = async (options) => {
|
|
|
11162
11022
|
method: "GET"
|
|
11163
11023
|
});
|
|
11164
11024
|
};
|
|
11025
|
+
var getGetStatsUrl = (params) => {
|
|
11026
|
+
const normalizedParams = new URLSearchParams();
|
|
11027
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
11028
|
+
if (value !== void 0) {
|
|
11029
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
11030
|
+
}
|
|
11031
|
+
});
|
|
11032
|
+
const stringifiedParams = normalizedParams.toString();
|
|
11033
|
+
return stringifiedParams.length > 0 ? `/api/v1/stats?${stringifiedParams}` : `/api/v1/stats`;
|
|
11034
|
+
};
|
|
11035
|
+
var getStats = async (params, options) => {
|
|
11036
|
+
return dexFetch(getGetStatsUrl(params), {
|
|
11037
|
+
...options,
|
|
11038
|
+
method: "GET"
|
|
11039
|
+
});
|
|
11040
|
+
};
|
|
11165
11041
|
var getListOrdersUrl = (params) => {
|
|
11166
11042
|
const normalizedParams = new URLSearchParams();
|
|
11167
11043
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -11384,6 +11260,7 @@ function createDexApi(context) {
|
|
|
11384
11260
|
getOrder: bind(context, getOrder),
|
|
11385
11261
|
listMyTrades: bind(context, listMyTrades),
|
|
11386
11262
|
getBalance: bind(context, getBalance),
|
|
11263
|
+
getStats: bind(context, getStats),
|
|
11387
11264
|
getUDFConfig: bind(context, getUDFConfig),
|
|
11388
11265
|
getUDFTime: bind(context, getUDFTime),
|
|
11389
11266
|
getUDFSymbol: bind(context, getUDFSymbol),
|
|
@@ -12073,74 +11950,6 @@ var Limiter = {
|
|
|
12073
11950
|
return message;
|
|
12074
11951
|
}
|
|
12075
11952
|
};
|
|
12076
|
-
function createBaseTransferLimitConfig() {
|
|
12077
|
-
return { hourly: void 0, daily: void 0 };
|
|
12078
|
-
}
|
|
12079
|
-
var TransferLimitConfig = {
|
|
12080
|
-
encode(message, writer = new import_wire32.BinaryWriter()) {
|
|
12081
|
-
if (message.hourly !== void 0) {
|
|
12082
|
-
Limiter.encode(message.hourly, writer.uint32(10).fork()).join();
|
|
12083
|
-
}
|
|
12084
|
-
if (message.daily !== void 0) {
|
|
12085
|
-
Limiter.encode(message.daily, writer.uint32(18).fork()).join();
|
|
12086
|
-
}
|
|
12087
|
-
return writer;
|
|
12088
|
-
},
|
|
12089
|
-
decode(input, length) {
|
|
12090
|
-
const reader = input instanceof import_wire32.BinaryReader ? input : new import_wire32.BinaryReader(input);
|
|
12091
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12092
|
-
const message = createBaseTransferLimitConfig();
|
|
12093
|
-
while (reader.pos < end) {
|
|
12094
|
-
const tag = reader.uint32();
|
|
12095
|
-
switch (tag >>> 3) {
|
|
12096
|
-
case 1: {
|
|
12097
|
-
if (tag !== 10) {
|
|
12098
|
-
break;
|
|
12099
|
-
}
|
|
12100
|
-
message.hourly = Limiter.decode(reader, reader.uint32());
|
|
12101
|
-
continue;
|
|
12102
|
-
}
|
|
12103
|
-
case 2: {
|
|
12104
|
-
if (tag !== 18) {
|
|
12105
|
-
break;
|
|
12106
|
-
}
|
|
12107
|
-
message.daily = Limiter.decode(reader, reader.uint32());
|
|
12108
|
-
continue;
|
|
12109
|
-
}
|
|
12110
|
-
}
|
|
12111
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12112
|
-
break;
|
|
12113
|
-
}
|
|
12114
|
-
reader.skip(tag & 7);
|
|
12115
|
-
}
|
|
12116
|
-
return message;
|
|
12117
|
-
},
|
|
12118
|
-
fromJSON(object2) {
|
|
12119
|
-
return {
|
|
12120
|
-
hourly: isSet30(object2.hourly) ? Limiter.fromJSON(object2.hourly) : void 0,
|
|
12121
|
-
daily: isSet30(object2.daily) ? Limiter.fromJSON(object2.daily) : void 0
|
|
12122
|
-
};
|
|
12123
|
-
},
|
|
12124
|
-
toJSON(message) {
|
|
12125
|
-
const obj = {};
|
|
12126
|
-
if (message.hourly !== void 0) {
|
|
12127
|
-
obj.hourly = Limiter.toJSON(message.hourly);
|
|
12128
|
-
}
|
|
12129
|
-
if (message.daily !== void 0) {
|
|
12130
|
-
obj.daily = Limiter.toJSON(message.daily);
|
|
12131
|
-
}
|
|
12132
|
-
return obj;
|
|
12133
|
-
},
|
|
12134
|
-
create(base) {
|
|
12135
|
-
return TransferLimitConfig.fromPartial(base ?? {});
|
|
12136
|
-
},
|
|
12137
|
-
fromPartial(object2) {
|
|
12138
|
-
const message = createBaseTransferLimitConfig();
|
|
12139
|
-
message.hourly = object2.hourly !== void 0 && object2.hourly !== null ? Limiter.fromPartial(object2.hourly) : void 0;
|
|
12140
|
-
message.daily = object2.daily !== void 0 && object2.daily !== null ? Limiter.fromPartial(object2.daily) : void 0;
|
|
12141
|
-
return message;
|
|
12142
|
-
}
|
|
12143
|
-
};
|
|
12144
11953
|
function createBaseTokenPair() {
|
|
12145
11954
|
return { erc20Address: "", denom: "", erc20Decimals: 0, enabled: false };
|
|
12146
11955
|
}
|
|
@@ -12239,6 +12048,74 @@ var TokenPair = {
|
|
|
12239
12048
|
return message;
|
|
12240
12049
|
}
|
|
12241
12050
|
};
|
|
12051
|
+
function createBaseTransferLimitConfig() {
|
|
12052
|
+
return { hourly: void 0, daily: void 0 };
|
|
12053
|
+
}
|
|
12054
|
+
var TransferLimitConfig = {
|
|
12055
|
+
encode(message, writer = new import_wire32.BinaryWriter()) {
|
|
12056
|
+
if (message.hourly !== void 0) {
|
|
12057
|
+
Limiter.encode(message.hourly, writer.uint32(10).fork()).join();
|
|
12058
|
+
}
|
|
12059
|
+
if (message.daily !== void 0) {
|
|
12060
|
+
Limiter.encode(message.daily, writer.uint32(18).fork()).join();
|
|
12061
|
+
}
|
|
12062
|
+
return writer;
|
|
12063
|
+
},
|
|
12064
|
+
decode(input, length) {
|
|
12065
|
+
const reader = input instanceof import_wire32.BinaryReader ? input : new import_wire32.BinaryReader(input);
|
|
12066
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12067
|
+
const message = createBaseTransferLimitConfig();
|
|
12068
|
+
while (reader.pos < end) {
|
|
12069
|
+
const tag = reader.uint32();
|
|
12070
|
+
switch (tag >>> 3) {
|
|
12071
|
+
case 1: {
|
|
12072
|
+
if (tag !== 10) {
|
|
12073
|
+
break;
|
|
12074
|
+
}
|
|
12075
|
+
message.hourly = Limiter.decode(reader, reader.uint32());
|
|
12076
|
+
continue;
|
|
12077
|
+
}
|
|
12078
|
+
case 2: {
|
|
12079
|
+
if (tag !== 18) {
|
|
12080
|
+
break;
|
|
12081
|
+
}
|
|
12082
|
+
message.daily = Limiter.decode(reader, reader.uint32());
|
|
12083
|
+
continue;
|
|
12084
|
+
}
|
|
12085
|
+
}
|
|
12086
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12087
|
+
break;
|
|
12088
|
+
}
|
|
12089
|
+
reader.skip(tag & 7);
|
|
12090
|
+
}
|
|
12091
|
+
return message;
|
|
12092
|
+
},
|
|
12093
|
+
fromJSON(object2) {
|
|
12094
|
+
return {
|
|
12095
|
+
hourly: isSet30(object2.hourly) ? Limiter.fromJSON(object2.hourly) : void 0,
|
|
12096
|
+
daily: isSet30(object2.daily) ? Limiter.fromJSON(object2.daily) : void 0
|
|
12097
|
+
};
|
|
12098
|
+
},
|
|
12099
|
+
toJSON(message) {
|
|
12100
|
+
const obj = {};
|
|
12101
|
+
if (message.hourly !== void 0) {
|
|
12102
|
+
obj.hourly = Limiter.toJSON(message.hourly);
|
|
12103
|
+
}
|
|
12104
|
+
if (message.daily !== void 0) {
|
|
12105
|
+
obj.daily = Limiter.toJSON(message.daily);
|
|
12106
|
+
}
|
|
12107
|
+
return obj;
|
|
12108
|
+
},
|
|
12109
|
+
create(base) {
|
|
12110
|
+
return TransferLimitConfig.fromPartial(base ?? {});
|
|
12111
|
+
},
|
|
12112
|
+
fromPartial(object2) {
|
|
12113
|
+
const message = createBaseTransferLimitConfig();
|
|
12114
|
+
message.hourly = object2.hourly !== void 0 && object2.hourly !== null ? Limiter.fromPartial(object2.hourly) : void 0;
|
|
12115
|
+
message.daily = object2.daily !== void 0 && object2.daily !== null ? Limiter.fromPartial(object2.daily) : void 0;
|
|
12116
|
+
return message;
|
|
12117
|
+
}
|
|
12118
|
+
};
|
|
12242
12119
|
function createBaseParams10() {
|
|
12243
12120
|
return { enabled: false };
|
|
12244
12121
|
}
|
|
@@ -12538,7 +12415,7 @@ var EIP712_MSG_TYPES = {
|
|
|
12538
12415
|
valueFields: [
|
|
12539
12416
|
{ name: "name", type: "string" },
|
|
12540
12417
|
{ name: "master_address", type: "string", jsName: "masterAddress" },
|
|
12541
|
-
{ name: "
|
|
12418
|
+
{ name: "expires_at", type: "string", jsName: "expiresAt" },
|
|
12542
12419
|
{ name: "agent_pubkey", type: "NESTED", jsName: "agentPubkey" }
|
|
12543
12420
|
],
|
|
12544
12421
|
nestedTypes: {
|
|
@@ -12548,8 +12425,8 @@ var EIP712_MSG_TYPES = {
|
|
|
12548
12425
|
],
|
|
12549
12426
|
value: [{ name: "key", type: "string" }]
|
|
12550
12427
|
},
|
|
12551
|
-
|
|
12552
|
-
optionalFields: ["
|
|
12428
|
+
timestampFields: ["expires_at"],
|
|
12429
|
+
optionalFields: ["expires_at"],
|
|
12553
12430
|
fieldSemantics: {
|
|
12554
12431
|
agent_pubkey: { isPubKey: true },
|
|
12555
12432
|
master_address: { isAddress: true }
|
|
@@ -12646,6 +12523,26 @@ var EIP712_MSG_TYPES = {
|
|
|
12646
12523
|
order_ids: { isBinary: true }
|
|
12647
12524
|
}
|
|
12648
12525
|
},
|
|
12526
|
+
"/ault.clob.v1.MsgModifyOrders": {
|
|
12527
|
+
aminoType: "clob/MsgModifyOrders",
|
|
12528
|
+
eip712TypeName: "TypeMsgModifyOrders",
|
|
12529
|
+
valueFields: [
|
|
12530
|
+
{ name: "sender", type: "string" },
|
|
12531
|
+
{ name: "orders", type: "NESTED[]" }
|
|
12532
|
+
],
|
|
12533
|
+
nestedTypes: {
|
|
12534
|
+
orders: [
|
|
12535
|
+
{ name: "order_id", type: "string", jsName: "orderId" },
|
|
12536
|
+
{ name: "new_quantity", type: "string", jsName: "newQuantity" },
|
|
12537
|
+
{ name: "new_price", type: "string", jsName: "newPrice" }
|
|
12538
|
+
]
|
|
12539
|
+
},
|
|
12540
|
+
fieldSemantics: {
|
|
12541
|
+
new_price: { isLegacyDec: true },
|
|
12542
|
+
new_quantity: { isLegacyDec: true },
|
|
12543
|
+
order_id: { isBinary: true }
|
|
12544
|
+
}
|
|
12545
|
+
},
|
|
12649
12546
|
"/ault.clob.v1.MsgPlaceLimitOrder": {
|
|
12650
12547
|
aminoType: "clob/MsgPlaceLimitOrder",
|
|
12651
12548
|
eip712TypeName: "TypeMsgPlaceLimitOrder",
|
|
@@ -12655,12 +12552,12 @@ var EIP712_MSG_TYPES = {
|
|
|
12655
12552
|
{ name: "price", type: "string" },
|
|
12656
12553
|
{ name: "post_only", type: "bool", jsName: "postOnly" },
|
|
12657
12554
|
{ name: "market_id", type: "string", jsName: "marketId" },
|
|
12658
|
-
{ name: "lifespan", type: "string" },
|
|
12659
12555
|
{ name: "is_buy", type: "bool", jsName: "isBuy" },
|
|
12556
|
+
{ name: "deadline", type: "string" },
|
|
12660
12557
|
{ name: "builder_fee_rate", type: "string", jsName: "builderFeeRate" },
|
|
12661
12558
|
{ name: "builder_address", type: "string", jsName: "builderAddress" }
|
|
12662
12559
|
],
|
|
12663
|
-
|
|
12560
|
+
timestampFields: ["deadline"],
|
|
12664
12561
|
optionalFields: ["builder_address", "builder_fee_rate"],
|
|
12665
12562
|
fieldSemantics: {
|
|
12666
12563
|
builder_address: { isAddress: true },
|
|
@@ -12703,13 +12600,13 @@ var EIP712_MSG_TYPES = {
|
|
|
12703
12600
|
{ name: "post_only", type: "bool", jsName: "postOnly" },
|
|
12704
12601
|
{ name: "market_id", type: "string", jsName: "marketId" },
|
|
12705
12602
|
{ name: "low_price", type: "string", jsName: "lowPrice" },
|
|
12706
|
-
{ name: "lifespan", type: "string" },
|
|
12707
12603
|
{ name: "is_buy", type: "bool", jsName: "isBuy" },
|
|
12708
12604
|
{ name: "high_price", type: "string", jsName: "highPrice" },
|
|
12605
|
+
{ name: "deadline", type: "string" },
|
|
12709
12606
|
{ name: "builder_fee_rate", type: "string", jsName: "builderFeeRate" },
|
|
12710
12607
|
{ name: "builder_address", type: "string", jsName: "builderAddress" }
|
|
12711
12608
|
],
|
|
12712
|
-
|
|
12609
|
+
timestampFields: ["deadline"],
|
|
12713
12610
|
optionalFields: ["builder_address", "builder_fee_rate"],
|
|
12714
12611
|
fieldSemantics: {
|
|
12715
12612
|
builder_address: { isAddress: true },
|
|
@@ -12954,9 +12851,11 @@ var EIP712_MSG_TYPES = {
|
|
|
12954
12851
|
eip712TypeName: "TypeMsgCreateMarket",
|
|
12955
12852
|
valueFields: [
|
|
12956
12853
|
{ name: "tick_precision", type: "string", jsName: "tickPrecision", protoHint: "uint32" },
|
|
12854
|
+
{ name: "taker_fee_rate", type: "string", jsName: "takerFeeRate" },
|
|
12957
12855
|
{ name: "sender", type: "string" },
|
|
12958
12856
|
{ name: "quote_denom", type: "string", jsName: "quoteDenom" },
|
|
12959
12857
|
{ name: "market_type", type: "int64", jsName: "marketType" },
|
|
12858
|
+
{ name: "maker_fee_rate", type: "string", jsName: "makerFeeRate" },
|
|
12960
12859
|
{ name: "base_denom", type: "string", jsName: "baseDenom" }
|
|
12961
12860
|
],
|
|
12962
12861
|
enumFieldPaths: {
|
|
@@ -12964,6 +12863,11 @@ var EIP712_MSG_TYPES = {
|
|
|
12964
12863
|
"0": "MARKET_TYPE_UNSPECIFIED",
|
|
12965
12864
|
"1": "MARKET_TYPE_SPOT"
|
|
12966
12865
|
}
|
|
12866
|
+
},
|
|
12867
|
+
optionalFields: ["maker_fee_rate", "taker_fee_rate"],
|
|
12868
|
+
fieldSemantics: {
|
|
12869
|
+
maker_fee_rate: { isLegacyDec: true },
|
|
12870
|
+
taker_fee_rate: { isLegacyDec: true }
|
|
12967
12871
|
}
|
|
12968
12872
|
},
|
|
12969
12873
|
"/ault.market.v1.MsgHaltAllMarkets": {
|
|
@@ -13778,6 +13682,7 @@ var msg = {
|
|
|
13778
13682
|
},
|
|
13779
13683
|
clob: {
|
|
13780
13684
|
cancelOrders: (value) => buildMsg("/ault.clob.v1.MsgCancelOrders", value),
|
|
13685
|
+
modifyOrders: (value) => buildMsg("/ault.clob.v1.MsgModifyOrders", value),
|
|
13781
13686
|
placeLimitOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceLimitOrder", value),
|
|
13782
13687
|
placeMarketOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceMarketOrder", value),
|
|
13783
13688
|
placeScaleOrder: (value) => buildMsg("/ault.clob.v1.MsgPlaceScaleOrder", value),
|
|
@@ -14039,13 +13944,58 @@ function durationToNanosecondsString(value, fieldName) {
|
|
|
14039
13944
|
`Duration field "${fieldName}.nanos" must be between -999999999 and 999999999.`
|
|
14040
13945
|
);
|
|
14041
13946
|
}
|
|
14042
|
-
if (seconds > 0n && nanos < 0n) {
|
|
14043
|
-
throw new Error(`Duration field "${fieldName}.nanos" must be >= 0 when seconds is positive.`);
|
|
13947
|
+
if (seconds > 0n && nanos < 0n) {
|
|
13948
|
+
throw new Error(`Duration field "${fieldName}.nanos" must be >= 0 when seconds is positive.`);
|
|
13949
|
+
}
|
|
13950
|
+
if (seconds < 0n && nanos > 0n) {
|
|
13951
|
+
throw new Error(`Duration field "${fieldName}.nanos" must be <= 0 when seconds is negative.`);
|
|
13952
|
+
}
|
|
13953
|
+
return (seconds * 1000000000n + nanos).toString();
|
|
13954
|
+
}
|
|
13955
|
+
var MAX_RFC3339_SECONDS = 253402300799n;
|
|
13956
|
+
function timestampToRfc3339String(value, fieldName) {
|
|
13957
|
+
let seconds;
|
|
13958
|
+
let nanos;
|
|
13959
|
+
if (value instanceof Date) {
|
|
13960
|
+
const ms = value.getTime();
|
|
13961
|
+
if (Number.isNaN(ms)) {
|
|
13962
|
+
throw new Error(`Timestamp field "${fieldName}" must be a valid Date.`);
|
|
13963
|
+
}
|
|
13964
|
+
const secondsNum = Math.floor(ms / 1e3);
|
|
13965
|
+
seconds = BigInt(secondsNum);
|
|
13966
|
+
nanos = BigInt(ms - secondsNum * 1e3) * 1000000n;
|
|
13967
|
+
} else if (typeof value === "string") {
|
|
13968
|
+
const ms = Date.parse(value);
|
|
13969
|
+
if (Number.isNaN(ms)) {
|
|
13970
|
+
throw new Error(`Timestamp field "${fieldName}" must be a valid RFC 3339 date string.`);
|
|
13971
|
+
}
|
|
13972
|
+
return timestampToRfc3339String(new Date(ms), fieldName);
|
|
13973
|
+
} else if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
13974
|
+
const record2 = value;
|
|
13975
|
+
if (record2.seconds === void 0 && record2.nanos === void 0) {
|
|
13976
|
+
throw new Error(`Timestamp field "${fieldName}" must include seconds or nanos.`);
|
|
13977
|
+
}
|
|
13978
|
+
seconds = toBigIntLike(record2.seconds ?? 0n, `${fieldName}.seconds`);
|
|
13979
|
+
nanos = toBigIntLike(record2.nanos ?? 0, `${fieldName}.nanos`);
|
|
13980
|
+
} else {
|
|
13981
|
+
throw new Error(
|
|
13982
|
+
`Timestamp field "${fieldName}" must be a Date, RFC 3339 string, or protobuf Timestamp object.`
|
|
13983
|
+
);
|
|
13984
|
+
}
|
|
13985
|
+
if (nanos < 0n || nanos > 999999999n) {
|
|
13986
|
+
throw new Error(`Timestamp field "${fieldName}.nanos" must be between 0 and 999999999.`);
|
|
14044
13987
|
}
|
|
14045
|
-
if (seconds < 0n
|
|
14046
|
-
throw new Error(
|
|
13988
|
+
if (seconds < 0n || seconds > MAX_RFC3339_SECONDS) {
|
|
13989
|
+
throw new Error(
|
|
13990
|
+
`Timestamp field "${fieldName}.seconds" must be between 1970-01-01 and 9999-12-31.`
|
|
13991
|
+
);
|
|
14047
13992
|
}
|
|
14048
|
-
|
|
13993
|
+
const datePart = new Date(Number(seconds) * 1e3).toISOString().slice(0, 19);
|
|
13994
|
+
if (nanos === 0n) {
|
|
13995
|
+
return `${datePart}Z`;
|
|
13996
|
+
}
|
|
13997
|
+
const fraction = nanos.toString().padStart(9, "0").replace(/0+$/, "");
|
|
13998
|
+
return `${datePart}.${fraction}Z`;
|
|
14049
13999
|
}
|
|
14050
14000
|
function normalizeEnumValue(value, fieldPath, enumFieldPaths) {
|
|
14051
14001
|
const values = enumFieldPaths?.[fieldPath];
|
|
@@ -14072,10 +14022,11 @@ function normalizeEnumValue(value, fieldPath, enumFieldPaths) {
|
|
|
14072
14022
|
}
|
|
14073
14023
|
return value;
|
|
14074
14024
|
}
|
|
14075
|
-
function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPaths, optionalFields, pathPrefix = "", fieldSemantics) {
|
|
14025
|
+
function mapValueToAmino(value, fields, nestedTypes, durationFields, timestampFields, enumFieldPaths, optionalFields, pathPrefix = "", fieldSemantics) {
|
|
14076
14026
|
const record2 = value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
14077
14027
|
const normalized = {};
|
|
14078
14028
|
const durationSet = durationFields ? new Set(durationFields) : void 0;
|
|
14029
|
+
const timestampSet = timestampFields ? new Set(timestampFields) : void 0;
|
|
14079
14030
|
const optionalSet = optionalFields ? new Set(optionalFields) : void 0;
|
|
14080
14031
|
for (const field of fields) {
|
|
14081
14032
|
const jsKey = fieldJsName(field);
|
|
@@ -14108,6 +14059,7 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
14108
14059
|
nestedFields,
|
|
14109
14060
|
nestedTypes,
|
|
14110
14061
|
durationFields,
|
|
14062
|
+
timestampFields,
|
|
14111
14063
|
enumFieldPaths,
|
|
14112
14064
|
optionalFields,
|
|
14113
14065
|
fieldPath,
|
|
@@ -14123,6 +14075,7 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
14123
14075
|
nestedFields,
|
|
14124
14076
|
nestedTypes,
|
|
14125
14077
|
durationFields,
|
|
14078
|
+
timestampFields,
|
|
14126
14079
|
enumFieldPaths,
|
|
14127
14080
|
optionalFields,
|
|
14128
14081
|
fieldPath,
|
|
@@ -14141,6 +14094,16 @@ function mapValueToAmino(value, fields, nestedTypes, durationFields, enumFieldPa
|
|
|
14141
14094
|
normalized[field.name] = durationToNanosecondsString(raw, field.name);
|
|
14142
14095
|
continue;
|
|
14143
14096
|
}
|
|
14097
|
+
if (timestampSet?.has(field.name)) {
|
|
14098
|
+
if (raw === void 0 || raw === null) {
|
|
14099
|
+
if (optionalSet?.has(field.name)) {
|
|
14100
|
+
continue;
|
|
14101
|
+
}
|
|
14102
|
+
throw new Error(`Timestamp field "${field.name}" is required.`);
|
|
14103
|
+
}
|
|
14104
|
+
normalized[field.name] = timestampToRfc3339String(raw, field.name);
|
|
14105
|
+
continue;
|
|
14106
|
+
}
|
|
14144
14107
|
if (raw === void 0) {
|
|
14145
14108
|
continue;
|
|
14146
14109
|
}
|
|
@@ -14285,6 +14248,7 @@ function buildEip712AminoMsg(msg2) {
|
|
|
14285
14248
|
msgConfig.valueFields,
|
|
14286
14249
|
msgConfig.nestedTypes,
|
|
14287
14250
|
msgConfig.durationFields,
|
|
14251
|
+
msgConfig.timestampFields,
|
|
14288
14252
|
msgConfig.enumFieldPaths,
|
|
14289
14253
|
msgConfig.optionalFields,
|
|
14290
14254
|
"",
|
|
@@ -14969,7 +14933,7 @@ function isSet32(value) {
|
|
|
14969
14933
|
// src/proto/gen/ault/agent/v1/tx.ts
|
|
14970
14934
|
var import_wire35 = require("@bufbuild/protobuf/wire");
|
|
14971
14935
|
function createBaseMsgApproveAgent() {
|
|
14972
|
-
return { masterAddress: "", agentPubkey: void 0, name: "",
|
|
14936
|
+
return { masterAddress: "", agentPubkey: void 0, name: "", expiresAt: void 0 };
|
|
14973
14937
|
}
|
|
14974
14938
|
var MsgApproveAgent = {
|
|
14975
14939
|
encode(message, writer = new import_wire35.BinaryWriter()) {
|
|
@@ -14982,8 +14946,8 @@ var MsgApproveAgent = {
|
|
|
14982
14946
|
if (message.name !== "") {
|
|
14983
14947
|
writer.uint32(26).string(message.name);
|
|
14984
14948
|
}
|
|
14985
|
-
if (message.
|
|
14986
|
-
|
|
14949
|
+
if (message.expiresAt !== void 0) {
|
|
14950
|
+
Timestamp.encode(toTimestamp6(message.expiresAt), writer.uint32(34).fork()).join();
|
|
14987
14951
|
}
|
|
14988
14952
|
return writer;
|
|
14989
14953
|
},
|
|
@@ -15019,7 +14983,7 @@ var MsgApproveAgent = {
|
|
|
15019
14983
|
if (tag !== 34) {
|
|
15020
14984
|
break;
|
|
15021
14985
|
}
|
|
15022
|
-
message.
|
|
14986
|
+
message.expiresAt = fromTimestamp6(Timestamp.decode(reader, reader.uint32()));
|
|
15023
14987
|
continue;
|
|
15024
14988
|
}
|
|
15025
14989
|
}
|
|
@@ -15035,7 +14999,7 @@ var MsgApproveAgent = {
|
|
|
15035
14999
|
masterAddress: isSet33(object2.masterAddress) ? globalThis.String(object2.masterAddress) : isSet33(object2.master_address) ? globalThis.String(object2.master_address) : "",
|
|
15036
15000
|
agentPubkey: isSet33(object2.agentPubkey) ? Any.fromJSON(object2.agentPubkey) : isSet33(object2.agent_pubkey) ? Any.fromJSON(object2.agent_pubkey) : void 0,
|
|
15037
15001
|
name: isSet33(object2.name) ? globalThis.String(object2.name) : "",
|
|
15038
|
-
|
|
15002
|
+
expiresAt: isSet33(object2.expiresAt) ? fromJsonTimestamp6(object2.expiresAt) : isSet33(object2.expires_at) ? fromJsonTimestamp6(object2.expires_at) : void 0
|
|
15039
15003
|
};
|
|
15040
15004
|
},
|
|
15041
15005
|
toJSON(message) {
|
|
@@ -15049,8 +15013,8 @@ var MsgApproveAgent = {
|
|
|
15049
15013
|
if (message.name !== "") {
|
|
15050
15014
|
obj.name = message.name;
|
|
15051
15015
|
}
|
|
15052
|
-
if (message.
|
|
15053
|
-
obj.
|
|
15016
|
+
if (message.expiresAt !== void 0) {
|
|
15017
|
+
obj.expiresAt = message.expiresAt.toISOString();
|
|
15054
15018
|
}
|
|
15055
15019
|
return obj;
|
|
15056
15020
|
},
|
|
@@ -15062,7 +15026,7 @@ var MsgApproveAgent = {
|
|
|
15062
15026
|
message.masterAddress = object2.masterAddress ?? "";
|
|
15063
15027
|
message.agentPubkey = object2.agentPubkey !== void 0 && object2.agentPubkey !== null ? Any.fromPartial(object2.agentPubkey) : void 0;
|
|
15064
15028
|
message.name = object2.name ?? "";
|
|
15065
|
-
message.
|
|
15029
|
+
message.expiresAt = object2.expiresAt ?? void 0;
|
|
15066
15030
|
return message;
|
|
15067
15031
|
}
|
|
15068
15032
|
};
|
|
@@ -15202,6 +15166,25 @@ var MsgUpdateParams2 = {
|
|
|
15202
15166
|
return message;
|
|
15203
15167
|
}
|
|
15204
15168
|
};
|
|
15169
|
+
function toTimestamp6(date) {
|
|
15170
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
15171
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
15172
|
+
return { seconds, nanos };
|
|
15173
|
+
}
|
|
15174
|
+
function fromTimestamp6(t) {
|
|
15175
|
+
let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1e3;
|
|
15176
|
+
millis += (t.nanos || 0) / 1e6;
|
|
15177
|
+
return new globalThis.Date(millis);
|
|
15178
|
+
}
|
|
15179
|
+
function fromJsonTimestamp6(o) {
|
|
15180
|
+
if (o instanceof globalThis.Date) {
|
|
15181
|
+
return o;
|
|
15182
|
+
} else if (typeof o === "string") {
|
|
15183
|
+
return new globalThis.Date(o);
|
|
15184
|
+
} else {
|
|
15185
|
+
return fromTimestamp6(Timestamp.fromJSON(o));
|
|
15186
|
+
}
|
|
15187
|
+
}
|
|
15205
15188
|
function isSet33(value) {
|
|
15206
15189
|
return value !== null && value !== void 0;
|
|
15207
15190
|
}
|
|
@@ -15387,7 +15370,7 @@ function createBaseMsgPlaceLimitOrder() {
|
|
|
15387
15370
|
isBuy: false,
|
|
15388
15371
|
price: "",
|
|
15389
15372
|
quantity: "",
|
|
15390
|
-
|
|
15373
|
+
deadline: void 0,
|
|
15391
15374
|
postOnly: false,
|
|
15392
15375
|
builderAddress: "",
|
|
15393
15376
|
builderFeeRate: ""
|
|
@@ -15410,8 +15393,8 @@ var MsgPlaceLimitOrder = {
|
|
|
15410
15393
|
if (message.quantity !== "") {
|
|
15411
15394
|
writer.uint32(42).string(message.quantity);
|
|
15412
15395
|
}
|
|
15413
|
-
if (message.
|
|
15414
|
-
|
|
15396
|
+
if (message.deadline !== void 0) {
|
|
15397
|
+
Timestamp.encode(toTimestamp7(message.deadline), writer.uint32(50).fork()).join();
|
|
15415
15398
|
}
|
|
15416
15399
|
if (message.postOnly !== false) {
|
|
15417
15400
|
writer.uint32(56).bool(message.postOnly);
|
|
@@ -15470,7 +15453,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15470
15453
|
if (tag !== 50) {
|
|
15471
15454
|
break;
|
|
15472
15455
|
}
|
|
15473
|
-
message.
|
|
15456
|
+
message.deadline = fromTimestamp7(Timestamp.decode(reader, reader.uint32()));
|
|
15474
15457
|
continue;
|
|
15475
15458
|
}
|
|
15476
15459
|
case 7: {
|
|
@@ -15509,7 +15492,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15509
15492
|
isBuy: isSet35(object2.isBuy) ? globalThis.Boolean(object2.isBuy) : isSet35(object2.is_buy) ? globalThis.Boolean(object2.is_buy) : false,
|
|
15510
15493
|
price: isSet35(object2.price) ? globalThis.String(object2.price) : "",
|
|
15511
15494
|
quantity: isSet35(object2.quantity) ? globalThis.String(object2.quantity) : "",
|
|
15512
|
-
|
|
15495
|
+
deadline: isSet35(object2.deadline) ? fromJsonTimestamp7(object2.deadline) : void 0,
|
|
15513
15496
|
postOnly: isSet35(object2.postOnly) ? globalThis.Boolean(object2.postOnly) : isSet35(object2.post_only) ? globalThis.Boolean(object2.post_only) : false,
|
|
15514
15497
|
builderAddress: isSet35(object2.builderAddress) ? globalThis.String(object2.builderAddress) : isSet35(object2.builder_address) ? globalThis.String(object2.builder_address) : "",
|
|
15515
15498
|
builderFeeRate: isSet35(object2.builderFeeRate) ? globalThis.String(object2.builderFeeRate) : isSet35(object2.builder_fee_rate) ? globalThis.String(object2.builder_fee_rate) : ""
|
|
@@ -15532,8 +15515,8 @@ var MsgPlaceLimitOrder = {
|
|
|
15532
15515
|
if (message.quantity !== "") {
|
|
15533
15516
|
obj.quantity = message.quantity;
|
|
15534
15517
|
}
|
|
15535
|
-
if (message.
|
|
15536
|
-
obj.
|
|
15518
|
+
if (message.deadline !== void 0) {
|
|
15519
|
+
obj.deadline = message.deadline.toISOString();
|
|
15537
15520
|
}
|
|
15538
15521
|
if (message.postOnly !== false) {
|
|
15539
15522
|
obj.postOnly = message.postOnly;
|
|
@@ -15556,7 +15539,7 @@ var MsgPlaceLimitOrder = {
|
|
|
15556
15539
|
message.isBuy = object2.isBuy ?? false;
|
|
15557
15540
|
message.price = object2.price ?? "";
|
|
15558
15541
|
message.quantity = object2.quantity ?? "";
|
|
15559
|
-
message.
|
|
15542
|
+
message.deadline = object2.deadline ?? void 0;
|
|
15560
15543
|
message.postOnly = object2.postOnly ?? false;
|
|
15561
15544
|
message.builderAddress = object2.builderAddress ?? "";
|
|
15562
15545
|
message.builderFeeRate = object2.builderFeeRate ?? "";
|
|
@@ -15798,6 +15781,157 @@ var MsgCancelOrders = {
|
|
|
15798
15781
|
return message;
|
|
15799
15782
|
}
|
|
15800
15783
|
};
|
|
15784
|
+
function createBaseMsgModifyOrders() {
|
|
15785
|
+
return { sender: "", orders: [] };
|
|
15786
|
+
}
|
|
15787
|
+
var MsgModifyOrders = {
|
|
15788
|
+
encode(message, writer = new import_wire37.BinaryWriter()) {
|
|
15789
|
+
if (message.sender !== "") {
|
|
15790
|
+
writer.uint32(10).string(message.sender);
|
|
15791
|
+
}
|
|
15792
|
+
for (const v of message.orders) {
|
|
15793
|
+
ModifyOrder.encode(v, writer.uint32(18).fork()).join();
|
|
15794
|
+
}
|
|
15795
|
+
return writer;
|
|
15796
|
+
},
|
|
15797
|
+
decode(input, length) {
|
|
15798
|
+
const reader = input instanceof import_wire37.BinaryReader ? input : new import_wire37.BinaryReader(input);
|
|
15799
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
15800
|
+
const message = createBaseMsgModifyOrders();
|
|
15801
|
+
while (reader.pos < end) {
|
|
15802
|
+
const tag = reader.uint32();
|
|
15803
|
+
switch (tag >>> 3) {
|
|
15804
|
+
case 1: {
|
|
15805
|
+
if (tag !== 10) {
|
|
15806
|
+
break;
|
|
15807
|
+
}
|
|
15808
|
+
message.sender = reader.string();
|
|
15809
|
+
continue;
|
|
15810
|
+
}
|
|
15811
|
+
case 2: {
|
|
15812
|
+
if (tag !== 18) {
|
|
15813
|
+
break;
|
|
15814
|
+
}
|
|
15815
|
+
message.orders.push(ModifyOrder.decode(reader, reader.uint32()));
|
|
15816
|
+
continue;
|
|
15817
|
+
}
|
|
15818
|
+
}
|
|
15819
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15820
|
+
break;
|
|
15821
|
+
}
|
|
15822
|
+
reader.skip(tag & 7);
|
|
15823
|
+
}
|
|
15824
|
+
return message;
|
|
15825
|
+
},
|
|
15826
|
+
fromJSON(object2) {
|
|
15827
|
+
return {
|
|
15828
|
+
sender: isSet35(object2.sender) ? globalThis.String(object2.sender) : "",
|
|
15829
|
+
orders: globalThis.Array.isArray(object2?.orders) ? object2.orders.map((e) => ModifyOrder.fromJSON(e)) : []
|
|
15830
|
+
};
|
|
15831
|
+
},
|
|
15832
|
+
toJSON(message) {
|
|
15833
|
+
const obj = {};
|
|
15834
|
+
if (message.sender !== "") {
|
|
15835
|
+
obj.sender = message.sender;
|
|
15836
|
+
}
|
|
15837
|
+
if (message.orders?.length) {
|
|
15838
|
+
obj.orders = message.orders.map((e) => ModifyOrder.toJSON(e));
|
|
15839
|
+
}
|
|
15840
|
+
return obj;
|
|
15841
|
+
},
|
|
15842
|
+
create(base) {
|
|
15843
|
+
return MsgModifyOrders.fromPartial(base ?? {});
|
|
15844
|
+
},
|
|
15845
|
+
fromPartial(object2) {
|
|
15846
|
+
const message = createBaseMsgModifyOrders();
|
|
15847
|
+
message.sender = object2.sender ?? "";
|
|
15848
|
+
message.orders = object2.orders?.map((e) => ModifyOrder.fromPartial(e)) || [];
|
|
15849
|
+
return message;
|
|
15850
|
+
}
|
|
15851
|
+
};
|
|
15852
|
+
function createBaseModifyOrder() {
|
|
15853
|
+
return { orderId: new Uint8Array(0), newPrice: "", newQuantity: "" };
|
|
15854
|
+
}
|
|
15855
|
+
var ModifyOrder = {
|
|
15856
|
+
encode(message, writer = new import_wire37.BinaryWriter()) {
|
|
15857
|
+
if (message.orderId.length !== 0) {
|
|
15858
|
+
writer.uint32(10).bytes(message.orderId);
|
|
15859
|
+
}
|
|
15860
|
+
if (message.newPrice !== "") {
|
|
15861
|
+
writer.uint32(18).string(message.newPrice);
|
|
15862
|
+
}
|
|
15863
|
+
if (message.newQuantity !== "") {
|
|
15864
|
+
writer.uint32(26).string(message.newQuantity);
|
|
15865
|
+
}
|
|
15866
|
+
return writer;
|
|
15867
|
+
},
|
|
15868
|
+
decode(input, length) {
|
|
15869
|
+
const reader = input instanceof import_wire37.BinaryReader ? input : new import_wire37.BinaryReader(input);
|
|
15870
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
15871
|
+
const message = createBaseModifyOrder();
|
|
15872
|
+
while (reader.pos < end) {
|
|
15873
|
+
const tag = reader.uint32();
|
|
15874
|
+
switch (tag >>> 3) {
|
|
15875
|
+
case 1: {
|
|
15876
|
+
if (tag !== 10) {
|
|
15877
|
+
break;
|
|
15878
|
+
}
|
|
15879
|
+
message.orderId = reader.bytes();
|
|
15880
|
+
continue;
|
|
15881
|
+
}
|
|
15882
|
+
case 2: {
|
|
15883
|
+
if (tag !== 18) {
|
|
15884
|
+
break;
|
|
15885
|
+
}
|
|
15886
|
+
message.newPrice = reader.string();
|
|
15887
|
+
continue;
|
|
15888
|
+
}
|
|
15889
|
+
case 3: {
|
|
15890
|
+
if (tag !== 26) {
|
|
15891
|
+
break;
|
|
15892
|
+
}
|
|
15893
|
+
message.newQuantity = reader.string();
|
|
15894
|
+
continue;
|
|
15895
|
+
}
|
|
15896
|
+
}
|
|
15897
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15898
|
+
break;
|
|
15899
|
+
}
|
|
15900
|
+
reader.skip(tag & 7);
|
|
15901
|
+
}
|
|
15902
|
+
return message;
|
|
15903
|
+
},
|
|
15904
|
+
fromJSON(object2) {
|
|
15905
|
+
return {
|
|
15906
|
+
orderId: isSet35(object2.orderId) ? bytesFromBase648(object2.orderId) : isSet35(object2.order_id) ? bytesFromBase648(object2.order_id) : new Uint8Array(0),
|
|
15907
|
+
newPrice: isSet35(object2.newPrice) ? globalThis.String(object2.newPrice) : isSet35(object2.new_price) ? globalThis.String(object2.new_price) : "",
|
|
15908
|
+
newQuantity: isSet35(object2.newQuantity) ? globalThis.String(object2.newQuantity) : isSet35(object2.new_quantity) ? globalThis.String(object2.new_quantity) : ""
|
|
15909
|
+
};
|
|
15910
|
+
},
|
|
15911
|
+
toJSON(message) {
|
|
15912
|
+
const obj = {};
|
|
15913
|
+
if (message.orderId.length !== 0) {
|
|
15914
|
+
obj.orderId = base64FromBytes8(message.orderId);
|
|
15915
|
+
}
|
|
15916
|
+
if (message.newPrice !== "") {
|
|
15917
|
+
obj.newPrice = message.newPrice;
|
|
15918
|
+
}
|
|
15919
|
+
if (message.newQuantity !== "") {
|
|
15920
|
+
obj.newQuantity = message.newQuantity;
|
|
15921
|
+
}
|
|
15922
|
+
return obj;
|
|
15923
|
+
},
|
|
15924
|
+
create(base) {
|
|
15925
|
+
return ModifyOrder.fromPartial(base ?? {});
|
|
15926
|
+
},
|
|
15927
|
+
fromPartial(object2) {
|
|
15928
|
+
const message = createBaseModifyOrder();
|
|
15929
|
+
message.orderId = object2.orderId ?? new Uint8Array(0);
|
|
15930
|
+
message.newPrice = object2.newPrice ?? "";
|
|
15931
|
+
message.newQuantity = object2.newQuantity ?? "";
|
|
15932
|
+
return message;
|
|
15933
|
+
}
|
|
15934
|
+
};
|
|
15801
15935
|
function createBaseMsgPlaceScaleOrder() {
|
|
15802
15936
|
return {
|
|
15803
15937
|
sender: "",
|
|
@@ -15807,7 +15941,7 @@ function createBaseMsgPlaceScaleOrder() {
|
|
|
15807
15941
|
highPrice: "",
|
|
15808
15942
|
totalQuantity: "",
|
|
15809
15943
|
weights: [],
|
|
15810
|
-
|
|
15944
|
+
deadline: void 0,
|
|
15811
15945
|
postOnly: false,
|
|
15812
15946
|
builderAddress: "",
|
|
15813
15947
|
builderFeeRate: ""
|
|
@@ -15838,8 +15972,8 @@ var MsgPlaceScaleOrder = {
|
|
|
15838
15972
|
writer.uint32(v);
|
|
15839
15973
|
}
|
|
15840
15974
|
writer.join();
|
|
15841
|
-
if (message.
|
|
15842
|
-
|
|
15975
|
+
if (message.deadline !== void 0) {
|
|
15976
|
+
Timestamp.encode(toTimestamp7(message.deadline), writer.uint32(66).fork()).join();
|
|
15843
15977
|
}
|
|
15844
15978
|
if (message.postOnly !== false) {
|
|
15845
15979
|
writer.uint32(72).bool(message.postOnly);
|
|
@@ -15919,7 +16053,7 @@ var MsgPlaceScaleOrder = {
|
|
|
15919
16053
|
if (tag !== 66) {
|
|
15920
16054
|
break;
|
|
15921
16055
|
}
|
|
15922
|
-
message.
|
|
16056
|
+
message.deadline = fromTimestamp7(Timestamp.decode(reader, reader.uint32()));
|
|
15923
16057
|
continue;
|
|
15924
16058
|
}
|
|
15925
16059
|
case 9: {
|
|
@@ -15960,7 +16094,7 @@ var MsgPlaceScaleOrder = {
|
|
|
15960
16094
|
highPrice: isSet35(object2.highPrice) ? globalThis.String(object2.highPrice) : isSet35(object2.high_price) ? globalThis.String(object2.high_price) : "",
|
|
15961
16095
|
totalQuantity: isSet35(object2.totalQuantity) ? globalThis.String(object2.totalQuantity) : isSet35(object2.total_quantity) ? globalThis.String(object2.total_quantity) : "",
|
|
15962
16096
|
weights: globalThis.Array.isArray(object2?.weights) ? object2.weights.map((e) => globalThis.Number(e)) : [],
|
|
15963
|
-
|
|
16097
|
+
deadline: isSet35(object2.deadline) ? fromJsonTimestamp7(object2.deadline) : void 0,
|
|
15964
16098
|
postOnly: isSet35(object2.postOnly) ? globalThis.Boolean(object2.postOnly) : isSet35(object2.post_only) ? globalThis.Boolean(object2.post_only) : false,
|
|
15965
16099
|
builderAddress: isSet35(object2.builderAddress) ? globalThis.String(object2.builderAddress) : isSet35(object2.builder_address) ? globalThis.String(object2.builder_address) : "",
|
|
15966
16100
|
builderFeeRate: isSet35(object2.builderFeeRate) ? globalThis.String(object2.builderFeeRate) : isSet35(object2.builder_fee_rate) ? globalThis.String(object2.builder_fee_rate) : ""
|
|
@@ -15989,8 +16123,8 @@ var MsgPlaceScaleOrder = {
|
|
|
15989
16123
|
if (message.weights?.length) {
|
|
15990
16124
|
obj.weights = message.weights.map((e) => Math.round(e));
|
|
15991
16125
|
}
|
|
15992
|
-
if (message.
|
|
15993
|
-
obj.
|
|
16126
|
+
if (message.deadline !== void 0) {
|
|
16127
|
+
obj.deadline = message.deadline.toISOString();
|
|
15994
16128
|
}
|
|
15995
16129
|
if (message.postOnly !== false) {
|
|
15996
16130
|
obj.postOnly = message.postOnly;
|
|
@@ -16015,7 +16149,7 @@ var MsgPlaceScaleOrder = {
|
|
|
16015
16149
|
message.highPrice = object2.highPrice ?? "";
|
|
16016
16150
|
message.totalQuantity = object2.totalQuantity ?? "";
|
|
16017
16151
|
message.weights = object2.weights?.map((e) => e) || [];
|
|
16018
|
-
message.
|
|
16152
|
+
message.deadline = object2.deadline ?? void 0;
|
|
16019
16153
|
message.postOnly = object2.postOnly ?? false;
|
|
16020
16154
|
message.builderAddress = object2.builderAddress ?? "";
|
|
16021
16155
|
message.builderFeeRate = object2.builderFeeRate ?? "";
|
|
@@ -16113,6 +16247,25 @@ function base64FromBytes8(arr) {
|
|
|
16113
16247
|
return globalThis.btoa(bin.join(""));
|
|
16114
16248
|
}
|
|
16115
16249
|
}
|
|
16250
|
+
function toTimestamp7(date) {
|
|
16251
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
16252
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
16253
|
+
return { seconds, nanos };
|
|
16254
|
+
}
|
|
16255
|
+
function fromTimestamp7(t) {
|
|
16256
|
+
let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1e3;
|
|
16257
|
+
millis += (t.nanos || 0) / 1e6;
|
|
16258
|
+
return new globalThis.Date(millis);
|
|
16259
|
+
}
|
|
16260
|
+
function fromJsonTimestamp7(o) {
|
|
16261
|
+
if (o instanceof globalThis.Date) {
|
|
16262
|
+
return o;
|
|
16263
|
+
} else if (typeof o === "string") {
|
|
16264
|
+
return new globalThis.Date(o);
|
|
16265
|
+
} else {
|
|
16266
|
+
return fromTimestamp7(Timestamp.fromJSON(o));
|
|
16267
|
+
}
|
|
16268
|
+
}
|
|
16116
16269
|
function isSet35(value) {
|
|
16117
16270
|
return value !== null && value !== void 0;
|
|
16118
16271
|
}
|
|
@@ -17189,7 +17342,15 @@ function isSet36(value) {
|
|
|
17189
17342
|
// src/proto/gen/ault/market/v1/tx.ts
|
|
17190
17343
|
var import_wire39 = require("@bufbuild/protobuf/wire");
|
|
17191
17344
|
function createBaseMsgCreateMarket() {
|
|
17192
|
-
return {
|
|
17345
|
+
return {
|
|
17346
|
+
sender: "",
|
|
17347
|
+
marketType: 0,
|
|
17348
|
+
baseDenom: "",
|
|
17349
|
+
quoteDenom: "",
|
|
17350
|
+
tickPrecision: 0,
|
|
17351
|
+
makerFeeRate: "",
|
|
17352
|
+
takerFeeRate: ""
|
|
17353
|
+
};
|
|
17193
17354
|
}
|
|
17194
17355
|
var MsgCreateMarket = {
|
|
17195
17356
|
encode(message, writer = new import_wire39.BinaryWriter()) {
|
|
@@ -17208,6 +17369,12 @@ var MsgCreateMarket = {
|
|
|
17208
17369
|
if (message.tickPrecision !== 0) {
|
|
17209
17370
|
writer.uint32(40).uint32(message.tickPrecision);
|
|
17210
17371
|
}
|
|
17372
|
+
if (message.makerFeeRate !== "") {
|
|
17373
|
+
writer.uint32(50).string(message.makerFeeRate);
|
|
17374
|
+
}
|
|
17375
|
+
if (message.takerFeeRate !== "") {
|
|
17376
|
+
writer.uint32(58).string(message.takerFeeRate);
|
|
17377
|
+
}
|
|
17211
17378
|
return writer;
|
|
17212
17379
|
},
|
|
17213
17380
|
decode(input, length) {
|
|
@@ -17252,6 +17419,20 @@ var MsgCreateMarket = {
|
|
|
17252
17419
|
message.tickPrecision = reader.uint32();
|
|
17253
17420
|
continue;
|
|
17254
17421
|
}
|
|
17422
|
+
case 6: {
|
|
17423
|
+
if (tag !== 50) {
|
|
17424
|
+
break;
|
|
17425
|
+
}
|
|
17426
|
+
message.makerFeeRate = reader.string();
|
|
17427
|
+
continue;
|
|
17428
|
+
}
|
|
17429
|
+
case 7: {
|
|
17430
|
+
if (tag !== 58) {
|
|
17431
|
+
break;
|
|
17432
|
+
}
|
|
17433
|
+
message.takerFeeRate = reader.string();
|
|
17434
|
+
continue;
|
|
17435
|
+
}
|
|
17255
17436
|
}
|
|
17256
17437
|
if ((tag & 7) === 4 || tag === 0) {
|
|
17257
17438
|
break;
|
|
@@ -17266,7 +17447,9 @@ var MsgCreateMarket = {
|
|
|
17266
17447
|
marketType: isSet37(object2.marketType) ? marketTypeFromJSON(object2.marketType) : isSet37(object2.market_type) ? marketTypeFromJSON(object2.market_type) : 0,
|
|
17267
17448
|
baseDenom: isSet37(object2.baseDenom) ? globalThis.String(object2.baseDenom) : isSet37(object2.base_denom) ? globalThis.String(object2.base_denom) : "",
|
|
17268
17449
|
quoteDenom: isSet37(object2.quoteDenom) ? globalThis.String(object2.quoteDenom) : isSet37(object2.quote_denom) ? globalThis.String(object2.quote_denom) : "",
|
|
17269
|
-
tickPrecision: isSet37(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet37(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0
|
|
17450
|
+
tickPrecision: isSet37(object2.tickPrecision) ? globalThis.Number(object2.tickPrecision) : isSet37(object2.tick_precision) ? globalThis.Number(object2.tick_precision) : 0,
|
|
17451
|
+
makerFeeRate: isSet37(object2.makerFeeRate) ? globalThis.String(object2.makerFeeRate) : isSet37(object2.maker_fee_rate) ? globalThis.String(object2.maker_fee_rate) : "",
|
|
17452
|
+
takerFeeRate: isSet37(object2.takerFeeRate) ? globalThis.String(object2.takerFeeRate) : isSet37(object2.taker_fee_rate) ? globalThis.String(object2.taker_fee_rate) : ""
|
|
17270
17453
|
};
|
|
17271
17454
|
},
|
|
17272
17455
|
toJSON(message) {
|
|
@@ -17286,6 +17469,12 @@ var MsgCreateMarket = {
|
|
|
17286
17469
|
if (message.tickPrecision !== 0) {
|
|
17287
17470
|
obj.tickPrecision = Math.round(message.tickPrecision);
|
|
17288
17471
|
}
|
|
17472
|
+
if (message.makerFeeRate !== "") {
|
|
17473
|
+
obj.makerFeeRate = message.makerFeeRate;
|
|
17474
|
+
}
|
|
17475
|
+
if (message.takerFeeRate !== "") {
|
|
17476
|
+
obj.takerFeeRate = message.takerFeeRate;
|
|
17477
|
+
}
|
|
17289
17478
|
return obj;
|
|
17290
17479
|
},
|
|
17291
17480
|
create(base) {
|
|
@@ -17298,6 +17487,8 @@ var MsgCreateMarket = {
|
|
|
17298
17487
|
message.baseDenom = object2.baseDenom ?? "";
|
|
17299
17488
|
message.quoteDenom = object2.quoteDenom ?? "";
|
|
17300
17489
|
message.tickPrecision = object2.tickPrecision ?? 0;
|
|
17490
|
+
message.makerFeeRate = object2.makerFeeRate ?? "";
|
|
17491
|
+
message.takerFeeRate = object2.takerFeeRate ?? "";
|
|
17301
17492
|
return message;
|
|
17302
17493
|
}
|
|
17303
17494
|
};
|
|
@@ -20458,12 +20649,6 @@ function requireRecordArray(value, label) {
|
|
|
20458
20649
|
return item;
|
|
20459
20650
|
});
|
|
20460
20651
|
}
|
|
20461
|
-
function optionalDuration(value, label) {
|
|
20462
|
-
if (value === void 0) {
|
|
20463
|
-
return void 0;
|
|
20464
|
-
}
|
|
20465
|
-
return requireDuration(value, label);
|
|
20466
|
-
}
|
|
20467
20652
|
function requireDuration(value, label) {
|
|
20468
20653
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20469
20654
|
throw new Error(`${label} must be a protobuf Duration object.`);
|
|
@@ -20491,6 +20676,40 @@ function requireDurationOrDefault(value, label, defaultValue = { seconds: 0n, na
|
|
|
20491
20676
|
}
|
|
20492
20677
|
return requireDuration(value, label);
|
|
20493
20678
|
}
|
|
20679
|
+
function optionalTimestamp(value, label) {
|
|
20680
|
+
if (value === void 0 || value === null) {
|
|
20681
|
+
return void 0;
|
|
20682
|
+
}
|
|
20683
|
+
return requireTimestamp(value, label);
|
|
20684
|
+
}
|
|
20685
|
+
function requireTimestamp(value, label) {
|
|
20686
|
+
if (value instanceof Date) {
|
|
20687
|
+
if (Number.isNaN(value.getTime())) {
|
|
20688
|
+
throw new Error(`${label} must be a valid Date.`);
|
|
20689
|
+
}
|
|
20690
|
+
return value;
|
|
20691
|
+
}
|
|
20692
|
+
if (typeof value === "string") {
|
|
20693
|
+
const parsed = new Date(value);
|
|
20694
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
20695
|
+
throw new Error(`${label} must be a valid RFC 3339 date string.`);
|
|
20696
|
+
}
|
|
20697
|
+
return parsed;
|
|
20698
|
+
}
|
|
20699
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
20700
|
+
const record2 = asRecord(value);
|
|
20701
|
+
if (record2.seconds === void 0 && record2.nanos === void 0) {
|
|
20702
|
+
throw new Error(`${label} must include seconds or nanos.`);
|
|
20703
|
+
}
|
|
20704
|
+
const seconds = requireBigIntLike(record2.seconds ?? 0n, `${label}.seconds`);
|
|
20705
|
+
const nanos = requireInt32Like(record2.nanos ?? 0, `${label}.nanos`);
|
|
20706
|
+
if (nanos < 0 || nanos > 999999999) {
|
|
20707
|
+
throw new Error(`${label}.nanos must be between 0 and 999999999.`);
|
|
20708
|
+
}
|
|
20709
|
+
return new Date(Number(seconds) * 1e3 + Math.floor(nanos / 1e6));
|
|
20710
|
+
}
|
|
20711
|
+
throw new Error(`${label} must be a Date, RFC 3339 string, or protobuf Timestamp object.`);
|
|
20712
|
+
}
|
|
20494
20713
|
function mapAultAccountxV1MsgOpenAccount(input, label = "value") {
|
|
20495
20714
|
const record2 = asRecord(input);
|
|
20496
20715
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20524,7 +20743,7 @@ function mapAultAgentV1MsgApproveAgent(input, label = "value") {
|
|
|
20524
20743
|
masterAddress: requireString(record2["masterAddress"], `${prefix}masterAddress`),
|
|
20525
20744
|
agentPubkey: mapGoogleProtobufAny(asRecord(record2["agentPubkey"]), `${prefix}agentPubkey`),
|
|
20526
20745
|
name: requireStringOrDefault(record2["name"], `${prefix}name`),
|
|
20527
|
-
|
|
20746
|
+
expiresAt: optionalTimestamp(record2["expiresAt"], `${prefix}expiresAt`)
|
|
20528
20747
|
};
|
|
20529
20748
|
}
|
|
20530
20749
|
function mapAultAgentV1MsgRevokeAgent(input, label = "value") {
|
|
@@ -20573,6 +20792,17 @@ function mapAultAuthorityV1MsgRevokeRole(input, label = "value") {
|
|
|
20573
20792
|
members: requireStringArray(record2["members"], `${prefix}members`)
|
|
20574
20793
|
};
|
|
20575
20794
|
}
|
|
20795
|
+
function mapAultClobV1ModifyOrder(input, label = "value") {
|
|
20796
|
+
const record2 = asRecord(input);
|
|
20797
|
+
const prefix = label ? `${label}.` : "";
|
|
20798
|
+
return {
|
|
20799
|
+
orderId: requireBytes(record2["orderId"], `${prefix}orderId`),
|
|
20800
|
+
newPrice: cosmosDecToProtoInt(requireStringOrDefault(record2["newPrice"], `${prefix}newPrice`)),
|
|
20801
|
+
newQuantity: cosmosDecToProtoInt(
|
|
20802
|
+
requireStringOrDefault(record2["newQuantity"], `${prefix}newQuantity`)
|
|
20803
|
+
)
|
|
20804
|
+
};
|
|
20805
|
+
}
|
|
20576
20806
|
function mapAultClobV1MsgCancelOrders(input, label = "value") {
|
|
20577
20807
|
const record2 = asRecord(input);
|
|
20578
20808
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20581,6 +20811,16 @@ function mapAultClobV1MsgCancelOrders(input, label = "value") {
|
|
|
20581
20811
|
orderIds: requireBytesArray(record2["orderIds"], `${prefix}orderIds`)
|
|
20582
20812
|
};
|
|
20583
20813
|
}
|
|
20814
|
+
function mapAultClobV1MsgModifyOrders(input, label = "value") {
|
|
20815
|
+
const record2 = asRecord(input);
|
|
20816
|
+
const prefix = label ? `${label}.` : "";
|
|
20817
|
+
return {
|
|
20818
|
+
sender: requireString(record2["sender"], `${prefix}sender`),
|
|
20819
|
+
orders: requireRecordArray(record2["orders"], `${prefix}orders`).map(
|
|
20820
|
+
(item, index) => mapAultClobV1ModifyOrder(item, `${prefix}orders[${index}]`)
|
|
20821
|
+
)
|
|
20822
|
+
};
|
|
20823
|
+
}
|
|
20584
20824
|
function mapAultClobV1MsgPlaceLimitOrder(input, label = "value") {
|
|
20585
20825
|
const record2 = asRecord(input);
|
|
20586
20826
|
const prefix = label ? `${label}.` : "";
|
|
@@ -20590,7 +20830,7 @@ function mapAultClobV1MsgPlaceLimitOrder(input, label = "value") {
|
|
|
20590
20830
|
isBuy: requireBool(record2["isBuy"], `${prefix}isBuy`),
|
|
20591
20831
|
price: cosmosDecToProtoInt(requireString(record2["price"], `${prefix}price`)),
|
|
20592
20832
|
quantity: cosmosDecToProtoInt(requireString(record2["quantity"], `${prefix}quantity`)),
|
|
20593
|
-
|
|
20833
|
+
deadline: requireTimestamp(record2["deadline"], `${prefix}deadline`),
|
|
20594
20834
|
postOnly: requireBoolOrDefault(record2["postOnly"], `${prefix}postOnly`),
|
|
20595
20835
|
builderAddress: requireStringOrDefault(record2["builderAddress"], `${prefix}builderAddress`),
|
|
20596
20836
|
builderFeeRate: cosmosDecToProtoInt(
|
|
@@ -20631,7 +20871,7 @@ function mapAultClobV1MsgPlaceScaleOrder(input, label = "value") {
|
|
|
20631
20871
|
requireString(record2["totalQuantity"], `${prefix}totalQuantity`)
|
|
20632
20872
|
),
|
|
20633
20873
|
weights: requireUint32Array(record2["weights"], `${prefix}weights`),
|
|
20634
|
-
|
|
20874
|
+
deadline: requireTimestamp(record2["deadline"], `${prefix}deadline`),
|
|
20635
20875
|
postOnly: requireBoolOrDefault(record2["postOnly"], `${prefix}postOnly`),
|
|
20636
20876
|
builderAddress: requireStringOrDefault(record2["builderAddress"], `${prefix}builderAddress`),
|
|
20637
20877
|
builderFeeRate: cosmosDecToProtoInt(
|
|
@@ -20862,7 +21102,13 @@ function mapAultMarketV1MsgCreateMarket(input, label = "value") {
|
|
|
20862
21102
|
),
|
|
20863
21103
|
baseDenom: requireString(record2["baseDenom"], `${prefix}baseDenom`),
|
|
20864
21104
|
quoteDenom: requireString(record2["quoteDenom"], `${prefix}quoteDenom`),
|
|
20865
|
-
tickPrecision: requireUint32Like(record2["tickPrecision"], `${prefix}tickPrecision`)
|
|
21105
|
+
tickPrecision: requireUint32Like(record2["tickPrecision"], `${prefix}tickPrecision`),
|
|
21106
|
+
makerFeeRate: cosmosDecToProtoInt(
|
|
21107
|
+
requireStringOrDefault(record2["makerFeeRate"], `${prefix}makerFeeRate`)
|
|
21108
|
+
),
|
|
21109
|
+
takerFeeRate: cosmosDecToProtoInt(
|
|
21110
|
+
requireStringOrDefault(record2["takerFeeRate"], `${prefix}takerFeeRate`)
|
|
21111
|
+
)
|
|
20866
21112
|
};
|
|
20867
21113
|
}
|
|
20868
21114
|
function mapAultMarketV1MsgHaltAllMarkets(input, label = "value") {
|
|
@@ -21396,6 +21642,9 @@ var MSG_ENCODERS = {
|
|
|
21396
21642
|
"/ault.clob.v1.MsgCancelOrders": (value) => MsgCancelOrders.encode(
|
|
21397
21643
|
MsgCancelOrders.fromPartial(mapAultClobV1MsgCancelOrders(value))
|
|
21398
21644
|
).finish(),
|
|
21645
|
+
"/ault.clob.v1.MsgModifyOrders": (value) => MsgModifyOrders.encode(
|
|
21646
|
+
MsgModifyOrders.fromPartial(mapAultClobV1MsgModifyOrders(value))
|
|
21647
|
+
).finish(),
|
|
21399
21648
|
"/ault.clob.v1.MsgPlaceLimitOrder": (value) => MsgPlaceLimitOrder.encode(
|
|
21400
21649
|
MsgPlaceLimitOrder.fromPartial(mapAultClobV1MsgPlaceLimitOrder(value))
|
|
21401
21650
|
).finish(),
|
|
@@ -22124,7 +22373,7 @@ function createAgentTxApi({ signerAddress, exec, getGas }) {
|
|
|
22124
22373
|
async approveAgent({
|
|
22125
22374
|
agentPubkey,
|
|
22126
22375
|
name = "",
|
|
22127
|
-
|
|
22376
|
+
expiresAt,
|
|
22128
22377
|
gasLimit,
|
|
22129
22378
|
feeAmount,
|
|
22130
22379
|
memo,
|
|
@@ -22137,7 +22386,7 @@ function createAgentTxApi({ signerAddress, exec, getGas }) {
|
|
|
22137
22386
|
masterAddress: signerAddress,
|
|
22138
22387
|
agentPubkey,
|
|
22139
22388
|
name,
|
|
22140
|
-
|
|
22389
|
+
expiresAt
|
|
22141
22390
|
})
|
|
22142
22391
|
],
|
|
22143
22392
|
{
|
|
@@ -22217,7 +22466,7 @@ function buildLimitOrderMsg(sender, params) {
|
|
|
22217
22466
|
isBuy: params.isBuy,
|
|
22218
22467
|
price: params.price,
|
|
22219
22468
|
quantity: params.quantity,
|
|
22220
|
-
|
|
22469
|
+
deadline: params.deadline,
|
|
22221
22470
|
...params.postOnly !== void 0 && { postOnly: params.postOnly },
|
|
22222
22471
|
...params.builderAddress !== void 0 && {
|
|
22223
22472
|
builderAddress: normalizeAddress(params.builderAddress)
|
|
@@ -22251,7 +22500,7 @@ function buildScaleOrderMsg(sender, params) {
|
|
|
22251
22500
|
highPrice: params.highPrice,
|
|
22252
22501
|
totalQuantity: params.totalQuantity,
|
|
22253
22502
|
weights: params.weights,
|
|
22254
|
-
|
|
22503
|
+
deadline: params.deadline,
|
|
22255
22504
|
...params.postOnly !== void 0 && { postOnly: params.postOnly },
|
|
22256
22505
|
...params.builderAddress !== void 0 && {
|
|
22257
22506
|
builderAddress: normalizeAddress(params.builderAddress)
|
|
@@ -24253,6 +24502,57 @@ var GetTradingFeesResponse = zod.record(
|
|
|
24253
24502
|
info: zod.looseObject({})
|
|
24254
24503
|
})
|
|
24255
24504
|
);
|
|
24505
|
+
var GetStatsQueryParams = zod.object({
|
|
24506
|
+
window: zod.enum(["24h"]).optional().describe("Rolling window. Only `24h` is supported; defaults to `24h`.")
|
|
24507
|
+
});
|
|
24508
|
+
var getStatsResponseTotalsQuoteVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24509
|
+
var getStatsResponseTotalsEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24510
|
+
var getStatsResponseTotalsAverageSlippageBpsRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24511
|
+
var getStatsResponseTotalsDepositUsdcVolume24hRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24512
|
+
var getStatsResponseTotalsBuilderCodesFee24hRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24513
|
+
var getStatsResponseMarketsItemQuoteVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24514
|
+
var getStatsResponseMarketsItemBaseVolumeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24515
|
+
var getStatsResponseMarketsItemEstimatedFeeRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24516
|
+
var getStatsResponseMarketsItemTakerFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
24517
|
+
var GetStatsResponse = zod.object({
|
|
24518
|
+
window: zod.enum(["24h"]),
|
|
24519
|
+
totals: zod.object({
|
|
24520
|
+
quoteVolume: zod.string().regex(getStatsResponseTotalsQuoteVolumeRegExp).nullable().describe(
|
|
24521
|
+
"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"
|
|
24522
|
+
),
|
|
24523
|
+
quoteAsset: zod.string().nullable().describe(
|
|
24524
|
+
'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'
|
|
24525
|
+
),
|
|
24526
|
+
estimatedFee: zod.string().regex(getStatsResponseTotalsEstimatedFeeRegExp).nullable().describe(
|
|
24527
|
+
"Estimated total fees (`\u03A3 quoteVolume \xD7 takerFeeRate`) as a decimal\nstring; an estimate, not booked revenue. Null on multi-quote.\n"
|
|
24528
|
+
),
|
|
24529
|
+
tradeCount: zod.number().describe("Number of fills (maker legs) in the window."),
|
|
24530
|
+
traderCount: zod.number().describe("Distinct trading addresses in the window."),
|
|
24531
|
+
activeMarkets: zod.number().describe("Number of markets with at least one fill in the window."),
|
|
24532
|
+
dailyActiveUsers: zod.number().nullable().describe(
|
|
24533
|
+
"Distinct trading addresses in the window. Currently an alias of\n`traderCount`; separate so a precise DAU source can diverge later.\n"
|
|
24534
|
+
),
|
|
24535
|
+
averageSlippageBps: zod.string().regex(getStatsResponseTotalsAverageSlippageBpsRegExp).nullable().describe(
|
|
24536
|
+
"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"
|
|
24537
|
+
),
|
|
24538
|
+
depositUsdcVolume24h: zod.string().regex(getStatsResponseTotalsDepositUsdcVolume24hRegExp).nullable().describe("Reserved. Currently always null."),
|
|
24539
|
+
builderCodesFee24h: zod.string().regex(getStatsResponseTotalsBuilderCodesFee24hRegExp).nullable().describe("Reserved. Currently always null.")
|
|
24540
|
+
}).describe("Protocol-wide aggregates for the window."),
|
|
24541
|
+
markets: zod.array(
|
|
24542
|
+
zod.object({
|
|
24543
|
+
symbol: zod.string(),
|
|
24544
|
+
base: zod.string(),
|
|
24545
|
+
quote: zod.string(),
|
|
24546
|
+
quoteVolume: zod.string().regex(getStatsResponseMarketsItemQuoteVolumeRegExp),
|
|
24547
|
+
baseVolume: zod.string().regex(getStatsResponseMarketsItemBaseVolumeRegExp),
|
|
24548
|
+
estimatedFee: zod.string().regex(getStatsResponseMarketsItemEstimatedFeeRegExp),
|
|
24549
|
+
tradeCount: zod.number(),
|
|
24550
|
+
takerFeeRate: zod.string().regex(getStatsResponseMarketsItemTakerFeeRateRegExp)
|
|
24551
|
+
}).describe("Per-market aggregates for the window.")
|
|
24552
|
+
)
|
|
24553
|
+
}).describe(
|
|
24554
|
+
"Protocol stats overview for a rolling window. Monetary fields are\ncanonical decimal strings; counts are integers.\n"
|
|
24555
|
+
);
|
|
24256
24556
|
var listOrdersQueryAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
|
|
24257
24557
|
var listOrdersQueryAddressTwoRegExp = new RegExp("^0x[a-f0-9]{40}$");
|
|
24258
24558
|
var listOrdersQueryMarketIdRegExp = new RegExp("^[0-9a-fA-F]+$");
|
|
@@ -24309,7 +24609,7 @@ var ListOrdersResponseItem = zod.object({
|
|
|
24309
24609
|
currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
|
|
24310
24610
|
rate: zod.string().regex(listOrdersResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
|
|
24311
24611
|
}).optional().describe(
|
|
24312
|
-
"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;
|
|
24612
|
+
"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"
|
|
24313
24613
|
),
|
|
24314
24614
|
reduceOnly: zod.boolean().optional(),
|
|
24315
24615
|
postOnly: zod.boolean().optional(),
|
|
@@ -24373,7 +24673,7 @@ var GetOrderResponse = zod.object({
|
|
|
24373
24673
|
currency: zod.string().optional().describe('Quote currency ticker (e.g., "USDT")'),
|
|
24374
24674
|
rate: zod.string().regex(getOrderResponseFeeRateRegExp).optional().describe("Fee rate from the market, decimal string.")
|
|
24375
24675
|
}).optional().describe(
|
|
24376
|
-
"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;
|
|
24676
|
+
"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"
|
|
24377
24677
|
),
|
|
24378
24678
|
reduceOnly: zod.boolean().optional(),
|
|
24379
24679
|
postOnly: zod.boolean().optional(),
|
|
@@ -24629,7 +24929,7 @@ function createDexWs(url, options) {
|
|
|
24629
24929
|
}
|
|
24630
24930
|
|
|
24631
24931
|
// src/index.ts
|
|
24632
|
-
var SDK_VERSION = "0.0.2-alpha.
|
|
24932
|
+
var SDK_VERSION = "0.0.2-alpha.23";
|
|
24633
24933
|
// Annotate the CommonJS export names for ESM import in node:
|
|
24634
24934
|
0 && (module.exports = {
|
|
24635
24935
|
AGENT_DEFAULTS,
|
|
@@ -24661,6 +24961,8 @@ var SDK_VERSION = "0.0.2-alpha.21";
|
|
|
24661
24961
|
GetOrderbookResponse,
|
|
24662
24962
|
GetReadyResponse,
|
|
24663
24963
|
GetSDKManifestResponse,
|
|
24964
|
+
GetStatsQueryParams,
|
|
24965
|
+
GetStatsResponse,
|
|
24664
24966
|
GetStatusResponse,
|
|
24665
24967
|
GetTickerParams,
|
|
24666
24968
|
GetTickerResponse,
|
|
@@ -24806,6 +25108,15 @@ var SDK_VERSION = "0.0.2-alpha.21";
|
|
|
24806
25108
|
getOrderbookQueryLimitDefault,
|
|
24807
25109
|
getOrderbookQueryLimitMax,
|
|
24808
25110
|
getOrderbookResponseMarketIdRegExp,
|
|
25111
|
+
getStatsResponseMarketsItemBaseVolumeRegExp,
|
|
25112
|
+
getStatsResponseMarketsItemEstimatedFeeRegExp,
|
|
25113
|
+
getStatsResponseMarketsItemQuoteVolumeRegExp,
|
|
25114
|
+
getStatsResponseMarketsItemTakerFeeRateRegExp,
|
|
25115
|
+
getStatsResponseTotalsAverageSlippageBpsRegExp,
|
|
25116
|
+
getStatsResponseTotalsBuilderCodesFee24hRegExp,
|
|
25117
|
+
getStatsResponseTotalsDepositUsdcVolume24hRegExp,
|
|
25118
|
+
getStatsResponseTotalsEstimatedFeeRegExp,
|
|
25119
|
+
getStatsResponseTotalsQuoteVolumeRegExp,
|
|
24809
25120
|
getTradingFeesResponseMakerRegExp,
|
|
24810
25121
|
getTradingFeesResponseTakerRegExp,
|
|
24811
25122
|
getUDFHistoryQueryCountbackMax,
|