ault-sdk-ts 0.0.2-alpha.10 → 0.0.2-alpha.12
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 -2
- package/dist/client.d.ts +4 -0
- package/dist/core/network.d.ts +11 -8
- package/dist/eip712/msg.generated.d.ts +15 -5
- package/dist/eip712/sign-and-broadcast.d.ts +2 -1
- package/dist/high-level/tx/accountx.d.ts +3 -0
- package/dist/high-level/types.d.ts +32 -6
- package/dist/index.cjs +13859 -8454
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +13788 -8343
- 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 +56 -0
- package/dist/proto/gen/ault/accountx/v1/tx.d.ts +52 -0
- package/dist/proto/gen/ault/authority/v1/authority.d.ts +2 -0
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +15 -15
- package/dist/proto/gen/ault/license/v1/license.d.ts +0 -12
- package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +0 -15
- 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/rest/accountx.d.ts +8 -0
- package/dist/rest/bank.d.ts +15 -0
- package/dist/rest/context.d.ts +4 -4
- package/dist/rest/dex-types.generated.d.ts +132 -104
- package/dist/rest/dex.generated.d.ts +133 -56
- package/dist/rest/license.d.ts +22 -59
- package/dist/rest/miner.d.ts +16 -46
- package/dist/rest/staking.d.ts +14 -28
- package/dist/rest/types.d.ts +83 -858
- package/dist/utils/address.d.ts +1 -0
- package/dist/utils/opaque-id.d.ts +24 -0
- package/dist/utils/tx-hash.d.ts +1 -0
- package/dist/ws/client.d.ts +3 -0
- package/dist/ws/types.d.ts +69 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -874,12 +874,20 @@ Pre-release tags publish to a separate npm dist-tag so they never become the def
|
|
|
874
874
|
|
|
875
875
|
```bash
|
|
876
876
|
# Set the pre-release version
|
|
877
|
+
git checkout master
|
|
878
|
+
git pull
|
|
879
|
+
git checkout -b "release/v0.1.0-alpha.1"
|
|
877
880
|
npm version 0.1.0-alpha.1 --no-git-tag-version
|
|
878
|
-
|
|
879
881
|
git add package.json
|
|
880
882
|
git commit -m "chore: release v0.1.0-alpha.1"
|
|
883
|
+
git push origin release/v0.1.0-alpha.1
|
|
884
|
+
|
|
885
|
+
# Create PR and merge to master
|
|
886
|
+
|
|
887
|
+
git checkout master
|
|
888
|
+
git pull
|
|
881
889
|
git tag v0.1.0-alpha.1
|
|
882
|
-
git push origin
|
|
890
|
+
git push origin v0.1.0-alpha.1
|
|
883
891
|
```
|
|
884
892
|
|
|
885
893
|
Consumers install with the corresponding tag:
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { NetworkConfig } from "./core/network";
|
|
2
2
|
import type { FetchWithRetryOptions, FetchFn } from "./core/http";
|
|
3
|
+
import { type AccountxApi } from "./rest/accountx";
|
|
3
4
|
import { type AgentApi } from "./rest/agent";
|
|
4
5
|
import { type AuthorityApi } from "./rest/authority";
|
|
6
|
+
import { type BankApi } from "./rest/bank";
|
|
5
7
|
import { type ClobApi } from "./rest/clob";
|
|
6
8
|
import { type LicenseApi } from "./rest/license";
|
|
7
9
|
import { type MarketApi } from "./rest/market";
|
|
@@ -29,8 +31,10 @@ export interface AultClientOptions {
|
|
|
29
31
|
export interface AultClient {
|
|
30
32
|
network: NetworkConfig;
|
|
31
33
|
rest: {
|
|
34
|
+
accountx: AccountxApi;
|
|
32
35
|
agent: AgentApi;
|
|
33
36
|
authority: AuthorityApi;
|
|
37
|
+
bank: BankApi;
|
|
34
38
|
clob: ClobApi;
|
|
35
39
|
license: LicenseApi;
|
|
36
40
|
market: MarketApi;
|
package/dist/core/network.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export interface NetworkConfig {
|
|
|
12
12
|
dexWsUrl?: string;
|
|
13
13
|
explorerUrl?: string;
|
|
14
14
|
isProduction: boolean;
|
|
15
|
+
/** Default EIP-712 fee denom. Overrides GAS_CONSTANTS.DENOM. */
|
|
16
|
+
eip712FeeDenom?: string;
|
|
15
17
|
/** Default EIP-712 fee amount in smallest denom (e.g. aault). Overrides GAS_CONSTANTS.EIP712_FEE_AMOUNT. */
|
|
16
18
|
eip712FeeAmount?: string;
|
|
17
19
|
/** Default EIP-712 gas limit. Overrides GAS_CONSTANTS.EIP712_GAS_LIMIT. */
|
|
@@ -42,18 +44,19 @@ export declare const GAS_CONSTANTS: {
|
|
|
42
44
|
readonly PER_DELEGATE_MINING: 200000;
|
|
43
45
|
readonly PER_SUBMIT_WORK: 200000;
|
|
44
46
|
readonly SET_OWNER_VRF_KEY: 200000;
|
|
45
|
-
readonly APPROVE_AGENT:
|
|
46
|
-
readonly REVOKE_AGENT:
|
|
47
|
-
readonly APPROVE_BUILDER:
|
|
48
|
-
readonly REVOKE_BUILDER:
|
|
49
|
-
readonly SET_REFERRAL_CODE:
|
|
50
|
-
readonly SET_REFERRAL:
|
|
51
|
-
readonly LIMIT_ORDER:
|
|
52
|
-
readonly MARKET_ORDER:
|
|
47
|
+
readonly APPROVE_AGENT: 97000;
|
|
48
|
+
readonly REVOKE_AGENT: 61000;
|
|
49
|
+
readonly APPROVE_BUILDER: 81000;
|
|
50
|
+
readonly REVOKE_BUILDER: 57000;
|
|
51
|
+
readonly SET_REFERRAL_CODE: 76000;
|
|
52
|
+
readonly SET_REFERRAL: 90000;
|
|
53
|
+
readonly LIMIT_ORDER: 126000;
|
|
54
|
+
readonly MARKET_ORDER: 116000;
|
|
53
55
|
readonly SCALE_ORDER_BASE: 115000;
|
|
54
56
|
readonly SCALE_ORDER_PER_SUB: 11000;
|
|
55
57
|
readonly CANCEL_ORDER_BASE: 49000;
|
|
56
58
|
readonly CANCEL_ORDER_PER_ID: 22000;
|
|
59
|
+
readonly OPEN_ACCOUNT: 96000;
|
|
57
60
|
};
|
|
58
61
|
export declare function computeFeeFreeGas(minGasPerOp: number, count: number): string;
|
|
59
62
|
export declare function computeFeeFreeGasCompound(base: number, perItem: number, count: number): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
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
5
|
import type { MsgCancelOrders, MsgPlaceLimitOrder, MsgPlaceMarketOrder, MsgPlaceScaleOrder, MsgUpdateParams as MsgUpdateParamsAultClobV1 } from "../proto/gen/ault/clob/v1/tx";
|
|
@@ -7,9 +8,11 @@ import type { MsgCreateMarket, MsgHaltAllMarkets, MsgHaltMarkets, MsgResumeAllMa
|
|
|
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 TransferLimitConfigInput = TransferLimitConfig;
|
|
13
16
|
type WorkSubmissionInput = Omit<WorkSubmission, "nonce"> & Partial<Pick<WorkSubmission, "nonce">>;
|
|
14
17
|
type MsgApproveAgentInput = Omit<MsgApproveAgent, "expiry" | "name"> & Partial<Pick<MsgApproveAgent, "expiry" | "name">>;
|
|
15
18
|
type MsgBatchSubmitWorkInput = Omit<MsgBatchSubmitWork, "submissions"> & {
|
|
@@ -19,9 +22,17 @@ type MsgPlaceLimitOrderInput = Omit<MsgPlaceLimitOrder, "builderAddress" | "buil
|
|
|
19
22
|
type MsgPlaceMarketOrderInput = Omit<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "priceTolerance" | "worstPrice">>;
|
|
20
23
|
type MsgPlaceScaleOrderInput = Omit<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly"> & Partial<Pick<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly">>;
|
|
21
24
|
type MsgRegisterOperatorInput = Omit<MsgRegisterOperator, "commissionRecipient"> & Partial<Pick<MsgRegisterOperator, "commissionRecipient">>;
|
|
25
|
+
type MsgRegisterTokenPairInput = Omit<MsgRegisterTokenPair, "transferLimit"> & Partial<Pick<MsgRegisterTokenPair, "transferLimit">>;
|
|
26
|
+
type MsgSetTransferLimitInput = Omit<MsgSetTransferLimit, "transferLimit"> & {
|
|
27
|
+
transferLimit: TransferLimitConfigInput;
|
|
28
|
+
};
|
|
22
29
|
type MsgSubmitWorkInput = Omit<MsgSubmitWork, "nonce"> & Partial<Pick<MsgSubmitWork, "nonce">>;
|
|
23
30
|
type MsgUpdateOperatorInfoInput = Omit<MsgUpdateOperatorInfo, "newCommissionRecipient"> & Partial<Pick<MsgUpdateOperatorInfo, "newCommissionRecipient">>;
|
|
24
31
|
export declare const msg: {
|
|
32
|
+
readonly accountx: {
|
|
33
|
+
readonly openAccount: (value: MsgOpenAccount) => Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount">;
|
|
34
|
+
readonly updateParams: (value: MsgUpdateParamsAultAccountxV1) => Eip712Msg<MsgUpdateParamsAultAccountxV1, "/ault.accountx.v1.MsgUpdateParams">;
|
|
35
|
+
};
|
|
25
36
|
readonly agent: {
|
|
26
37
|
readonly approveAgent: (value: MsgApproveAgentInput) => Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent">;
|
|
27
38
|
readonly revokeAgent: (value: MsgRevokeAgent) => Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent">;
|
|
@@ -95,15 +106,14 @@ export declare const msg: {
|
|
|
95
106
|
readonly undelegate: (value: MsgUndelegate) => Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
|
|
96
107
|
};
|
|
97
108
|
readonly tokenregistry: {
|
|
98
|
-
readonly cleanupTokenPair: (value: MsgCleanupTokenPair) => Eip712Msg<MsgCleanupTokenPair, "/ault.tokenregistry.v1.MsgCleanupTokenPair">;
|
|
99
109
|
readonly disableTokenPair: (value: MsgDisableTokenPair) => Eip712Msg<MsgDisableTokenPair, "/ault.tokenregistry.v1.MsgDisableTokenPair">;
|
|
100
110
|
readonly disableTransfers: (value: MsgDisableTransfers) => Eip712Msg<MsgDisableTransfers, "/ault.tokenregistry.v1.MsgDisableTransfers">;
|
|
101
111
|
readonly enableTokenPair: (value: MsgEnableTokenPair) => Eip712Msg<MsgEnableTokenPair, "/ault.tokenregistry.v1.MsgEnableTokenPair">;
|
|
102
112
|
readonly enableTransfers: (value: MsgEnableTransfers) => Eip712Msg<MsgEnableTransfers, "/ault.tokenregistry.v1.MsgEnableTransfers">;
|
|
103
|
-
readonly registerTokenPair: (value:
|
|
113
|
+
readonly registerTokenPair: (value: MsgRegisterTokenPairInput) => Eip712Msg<MsgRegisterTokenPairInput, "/ault.tokenregistry.v1.MsgRegisterTokenPair">;
|
|
104
114
|
readonly removeTransferLimit: (value: MsgRemoveTransferLimit) => Eip712Msg<MsgRemoveTransferLimit, "/ault.tokenregistry.v1.MsgRemoveTransferLimit">;
|
|
105
|
-
readonly setTransferLimit: (value:
|
|
115
|
+
readonly setTransferLimit: (value: MsgSetTransferLimitInput) => Eip712Msg<MsgSetTransferLimitInput, "/ault.tokenregistry.v1.MsgSetTransferLimit">;
|
|
106
116
|
};
|
|
107
117
|
};
|
|
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<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<
|
|
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">;
|
|
109
119
|
export {};
|
|
@@ -41,13 +41,14 @@ export interface SignAndBroadcastParams {
|
|
|
41
41
|
msgs: AnyEip712Msg[];
|
|
42
42
|
memo?: string;
|
|
43
43
|
gasLimit?: string;
|
|
44
|
+
feeDenom?: string;
|
|
44
45
|
feeAmount?: string;
|
|
45
46
|
confirmationTimeoutMs?: number;
|
|
46
47
|
fetchFn?: FetchFn;
|
|
47
48
|
fetchOptions?: import("../core/http").FetchWithRetryOptions;
|
|
48
49
|
cache?: AccountCache;
|
|
49
50
|
}
|
|
50
|
-
export declare function signAndBroadcastEip712({ network, signerAddress, signer, msgs, memo, gasLimit, feeAmount, confirmationTimeoutMs, fetchFn, fetchOptions, cache, }: SignAndBroadcastParams): Promise<{
|
|
51
|
+
export declare function signAndBroadcastEip712({ network, signerAddress, signer, msgs, memo, gasLimit, feeDenom, feeAmount, confirmationTimeoutMs, fetchFn, fetchOptions, cache, }: SignAndBroadcastParams): Promise<{
|
|
51
52
|
txHash: string;
|
|
52
53
|
code: number;
|
|
53
54
|
rawLog?: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { NetworkConfig } from "../core/network";
|
|
2
2
|
import type { FetchWithRetryOptions, FetchFn } from "../core/http";
|
|
3
3
|
import type { AultClient } from "../client";
|
|
4
|
+
import type { AccountxApi } from "../rest/accountx";
|
|
4
5
|
import type { AgentApi } from "../rest/agent";
|
|
5
6
|
import type { AuthorityApi, AuthorityRoleInput } from "../rest/authority";
|
|
7
|
+
import type { BankApi } from "../rest/bank";
|
|
6
8
|
import type { ClobApi } from "../rest/clob";
|
|
7
9
|
import type { LicenseApi } from "../rest/license";
|
|
8
10
|
import type { MarketApi } from "../rest/market";
|
|
@@ -11,7 +13,7 @@ import type { RateLimitApi } from "../rest/ratelimit";
|
|
|
11
13
|
import type { RewardApi } from "../rest/reward";
|
|
12
14
|
import type { StakingApi } from "../rest/staking";
|
|
13
15
|
import type { TokenRegistryApi } from "../rest/tokenregistry";
|
|
14
|
-
import type { License } from "../
|
|
16
|
+
import type { License } from "../proto/gen/ault/license/v1/license";
|
|
15
17
|
import type { Params as AgentParams } from "../proto/gen/ault/agent/v1/params";
|
|
16
18
|
import type { Role } from "../proto/gen/ault/authority/v1/authority";
|
|
17
19
|
import type { Params as ClobParams } from "../proto/gen/ault/clob/v1/params";
|
|
@@ -35,6 +37,7 @@ export type MarketUpdateInput = {
|
|
|
35
37
|
/** Common transaction options available on all methods */
|
|
36
38
|
export interface TxOptions {
|
|
37
39
|
gasLimit?: string;
|
|
40
|
+
feeDenom?: string;
|
|
38
41
|
feeAmount?: string;
|
|
39
42
|
memo?: string;
|
|
40
43
|
confirmationTimeoutMs?: number;
|
|
@@ -87,7 +90,11 @@ export interface ClientOptions {
|
|
|
87
90
|
* Result of a transaction.
|
|
88
91
|
*/
|
|
89
92
|
export interface TxResult {
|
|
90
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Transaction hash in canonical SDK form: lower-case hex without a `0x`
|
|
95
|
+
* prefix (32 bytes = 64 hex characters). For Tendermint REST/CLI queries
|
|
96
|
+
* upper-case the value; for EVM JSON-RPC prefix it with `0x`.
|
|
97
|
+
*/
|
|
91
98
|
txHash: string;
|
|
92
99
|
/** Result code (0 = success). When `confirmed` is false this is -1 (poll timed out). */
|
|
93
100
|
code: number;
|
|
@@ -215,6 +222,24 @@ export interface AgentTxApi {
|
|
|
215
222
|
params: AgentParams;
|
|
216
223
|
} & TxOptions): Promise<TxResult>;
|
|
217
224
|
}
|
|
225
|
+
export interface AccountxTxApi {
|
|
226
|
+
/**
|
|
227
|
+
* Register an account for fee-free transactions on the chain. Required
|
|
228
|
+
* before any subsequent fee-free EIP-712 or agent tx; without it the
|
|
229
|
+
* chain rejects the next tx with
|
|
230
|
+
* "account is not opened for fee-free transactions".
|
|
231
|
+
*
|
|
232
|
+
* `account` defaults to the signer's own address. `feeDenom` selects the
|
|
233
|
+
* opening-fee denomination from the chain's `accountx.params.allowed_fees`
|
|
234
|
+
* list and is also used as the transaction fee denom for this call. The
|
|
235
|
+
* opening tx itself pays a real fee, so callers should pass the matching
|
|
236
|
+
* `feeAmount` from the selected allowed fee.
|
|
237
|
+
*/
|
|
238
|
+
openAccount(params: {
|
|
239
|
+
feeDenom: string;
|
|
240
|
+
account?: string;
|
|
241
|
+
} & TxOptions): Promise<TxResult>;
|
|
242
|
+
}
|
|
218
243
|
export interface AuthorityTxApi {
|
|
219
244
|
grantRole(params: {
|
|
220
245
|
role: AuthorityRoleInput;
|
|
@@ -358,9 +383,6 @@ export interface TokenRegistryTxApi {
|
|
|
358
383
|
disableTokenPair(params: {
|
|
359
384
|
erc20Address: string;
|
|
360
385
|
} & TxOptions): Promise<TxResult>;
|
|
361
|
-
cleanupTokenPair(params: {
|
|
362
|
-
erc20Address: string;
|
|
363
|
-
} & TxOptions): Promise<TxResult>;
|
|
364
386
|
}
|
|
365
387
|
export interface LicenseDelegationStatus {
|
|
366
388
|
licenseId: string;
|
|
@@ -387,15 +409,19 @@ export interface ParallelQueryApi {
|
|
|
387
409
|
* High-level client interface for the Ault SDK.
|
|
388
410
|
* Provides simplified methods for common operations.
|
|
389
411
|
*/
|
|
390
|
-
export interface Client extends AgentTxApi, AuthorityTxApi, ClobTxApi, LicenseTxApi, MarketTxApi, MinerTxApi, RateLimitTxApi, RewardTxApi, StakingTxApi, TokenRegistryTxApi, ParallelQueryApi {
|
|
412
|
+
export interface Client extends AccountxTxApi, AgentTxApi, AuthorityTxApi, ClobTxApi, LicenseTxApi, MarketTxApi, MinerTxApi, RateLimitTxApi, RewardTxApi, StakingTxApi, TokenRegistryTxApi, ParallelQueryApi {
|
|
391
413
|
/** Network configuration */
|
|
392
414
|
readonly network: NetworkConfig;
|
|
393
415
|
/** Signer address in Ault bech32 format */
|
|
394
416
|
readonly address: string;
|
|
417
|
+
/** Accountx module queries (fee-free account registration). */
|
|
418
|
+
readonly accountx: AccountxApi;
|
|
395
419
|
/** Agent module queries */
|
|
396
420
|
readonly agent: AgentApi;
|
|
397
421
|
/** Authority module queries */
|
|
398
422
|
readonly authority: AuthorityApi;
|
|
423
|
+
/** Bank module queries (proto-canonical Coin amounts as strings). */
|
|
424
|
+
readonly bank: BankApi;
|
|
399
425
|
/** CLOB module queries */
|
|
400
426
|
readonly clob: ClobApi;
|
|
401
427
|
/** License module queries */
|