ault-sdk-ts 0.0.2-alpha.8 → 0.1.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 +375 -50
- package/dist/agent/attach.d.ts +26 -0
- package/dist/agent/sign-and-broadcast.d.ts +9 -2
- package/dist/agent/tx/clob.d.ts +8 -1
- package/dist/agent/tx-executor.d.ts +24 -2
- package/dist/client.d.ts +6 -7
- package/dist/core/clob-gas.d.ts +28 -0
- package/dist/core/clob-msgs.d.ts +31 -5
- package/dist/core/clob-responses.d.ts +20 -0
- package/dist/core/cloid.d.ts +4 -0
- package/dist/core/errors.d.ts +79 -0
- package/dist/core/manifest-fetcher.d.ts +12 -0
- package/dist/core/manifest-resolver.d.ts +121 -0
- package/dist/core/manifest-types.d.ts +102 -0
- package/dist/core/network.d.ts +42 -13
- package/dist/eip712/msg.generated.d.ts +26 -10
- package/dist/eip712/registry.d.ts +2 -0
- package/dist/eip712/sign-and-broadcast.d.ts +27 -3
- package/dist/high-level/cloid-lookup.d.ts +9 -0
- package/dist/high-level/create-client.d.ts +15 -11
- package/dist/high-level/tx/accountx.d.ts +3 -0
- package/dist/high-level/tx/agent.d.ts +1 -1
- package/dist/high-level/tx/clob.d.ts +1 -1
- package/dist/high-level/tx/context.d.ts +8 -0
- package/dist/high-level/tx/license.d.ts +1 -1
- package/dist/high-level/tx/miner.d.ts +1 -1
- package/dist/high-level/tx/reward.d.ts +1 -1
- package/dist/high-level/tx/staking.d.ts +1 -1
- package/dist/high-level/tx-executor.d.ts +23 -3
- package/dist/high-level/types.d.ts +356 -100
- package/dist/high-level-client.d.ts +1 -1
- package/dist/index.cjs +16101 -7908
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +15860 -7678
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/accountx/v1/genesis.d.ts +38 -0
- package/dist/proto/gen/ault/accountx/v1/params.d.ts +32 -0
- package/dist/proto/gen/ault/accountx/v1/query.d.ts +88 -0
- package/dist/proto/gen/ault/accountx/v1/tx.d.ts +52 -0
- package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
- package/dist/proto/gen/ault/authority/v1/authority.d.ts +2 -0
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +6 -5
- package/dist/proto/gen/ault/clob/v1/query.d.ts +14 -0
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +30 -3
- package/dist/proto/gen/ault/common/v1/system.d.ts +31 -0
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
- package/dist/proto/gen/ault/license/v1/license.d.ts +0 -26
- 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/systemtx/v1/genesis.d.ts +37 -0
- 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 -16
- package/dist/proto/gen/cosmos/bank/v1beta1/bank.d.ts +119 -0
- package/dist/proto/gen/cosmos/bank/v1beta1/query.d.ts +264 -0
- package/dist/proto/gen/cosmos/distribution/v1beta1/query.d.ts +203 -0
- package/dist/proto/gen/cosmos/query/v1/query.d.ts +1 -0
- package/dist/proto/gen/cosmos/staking/v1beta1/query.d.ts +275 -0
- package/dist/proto/gen/google/api/http.d.ts +20 -28
- package/dist/proto/gen/tendermint/abci/types.d.ts +23 -0
- package/dist/proto/tx-decode.d.ts +18 -0
- package/dist/rest/accountx.d.ts +8 -0
- package/dist/rest/bank.d.ts +15 -0
- package/dist/rest/clob.d.ts +9 -1
- package/dist/rest/context.d.ts +4 -4
- package/dist/rest/dex-types.generated.d.ts +363 -120
- package/dist/rest/dex.d.ts +6 -0
- package/dist/rest/dex.generated.d.ts +599 -83
- package/dist/rest/feemarket.d.ts +114 -0
- package/dist/rest/license.d.ts +21 -59
- package/dist/rest/miner.d.ts +16 -46
- package/dist/rest/portfolio.d.ts +103 -0
- package/dist/rest/staking.d.ts +14 -28
- package/dist/rest/tokenregistry.d.ts +3 -1
- package/dist/rest/types.d.ts +82 -858
- package/dist/utils/address.d.ts +2 -0
- package/dist/utils/opaque-id.d.ts +25 -0
- package/dist/utils/tx-hash.d.ts +1 -0
- package/dist/ws/client.d.ts +45 -5
- package/dist/ws/types.d.ts +377 -34
- package/package.json +2 -1
- package/dist/agent/create-agent-client.d.ts +0 -3
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
import type { Eip712Msg } from "./builder";
|
|
2
|
+
import type { MsgOpenAccount, MsgUpdateParams as MsgUpdateParamsAultAccountxV1 } from "../proto/gen/ault/accountx/v1/tx";
|
|
2
3
|
import type { MsgApproveAgent, MsgRevokeAgent, MsgUpdateParams as MsgUpdateParamsAultAgentV1 } from "../proto/gen/ault/agent/v1/tx";
|
|
3
4
|
import type { MsgGrantRole, MsgRevokeRole } from "../proto/gen/ault/authority/v1/tx";
|
|
4
|
-
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";
|
|
5
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";
|
|
6
7
|
import type { MsgCreateMarket, MsgHaltAllMarkets, MsgHaltMarkets, MsgResumeAllMarkets, MsgResumeMarkets, MsgUpdateMarket, MsgUpdateParams as MsgUpdateParamsAultMarketV1 } from "../proto/gen/ault/market/v1/tx";
|
|
7
8
|
import type { MsgBatchSubmitWork, MsgCancelMiningDelegation, MsgDelegateMining, MsgRedelegateMining, MsgRegisterOperator, MsgSetOwnerVrfKey, MsgSubmitWork, MsgUnregisterOperator, MsgUpdateOperatorInfo, MsgUpdateParams as MsgUpdateParamsAultMinerV1, WorkSubmission } from "../proto/gen/ault/miner/v1/tx";
|
|
8
9
|
import type { MsgUpdateParams as MsgUpdateParamsAultRatelimitV1 } from "../proto/gen/ault/ratelimit/v1/tx";
|
|
9
10
|
import type { MsgApproveBuilder, MsgRevokeBuilder, MsgSetDeployerShare, MsgSetReferral, MsgSetReferralCode, MsgUpdateEligibleReferrers, MsgUpdateParams as MsgUpdateParamsAultRewardV1 } from "../proto/gen/ault/reward/v1/tx";
|
|
10
|
-
import type {
|
|
11
|
+
import type { TransferLimitConfig } from "../proto/gen/ault/tokenregistry/v1/tokenregistry";
|
|
12
|
+
import type { MsgDisableTokenPair, MsgDisableTransfers, MsgEnableTokenPair, MsgEnableTransfers, MsgRegisterTokenPair, MsgRemoveTransferLimit, MsgSetTransferLimit } from "../proto/gen/ault/tokenregistry/v1/tx";
|
|
11
13
|
import type { MsgWithdrawDelegatorReward } from "../proto/gen/cosmos/distribution/v1beta1/tx";
|
|
12
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">>;
|
|
16
|
+
type TransferLimitConfigInput = TransferLimitConfig;
|
|
13
17
|
type WorkSubmissionInput = Omit<WorkSubmission, "nonce"> & Partial<Pick<WorkSubmission, "nonce">>;
|
|
14
|
-
type MsgApproveAgentInput = Omit<MsgApproveAgent, "
|
|
18
|
+
type MsgApproveAgentInput = Omit<MsgApproveAgent, "expiresAt" | "name"> & Partial<Pick<MsgApproveAgent, "expiresAt" | "name">>;
|
|
15
19
|
type MsgBatchSubmitWorkInput = Omit<MsgBatchSubmitWork, "submissions"> & {
|
|
16
20
|
submissions: WorkSubmissionInput[];
|
|
17
21
|
};
|
|
18
|
-
type
|
|
19
|
-
type
|
|
22
|
+
type MsgCreateMarketInput = Omit<MsgCreateMarket, "makerFeeRate" | "takerFeeRate"> & Partial<Pick<MsgCreateMarket, "makerFeeRate" | "takerFeeRate">>;
|
|
23
|
+
type MsgModifyOrdersInput = Omit<MsgModifyOrders, "orders"> & {
|
|
24
|
+
orders: ModifyOrderInput[];
|
|
25
|
+
};
|
|
26
|
+
type MsgPlaceLimitOrderInput = Omit<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "postOnly"> & Partial<Pick<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "postOnly">>;
|
|
27
|
+
type MsgPlaceMarketOrderInput = Omit<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice">>;
|
|
20
28
|
type MsgPlaceScaleOrderInput = Omit<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly"> & Partial<Pick<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly">>;
|
|
21
29
|
type MsgRegisterOperatorInput = Omit<MsgRegisterOperator, "commissionRecipient"> & Partial<Pick<MsgRegisterOperator, "commissionRecipient">>;
|
|
30
|
+
type MsgRegisterTokenPairInput = Omit<MsgRegisterTokenPair, "transferLimit"> & Partial<Pick<MsgRegisterTokenPair, "transferLimit">>;
|
|
31
|
+
type MsgSetTransferLimitInput = Omit<MsgSetTransferLimit, "transferLimit"> & {
|
|
32
|
+
transferLimit: TransferLimitConfigInput;
|
|
33
|
+
};
|
|
22
34
|
type MsgSubmitWorkInput = Omit<MsgSubmitWork, "nonce"> & Partial<Pick<MsgSubmitWork, "nonce">>;
|
|
23
35
|
type MsgUpdateOperatorInfoInput = Omit<MsgUpdateOperatorInfo, "newCommissionRecipient"> & Partial<Pick<MsgUpdateOperatorInfo, "newCommissionRecipient">>;
|
|
24
36
|
export declare const msg: {
|
|
37
|
+
readonly accountx: {
|
|
38
|
+
readonly openAccount: (value: MsgOpenAccount) => Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount">;
|
|
39
|
+
readonly updateParams: (value: MsgUpdateParamsAultAccountxV1) => Eip712Msg<MsgUpdateParamsAultAccountxV1, "/ault.accountx.v1.MsgUpdateParams">;
|
|
40
|
+
};
|
|
25
41
|
readonly agent: {
|
|
26
42
|
readonly approveAgent: (value: MsgApproveAgentInput) => Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent">;
|
|
27
43
|
readonly revokeAgent: (value: MsgRevokeAgent) => Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent">;
|
|
@@ -33,6 +49,7 @@ export declare const msg: {
|
|
|
33
49
|
};
|
|
34
50
|
readonly clob: {
|
|
35
51
|
readonly cancelOrders: (value: MsgCancelOrders) => Eip712Msg<MsgCancelOrders, "/ault.clob.v1.MsgCancelOrders">;
|
|
52
|
+
readonly modifyOrders: (value: MsgModifyOrdersInput) => Eip712Msg<MsgModifyOrdersInput, "/ault.clob.v1.MsgModifyOrders">;
|
|
36
53
|
readonly placeLimitOrder: (value: MsgPlaceLimitOrderInput) => Eip712Msg<MsgPlaceLimitOrderInput, "/ault.clob.v1.MsgPlaceLimitOrder">;
|
|
37
54
|
readonly placeMarketOrder: (value: MsgPlaceMarketOrderInput) => Eip712Msg<MsgPlaceMarketOrderInput, "/ault.clob.v1.MsgPlaceMarketOrder">;
|
|
38
55
|
readonly placeScaleOrder: (value: MsgPlaceScaleOrderInput) => Eip712Msg<MsgPlaceScaleOrderInput, "/ault.clob.v1.MsgPlaceScaleOrder">;
|
|
@@ -57,7 +74,7 @@ export declare const msg: {
|
|
|
57
74
|
readonly updateParams: (value: MsgUpdateParamsAultLicenseV1) => Eip712Msg<MsgUpdateParamsAultLicenseV1, "/ault.license.v1.MsgUpdateParams">;
|
|
58
75
|
};
|
|
59
76
|
readonly market: {
|
|
60
|
-
readonly createMarket: (value:
|
|
77
|
+
readonly createMarket: (value: MsgCreateMarketInput) => Eip712Msg<MsgCreateMarketInput, "/ault.market.v1.MsgCreateMarket">;
|
|
61
78
|
readonly haltAllMarkets: (value: MsgHaltAllMarkets) => Eip712Msg<MsgHaltAllMarkets, "/ault.market.v1.MsgHaltAllMarkets">;
|
|
62
79
|
readonly haltMarkets: (value: MsgHaltMarkets) => Eip712Msg<MsgHaltMarkets, "/ault.market.v1.MsgHaltMarkets">;
|
|
63
80
|
readonly resumeAllMarkets: (value: MsgResumeAllMarkets) => Eip712Msg<MsgResumeAllMarkets, "/ault.market.v1.MsgResumeAllMarkets">;
|
|
@@ -95,15 +112,14 @@ export declare const msg: {
|
|
|
95
112
|
readonly undelegate: (value: MsgUndelegate) => Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
|
|
96
113
|
};
|
|
97
114
|
readonly tokenregistry: {
|
|
98
|
-
readonly cleanupTokenPair: (value: MsgCleanupTokenPair) => Eip712Msg<MsgCleanupTokenPair, "/ault.tokenregistry.v1.MsgCleanupTokenPair">;
|
|
99
115
|
readonly disableTokenPair: (value: MsgDisableTokenPair) => Eip712Msg<MsgDisableTokenPair, "/ault.tokenregistry.v1.MsgDisableTokenPair">;
|
|
100
116
|
readonly disableTransfers: (value: MsgDisableTransfers) => Eip712Msg<MsgDisableTransfers, "/ault.tokenregistry.v1.MsgDisableTransfers">;
|
|
101
117
|
readonly enableTokenPair: (value: MsgEnableTokenPair) => Eip712Msg<MsgEnableTokenPair, "/ault.tokenregistry.v1.MsgEnableTokenPair">;
|
|
102
118
|
readonly enableTransfers: (value: MsgEnableTransfers) => Eip712Msg<MsgEnableTransfers, "/ault.tokenregistry.v1.MsgEnableTransfers">;
|
|
103
|
-
readonly registerTokenPair: (value:
|
|
119
|
+
readonly registerTokenPair: (value: MsgRegisterTokenPairInput) => Eip712Msg<MsgRegisterTokenPairInput, "/ault.tokenregistry.v1.MsgRegisterTokenPair">;
|
|
104
120
|
readonly removeTransferLimit: (value: MsgRemoveTransferLimit) => Eip712Msg<MsgRemoveTransferLimit, "/ault.tokenregistry.v1.MsgRemoveTransferLimit">;
|
|
105
|
-
readonly setTransferLimit: (value:
|
|
121
|
+
readonly setTransferLimit: (value: MsgSetTransferLimitInput) => Eip712Msg<MsgSetTransferLimitInput, "/ault.tokenregistry.v1.MsgSetTransferLimit">;
|
|
106
122
|
};
|
|
107
123
|
};
|
|
108
|
-
export type AnyEip712Msg = 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<
|
|
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">;
|
|
109
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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AnyEip712Msg } from "./builder";
|
|
2
2
|
import { type NetworkConfig } from "../core/network";
|
|
3
3
|
import { type FetchFn, type FetchWithRetryOptions } from "../core/http";
|
|
4
|
+
import { type FeeMarketCache } from "../rest/feemarket";
|
|
4
5
|
import { type SignerInput } from "./signers";
|
|
5
6
|
export interface AccountInfo {
|
|
6
7
|
accountNumber: string;
|
|
@@ -32,6 +33,7 @@ export declare function _resetIndexingCache(): void;
|
|
|
32
33
|
export declare function pollTxInclusion(network: NetworkConfig, txHash: string, fetchFn?: FetchFn, fetchOptions?: FetchWithRetryOptions, timeoutMs?: number, intervalMs?: number): Promise<{
|
|
33
34
|
code: number;
|
|
34
35
|
rawLog?: string;
|
|
36
|
+
data?: string;
|
|
35
37
|
confirmed: boolean | undefined;
|
|
36
38
|
}>;
|
|
37
39
|
export interface SignAndBroadcastParams {
|
|
@@ -41,15 +43,37 @@ export interface SignAndBroadcastParams {
|
|
|
41
43
|
msgs: AnyEip712Msg[];
|
|
42
44
|
memo?: string;
|
|
43
45
|
gasLimit?: string;
|
|
46
|
+
feeDenom?: string;
|
|
44
47
|
feeAmount?: string;
|
|
45
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;
|
|
46
56
|
fetchFn?: FetchFn;
|
|
47
57
|
fetchOptions?: import("../core/http").FetchWithRetryOptions;
|
|
48
58
|
cache?: AccountCache;
|
|
59
|
+
/**
|
|
60
|
+
* Optional cache for cosmos-evm feemarket params. When neither `feeAmount`
|
|
61
|
+
* nor `network.eip712FeeAmount` is set, the sign path queries the chain's
|
|
62
|
+
* feemarket params and computes a fee at `effectiveGasPrice * gas` plus a
|
|
63
|
+
* safety margin. Sharing one cache across calls avoids per-tx REST hits.
|
|
64
|
+
*/
|
|
65
|
+
feeMarketCache?: FeeMarketCache;
|
|
49
66
|
}
|
|
50
|
-
|
|
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 {
|
|
51
73
|
txHash: string;
|
|
52
74
|
code: number;
|
|
53
75
|
rawLog?: string;
|
|
54
|
-
|
|
55
|
-
|
|
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>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AultClient } from "../client";
|
|
2
|
+
import type { CloidLookupApi } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Chain-first, dex-api-fallback cloid lookup. The chain only indexes a cloid
|
|
5
|
+
* while its order is live, so a clean miss there means filled/cancelled/expired,
|
|
6
|
+
* which the dex-api's historical index answers instead. The two legs return
|
|
7
|
+
* different shapes; see {@link CloidOrder}.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCloidLookupApi(lowLevel: AultClient): CloidLookupApi;
|
|
@@ -2,25 +2,29 @@ import type { Client, ClientOptions } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a high-level client for the Ault SDK.
|
|
4
4
|
*
|
|
5
|
+
* One client per master identity. The client owns:
|
|
6
|
+
* - the manifest resolver (fetched once at boot, refreshed in background)
|
|
7
|
+
* - the master account-info cache (sequence / accountNumber)
|
|
8
|
+
* - the fee-market cache
|
|
9
|
+
* - the wallet-signed tx executor (used by all `client.<method>(...)` calls)
|
|
10
|
+
*
|
|
11
|
+
* Agent-signed CLOB orders piggyback on the same infrastructure via
|
|
12
|
+
* `client.attachAgent(...)` — no second resolver, no second account RPC,
|
|
13
|
+
* no chance of URL/EIP-712 drift between paths.
|
|
14
|
+
*
|
|
5
15
|
* @example
|
|
6
16
|
* ```typescript
|
|
7
|
-
* import { createClient, getNetworkConfig } from 'ault-sdk-ts';
|
|
8
|
-
* import { privateKeyToAccount } from 'viem/accounts';
|
|
9
|
-
*
|
|
10
|
-
* const account = privateKeyToAccount('0x...');
|
|
11
17
|
* const client = await createClient({
|
|
12
18
|
* network: getNetworkConfig('ault_10904-1'),
|
|
13
19
|
* signer: account,
|
|
14
20
|
* });
|
|
15
21
|
*
|
|
16
|
-
* //
|
|
17
|
-
* const licenses = await client.license.getOwnedBy(client.address);
|
|
22
|
+
* await client.placeLimitOrder({...}); // signed by the master signer
|
|
18
23
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* });
|
|
24
|
+
* client.attachAgent({ agentPrivateKey });
|
|
25
|
+
* await client.asAgent!.placeLimitOrder({...}); // signed by the agent key
|
|
26
|
+
*
|
|
27
|
+
* client.dispose(); // stops manifest refresh timer
|
|
24
28
|
* ```
|
|
25
29
|
*/
|
|
26
30
|
export declare function createClient(options: ClientOptions): Promise<Client>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AgentTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createAgentTxApi({ signerAddress, exec }: TxModuleContext): AgentTxApi;
|
|
3
|
+
export declare function createAgentTxApi({ signerAddress, exec, getGas }: TxModuleContext): AgentTxApi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ClobTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createClobTxApi({ signerAddress, exec }: TxModuleContext): ClobTxApi;
|
|
3
|
+
export declare function createClobTxApi({ signerAddress, exec, getGas }: TxModuleContext): ClobTxApi;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { TxExecutor } from "../tx-executor";
|
|
2
|
+
import type { GAS_CONSTANTS } from "../../core/network";
|
|
2
3
|
export interface TxModuleContext {
|
|
3
4
|
signerAddress: string;
|
|
4
5
|
exec: TxExecutor;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the current gas constants — base GAS_CONSTANTS overlaid with any
|
|
8
|
+
* manifest overrides for the active client. Tx builders call this on each
|
|
9
|
+
* invocation so a hot-swap (manifest refresh) takes effect on the next tx
|
|
10
|
+
* without re-creating the client.
|
|
11
|
+
*/
|
|
12
|
+
getGas: () => typeof GAS_CONSTANTS;
|
|
5
13
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LicenseTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createLicenseTxApi({ signerAddress, exec }: TxModuleContext): LicenseTxApi;
|
|
3
|
+
export declare function createLicenseTxApi({ signerAddress, exec, getGas }: TxModuleContext): LicenseTxApi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MinerTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createMinerTxApi({ signerAddress, exec }: TxModuleContext): MinerTxApi;
|
|
3
|
+
export declare function createMinerTxApi({ signerAddress, exec, getGas }: TxModuleContext): MinerTxApi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RewardTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createRewardTxApi({ signerAddress, exec }: TxModuleContext): RewardTxApi;
|
|
3
|
+
export declare function createRewardTxApi({ signerAddress, exec, getGas }: TxModuleContext): RewardTxApi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { StakingTxApi } from "../types";
|
|
2
2
|
import type { TxModuleContext } from "./context";
|
|
3
|
-
export declare function createStakingTxApi({ signerAddress, exec }: TxModuleContext): StakingTxApi;
|
|
3
|
+
export declare function createStakingTxApi({ signerAddress, exec, getGas }: TxModuleContext): StakingTxApi;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
import type { FetchFn, FetchWithRetryOptions } from "../core/http";
|
|
2
2
|
import { type NetworkConfig } from "../core/network";
|
|
3
|
+
import { type AccountCache } from "../eip712/sign-and-broadcast";
|
|
3
4
|
import type { AnyEip712Msg } from "../eip712/builder";
|
|
4
5
|
import type { AultSigner } from "../eip712/signers";
|
|
6
|
+
import { type FeeMarketCache } from "../rest/feemarket";
|
|
5
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
|
+
};
|
|
6
16
|
interface TxExecutorOptions {
|
|
7
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Returns the network with the latest manifest URL/eip712 overrides applied.
|
|
19
|
+
* Called fresh on every tx so a hot-swap takes effect on the next call
|
|
20
|
+
* without re-creating the executor.
|
|
21
|
+
*/
|
|
22
|
+
getNetwork: () => NetworkConfig;
|
|
23
|
+
/** Default EIP-712 gas limit. Resolved per-call via the network getter. */
|
|
24
|
+
defaultGasLimit?: string;
|
|
8
25
|
signer: AultSigner;
|
|
9
26
|
signerAddress: string;
|
|
10
27
|
fetchFn?: FetchFn;
|
|
11
28
|
fetchOptions?: FetchWithRetryOptions;
|
|
12
|
-
defaultGasLimit?: string;
|
|
13
29
|
defaultMemo?: string;
|
|
14
30
|
defaultConfirmationTimeoutMs?: number;
|
|
31
|
+
/** Optional shared account cache (lets the agent executor read the same accountNumber). */
|
|
32
|
+
cache?: AccountCache;
|
|
33
|
+
/** Optional shared fee-market cache. */
|
|
34
|
+
feeMarketCache?: FeeMarketCache;
|
|
15
35
|
}
|
|
16
|
-
export type TxExecutor = (msgs: AnyEip712Msg[], txOptions?:
|
|
36
|
+
export type TxExecutor = (msgs: AnyEip712Msg[], txOptions?: ExecOptions) => Promise<TxResult>;
|
|
17
37
|
export declare function createTxExecutor(options: TxExecutorOptions): TxExecutor;
|
|
18
38
|
export {};
|