ault-sdk-ts 0.1.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/core/clob-gas.d.ts +5 -19
- package/dist/core/manifest-resolver.d.ts +17 -8
- package/dist/core/manifest-types.d.ts +2 -0
- package/dist/core/network.d.ts +0 -9
- package/dist/index.cjs +145 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +131 -41
- package/dist/index.js.map +1 -1
- package/dist/rest/dex-types.generated.d.ts +72 -1
- package/dist/rest/dex.d.ts +1 -0
- package/dist/rest/dex.generated.d.ts +58 -0
- package/dist/ws/types.d.ts +8 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -347,7 +347,7 @@ var NETWORKS = {
|
|
|
347
347
|
rpcUrl: "https://mainnet-rpc-proxy.aultblockchain.xyz/cosmos-rpc",
|
|
348
348
|
restUrl: "https://mainnet-rpc-proxy.aultblockchain.xyz/rest",
|
|
349
349
|
evmRpcUrl: "https://mainnet-rpc-proxy.aultblockchain.xyz/evm",
|
|
350
|
-
explorerUrl: "https://ault.explorer.
|
|
350
|
+
explorerUrl: "https://ault.explorer.orynt.tech",
|
|
351
351
|
isProduction: true
|
|
352
352
|
},
|
|
353
353
|
"ault_10904-1": {
|
|
@@ -358,7 +358,7 @@ var NETWORKS = {
|
|
|
358
358
|
rpcUrl: "https://test-rpc.cloud.aultblockchain.xyz",
|
|
359
359
|
restUrl: "https://test-api.cloud.aultblockchain.xyz",
|
|
360
360
|
evmRpcUrl: "https://test-json-rpc.cloud.aultblockchain.xyz",
|
|
361
|
-
explorerUrl: "https://testnet
|
|
361
|
+
explorerUrl: "https://ault-testnet.explorer.orynt.tech",
|
|
362
362
|
dexApiUrl: "https://test-dex-api.cloud.aultblockchain.xyz",
|
|
363
363
|
isProduction: false
|
|
364
364
|
},
|
|
@@ -427,15 +427,6 @@ var GAS_CONSTANTS = {
|
|
|
427
427
|
DENOM: "aault",
|
|
428
428
|
/** Chain multiplier applied to min gas to derive max gas (120 = 1.2×). */
|
|
429
429
|
FEE_FREE_GAS_MULTIPLIER: 120,
|
|
430
|
-
/**
|
|
431
|
-
* EIP-712 ante overhead, in gas. The chain's per-message MinGasLimit values
|
|
432
|
-
* (mirrored below) measure the *handler* cost only; a fee-free EIP-712 tx
|
|
433
|
-
* additionally burns ante gas (sig verification + typed-data decode + tx
|
|
434
|
-
* size) that counts against gasWanted. For small-base ops (cancel) the 1.2×
|
|
435
|
-
* buffer doesn't cover it, so the high-level (EIP-712) path adds this on top.
|
|
436
|
-
* The agent path is capped at MinGasLimit×1.2 and must not add it.
|
|
437
|
-
*/
|
|
438
|
-
EIP712_ANTE_GAS: 3e4,
|
|
439
430
|
// License module
|
|
440
431
|
PER_LICENSE: 2e5,
|
|
441
432
|
PER_KYC_MEMBER: 2e5,
|
|
@@ -3519,8 +3510,10 @@ function isSet15(value) {
|
|
|
3519
3510
|
}
|
|
3520
3511
|
|
|
3521
3512
|
// src/rest/clob.ts
|
|
3513
|
+
var ORDER_ID_HEX_RE = new RegExp(`^(0[xX])?[0-9a-fA-F]{${ORDER_ID_LENGTH * 2}}$`);
|
|
3522
3514
|
function normalizeOrderId(orderId) {
|
|
3523
|
-
|
|
3515
|
+
if (typeof orderId !== "string") return bytesToBase64(orderId);
|
|
3516
|
+
return ORDER_ID_HEX_RE.test(orderId) ? OrderId.fromHex(orderId).toBase64() : orderId;
|
|
3524
3517
|
}
|
|
3525
3518
|
function normalizeMarketId(marketId) {
|
|
3526
3519
|
return typeof marketId === "string" ? marketId : bytesToBase64(marketId);
|
|
@@ -10719,6 +10712,7 @@ __export(dex_generated_exports, {
|
|
|
10719
10712
|
getGetStatsUrl: () => getGetStatsUrl,
|
|
10720
10713
|
getGetStatusUrl: () => getGetStatusUrl,
|
|
10721
10714
|
getGetTickerUrl: () => getGetTickerUrl,
|
|
10715
|
+
getGetTradeUrl: () => getGetTradeUrl,
|
|
10722
10716
|
getGetTradingFeesUrl: () => getGetTradingFeesUrl,
|
|
10723
10717
|
getGetUDFConfigUrl: () => getGetUDFConfigUrl,
|
|
10724
10718
|
getGetUDFHistoryUrl: () => getGetUDFHistoryUrl,
|
|
@@ -10744,6 +10738,7 @@ __export(dex_generated_exports, {
|
|
|
10744
10738
|
getStats: () => getStats,
|
|
10745
10739
|
getStatus: () => getStatus,
|
|
10746
10740
|
getTicker: () => getTicker,
|
|
10741
|
+
getTrade: () => getTrade,
|
|
10747
10742
|
getTradingFees: () => getTradingFees,
|
|
10748
10743
|
getUDFConfig: () => getUDFConfig,
|
|
10749
10744
|
getUDFHistory: () => getUDFHistory,
|
|
@@ -10986,6 +10981,15 @@ var listTrades = async (symbol, params, options) => {
|
|
|
10986
10981
|
method: "GET"
|
|
10987
10982
|
});
|
|
10988
10983
|
};
|
|
10984
|
+
var getGetTradeUrl = (id) => {
|
|
10985
|
+
return `/api/v1/trade/${id}`;
|
|
10986
|
+
};
|
|
10987
|
+
var getTrade = async (id, options) => {
|
|
10988
|
+
return dexFetch(getGetTradeUrl(id), {
|
|
10989
|
+
...options,
|
|
10990
|
+
method: "GET"
|
|
10991
|
+
});
|
|
10992
|
+
};
|
|
10989
10993
|
var getGetTradingFeesUrl = () => {
|
|
10990
10994
|
return `/api/v1/fees`;
|
|
10991
10995
|
};
|
|
@@ -11260,6 +11264,7 @@ function createDexApi(context) {
|
|
|
11260
11264
|
getOHLCV: bind(context, getOHLCV),
|
|
11261
11265
|
listOrders: bind(context, listOrders),
|
|
11262
11266
|
getOrder: bind(context, getOrder),
|
|
11267
|
+
getTrade: bind(context, getTrade),
|
|
11263
11268
|
listMyTrades: bind(context, listMyTrades),
|
|
11264
11269
|
getBalance: bind(context, getBalance),
|
|
11265
11270
|
getStats: bind(context, getStats),
|
|
@@ -23432,24 +23437,16 @@ function scaleOrderGas(gas, subOrderCount) {
|
|
|
23432
23437
|
gas.FEE_FREE_GAS_MULTIPLIER
|
|
23433
23438
|
);
|
|
23434
23439
|
}
|
|
23435
|
-
function cancelOrdersGas(gas, orderCount
|
|
23436
|
-
|
|
23440
|
+
function cancelOrdersGas(gas, orderCount) {
|
|
23441
|
+
return computeFeeFreeGasCompound(
|
|
23437
23442
|
gas.CANCEL_ORDER_BASE,
|
|
23438
23443
|
gas.CANCEL_ORDER_PER_ID,
|
|
23439
23444
|
orderCount,
|
|
23440
23445
|
gas.FEE_FREE_GAS_MULTIPLIER
|
|
23441
23446
|
);
|
|
23442
|
-
if (!includeAnte) return feeFree;
|
|
23443
|
-
return (BigInt(feeFree) + BigInt(gas.EIP712_ANTE_GAS)).toString();
|
|
23444
23447
|
}
|
|
23445
|
-
function modifyOrdersGas(gas, orderCount
|
|
23446
|
-
|
|
23447
|
-
gas.MODIFY_ORDER_PER_ID,
|
|
23448
|
-
orderCount,
|
|
23449
|
-
gas.FEE_FREE_GAS_MULTIPLIER
|
|
23450
|
-
);
|
|
23451
|
-
if (!includeAnte) return feeFree;
|
|
23452
|
-
return (BigInt(feeFree) + BigInt(gas.EIP712_ANTE_GAS)).toString();
|
|
23448
|
+
function modifyOrdersGas(gas, orderCount) {
|
|
23449
|
+
return computeFeeFreeGas(gas.MODIFY_ORDER_PER_ID, orderCount, gas.FEE_FREE_GAS_MULTIPLIER);
|
|
23453
23450
|
}
|
|
23454
23451
|
|
|
23455
23452
|
// src/high-level/tx/clob.ts
|
|
@@ -23501,16 +23498,18 @@ function createClobTxApi({ signerAddress, exec, getGas }) {
|
|
|
23501
23498
|
orderIds,
|
|
23502
23499
|
wait,
|
|
23503
23500
|
gasLimit,
|
|
23501
|
+
feeDenom,
|
|
23504
23502
|
feeAmount,
|
|
23505
23503
|
memo,
|
|
23506
23504
|
confirmationTimeoutMs
|
|
23507
23505
|
}) {
|
|
23508
23506
|
const gas = getGas();
|
|
23509
|
-
const cancelGas = gasLimit ?? cancelOrdersGas(gas, orderIds.length
|
|
23507
|
+
const cancelGas = gasLimit ?? cancelOrdersGas(gas, orderIds.length);
|
|
23510
23508
|
return withWaitDecode(
|
|
23511
23509
|
wait,
|
|
23512
23510
|
(w) => exec([buildCancelOrdersMsg(signerAddress, orderIds)], {
|
|
23513
23511
|
gasLimit: cancelGas,
|
|
23512
|
+
feeDenom,
|
|
23514
23513
|
feeAmount,
|
|
23515
23514
|
memo,
|
|
23516
23515
|
confirmationTimeoutMs,
|
|
@@ -23523,6 +23522,7 @@ function createClobTxApi({ signerAddress, exec, getGas }) {
|
|
|
23523
23522
|
orders,
|
|
23524
23523
|
wait,
|
|
23525
23524
|
gasLimit,
|
|
23525
|
+
feeDenom,
|
|
23526
23526
|
feeAmount,
|
|
23527
23527
|
memo,
|
|
23528
23528
|
confirmationTimeoutMs
|
|
@@ -23530,11 +23530,12 @@ function createClobTxApi({ signerAddress, exec, getGas }) {
|
|
|
23530
23530
|
const modifyMsg = buildModifyOrdersMsg(signerAddress, orders);
|
|
23531
23531
|
assertUniformModifyShape(orders);
|
|
23532
23532
|
const gas = getGas();
|
|
23533
|
-
const modifyGas = gasLimit ?? modifyOrdersGas(gas, orders.length
|
|
23533
|
+
const modifyGas = gasLimit ?? modifyOrdersGas(gas, orders.length);
|
|
23534
23534
|
return withWaitDecode(
|
|
23535
23535
|
wait,
|
|
23536
23536
|
(w) => exec([modifyMsg], {
|
|
23537
23537
|
gasLimit: modifyGas,
|
|
23538
|
+
feeDenom,
|
|
23538
23539
|
feeAmount,
|
|
23539
23540
|
memo,
|
|
23540
23541
|
confirmationTimeoutMs,
|
|
@@ -24615,6 +24616,7 @@ var ManifestGasSchema = z.object({
|
|
|
24615
24616
|
SCALE_ORDER_PER_SUB: z.number().int().positive(),
|
|
24616
24617
|
CANCEL_ORDER_BASE: z.number().int().positive(),
|
|
24617
24618
|
CANCEL_ORDER_PER_ID: z.number().int().positive(),
|
|
24619
|
+
MODIFY_ORDER_PER_ID: z.number().int().positive(),
|
|
24618
24620
|
OPEN_ACCOUNT: z.number().int().positive(),
|
|
24619
24621
|
DELEGATE: z.number().int().positive(),
|
|
24620
24622
|
UNDELEGATE: z.number().int().positive(),
|
|
@@ -24706,17 +24708,13 @@ function applyNetworkOverrides(network, manifest) {
|
|
|
24706
24708
|
...manifest.eip712?.gasLimit != null ? { eip712GasLimit: manifest.eip712.gasLimit } : {}
|
|
24707
24709
|
};
|
|
24708
24710
|
}
|
|
24711
|
+
var NON_OVERRIDABLE_GAS_KEYS = ["EIP712_FEE_AMOUNT", "EIP712_GAS_LIMIT", "DENOM"];
|
|
24712
|
+
var NON_OVERRIDABLE_GAS_KEY_SET = new Set(NON_OVERRIDABLE_GAS_KEYS);
|
|
24709
24713
|
function applyGasOverrides(gas) {
|
|
24710
24714
|
if (!gas) return GAS_CONSTANTS;
|
|
24711
|
-
const {
|
|
24712
|
-
EIP712_FEE_AMOUNT: _ignoredFee,
|
|
24713
|
-
EIP712_GAS_LIMIT: _ignoredGas,
|
|
24714
|
-
DENOM: _ignoredDenom,
|
|
24715
|
-
EIP712_ANTE_GAS: _ignoredAnte,
|
|
24716
|
-
...rest
|
|
24717
|
-
} = gas;
|
|
24718
24715
|
const safeRest = {};
|
|
24719
|
-
for (const [k, v] of Object.entries(
|
|
24716
|
+
for (const [k, v] of Object.entries(gas)) {
|
|
24717
|
+
if (NON_OVERRIDABLE_GAS_KEY_SET.has(k)) continue;
|
|
24720
24718
|
if (typeof v === "number" && Number.isInteger(v) && v > 0) {
|
|
24721
24719
|
safeRest[k] = v;
|
|
24722
24720
|
}
|
|
@@ -25090,8 +25088,7 @@ function createAgentClobTxApi({
|
|
|
25090
25088
|
return withWaitDecode(
|
|
25091
25089
|
wait,
|
|
25092
25090
|
(w) => exec([buildCancelOrdersMsg(masterAddress, orderIds)], {
|
|
25093
|
-
|
|
25094
|
-
gasLimit: gasLimit ?? cancelOrdersGas(gas, orderIds.length, false),
|
|
25091
|
+
gasLimit: gasLimit ?? cancelOrdersGas(gas, orderIds.length),
|
|
25095
25092
|
memo,
|
|
25096
25093
|
confirmationTimeoutMs,
|
|
25097
25094
|
timeoutSeconds,
|
|
@@ -25112,8 +25109,7 @@ function createAgentClobTxApi({
|
|
|
25112
25109
|
return withWaitDecode(
|
|
25113
25110
|
wait,
|
|
25114
25111
|
(w) => exec([buildModifyOrdersMsg(masterAddress, orders)], {
|
|
25115
|
-
|
|
25116
|
-
gasLimit: gasLimit ?? modifyOrdersGas(gas, orders.length, false),
|
|
25112
|
+
gasLimit: gasLimit ?? modifyOrdersGas(gas, orders.length),
|
|
25117
25113
|
memo,
|
|
25118
25114
|
confirmationTimeoutMs,
|
|
25119
25115
|
timeoutSeconds,
|
|
@@ -25524,6 +25520,7 @@ var listTradesResponseFeeCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
|
25524
25520
|
var listTradesResponseFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25525
25521
|
var listTradesResponseInfoAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
|
|
25526
25522
|
var listTradesResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
|
|
25523
|
+
var listTradesResponseInfoEventIndexMin = 0;
|
|
25527
25524
|
var ListTradesResponseItem = zod.object({
|
|
25528
25525
|
id: zod.string(),
|
|
25529
25526
|
order: zod.string().nullish(),
|
|
@@ -25569,7 +25566,10 @@ var ListTradesResponseItem = zod.object({
|
|
|
25569
25566
|
received: zod.string().describe(
|
|
25570
25567
|
"Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
|
|
25571
25568
|
),
|
|
25572
|
-
block_height: zod.string().regex(listTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event.")
|
|
25569
|
+
block_height: zod.string().regex(listTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
|
|
25570
|
+
event_index: zod.number().min(listTradesResponseInfoEventIndexMin).describe(
|
|
25571
|
+
"The trade's event position within its block. Together with\n`block_height` it is the row's composite pagination cursor for the\ntrade feed. `created_at` cannot serve this role because every trade\nin a block shares one timestamp.\n"
|
|
25572
|
+
)
|
|
25573
25573
|
}).describe(
|
|
25574
25574
|
"Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
|
|
25575
25575
|
)
|
|
@@ -25577,6 +25577,78 @@ var ListTradesResponseItem = zod.object({
|
|
|
25577
25577
|
"All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n"
|
|
25578
25578
|
);
|
|
25579
25579
|
var ListTradesResponse = zod.array(ListTradesResponseItem);
|
|
25580
|
+
var getTradePathIdMax = 114;
|
|
25581
|
+
var getTradePathIdRegExp = new RegExp(
|
|
25582
|
+
"^(0|[1-9][0-9]*)-[0-9a-f]{32}-(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$"
|
|
25583
|
+
);
|
|
25584
|
+
var GetTradeParams = zod.object({
|
|
25585
|
+
id: zod.string().max(getTradePathIdMax).regex(getTradePathIdRegExp).describe(
|
|
25586
|
+
"Synthesized trade id in the form\n`<block_height>-<hex(order_id)>-<open_quantity>`, taken verbatim from\na REST trade object's `id` field (not the WebSocket `tid`).\n"
|
|
25587
|
+
)
|
|
25588
|
+
});
|
|
25589
|
+
var getTradeResponsePriceRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25590
|
+
var getTradeResponseAmountRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25591
|
+
var getTradeResponseCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25592
|
+
var getTradeResponseFeeCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25593
|
+
var getTradeResponseFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25594
|
+
var getTradeResponseInfoAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
|
|
25595
|
+
var getTradeResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
|
|
25596
|
+
var getTradeResponseInfoEventIndexMin = 0;
|
|
25597
|
+
var GetTradeResponse = zod.object({
|
|
25598
|
+
id: zod.string(),
|
|
25599
|
+
order: zod.string().nullish(),
|
|
25600
|
+
timestamp: zod.number(),
|
|
25601
|
+
datetime: zod.iso.datetime({}),
|
|
25602
|
+
symbol: zod.string(),
|
|
25603
|
+
type: zod.union([
|
|
25604
|
+
zod.literal("limit"),
|
|
25605
|
+
zod.literal("market"),
|
|
25606
|
+
zod.literal("unknown"),
|
|
25607
|
+
zod.literal(null)
|
|
25608
|
+
]).nullish().describe(
|
|
25609
|
+
"Order type resolved via JOIN to orders table. Null if order not found. `unknown` is the fallback for a chain code the API doesn't recognize."
|
|
25610
|
+
),
|
|
25611
|
+
cloid: zod.string().nullish().describe(
|
|
25612
|
+
"Client order id (hex, 8 bytes) resolved via JOIN to orders table. Null when the order carried none, the row predates cloid indexing, or on the public trades feed (cloids are private to the orderer)."
|
|
25613
|
+
),
|
|
25614
|
+
side: zod.enum(["buy", "sell"]),
|
|
25615
|
+
takerOrMaker: zod.enum(["taker", "maker"]).optional().describe(
|
|
25616
|
+
"Which leg of the match this fill is. Each match writes a maker leg and a taker leg; the public market feed returns only the maker leg so a market's trades aren't double-counted, while the per-orderer feed returns whichever leg belongs to that orderer."
|
|
25617
|
+
),
|
|
25618
|
+
price: zod.string().regex(getTradeResponsePriceRegExp),
|
|
25619
|
+
amount: zod.string().regex(getTradeResponseAmountRegExp),
|
|
25620
|
+
cost: zod.string().regex(getTradeResponseCostRegExp).describe("price * amount"),
|
|
25621
|
+
fee: zod.object({
|
|
25622
|
+
cost: zod.string().regex(getTradeResponseFeeCostRegExp).optional().describe("Fee cost in `currency` units, decimal string."),
|
|
25623
|
+
currency: zod.string().optional().describe(
|
|
25624
|
+
'Ticker of the fee denom (e.g., "USDT", or "AULT" for a base-denom fee). The quote ticker for the rate-estimated fallback.'
|
|
25625
|
+
),
|
|
25626
|
+
rate: zod.string().regex(getTradeResponseFeeRateRegExp).optional().describe(
|
|
25627
|
+
"This leg's fee rate from the market, decimal string: the maker rate for the maker leg, the taker rate otherwise."
|
|
25628
|
+
)
|
|
25629
|
+
}).optional().describe(
|
|
25630
|
+
"Fee charged on the fill. When the indexer recorded a realized fee, cost and currency report it verbatim; the currency follows the denom the filled leg received, which is the base asset on a taker buy, not always the quote. For rows that predate fee indexing, cost falls back to the estimate amount * price * rate in the quote currency, where rate is this leg's rate (maker_fee_rate for the maker leg, otherwise taker_fee_rate)."
|
|
25631
|
+
),
|
|
25632
|
+
info: zod.object({
|
|
25633
|
+
address: zod.string().regex(getTradeResponseInfoAddressOneRegExp).describe(
|
|
25634
|
+
"Cosmos bech32 account address. The HRP is fixed to `ault` for\naccounts (validators use `aultvaloper`, which this schema rejects).\nLowercased and checksum-verified by the API; mixed-case bech32 is\nrejected to avoid silent EIP-55-style ambiguity.\n"
|
|
25635
|
+
).describe("Bech32 address of the orderer that owns this leg of the fill."),
|
|
25636
|
+
paid: zod.string().describe(
|
|
25637
|
+
'Atto-precision amount the orderer paid for this fill, suffixed\nwith the chain denom (e.g. `"1500000000000000000uusdt"`). Empty\nstring when the chain did not record this side.\n'
|
|
25638
|
+
),
|
|
25639
|
+
received: zod.string().describe(
|
|
25640
|
+
"Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
|
|
25641
|
+
),
|
|
25642
|
+
block_height: zod.string().regex(getTradeResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
|
|
25643
|
+
event_index: zod.number().min(getTradeResponseInfoEventIndexMin).describe(
|
|
25644
|
+
"The trade's event position within its block. Together with\n`block_height` it is the row's composite pagination cursor for the\ntrade feed. `created_at` cannot serve this role because every trade\nin a block shares one timestamp.\n"
|
|
25645
|
+
)
|
|
25646
|
+
}).describe(
|
|
25647
|
+
"Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
|
|
25648
|
+
)
|
|
25649
|
+
}).describe(
|
|
25650
|
+
"All numeric fields are canonical decimal strings \u2014 quantities at any\nmagnitude survive the JSON round-trip without rounding through\nfloat64. Consumers parse with their own bigdecimal.\n"
|
|
25651
|
+
);
|
|
25580
25652
|
var getTradingFeesResponseMakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25581
25653
|
var getTradingFeesResponseTakerRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25582
25654
|
var GetTradingFeesResponse = zod.record(
|
|
@@ -25826,6 +25898,7 @@ var listMyTradesResponseFeeCostRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
|
25826
25898
|
var listMyTradesResponseFeeRateRegExp = new RegExp("^-?\\d+(\\.\\d+)?$");
|
|
25827
25899
|
var listMyTradesResponseInfoAddressOneRegExp = new RegExp("^ault1[a-z0-9]{38,}$");
|
|
25828
25900
|
var listMyTradesResponseInfoBlockHeightRegExp = new RegExp("^\\d+$");
|
|
25901
|
+
var listMyTradesResponseInfoEventIndexMin = 0;
|
|
25829
25902
|
var ListMyTradesResponseItem = zod.object({
|
|
25830
25903
|
id: zod.string(),
|
|
25831
25904
|
order: zod.string().nullish(),
|
|
@@ -25871,7 +25944,10 @@ var ListMyTradesResponseItem = zod.object({
|
|
|
25871
25944
|
received: zod.string().describe(
|
|
25872
25945
|
"Atto-precision amount the orderer received for this fill,\nsuffixed with the chain denom. Empty string when the chain did\nnot record this side.\n"
|
|
25873
25946
|
),
|
|
25874
|
-
block_height: zod.string().regex(listMyTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event.")
|
|
25947
|
+
block_height: zod.string().regex(listMyTradesResponseInfoBlockHeightRegExp).describe("Decimal-string block height for parity with the WS trade event."),
|
|
25948
|
+
event_index: zod.number().min(listMyTradesResponseInfoEventIndexMin).describe(
|
|
25949
|
+
"The trade's event position within its block. Together with\n`block_height` it is the row's composite pagination cursor for the\ntrade feed. `created_at` cannot serve this role because every trade\nin a block shares one timestamp.\n"
|
|
25950
|
+
)
|
|
25875
25951
|
}).describe(
|
|
25876
25952
|
"Exchange-specific extension on `TradeResponse`. Mirrors the\n`Info` struct populated in `internal/domain/trade/service.go`.\n"
|
|
25877
25953
|
)
|
|
@@ -26059,7 +26135,7 @@ function createDexWs(url, options) {
|
|
|
26059
26135
|
}
|
|
26060
26136
|
|
|
26061
26137
|
// src/index.ts
|
|
26062
|
-
var SDK_VERSION = "0.
|
|
26138
|
+
var SDK_VERSION = "0.4.0";
|
|
26063
26139
|
export {
|
|
26064
26140
|
AGENT_DEFAULTS,
|
|
26065
26141
|
AULT_SIGNER_MARKER,
|
|
@@ -26095,6 +26171,8 @@ export {
|
|
|
26095
26171
|
GetStatusResponse,
|
|
26096
26172
|
GetTickerParams,
|
|
26097
26173
|
GetTickerResponse,
|
|
26174
|
+
GetTradeParams,
|
|
26175
|
+
GetTradeResponse,
|
|
26098
26176
|
GetTradingFeesResponse,
|
|
26099
26177
|
GetUDFConfigResponse,
|
|
26100
26178
|
GetUDFHistoryQueryParams,
|
|
@@ -26252,6 +26330,16 @@ export {
|
|
|
26252
26330
|
getStatsResponseTotalsDepositUsdcVolume24hRegExp,
|
|
26253
26331
|
getStatsResponseTotalsEstimatedFeeRegExp,
|
|
26254
26332
|
getStatsResponseTotalsQuoteVolumeRegExp,
|
|
26333
|
+
getTradePathIdMax,
|
|
26334
|
+
getTradePathIdRegExp,
|
|
26335
|
+
getTradeResponseAmountRegExp,
|
|
26336
|
+
getTradeResponseCostRegExp,
|
|
26337
|
+
getTradeResponseFeeCostRegExp,
|
|
26338
|
+
getTradeResponseFeeRateRegExp,
|
|
26339
|
+
getTradeResponseInfoAddressOneRegExp,
|
|
26340
|
+
getTradeResponseInfoBlockHeightRegExp,
|
|
26341
|
+
getTradeResponseInfoEventIndexMin,
|
|
26342
|
+
getTradeResponsePriceRegExp,
|
|
26255
26343
|
getTradingFeesResponseMakerRegExp,
|
|
26256
26344
|
getTradingFeesResponseTakerRegExp,
|
|
26257
26345
|
getUDFHistoryQueryCountbackMax,
|
|
@@ -26271,6 +26359,7 @@ export {
|
|
|
26271
26359
|
listMyTradesResponseFeeRateRegExp,
|
|
26272
26360
|
listMyTradesResponseInfoAddressOneRegExp,
|
|
26273
26361
|
listMyTradesResponseInfoBlockHeightRegExp,
|
|
26362
|
+
listMyTradesResponseInfoEventIndexMin,
|
|
26274
26363
|
listMyTradesResponsePriceRegExp,
|
|
26275
26364
|
listOrdersQueryAddressOneRegExp,
|
|
26276
26365
|
listOrdersQueryAddressTwoRegExp,
|
|
@@ -26295,6 +26384,7 @@ export {
|
|
|
26295
26384
|
listTradesResponseFeeRateRegExp,
|
|
26296
26385
|
listTradesResponseInfoAddressOneRegExp,
|
|
26297
26386
|
listTradesResponseInfoBlockHeightRegExp,
|
|
26387
|
+
listTradesResponseInfoEventIndexMin,
|
|
26298
26388
|
listTradesResponsePriceRegExp,
|
|
26299
26389
|
mergeManifests,
|
|
26300
26390
|
msg,
|