ault-sdk-ts 0.0.2-alpha.22 → 0.0.2-alpha.24

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.
Files changed (43) hide show
  1. package/README.md +32 -7
  2. package/dist/agent/sign-and-broadcast.d.ts +10 -3
  3. package/dist/agent/tx/clob.d.ts +1 -1
  4. package/dist/agent/tx-executor.d.ts +9 -1
  5. package/dist/client.d.ts +2 -7
  6. package/dist/core/clob-gas.d.ts +22 -0
  7. package/dist/core/clob-msgs.d.ts +2 -3
  8. package/dist/core/clob-responses.d.ts +19 -0
  9. package/dist/core/errors.d.ts +13 -0
  10. package/dist/eip712/msg.generated.d.ts +10 -4
  11. package/dist/eip712/registry.d.ts +2 -0
  12. package/dist/eip712/sign-and-broadcast.d.ts +19 -4
  13. package/dist/high-level/tx-executor.d.ts +9 -1
  14. package/dist/high-level/types.d.ts +152 -64
  15. package/dist/high-level-client.d.ts +1 -1
  16. package/dist/index.cjs +1441 -624
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +1438 -622
  19. package/dist/index.js.map +1 -1
  20. package/dist/proto/gen/ault/accountx/v1/query.d.ts +32 -0
  21. package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
  22. package/dist/proto/gen/ault/clob/v1/genesis.d.ts +0 -7
  23. package/dist/proto/gen/ault/clob/v1/tx.d.ts +25 -3
  24. package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
  25. package/dist/proto/gen/ault/license/v1/license.d.ts +0 -14
  26. package/dist/proto/gen/ault/license/v1/query.d.ts +44 -18
  27. package/dist/proto/gen/ault/market/v1/market.d.ts +1 -0
  28. package/dist/proto/gen/ault/market/v1/tx.d.ts +9 -0
  29. package/dist/proto/gen/ault/miner/v1/genesis.d.ts +52 -84
  30. package/dist/proto/gen/ault/miner/v1/miner.d.ts +10 -45
  31. package/dist/proto/gen/ault/miner/v1/query.d.ts +0 -13
  32. package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -2
  33. package/dist/proto/gen/ault/spot/v1/order.d.ts +12 -4
  34. package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +3 -3
  35. package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +2 -2
  36. package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +24 -15
  37. package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +1 -1
  38. package/dist/proto/tx-decode.d.ts +18 -0
  39. package/dist/rest/dex-types.generated.d.ts +12 -27
  40. package/dist/rest/dex.generated.d.ts +24 -52
  41. package/dist/rest/license.d.ts +1 -2
  42. package/dist/rest/types.d.ts +1 -2
  43. package/package.json +1 -1
package/README.md CHANGED
@@ -637,11 +637,18 @@ interface TxResult {
637
637
  txHash: string; // Transaction hash
638
638
  code: number; // Result code (0 = success)
639
639
  rawLog?: string; // Raw log from transaction
640
- confirmed?: boolean; // true = definitive result, false = timed out, undefined = confirmation lookup unavailable
640
+ confirmed?: boolean; // true = DeliverTx observed; false = broadcast-only or poll timeout; undefined = confirmation lookup unavailable
641
641
  success: boolean; // True only when DeliverTx success was confirmed
642
642
  }
643
643
  ```
644
644
 
645
+ The CLOB order methods (`placeLimitOrder`, `placeMarketOrder`,
646
+ `placeScaleOrder`, `cancelOrders`) default to broadcast-only: they return once
647
+ CheckTx accepts the transaction, so the result has `confirmed: false` and
648
+ `success: false`. Pass `wait: true` to poll for DeliverTx and get back the
649
+ decoded order IDs. See [Market And CLOB
650
+ Transactions](#market-and-clob-transactions).
651
+
645
652
  ### License Transactions
646
653
 
647
654
  ```typescript
@@ -742,23 +749,37 @@ await client.updateOperatorInfo({
742
749
  ```typescript
743
750
  import { base64ToBytes } from "ault-sdk-ts";
744
751
 
745
- // Place a limit order
752
+ const marketId = base64ToBytes("base64MarketId...");
753
+
754
+ // Place a limit order (broadcast-only: returns once CheckTx accepts it).
746
755
  await client.placeLimitOrder({
747
- marketId: 1,
756
+ marketId,
748
757
  isBuy: true,
749
758
  price: "1.5",
750
759
  quantity: "100",
751
760
  lifespan: { seconds: 3600n, nanos: 0 }, // 1 hour
752
761
  });
753
762
 
763
+ // Pass `wait: true` to poll for DeliverTx and read back the order ID.
764
+ const placed = await client.placeLimitOrder({
765
+ marketId,
766
+ isBuy: true,
767
+ price: "1.5",
768
+ quantity: "100",
769
+ lifespan: { seconds: 3600n, nanos: 0 },
770
+ wait: true,
771
+ });
772
+ console.log(placed.orderId);
773
+
754
774
  // Place a market order
755
775
  await client.placeMarketOrder({
756
- marketId: 1,
776
+ marketId,
757
777
  isBuy: true,
758
778
  deposit: "100",
759
779
  });
760
780
 
761
- // Cancel specific orders
781
+ // Cancel specific orders. With `wait: true` the result lists which IDs
782
+ // succeeded and which failed.
762
783
  await client.cancelOrders({ orderIds: [base64ToBytes("base64OrderId...")] });
763
784
 
764
785
  // Create a market
@@ -855,14 +876,18 @@ console.log(client.asAgent === agent); // true
855
876
  ### Place agent-signed orders
856
877
 
857
878
  ```typescript
858
- // Same shape as the wallet-signed equivalents on `client.*`.
859
- await client.asAgent!.placeLimitOrder({
879
+ // Same shape as the wallet-signed equivalents on `client.*`, including the
880
+ // broadcast-only default and the `wait: true` opt-in for a result with the
881
+ // decoded order ID.
882
+ const placed = await client.asAgent!.placeLimitOrder({
860
883
  marketId,
861
884
  isBuy: true,
862
885
  price: "1.0",
863
886
  quantity: "1000000000000000000",
864
887
  lifespan: { seconds: 3600n, nanos: 0 },
888
+ wait: true,
865
889
  });
890
+ console.log(placed.orderId);
866
891
 
867
892
  await client.asAgent!.placeMarketOrder({
868
893
  marketId,
@@ -21,6 +21,12 @@ export interface AgentSignAndBroadcastParams {
21
21
  memo?: string;
22
22
  gasLimit?: string;
23
23
  confirmationTimeoutMs?: number;
24
+ /**
25
+ * When `true` (default), poll for DeliverTx after a successful CheckTx. When
26
+ * `false`, return immediately after CheckTx acceptance with `confirmed: false`.
27
+ * A CheckTx rejection throws in both modes.
28
+ */
29
+ wait?: boolean;
24
30
  timeoutSeconds?: number;
25
31
  timeoutTimestamp?: {
26
32
  seconds: bigint;
@@ -30,9 +36,10 @@ export interface AgentSignAndBroadcastParams {
30
36
  fetchOptions?: FetchWithRetryOptions;
31
37
  cache?: AccountCache;
32
38
  }
33
- export declare function signAndBroadcastAgentTx({ network, keyMaterial, masterAddress, msgs, memo, gasLimit, confirmationTimeoutMs, timeoutSeconds, timeoutTimestamp, fetchFn, fetchOptions, cache, }: AgentSignAndBroadcastParams): Promise<{
39
+ export declare function signAndBroadcastAgentTx({ network, keyMaterial, masterAddress, msgs, memo, gasLimit, confirmationTimeoutMs, wait, timeoutSeconds, timeoutTimestamp, fetchFn, fetchOptions, cache, }: AgentSignAndBroadcastParams): Promise<{
34
40
  txHash: string;
35
- code: 0;
41
+ code: number;
36
42
  rawLog?: string;
37
- confirmed: true;
43
+ data?: string;
44
+ confirmed: boolean;
38
45
  }>;
@@ -1,4 +1,4 @@
1
- import { type GAS_CONSTANTS } from "../../core/network";
1
+ import type { GAS_CONSTANTS } from "../../core/network";
2
2
  import type { AgentClobTxApi } from "../../high-level/types";
3
3
  import type { AgentTxExecutor } from "../tx-executor";
4
4
  export interface AgentClobTxContext {
@@ -3,6 +3,13 @@ import { type NetworkConfig } from "../core/network";
3
3
  import type { AnyEip712Msg } from "../eip712/builder";
4
4
  import type { AgentTxOptions, TxResult } from "../high-level/types";
5
5
  import { type AccountCache } from "../eip712/sign-and-broadcast";
6
+ /**
7
+ * Internal exec options: the public {@link AgentTxOptions} plus the per-call
8
+ * `wait` flag threaded through by the CLOB order methods.
9
+ */
10
+ type AgentExecOptions = AgentTxOptions & {
11
+ wait?: boolean;
12
+ };
6
13
  export interface AgentTxExecutorOptions {
7
14
  /**
8
15
  * Returns the network with the latest manifest URL/eip712 overrides applied.
@@ -27,5 +34,6 @@ export interface AgentTxExecutorOptions {
27
34
  */
28
35
  cache?: AccountCache;
29
36
  }
30
- export type AgentTxExecutor = (msgs: AnyEip712Msg[], txOptions?: AgentTxOptions) => Promise<TxResult>;
37
+ export type AgentTxExecutor = (msgs: AnyEip712Msg[], txOptions?: AgentExecOptions) => Promise<TxResult>;
31
38
  export declare function createAgentTxExecutor(options: AgentTxExecutorOptions): AgentTxExecutor;
39
+ export {};
package/dist/client.d.ts CHANGED
@@ -16,7 +16,7 @@ import { DexWsClient } from "./ws/client";
16
16
  import type { DexWsOptions } from "./ws/types";
17
17
  import { type TokenRegistryApi } from "./rest/tokenregistry";
18
18
  import type { AnyEip712Msg, Eip712TxContext } from "./eip712/builder";
19
- import type { SignAndBroadcastParams } from "./eip712/sign-and-broadcast";
19
+ import type { SignAndBroadcastParams, SignAndBroadcastResult } from "./eip712/sign-and-broadcast";
20
20
  import { EIP712_MSG_TYPES } from "./eip712/registry";
21
21
  import { type SignerInput } from "./eip712/signers";
22
22
  export interface AultClientOptions {
@@ -53,12 +53,7 @@ export interface AultClient {
53
53
  domain: Record<string, unknown>;
54
54
  message: Record<string, unknown>;
55
55
  };
56
- signAndBroadcast: (params: Omit<SignAndBroadcastParams, "network" | "fetchFn">) => Promise<{
57
- txHash: string;
58
- code: number;
59
- rawLog?: string;
60
- confirmed?: boolean;
61
- }>;
56
+ signAndBroadcast: (params: Omit<SignAndBroadcastParams, "network" | "fetchFn">) => Promise<SignAndBroadcastResult>;
62
57
  registry: typeof EIP712_MSG_TYPES;
63
58
  };
64
59
  }
@@ -0,0 +1,22 @@
1
+ import { type GAS_CONSTANTS } from "./network";
2
+ /**
3
+ * Per-op fee-free gas formulas for the CLOB order methods, shared by the
4
+ * high-level (wallet) and agent factories. The formulas are identical across
5
+ * both paths; the only delta is the cancel EIP-712 ante, which is wallet-only
6
+ * (see {@link cancelOrdersGas}). Each takes an explicit `gas` snapshot so a
7
+ * manifest hot-swap is honored on the next call.
8
+ */
9
+ type Gas = typeof GAS_CONSTANTS;
10
+ export declare function limitOrderGas(gas: Gas): string;
11
+ export declare function marketOrderGas(gas: Gas): string;
12
+ export declare function scaleOrderGas(gas: Gas, subOrderCount: number): string;
13
+ /**
14
+ * Cancel gas. `includeAnte` adds the EIP-712 ante on top of the fee-free
15
+ * allowance: cancel's base (`CANCEL_ORDER_BASE`) is the smallest CLOB op, so the
16
+ * fee-free multiplier doesn't absorb the ante the way limit/market/scale do.
17
+ * Wallet (EIP-712) cancels pass `true`; agent cancels are gas-capped and pass
18
+ * `false`. If chain `MinGasLimits` change, revisit whether the other ops also
19
+ * need the ante.
20
+ */
21
+ export declare function cancelOrdersGas(gas: Gas, orderCount: number, includeAnte: boolean): string;
22
+ export {};
@@ -1,10 +1,9 @@
1
- import type { Duration } from "../proto/gen/google/protobuf/duration";
2
1
  export declare function buildLimitOrderMsg(sender: string, params: {
3
2
  marketId: Uint8Array;
4
3
  isBuy: boolean;
5
4
  price: string;
6
5
  quantity: string;
7
- lifespan: Duration;
6
+ deadline: Date;
8
7
  postOnly?: boolean;
9
8
  builderAddress?: string;
10
9
  builderFeeRate?: string;
@@ -26,7 +25,7 @@ export declare function buildScaleOrderMsg(sender: string, params: {
26
25
  highPrice: string;
27
26
  totalQuantity: string;
28
27
  weights: number[];
29
- lifespan: Duration;
28
+ deadline: Date;
30
29
  postOnly?: boolean;
31
30
  builderAddress?: string;
32
31
  builderFeeRate?: string;
@@ -0,0 +1,19 @@
1
+ import type { PlaceOrderResult, PlaceScaleOrderResult, CancelOrdersResult, TxResult } from "../high-level/types";
2
+ type MsgResponse = {
3
+ typeUrl: string;
4
+ value: Uint8Array;
5
+ };
6
+ /**
7
+ * Shared wait/decode plumbing for the CLOB order methods (high-level and
8
+ * agent). Resolves the `wait` default once, runs the broadcast, and either
9
+ * returns the raw {@link TxResult} (broadcast-only) or feeds the committed
10
+ * `msg_responses` to the per-op decoder. Keeps the `wait ?? false` default and
11
+ * the broadcast-vs-decode branch in one place; callers supply the gas/options
12
+ * (which genuinely differ per op) via the `run` thunk.
13
+ */
14
+ export declare function withWaitDecode<R extends TxResult>(wait: boolean | undefined, run: (wait: boolean) => Promise<TxResult>, decode: (msgResponses: MsgResponse[] | undefined, base: TxResult) => R): Promise<TxResult | R>;
15
+ export declare function decodeLimitOrderResult(msgResponses: MsgResponse[] | undefined, base: TxResult): PlaceOrderResult;
16
+ export declare function decodeMarketOrderResult(msgResponses: MsgResponse[] | undefined, base: TxResult): PlaceOrderResult;
17
+ export declare function decodeScaleOrderResult(msgResponses: MsgResponse[] | undefined, base: TxResult): PlaceScaleOrderResult;
18
+ export declare function decodeCancelOrdersResult(msgResponses: MsgResponse[] | undefined, base: TxResult): CancelOrdersResult;
19
+ export {};
@@ -55,6 +55,19 @@ export declare class TxNotConfirmedError extends TxError {
55
55
  export declare class TxConfirmationUnavailableError extends TxError {
56
56
  constructor(params: TxErrorParams);
57
57
  }
58
+ /**
59
+ * Thrown in wait mode when the tx committed successfully (DeliverTx code 0) but
60
+ * the expected per-message response was missing from `tx_response.data` — e.g. a
61
+ * lagging LCD node that returns a confirmed tx without `data`. Distinct from
62
+ * `TxError` so callers can tell "the order failed" from "the order succeeded but
63
+ * I could not decode its id". The tx is on-chain; re-query by `txHash` to recover
64
+ * the response.
65
+ */
66
+ export declare class MissingMsgResponseError extends Error {
67
+ txHash?: string;
68
+ typeUrl: string;
69
+ constructor(typeUrl: string, txHash?: string);
70
+ }
58
71
  /**
59
72
  * Thrown by `withdrawRewards` when a mid-loop tx fails AFTER one or more
60
73
  * validators have already been withdrawn on-chain. Carries the txs that
@@ -2,7 +2,7 @@ import type { Eip712Msg } from "./builder";
2
2
  import type { MsgOpenAccount, MsgUpdateParams as MsgUpdateParamsAultAccountxV1 } from "../proto/gen/ault/accountx/v1/tx";
3
3
  import type { MsgApproveAgent, MsgRevokeAgent, MsgUpdateParams as MsgUpdateParamsAultAgentV1 } from "../proto/gen/ault/agent/v1/tx";
4
4
  import type { MsgGrantRole, MsgRevokeRole } from "../proto/gen/ault/authority/v1/tx";
5
- import type { MsgCancelOrders, MsgPlaceLimitOrder, MsgPlaceMarketOrder, MsgPlaceScaleOrder, MsgUpdateParams as MsgUpdateParamsAultClobV1 } from "../proto/gen/ault/clob/v1/tx";
5
+ import type { ModifyOrder, MsgCancelOrders, MsgModifyOrders, MsgPlaceLimitOrder, MsgPlaceMarketOrder, MsgPlaceScaleOrder, MsgUpdateParams as MsgUpdateParamsAultClobV1 } from "../proto/gen/ault/clob/v1/tx";
6
6
  import type { MsgApproveMember, MsgBatchApproveMember, MsgBatchMintLicense, MsgBatchRevokeMember, MsgBurnLicense, MsgMintLicense, MsgRevokeLicense, MsgRevokeMember, MsgSetKYCApprovers, MsgSetMinters, MsgSetTokenURI, MsgTransferLicense, MsgUpdateParams as MsgUpdateParamsAultLicenseV1 } from "../proto/gen/ault/license/v1/tx";
7
7
  import type { MsgCreateMarket, MsgHaltAllMarkets, MsgHaltMarkets, MsgResumeAllMarkets, MsgResumeMarkets, MsgUpdateMarket, MsgUpdateParams as MsgUpdateParamsAultMarketV1 } from "../proto/gen/ault/market/v1/tx";
8
8
  import type { MsgBatchSubmitWork, MsgCancelMiningDelegation, MsgDelegateMining, MsgRedelegateMining, MsgRegisterOperator, MsgSetOwnerVrfKey, MsgSubmitWork, MsgUnregisterOperator, MsgUpdateOperatorInfo, MsgUpdateParams as MsgUpdateParamsAultMinerV1, WorkSubmission } from "../proto/gen/ault/miner/v1/tx";
@@ -12,12 +12,17 @@ import type { TransferLimitConfig } from "../proto/gen/ault/tokenregistry/v1/tok
12
12
  import type { MsgDisableTokenPair, MsgDisableTransfers, MsgEnableTokenPair, MsgEnableTransfers, MsgRegisterTokenPair, MsgRemoveTransferLimit, MsgSetTransferLimit } from "../proto/gen/ault/tokenregistry/v1/tx";
13
13
  import type { MsgWithdrawDelegatorReward } from "../proto/gen/cosmos/distribution/v1beta1/tx";
14
14
  import type { MsgBeginRedelegate, MsgDelegate, MsgUndelegate } from "../proto/gen/cosmos/staking/v1beta1/tx";
15
+ type ModifyOrderInput = Omit<ModifyOrder, "newPrice" | "newQuantity"> & Partial<Pick<ModifyOrder, "newPrice" | "newQuantity">>;
15
16
  type TransferLimitConfigInput = TransferLimitConfig;
16
17
  type WorkSubmissionInput = Omit<WorkSubmission, "nonce"> & Partial<Pick<WorkSubmission, "nonce">>;
17
- type MsgApproveAgentInput = Omit<MsgApproveAgent, "expiry" | "name"> & Partial<Pick<MsgApproveAgent, "expiry" | "name">>;
18
+ type MsgApproveAgentInput = Omit<MsgApproveAgent, "expiresAt" | "name"> & Partial<Pick<MsgApproveAgent, "expiresAt" | "name">>;
18
19
  type MsgBatchSubmitWorkInput = Omit<MsgBatchSubmitWork, "submissions"> & {
19
20
  submissions: WorkSubmissionInput[];
20
21
  };
22
+ type MsgCreateMarketInput = Omit<MsgCreateMarket, "makerFeeRate" | "takerFeeRate"> & Partial<Pick<MsgCreateMarket, "makerFeeRate" | "takerFeeRate">>;
23
+ type MsgModifyOrdersInput = Omit<MsgModifyOrders, "orders"> & {
24
+ orders: ModifyOrderInput[];
25
+ };
21
26
  type MsgPlaceLimitOrderInput = Omit<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "postOnly"> & Partial<Pick<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "postOnly">>;
22
27
  type MsgPlaceMarketOrderInput = Omit<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "priceTolerance" | "worstPrice">>;
23
28
  type MsgPlaceScaleOrderInput = Omit<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly"> & Partial<Pick<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly">>;
@@ -44,6 +49,7 @@ export declare const msg: {
44
49
  };
45
50
  readonly clob: {
46
51
  readonly cancelOrders: (value: MsgCancelOrders) => Eip712Msg<MsgCancelOrders, "/ault.clob.v1.MsgCancelOrders">;
52
+ readonly modifyOrders: (value: MsgModifyOrdersInput) => Eip712Msg<MsgModifyOrdersInput, "/ault.clob.v1.MsgModifyOrders">;
47
53
  readonly placeLimitOrder: (value: MsgPlaceLimitOrderInput) => Eip712Msg<MsgPlaceLimitOrderInput, "/ault.clob.v1.MsgPlaceLimitOrder">;
48
54
  readonly placeMarketOrder: (value: MsgPlaceMarketOrderInput) => Eip712Msg<MsgPlaceMarketOrderInput, "/ault.clob.v1.MsgPlaceMarketOrder">;
49
55
  readonly placeScaleOrder: (value: MsgPlaceScaleOrderInput) => Eip712Msg<MsgPlaceScaleOrderInput, "/ault.clob.v1.MsgPlaceScaleOrder">;
@@ -68,7 +74,7 @@ export declare const msg: {
68
74
  readonly updateParams: (value: MsgUpdateParamsAultLicenseV1) => Eip712Msg<MsgUpdateParamsAultLicenseV1, "/ault.license.v1.MsgUpdateParams">;
69
75
  };
70
76
  readonly market: {
71
- readonly createMarket: (value: MsgCreateMarket) => Eip712Msg<MsgCreateMarket, "/ault.market.v1.MsgCreateMarket">;
77
+ readonly createMarket: (value: MsgCreateMarketInput) => Eip712Msg<MsgCreateMarketInput, "/ault.market.v1.MsgCreateMarket">;
72
78
  readonly haltAllMarkets: (value: MsgHaltAllMarkets) => Eip712Msg<MsgHaltAllMarkets, "/ault.market.v1.MsgHaltAllMarkets">;
73
79
  readonly haltMarkets: (value: MsgHaltMarkets) => Eip712Msg<MsgHaltMarkets, "/ault.market.v1.MsgHaltMarkets">;
74
80
  readonly resumeAllMarkets: (value: MsgResumeAllMarkets) => Eip712Msg<MsgResumeAllMarkets, "/ault.market.v1.MsgResumeAllMarkets">;
@@ -115,5 +121,5 @@ export declare const msg: {
115
121
  readonly setTransferLimit: (value: MsgSetTransferLimitInput) => Eip712Msg<MsgSetTransferLimitInput, "/ault.tokenregistry.v1.MsgSetTransferLimit">;
116
122
  };
117
123
  };
118
- export type AnyEip712Msg = Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount"> | Eip712Msg<MsgUpdateParamsAultAccountxV1, "/ault.accountx.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent"> | Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent"> | Eip712Msg<MsgUpdateParamsAultAgentV1, "/ault.agent.v1.MsgUpdateParams"> | Eip712Msg<MsgGrantRole, "/ault.authority.v1.MsgGrantRole"> | Eip712Msg<MsgRevokeRole, "/ault.authority.v1.MsgRevokeRole"> | Eip712Msg<MsgCancelOrders, "/ault.clob.v1.MsgCancelOrders"> | Eip712Msg<MsgPlaceLimitOrderInput, "/ault.clob.v1.MsgPlaceLimitOrder"> | Eip712Msg<MsgPlaceMarketOrderInput, "/ault.clob.v1.MsgPlaceMarketOrder"> | Eip712Msg<MsgPlaceScaleOrderInput, "/ault.clob.v1.MsgPlaceScaleOrder"> | Eip712Msg<MsgUpdateParamsAultClobV1, "/ault.clob.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveMember, "/ault.license.v1.MsgApproveMember"> | Eip712Msg<MsgBatchApproveMember, "/ault.license.v1.MsgBatchApproveMember"> | Eip712Msg<MsgBatchMintLicense, "/ault.license.v1.MsgBatchMintLicense"> | Eip712Msg<MsgBatchRevokeMember, "/ault.license.v1.MsgBatchRevokeMember"> | Eip712Msg<MsgBurnLicense, "/ault.license.v1.MsgBurnLicense"> | Eip712Msg<MsgMintLicense, "/ault.license.v1.MsgMintLicense"> | Eip712Msg<MsgRevokeLicense, "/ault.license.v1.MsgRevokeLicense"> | Eip712Msg<MsgRevokeMember, "/ault.license.v1.MsgRevokeMember"> | Eip712Msg<MsgSetKYCApprovers, "/ault.license.v1.MsgSetKYCApprovers"> | Eip712Msg<MsgSetMinters, "/ault.license.v1.MsgSetMinters"> | Eip712Msg<MsgSetTokenURI, "/ault.license.v1.MsgSetTokenURI"> | Eip712Msg<MsgTransferLicense, "/ault.license.v1.MsgTransferLicense"> | Eip712Msg<MsgUpdateParamsAultLicenseV1, "/ault.license.v1.MsgUpdateParams"> | Eip712Msg<MsgCreateMarket, "/ault.market.v1.MsgCreateMarket"> | Eip712Msg<MsgHaltAllMarkets, "/ault.market.v1.MsgHaltAllMarkets"> | Eip712Msg<MsgHaltMarkets, "/ault.market.v1.MsgHaltMarkets"> | Eip712Msg<MsgResumeAllMarkets, "/ault.market.v1.MsgResumeAllMarkets"> | Eip712Msg<MsgResumeMarkets, "/ault.market.v1.MsgResumeMarkets"> | Eip712Msg<MsgUpdateMarket, "/ault.market.v1.MsgUpdateMarket"> | Eip712Msg<MsgUpdateParamsAultMarketV1, "/ault.market.v1.MsgUpdateParams"> | Eip712Msg<MsgBatchSubmitWorkInput, "/ault.miner.v1.MsgBatchSubmitWork"> | Eip712Msg<MsgCancelMiningDelegation, "/ault.miner.v1.MsgCancelMiningDelegation"> | Eip712Msg<MsgDelegateMining, "/ault.miner.v1.MsgDelegateMining"> | Eip712Msg<MsgRedelegateMining, "/ault.miner.v1.MsgRedelegateMining"> | Eip712Msg<MsgRegisterOperatorInput, "/ault.miner.v1.MsgRegisterOperator"> | Eip712Msg<MsgSetOwnerVrfKey, "/ault.miner.v1.MsgSetOwnerVrfKey"> | Eip712Msg<MsgSubmitWorkInput, "/ault.miner.v1.MsgSubmitWork"> | Eip712Msg<MsgUnregisterOperator, "/ault.miner.v1.MsgUnregisterOperator"> | Eip712Msg<MsgUpdateOperatorInfoInput, "/ault.miner.v1.MsgUpdateOperatorInfo"> | Eip712Msg<MsgUpdateParamsAultMinerV1, "/ault.miner.v1.MsgUpdateParams"> | Eip712Msg<MsgUpdateParamsAultRatelimitV1, "/ault.ratelimit.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveBuilder, "/ault.reward.v1.MsgApproveBuilder"> | Eip712Msg<MsgRevokeBuilder, "/ault.reward.v1.MsgRevokeBuilder"> | Eip712Msg<MsgSetDeployerShare, "/ault.reward.v1.MsgSetDeployerShare"> | Eip712Msg<MsgSetReferral, "/ault.reward.v1.MsgSetReferral"> | Eip712Msg<MsgSetReferralCode, "/ault.reward.v1.MsgSetReferralCode"> | Eip712Msg<MsgUpdateEligibleReferrers, "/ault.reward.v1.MsgUpdateEligibleReferrers"> | Eip712Msg<MsgUpdateParamsAultRewardV1, "/ault.reward.v1.MsgUpdateParams"> | Eip712Msg<MsgDisableTokenPair, "/ault.tokenregistry.v1.MsgDisableTokenPair"> | Eip712Msg<MsgDisableTransfers, "/ault.tokenregistry.v1.MsgDisableTransfers"> | Eip712Msg<MsgEnableTokenPair, "/ault.tokenregistry.v1.MsgEnableTokenPair"> | Eip712Msg<MsgEnableTransfers, "/ault.tokenregistry.v1.MsgEnableTransfers"> | Eip712Msg<MsgRegisterTokenPairInput, "/ault.tokenregistry.v1.MsgRegisterTokenPair"> | Eip712Msg<MsgRemoveTransferLimit, "/ault.tokenregistry.v1.MsgRemoveTransferLimit"> | Eip712Msg<MsgSetTransferLimitInput, "/ault.tokenregistry.v1.MsgSetTransferLimit"> | Eip712Msg<MsgWithdrawDelegatorReward, "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"> | Eip712Msg<MsgBeginRedelegate, "/cosmos.staking.v1beta1.MsgBeginRedelegate"> | Eip712Msg<MsgDelegate, "/cosmos.staking.v1beta1.MsgDelegate"> | Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
124
+ export type AnyEip712Msg = Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount"> | Eip712Msg<MsgUpdateParamsAultAccountxV1, "/ault.accountx.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent"> | Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent"> | Eip712Msg<MsgUpdateParamsAultAgentV1, "/ault.agent.v1.MsgUpdateParams"> | Eip712Msg<MsgGrantRole, "/ault.authority.v1.MsgGrantRole"> | Eip712Msg<MsgRevokeRole, "/ault.authority.v1.MsgRevokeRole"> | Eip712Msg<MsgCancelOrders, "/ault.clob.v1.MsgCancelOrders"> | Eip712Msg<MsgModifyOrdersInput, "/ault.clob.v1.MsgModifyOrders"> | Eip712Msg<MsgPlaceLimitOrderInput, "/ault.clob.v1.MsgPlaceLimitOrder"> | Eip712Msg<MsgPlaceMarketOrderInput, "/ault.clob.v1.MsgPlaceMarketOrder"> | Eip712Msg<MsgPlaceScaleOrderInput, "/ault.clob.v1.MsgPlaceScaleOrder"> | Eip712Msg<MsgUpdateParamsAultClobV1, "/ault.clob.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveMember, "/ault.license.v1.MsgApproveMember"> | Eip712Msg<MsgBatchApproveMember, "/ault.license.v1.MsgBatchApproveMember"> | Eip712Msg<MsgBatchMintLicense, "/ault.license.v1.MsgBatchMintLicense"> | Eip712Msg<MsgBatchRevokeMember, "/ault.license.v1.MsgBatchRevokeMember"> | Eip712Msg<MsgBurnLicense, "/ault.license.v1.MsgBurnLicense"> | Eip712Msg<MsgMintLicense, "/ault.license.v1.MsgMintLicense"> | Eip712Msg<MsgRevokeLicense, "/ault.license.v1.MsgRevokeLicense"> | Eip712Msg<MsgRevokeMember, "/ault.license.v1.MsgRevokeMember"> | Eip712Msg<MsgSetKYCApprovers, "/ault.license.v1.MsgSetKYCApprovers"> | Eip712Msg<MsgSetMinters, "/ault.license.v1.MsgSetMinters"> | Eip712Msg<MsgSetTokenURI, "/ault.license.v1.MsgSetTokenURI"> | Eip712Msg<MsgTransferLicense, "/ault.license.v1.MsgTransferLicense"> | Eip712Msg<MsgUpdateParamsAultLicenseV1, "/ault.license.v1.MsgUpdateParams"> | Eip712Msg<MsgCreateMarketInput, "/ault.market.v1.MsgCreateMarket"> | Eip712Msg<MsgHaltAllMarkets, "/ault.market.v1.MsgHaltAllMarkets"> | Eip712Msg<MsgHaltMarkets, "/ault.market.v1.MsgHaltMarkets"> | Eip712Msg<MsgResumeAllMarkets, "/ault.market.v1.MsgResumeAllMarkets"> | Eip712Msg<MsgResumeMarkets, "/ault.market.v1.MsgResumeMarkets"> | Eip712Msg<MsgUpdateMarket, "/ault.market.v1.MsgUpdateMarket"> | Eip712Msg<MsgUpdateParamsAultMarketV1, "/ault.market.v1.MsgUpdateParams"> | Eip712Msg<MsgBatchSubmitWorkInput, "/ault.miner.v1.MsgBatchSubmitWork"> | Eip712Msg<MsgCancelMiningDelegation, "/ault.miner.v1.MsgCancelMiningDelegation"> | Eip712Msg<MsgDelegateMining, "/ault.miner.v1.MsgDelegateMining"> | Eip712Msg<MsgRedelegateMining, "/ault.miner.v1.MsgRedelegateMining"> | Eip712Msg<MsgRegisterOperatorInput, "/ault.miner.v1.MsgRegisterOperator"> | Eip712Msg<MsgSetOwnerVrfKey, "/ault.miner.v1.MsgSetOwnerVrfKey"> | Eip712Msg<MsgSubmitWorkInput, "/ault.miner.v1.MsgSubmitWork"> | Eip712Msg<MsgUnregisterOperator, "/ault.miner.v1.MsgUnregisterOperator"> | Eip712Msg<MsgUpdateOperatorInfoInput, "/ault.miner.v1.MsgUpdateOperatorInfo"> | Eip712Msg<MsgUpdateParamsAultMinerV1, "/ault.miner.v1.MsgUpdateParams"> | Eip712Msg<MsgUpdateParamsAultRatelimitV1, "/ault.ratelimit.v1.MsgUpdateParams"> | Eip712Msg<MsgApproveBuilder, "/ault.reward.v1.MsgApproveBuilder"> | Eip712Msg<MsgRevokeBuilder, "/ault.reward.v1.MsgRevokeBuilder"> | Eip712Msg<MsgSetDeployerShare, "/ault.reward.v1.MsgSetDeployerShare"> | Eip712Msg<MsgSetReferral, "/ault.reward.v1.MsgSetReferral"> | Eip712Msg<MsgSetReferralCode, "/ault.reward.v1.MsgSetReferralCode"> | Eip712Msg<MsgUpdateEligibleReferrers, "/ault.reward.v1.MsgUpdateEligibleReferrers"> | Eip712Msg<MsgUpdateParamsAultRewardV1, "/ault.reward.v1.MsgUpdateParams"> | Eip712Msg<MsgDisableTokenPair, "/ault.tokenregistry.v1.MsgDisableTokenPair"> | Eip712Msg<MsgDisableTransfers, "/ault.tokenregistry.v1.MsgDisableTransfers"> | Eip712Msg<MsgEnableTokenPair, "/ault.tokenregistry.v1.MsgEnableTokenPair"> | Eip712Msg<MsgEnableTransfers, "/ault.tokenregistry.v1.MsgEnableTransfers"> | Eip712Msg<MsgRegisterTokenPairInput, "/ault.tokenregistry.v1.MsgRegisterTokenPair"> | Eip712Msg<MsgRemoveTransferLimit, "/ault.tokenregistry.v1.MsgRemoveTransferLimit"> | Eip712Msg<MsgSetTransferLimitInput, "/ault.tokenregistry.v1.MsgSetTransferLimit"> | Eip712Msg<MsgWithdrawDelegatorReward, "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"> | Eip712Msg<MsgBeginRedelegate, "/cosmos.staking.v1beta1.MsgBeginRedelegate"> | Eip712Msg<MsgDelegate, "/cosmos.staking.v1beta1.MsgDelegate"> | Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
119
125
  export {};
@@ -17,6 +17,8 @@ export interface Eip712MsgTypeConfig {
17
17
  valueFields: readonly Eip712Field[];
18
18
  nestedTypes?: Record<string, readonly Eip712Field[]>;
19
19
  durationFields?: readonly string[];
20
+ /** Fields amino-encoded by the chain as RFC 3339 strings (gogoproto stdtime). */
21
+ timestampFields?: readonly string[];
20
22
  enumFieldPaths?: Record<string, Record<string, string>>;
21
23
  optionalFields?: readonly string[];
22
24
  legacyAminoRegistered?: boolean;
@@ -33,6 +33,7 @@ export declare function _resetIndexingCache(): void;
33
33
  export declare function pollTxInclusion(network: NetworkConfig, txHash: string, fetchFn?: FetchFn, fetchOptions?: FetchWithRetryOptions, timeoutMs?: number, intervalMs?: number): Promise<{
34
34
  code: number;
35
35
  rawLog?: string;
36
+ data?: string;
36
37
  confirmed: boolean | undefined;
37
38
  }>;
38
39
  export interface SignAndBroadcastParams {
@@ -45,6 +46,13 @@ export interface SignAndBroadcastParams {
45
46
  feeDenom?: string;
46
47
  feeAmount?: string;
47
48
  confirmationTimeoutMs?: number;
49
+ /**
50
+ * When `true` (default), poll for DeliverTx after a successful CheckTx and
51
+ * return the committed result (throwing on any non-success). When `false`,
52
+ * return immediately after CheckTx acceptance with `confirmed: false` — the
53
+ * caller takes on confirmation. A CheckTx rejection throws in both modes.
54
+ */
55
+ wait?: boolean;
48
56
  fetchFn?: FetchFn;
49
57
  fetchOptions?: import("../core/http").FetchWithRetryOptions;
50
58
  cache?: AccountCache;
@@ -56,9 +64,16 @@ export interface SignAndBroadcastParams {
56
64
  */
57
65
  feeMarketCache?: FeeMarketCache;
58
66
  }
59
- export declare function signAndBroadcastEip712({ network, signerAddress, signer, msgs, memo, gasLimit, feeDenom, feeAmount, confirmationTimeoutMs, fetchFn, fetchOptions, cache, feeMarketCache, }: SignAndBroadcastParams): Promise<{
67
+ /**
68
+ * Result of {@link signAndBroadcastEip712}. `data` carries the hex-encoded
69
+ * `TxMsgData` (per-message responses such as orderId), populated only when
70
+ * `wait` was true and the tx committed.
71
+ */
72
+ export interface SignAndBroadcastResult {
60
73
  txHash: string;
61
- code: 0;
74
+ code: number;
62
75
  rawLog?: string;
63
- confirmed: true;
64
- }>;
76
+ data?: string;
77
+ confirmed: boolean;
78
+ }
79
+ export declare function signAndBroadcastEip712({ network, signerAddress, signer, msgs, memo, gasLimit, feeDenom, feeAmount, confirmationTimeoutMs, wait, fetchFn, fetchOptions, cache, feeMarketCache, }: SignAndBroadcastParams): Promise<SignAndBroadcastResult>;
@@ -5,6 +5,14 @@ import type { AnyEip712Msg } from "../eip712/builder";
5
5
  import type { AultSigner } from "../eip712/signers";
6
6
  import { type FeeMarketCache } from "../rest/feemarket";
7
7
  import type { TxOptions, TxResult } from "./types";
8
+ /**
9
+ * Internal exec options: the public {@link TxOptions} plus the per-call `wait`
10
+ * flag. `wait` is not part of `TxOptions` — only the CLOB order methods expose
11
+ * it, and they thread it through here.
12
+ */
13
+ type ExecOptions = TxOptions & {
14
+ wait?: boolean;
15
+ };
8
16
  interface TxExecutorOptions {
9
17
  /**
10
18
  * Returns the network with the latest manifest URL/eip712 overrides applied.
@@ -25,6 +33,6 @@ interface TxExecutorOptions {
25
33
  /** Optional shared fee-market cache. */
26
34
  feeMarketCache?: FeeMarketCache;
27
35
  }
28
- export type TxExecutor = (msgs: AnyEip712Msg[], txOptions?: TxOptions) => Promise<TxResult>;
36
+ export type TxExecutor = (msgs: AnyEip712Msg[], txOptions?: ExecOptions) => Promise<TxResult>;
29
37
  export declare function createTxExecutor(options: TxExecutorOptions): TxExecutor;
30
38
  export {};