ault-sdk-ts 0.8.0 → 0.10.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 +267 -51
- package/dist/agent/attach.d.ts +10 -1
- package/dist/agent/sign-and-broadcast.d.ts +2 -2
- package/dist/agent/tx/perpetual.d.ts +10 -0
- package/dist/agent/tx/vault.d.ts +11 -0
- package/dist/client.d.ts +10 -0
- package/dist/core/address.d.ts +6 -0
- package/dist/core/clob-msgs.d.ts +21 -3
- package/dist/core/lending-gas.d.ts +5 -0
- package/dist/core/lending-msgs.d.ts +52 -0
- package/dist/core/manifest-types.d.ts +60 -0
- package/dist/core/margin-account.d.ts +18 -0
- package/dist/core/margin-gas.d.ts +7 -0
- package/dist/core/margin-msgs.d.ts +52 -0
- package/dist/core/network.d.ts +37 -7
- package/dist/core/perpetual-gas.d.ts +12 -0
- package/dist/core/perpetual-msgs.d.ts +44 -0
- package/dist/core/vault-gas.d.ts +8 -0
- package/dist/core/vault-msgs.d.ts +150 -0
- package/dist/eip712/msg-encoders.generated.d.ts +8 -0
- package/dist/eip712/msg.generated.d.ts +51 -68
- package/dist/eip712/registry.d.ts +17 -0
- package/dist/eip712/types.d.ts +5 -0
- package/dist/high-level/tx/lending.d.ts +3 -0
- package/dist/high-level/tx/license.d.ts +1 -1
- package/dist/high-level/tx/margin.d.ts +3 -0
- package/dist/high-level/tx/perpetual.d.ts +3 -0
- package/dist/high-level/tx/vault.d.ts +3 -0
- package/dist/high-level/types.d.ts +280 -152
- package/dist/index.cjs +23569 -12952
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +23364 -13023
- package/dist/index.js.map +1 -1
- package/dist/perp/decimal.d.ts +39 -0
- package/dist/perp/funding.d.ts +18 -0
- package/dist/perp/index.d.ts +5 -0
- package/dist/perp/margin.d.ts +33 -0
- package/dist/perp/orders.d.ts +27 -0
- package/dist/perp/position.d.ts +29 -0
- package/dist/proto/gen/ault/accountx/v1/query.d.ts +10 -1
- package/dist/proto/gen/ault/authority/v1/authority.d.ts +2 -0
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +7 -0
- package/dist/proto/gen/ault/clob/v1/twap.d.ts +11 -8
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +11 -1
- package/dist/proto/gen/ault/common/v1/system.d.ts +31 -0
- package/dist/proto/gen/ault/lending/v1/genesis.d.ts +34 -0
- package/dist/proto/gen/ault/lending/v1/lending.d.ts +152 -0
- package/dist/proto/gen/ault/lending/v1/params.d.ts +42 -0
- package/dist/proto/gen/ault/lending/v1/query.d.ts +157 -0
- package/dist/proto/gen/ault/lending/v1/tx.d.ts +236 -0
- package/dist/proto/gen/ault/margin/v1/genesis.d.ts +102 -0
- package/dist/proto/gen/ault/margin/v1/margin.d.ts +130 -0
- package/dist/proto/gen/ault/margin/v1/params.d.ts +31 -0
- package/dist/proto/gen/ault/margin/v1/query.d.ts +127 -0
- package/dist/proto/gen/ault/margin/v1/tx.d.ts +181 -0
- package/dist/proto/gen/ault/market/v1/market.d.ts +9 -0
- package/dist/proto/gen/ault/market/v1/tx.d.ts +16 -0
- package/dist/proto/gen/ault/oracle/v1/genesis.d.ts +69 -0
- package/dist/proto/gen/ault/oracle/v1/oracle.d.ts +154 -0
- package/dist/proto/gen/ault/oracle/v1/query.d.ts +93 -0
- package/dist/proto/gen/ault/oracle/v1/tx.d.ts +151 -0
- package/dist/proto/gen/ault/perpetual/v1/genesis.d.ts +119 -0
- package/dist/proto/gen/ault/perpetual/v1/order.d.ts +46 -0
- package/dist/proto/gen/ault/perpetual/v1/params.d.ts +30 -0
- package/dist/proto/gen/ault/perpetual/v1/perpetual.d.ts +192 -0
- package/dist/proto/gen/ault/perpetual/v1/query.d.ts +150 -0
- package/dist/proto/gen/ault/perpetual/v1/tx.d.ts +97 -0
- package/dist/proto/gen/ault/systemtx/v1/genesis.d.ts +37 -0
- package/dist/proto/gen/ault/vault/v1/genesis.d.ts +90 -0
- package/dist/proto/gen/ault/vault/v1/params.d.ts +55 -0
- package/dist/proto/gen/ault/vault/v1/query.d.ts +152 -0
- package/dist/proto/gen/ault/vault/v1/tx.d.ts +194 -0
- package/dist/proto/gen/ault/vault/v1/vault.d.ts +227 -0
- package/dist/rest/dex-types.generated.d.ts +2045 -27
- package/dist/rest/dex.d.ts +52 -2
- package/dist/rest/dex.generated.d.ts +5097 -1276
- package/dist/rest/lending.d.ts +46 -0
- package/dist/rest/margin.d.ts +33 -0
- package/dist/rest/oracle.d.ts +19 -0
- package/dist/rest/pagination.d.ts +6 -2
- package/dist/rest/perpetual.d.ts +46 -0
- package/dist/rest/portfolio.d.ts +32 -0
- package/dist/rest/tokenregistry.d.ts +7 -0
- package/dist/rest/vault.d.ts +26 -0
- package/dist/utils/cosmos-dec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/high-level/tx/authority.d.ts +0 -3
- package/dist/high-level/tx/market.d.ts +0 -3
- package/dist/high-level/tx/ratelimit.d.ts +0 -3
- package/dist/high-level/tx/tokenregistry.d.ts +0 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MarketId } from "../utils/opaque-id";
|
|
2
|
+
/** A market id as raw bytes, a `MarketId`, or the hex string the dex-api returns. */
|
|
3
|
+
export type MarginMarketIdInput = Uint8Array | MarketId | string;
|
|
4
|
+
/**
|
|
5
|
+
* The margin account the chain funds a margin order from. Without `marketId`
|
|
6
|
+
* this is the owner's cross account; with one, the isolated account of that
|
|
7
|
+
* market. A `cross: true` order funds from the cross account whatever market
|
|
8
|
+
* it trades, so derive its account without the market id. Orders, fills and wallet flows of a margin account are read through
|
|
9
|
+
* the dex-api address routes with this address, not the owner's.
|
|
10
|
+
*
|
|
11
|
+
* `owner` takes a bech32 or 0x address. Nothing is queried: the chain derives
|
|
12
|
+
* the same address the same way.
|
|
13
|
+
*/
|
|
14
|
+
export declare function marginAccountAddress(owner: string, marketId?: MarginMarketIdInput): string;
|
|
15
|
+
/** True when `address` has the length and prefix every margin account has. No store read. */
|
|
16
|
+
export declare function isMarginAccountAddress(address: string): boolean;
|
|
17
|
+
/** The owner a margin account was derived from, or null when `address` is not one. */
|
|
18
|
+
export declare function marginAccountOwner(address: string): string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GAS_CONSTANTS } from "./network";
|
|
2
|
+
type Gas = typeof GAS_CONSTANTS;
|
|
3
|
+
export declare function depositMarginGas(gas: Gas, coinCount: number): string;
|
|
4
|
+
export declare function withdrawMarginGas(gas: Gas, coinCount: number): string;
|
|
5
|
+
export declare function borrowMarginGas(gas: Gas): string;
|
|
6
|
+
export declare function repayMarginGas(gas: Gas): string;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Any } from "../proto/gen/google/protobuf/any";
|
|
2
|
+
import type { Coin } from "../proto/gen/cosmos/base/v1beta1/coin";
|
|
3
|
+
export declare const MARGIN_OPTIONS_TYPE_URL = "/ault.margin.v1.MarginOptions";
|
|
4
|
+
/**
|
|
5
|
+
* Lending-backed funding for a spot order. Every flag defaults to false, which
|
|
6
|
+
* is an isolated order that only spends collateral already in the account.
|
|
7
|
+
*/
|
|
8
|
+
export interface MarginOrderOptions {
|
|
9
|
+
/** Fund from the owner's cross-margin account instead of the market's isolated one. */
|
|
10
|
+
cross?: boolean;
|
|
11
|
+
/** Borrow the shortfall between the order's escrow and the account's free collateral. */
|
|
12
|
+
autoBorrow?: boolean;
|
|
13
|
+
/** Apply the order's fill proceeds to same-denom debt. */
|
|
14
|
+
autoRepay?: boolean;
|
|
15
|
+
/** Repay this order's borrow when its reservation is freed by a close, shrink or replace. */
|
|
16
|
+
autoRepayAtCancel?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Packs margin funding options into the `options` Any of a clob limit or
|
|
20
|
+
* market order. The order then escrows from the owner's derived margin
|
|
21
|
+
* account (see `marginAccountAddress`) instead of the bank balance. TWAP and
|
|
22
|
+
* scale orders carry no options.
|
|
23
|
+
*/
|
|
24
|
+
export declare function packMarginOrderOptions(options: MarginOrderOptions): Any;
|
|
25
|
+
/**
|
|
26
|
+
* Moves coins from the sender's bank balance into a margin account as Lending
|
|
27
|
+
* collateral. Without `marketId` this funds the cross account. Coins may come
|
|
28
|
+
* in any order; they are sent sorted by denom.
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildDepositMarginMsg(sender: string, params: {
|
|
31
|
+
amount: Coin[];
|
|
32
|
+
marketId?: Uint8Array;
|
|
33
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/margin/v1/tx").MsgDepositMargin, "/ault.margin.v1.MsgDepositMargin">;
|
|
34
|
+
/**
|
|
35
|
+
* Withdraws collateral from a margin account back to the bank. The chain
|
|
36
|
+
* refuses a withdrawal that would drop the account below its health bound;
|
|
37
|
+
* the dex-api reports the safe amount per denom as `maxTransferable`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildWithdrawMarginMsg(sender: string, params: {
|
|
40
|
+
amount: Coin[];
|
|
41
|
+
marketId?: Uint8Array;
|
|
42
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/margin/v1/tx").MsgWithdrawMargin, "/ault.margin.v1.MsgWithdrawMargin">;
|
|
43
|
+
/** Borrows into a margin account from the margin Lending pool. */
|
|
44
|
+
export declare function buildBorrowMarginMsg(sender: string, params: {
|
|
45
|
+
amount: Coin;
|
|
46
|
+
marketId?: Uint8Array;
|
|
47
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/margin/v1/tx").MsgBorrowMargin, "/ault.margin.v1.MsgBorrowMargin">;
|
|
48
|
+
/** Repays a margin account's debt out of its own collateral. */
|
|
49
|
+
export declare function buildRepayMarginMsg(sender: string, params: {
|
|
50
|
+
amount: Coin;
|
|
51
|
+
marketId?: Uint8Array;
|
|
52
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/margin/v1/tx").MsgRepayMargin, "/ault.margin.v1.MsgRepayMargin">;
|
package/dist/core/network.d.ts
CHANGED
|
@@ -53,15 +53,45 @@ export declare const GAS_CONSTANTS: {
|
|
|
53
53
|
readonly REVOKE_BUILDER: 57000;
|
|
54
54
|
readonly SET_REFERRAL_CODE: 76000;
|
|
55
55
|
readonly SET_REFERRAL: 80000;
|
|
56
|
-
readonly LIMIT_ORDER:
|
|
57
|
-
readonly MARKET_ORDER:
|
|
58
|
-
readonly TWAP_ORDER:
|
|
59
|
-
readonly SCALE_ORDER_BASE:
|
|
60
|
-
readonly SCALE_ORDER_PER_SUB:
|
|
56
|
+
readonly LIMIT_ORDER: 155000;
|
|
57
|
+
readonly MARKET_ORDER: 145000;
|
|
58
|
+
readonly TWAP_ORDER: 118000;
|
|
59
|
+
readonly SCALE_ORDER_BASE: 130000;
|
|
60
|
+
readonly SCALE_ORDER_PER_SUB: 23000;
|
|
61
61
|
readonly CANCEL_ORDER_BASE: 52000;
|
|
62
|
-
readonly CANCEL_ORDER_PER_ID:
|
|
63
|
-
readonly MODIFY_ORDER_PER_ID:
|
|
62
|
+
readonly CANCEL_ORDER_PER_ID: 29000;
|
|
63
|
+
readonly MODIFY_ORDER_PER_ID: 155000;
|
|
64
64
|
readonly OPEN_ACCOUNT: 96000;
|
|
65
|
+
readonly PERP_DEPOSIT: 250000;
|
|
66
|
+
readonly PERP_WITHDRAW: 250000;
|
|
67
|
+
readonly PERP_SET_MARGIN_CONFIG: 250000;
|
|
68
|
+
readonly PERP_MODIFY_POSITION_MARGIN: 250000;
|
|
69
|
+
readonly LENDING_SUPPLY: 122000;
|
|
70
|
+
readonly LENDING_WITHDRAW: 115000;
|
|
71
|
+
readonly LENDING_SUPPLY_COLLATERAL: 110000;
|
|
72
|
+
readonly LENDING_WITHDRAW_COLLATERAL: 240000;
|
|
73
|
+
readonly LENDING_BORROW: 260000;
|
|
74
|
+
readonly LENDING_REPAY: 100000;
|
|
75
|
+
readonly LENDING_LIQUIDATE: 440000;
|
|
76
|
+
readonly LENDING_FUND_INSURANCE_FUND: 150000;
|
|
77
|
+
readonly MARGIN_DEPOSIT_BASE: 88000;
|
|
78
|
+
readonly MARGIN_DEPOSIT_PER_COIN: 46000;
|
|
79
|
+
readonly MARGIN_WITHDRAW_BASE: 74000;
|
|
80
|
+
readonly MARGIN_WITHDRAW_PER_COIN: 180000;
|
|
81
|
+
readonly MARGIN_BORROW: 227000;
|
|
82
|
+
readonly MARGIN_REPAY: 92000;
|
|
83
|
+
readonly VAULT_CREATE_TRADING_BASE: 190000;
|
|
84
|
+
readonly VAULT_CREATE_PER_MARKET: 10000;
|
|
85
|
+
readonly VAULT_CREATE_LENDING_BASE: 124000;
|
|
86
|
+
readonly VAULT_CREATE_PER_LENDING_POOL: 1700;
|
|
87
|
+
readonly VAULT_UPDATE_MANAGER: 130000;
|
|
88
|
+
readonly VAULT_UPDATE_CONFIG: 1650000;
|
|
89
|
+
readonly VAULT_CANCEL_CONFIG_UPDATE: 75000;
|
|
90
|
+
readonly VAULT_SET_STATUS: 78000;
|
|
91
|
+
readonly VAULT_DEPOSIT: 2000000;
|
|
92
|
+
readonly VAULT_REDEEM: 2000000;
|
|
93
|
+
readonly VAULT_TRANSFER: 65000;
|
|
94
|
+
readonly VAULT_REALLOCATE: 145000;
|
|
65
95
|
readonly DELEGATE: 220000;
|
|
66
96
|
readonly UNDELEGATE: 260000;
|
|
67
97
|
readonly BEGIN_REDELEGATE: 400000;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type GAS_CONSTANTS } from "./network";
|
|
2
|
+
/**
|
|
3
|
+
* Fee-free gas for the x/perpetual collateral and margin messages, shared by
|
|
4
|
+
* the wallet (EIP-712) and agent factories. Each takes an explicit `gas`
|
|
5
|
+
* snapshot so a manifest hot-swap is honored on the next call.
|
|
6
|
+
*/
|
|
7
|
+
type Gas = typeof GAS_CONSTANTS;
|
|
8
|
+
export declare function perpDepositGas(gas: Gas): string;
|
|
9
|
+
export declare function perpWithdrawGas(gas: Gas): string;
|
|
10
|
+
export declare function setMarginConfigGas(gas: Gas): string;
|
|
11
|
+
export declare function modifyPositionMarginGas(gas: Gas): string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Any } from "../proto/gen/google/protobuf/any";
|
|
2
|
+
export declare const PERPETUAL_ORDER_OPTIONS_TYPE_URL = "/ault.perpetual.v1.PerpetualOrderOptions";
|
|
3
|
+
/**
|
|
4
|
+
* Packs perpetual order options into the `options` Any that the clob
|
|
5
|
+
* place-order messages carry. The chain routes the order to x/perpetual by
|
|
6
|
+
* market type; these options only tune how that module treats it.
|
|
7
|
+
*/
|
|
8
|
+
export declare function packPerpetualOrderOptions(options: {
|
|
9
|
+
reduceOnly: boolean;
|
|
10
|
+
}): Any;
|
|
11
|
+
/**
|
|
12
|
+
* Moves collateral from the sender's bank balance into their perpetual cross
|
|
13
|
+
* account. `amount` is an integer string in the collateral denom's base units.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildPerpDepositMsg(sender: string, params: {
|
|
16
|
+
amount: string;
|
|
17
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/perpetual/v1/tx").MsgDeposit, "/ault.perpetual.v1.MsgDeposit">;
|
|
18
|
+
/**
|
|
19
|
+
* Moves collateral from the perpetual cross account back to the bank. The
|
|
20
|
+
* chain rejects a withdrawal that would leave the account below its transfer
|
|
21
|
+
* margin (initial margin plus the notional floor, plus resting-order margin).
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildPerpWithdrawMsg(sender: string, params: {
|
|
24
|
+
amount: string;
|
|
25
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/perpetual/v1/tx").MsgWithdraw, "/ault.perpetual.v1.MsgWithdraw">;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the sender's margin mode and leverage for one market. The mode cannot
|
|
28
|
+
* change while a position or resting order exists in that market; leverage
|
|
29
|
+
* applies to existing and future positions.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildSetMarginConfigMsg(sender: string, params: {
|
|
32
|
+
marketId: Uint8Array;
|
|
33
|
+
leverage: number;
|
|
34
|
+
cross: boolean;
|
|
35
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/perpetual/v1/tx").MsgSetMarginConfig, "/ault.perpetual.v1.MsgSetMarginConfig">;
|
|
36
|
+
/**
|
|
37
|
+
* Moves collateral between the sender's cross account and an isolated
|
|
38
|
+
* position. A positive `marginDelta` adds collateral to the isolated position;
|
|
39
|
+
* a negative one returns it to the cross account. Integer string, base units.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildModifyPositionMarginMsg(sender: string, params: {
|
|
42
|
+
marketId: Uint8Array;
|
|
43
|
+
marginDelta: string;
|
|
44
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/perpetual/v1/tx").MsgModifyPositionMargin, "/ault.perpetual.v1.MsgModifyPositionMargin">;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GAS_CONSTANTS } from "./network";
|
|
2
|
+
import type { VaultConfigInput } from "./vault-msgs";
|
|
3
|
+
type Gas = typeof GAS_CONSTANTS;
|
|
4
|
+
type VaultGasKey = "VAULT_UPDATE_MANAGER" | "VAULT_UPDATE_CONFIG" | "VAULT_CANCEL_CONFIG_UPDATE" | "VAULT_SET_STATUS" | "VAULT_DEPOSIT" | "VAULT_REDEEM" | "VAULT_TRANSFER" | "VAULT_REALLOCATE";
|
|
5
|
+
export declare function vaultGas(gas: Gas, key: VaultGasKey): string;
|
|
6
|
+
/** A trading vault pays per allowed spot market, a lending vault per pool. */
|
|
7
|
+
export declare function createVaultGas(gas: Gas, config: VaultConfigInput): string;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { Coin } from "../proto/gen/cosmos/base/v1beta1/coin";
|
|
2
|
+
import { type LockupPolicy } from "../proto/gen/ault/vault/v1/vault";
|
|
3
|
+
export type VaultStatusInput = "active" | "paused" | "closed";
|
|
4
|
+
export type VaultFeeInput = {
|
|
5
|
+
type: "none" | "managementDilution" | "performanceExit";
|
|
6
|
+
/** Fee rate in basis points (100 = 1%). */
|
|
7
|
+
rateBps: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* When depositors may enter and leave. A fund window accepts deposits between
|
|
11
|
+
* the open and close times and redemptions from `redemptionOpenTime` on.
|
|
12
|
+
*/
|
|
13
|
+
export type VaultLockupInput = {
|
|
14
|
+
type: "unrestricted";
|
|
15
|
+
} | {
|
|
16
|
+
type: "fundWindow";
|
|
17
|
+
depositOpenTime: Date;
|
|
18
|
+
depositCloseTime: Date;
|
|
19
|
+
redemptionOpenTime: Date;
|
|
20
|
+
};
|
|
21
|
+
export interface LendingVaultConfigInput {
|
|
22
|
+
/** Pools the vault may supply to, with the most it may supply to each (base units). */
|
|
23
|
+
pools: Array<{
|
|
24
|
+
poolId: bigint | number | string;
|
|
25
|
+
supplyCap: string;
|
|
26
|
+
}>;
|
|
27
|
+
/** Order in which deposits are supplied to pools. */
|
|
28
|
+
supplyQueue: Array<bigint | number | string>;
|
|
29
|
+
/** Order in which pools are drawn down to pay redemptions. */
|
|
30
|
+
withdrawalQueue: Array<bigint | number | string>;
|
|
31
|
+
}
|
|
32
|
+
export interface TradingVaultConfigInput {
|
|
33
|
+
allowedActions: Array<"spot" | "lendingLiquidation">;
|
|
34
|
+
spotMarketIds: Uint8Array[];
|
|
35
|
+
lendingPoolIds?: Array<bigint | number | string>;
|
|
36
|
+
/** Share of each fill the manager keeps, in basis points. */
|
|
37
|
+
managerFractionBps?: number;
|
|
38
|
+
/** Close the redeemed share of open positions on every redemption. */
|
|
39
|
+
alwaysCloseOnRedemption?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type VaultConfigInput = {
|
|
42
|
+
lending: LendingVaultConfigInput;
|
|
43
|
+
} | {
|
|
44
|
+
trading: TradingVaultConfigInput;
|
|
45
|
+
};
|
|
46
|
+
/** x/gov's module account: the only owner x/vault accepts for a parent vault. */
|
|
47
|
+
export declare const GOV_MODULE_ADDRESS = "ault10d07y265gmmuvt4z0w9aw880jnsr700jtfne29";
|
|
48
|
+
/** Whether `address` (bech32 or 0x) is a vault account. */
|
|
49
|
+
export declare function isVaultAddress(address: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Deposits `amount` of the vault's denom and mints shares to the sender.
|
|
52
|
+
* Normal and parent vaults take deposits; a child vault does not.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildVaultDepositMsg(sender: string, params: {
|
|
55
|
+
vaultAddress: string;
|
|
56
|
+
amount: Coin;
|
|
57
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgDeposit, "/ault.vault.v1.MsgDeposit">;
|
|
58
|
+
/**
|
|
59
|
+
* Redeems `shares` (raw share units, 10^18 per human share). Settles at once
|
|
60
|
+
* when the vault holds enough idle funds, otherwise queues a redemption
|
|
61
|
+
* request the vault unwinds over the following blocks. A child vault has no
|
|
62
|
+
* shares to redeem.
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildVaultRedeemMsg(sender: string, params: {
|
|
65
|
+
vaultAddress: string;
|
|
66
|
+
shares: string;
|
|
67
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgRedeem, "/ault.vault.v1.MsgRedeem">;
|
|
68
|
+
/**
|
|
69
|
+
* Creates a vault owned by `owner`.
|
|
70
|
+
*
|
|
71
|
+
* - A normal vault is owned and, at first, managed by the account that sends
|
|
72
|
+
* it (`manager` defaults to it and may not differ; hand it over later with
|
|
73
|
+
* `updateVaultManager`). A normal trading vault needs `initialDeposit` in
|
|
74
|
+
* its denom, which makes the owner its first depositor.
|
|
75
|
+
* - A parent vault is owned by x/gov (`GOV_MODULE_ADDRESS`), so it can only be
|
|
76
|
+
* created by a governance proposal; `manager` names who runs it.
|
|
77
|
+
* - A child vault is created by its parent vault's account (`owner` is the
|
|
78
|
+
* parent vault, through `attachVaultManager`), with no `manager` and no
|
|
79
|
+
* `lockup`.
|
|
80
|
+
*
|
|
81
|
+
* Lending vaults are always normal. Only a normal trading vault takes an
|
|
82
|
+
* `initialDeposit`. Only the agent path can sign this on chain v3.0.0-rc.2
|
|
83
|
+
* (see `eip712Unsupported` on the registry entry).
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildCreateVaultMsg(owner: string, params: {
|
|
86
|
+
vaultDenom: string;
|
|
87
|
+
config: VaultConfigInput;
|
|
88
|
+
lockup?: VaultLockupInput;
|
|
89
|
+
fee: VaultFeeInput;
|
|
90
|
+
initialDeposit?: Coin;
|
|
91
|
+
manager?: string;
|
|
92
|
+
exitFeeBps?: number;
|
|
93
|
+
/** `parent` or `child` for protocol vault trees; default `normal`. */
|
|
94
|
+
relationship?: "normal" | "parent" | "child";
|
|
95
|
+
}): import("../index.js").Eip712Msg<Omit<import("../proto/gen/ault/vault/v1/tx").MsgCreateVault, "lending" | "trading" | "lockup"> & Partial<Pick<import("../proto/gen/ault/vault/v1/tx").MsgCreateVault, "lending" | "trading">> & {
|
|
96
|
+
lockup: Omit<LockupPolicy, "unrestricted" | "fundWindow"> & Partial<Pick<LockupPolicy, "unrestricted" | "fundWindow">>;
|
|
97
|
+
}, "/ault.vault.v1.MsgCreateVault">;
|
|
98
|
+
/**
|
|
99
|
+
* Schedules a new configuration of the vault's own type (a lending config for
|
|
100
|
+
* a lending vault, a trading config for a trading vault). It applies after
|
|
101
|
+
* the chain's config delay; `buildCancelVaultConfigUpdateMsg` drops it before
|
|
102
|
+
* then. Sent by the vault's owner: the user for a normal vault, the parent
|
|
103
|
+
* vault's account for a child. Agent path only on chain v3.0.0-rc.2.
|
|
104
|
+
*/
|
|
105
|
+
export declare function buildUpdateVaultConfigMsg(owner: string, params: {
|
|
106
|
+
vaultAddress: string;
|
|
107
|
+
config: VaultConfigInput;
|
|
108
|
+
}): import("../index.js").Eip712Msg<Omit<import("../proto/gen/ault/vault/v1/tx").MsgUpdateVaultConfig, "lending" | "trading"> & Partial<Pick<import("../proto/gen/ault/vault/v1/tx").MsgUpdateVaultConfig, "lending" | "trading">>, "/ault.vault.v1.MsgUpdateVaultConfig">;
|
|
109
|
+
/** Drops a scheduled config update. Sent by the vault's owner. */
|
|
110
|
+
export declare function buildCancelVaultConfigUpdateMsg(owner: string, params: {
|
|
111
|
+
vaultAddress: string;
|
|
112
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgCancelVaultConfigUpdate, "/ault.vault.v1.MsgCancelVaultConfigUpdate">;
|
|
113
|
+
/**
|
|
114
|
+
* Pauses, resumes or closes a vault. Sent by its owner (the parent vault's
|
|
115
|
+
* account for a child), not its manager; closing cannot be undone.
|
|
116
|
+
*/
|
|
117
|
+
export declare function buildSetVaultStatusMsg(sender: string, params: {
|
|
118
|
+
vaultAddress: string;
|
|
119
|
+
status: VaultStatusInput;
|
|
120
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgSetVaultStatus, "/ault.vault.v1.MsgSetVaultStatus">;
|
|
121
|
+
/**
|
|
122
|
+
* Hands the vault to a new manager. Owner only, and not agent-signable. A
|
|
123
|
+
* child vault has no manager of its own; a normal trading vault's new
|
|
124
|
+
* manager must already hold its `managerFractionBps` of the shares.
|
|
125
|
+
*/
|
|
126
|
+
export declare function buildUpdateVaultManagerMsg(owner: string, params: {
|
|
127
|
+
vaultAddress: string;
|
|
128
|
+
manager: string;
|
|
129
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgUpdateVaultManager, "/ault.vault.v1.MsgUpdateVaultManager">;
|
|
130
|
+
/**
|
|
131
|
+
* Moves capital between a parent vault (`sender`) and one of its child
|
|
132
|
+
* vaults: into the child when `isDeposit`, back to the parent otherwise.
|
|
133
|
+
* `amount` is in the parent's denom. Sent from the parent vault's account,
|
|
134
|
+
* signed by its manager (or the manager's agent) through the agent path.
|
|
135
|
+
*/
|
|
136
|
+
export declare function buildVaultTransferMsg(parentVault: string, params: {
|
|
137
|
+
childVault: string;
|
|
138
|
+
amount: Coin;
|
|
139
|
+
isDeposit: boolean;
|
|
140
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgVaultTransfer, "/ault.vault.v1.MsgVaultTransfer">;
|
|
141
|
+
/**
|
|
142
|
+
* Moves a normal Lending vault's supply from one configured pool to another.
|
|
143
|
+
* Sent from the vault's own account, signed by its manager through the agent
|
|
144
|
+
* path.
|
|
145
|
+
*/
|
|
146
|
+
export declare function buildReallocateMsg(vaultAddress: string, params: {
|
|
147
|
+
sourcePoolId: bigint | number | string;
|
|
148
|
+
destinationPoolId: bigint | number | string;
|
|
149
|
+
amount: Coin;
|
|
150
|
+
}): import("../index.js").Eip712Msg<import("../proto/gen/ault/vault/v1/tx").MsgReallocate, "/ault.vault.v1.MsgReallocate">;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
export interface AnyValueCodec {
|
|
2
|
+
/** Decodes packed proto bytes into the message object (proto field names). */
|
|
3
|
+
decode: (bytes: Uint8Array) => Record<string, unknown>;
|
|
4
|
+
/** Encodes a decoded message object back into packed proto bytes. */
|
|
5
|
+
encode: (value: unknown) => Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
/** Codecs for every message that can be packed into an interface Any, by type URL. */
|
|
8
|
+
export declare const ANY_VALUE_CODECS: Record<string, AnyValueCodec>;
|
|
1
9
|
export declare const MSG_ENCODERS: Record<string, (value: unknown) => Uint8Array>;
|
|
@@ -1,55 +1,46 @@
|
|
|
1
1
|
import type { Eip712Msg } from "./builder";
|
|
2
|
-
import type { MsgOpenAccount
|
|
3
|
-
import type { MsgApproveAgent, MsgRevokeAgent
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type { MsgBatchSubmitWork, MsgCancelMiningDelegation, MsgDelegateMining, MsgRedelegateMining, MsgRegisterOperator, MsgSetOwnerVrfKey, MsgSubmitWork, MsgUnregisterOperator, MsgUpdateOperatorInfo,
|
|
9
|
-
import type {
|
|
10
|
-
import type { MsgApproveBuilder, MsgRevokeBuilder,
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
2
|
+
import type { MsgOpenAccount } from "../proto/gen/ault/accountx/v1/tx";
|
|
3
|
+
import type { MsgApproveAgent, MsgRevokeAgent } from "../proto/gen/ault/agent/v1/tx";
|
|
4
|
+
import type { ModifyOrder, MsgCancelOrders, MsgModifyOrders, MsgPlaceLimitOrder, MsgPlaceMarketOrder, MsgPlaceScaleOrder, MsgPlaceTwapOrder } from "../proto/gen/ault/clob/v1/tx";
|
|
5
|
+
import type { MsgBorrow, MsgFundInsuranceFund, MsgLiquidate as MsgLiquidateAultLendingV1, MsgRepay, MsgSupply, MsgSupplyCollateral, MsgWithdraw as MsgWithdrawAultLendingV1, MsgWithdrawCollateral } from "../proto/gen/ault/lending/v1/tx";
|
|
6
|
+
import type { MsgTransferLicense } from "../proto/gen/ault/license/v1/tx";
|
|
7
|
+
import type { MsgBorrowMargin, MsgDepositMargin, MsgRepayMargin, MsgWithdrawMargin } from "../proto/gen/ault/margin/v1/tx";
|
|
8
|
+
import type { MsgBatchSubmitWork, MsgCancelMiningDelegation, MsgDelegateMining, MsgRedelegateMining, MsgRegisterOperator, MsgSetOwnerVrfKey, MsgSubmitWork, MsgUnregisterOperator, MsgUpdateOperatorInfo, WorkSubmission } from "../proto/gen/ault/miner/v1/tx";
|
|
9
|
+
import type { MsgDeposit as MsgDepositAultPerpetualV1, MsgLiquidate as MsgLiquidateAultPerpetualV1, MsgModifyPositionMargin, MsgSetMarginConfig, MsgWithdraw as MsgWithdrawAultPerpetualV1 } from "../proto/gen/ault/perpetual/v1/tx";
|
|
10
|
+
import type { MsgApproveBuilder, MsgRevokeBuilder, MsgSetReferral, MsgSetReferralCode } from "../proto/gen/ault/reward/v1/tx";
|
|
11
|
+
import type { MsgCancelVaultConfigUpdate, MsgCreateVault, MsgDeposit as MsgDepositAultVaultV1, MsgReallocate, MsgRedeem, MsgSetVaultStatus, MsgUpdateVaultConfig, MsgUpdateVaultManager, MsgVaultTransfer } from "../proto/gen/ault/vault/v1/tx";
|
|
12
|
+
import type { LockupPolicy } from "../proto/gen/ault/vault/v1/vault";
|
|
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 LockupPolicyInput = Omit<LockupPolicy, "fundWindow" | "unrestricted"> & Partial<Pick<LockupPolicy, "fundWindow" | "unrestricted">>;
|
|
15
16
|
type ModifyOrderInput = Omit<ModifyOrder, "newPrice" | "newQuantity"> & Partial<Pick<ModifyOrder, "newPrice" | "newQuantity">>;
|
|
16
|
-
type TransferLimitConfigInput = TransferLimitConfig;
|
|
17
17
|
type WorkSubmissionInput = Omit<WorkSubmission, "nonce"> & Partial<Pick<WorkSubmission, "nonce">>;
|
|
18
18
|
type MsgApproveAgentInput = Omit<MsgApproveAgent, "expiresAt" | "name"> & Partial<Pick<MsgApproveAgent, "expiresAt" | "name">>;
|
|
19
19
|
type MsgBatchSubmitWorkInput = Omit<MsgBatchSubmitWork, "submissions"> & {
|
|
20
20
|
submissions: WorkSubmissionInput[];
|
|
21
21
|
};
|
|
22
|
-
type
|
|
22
|
+
type MsgCreateVaultInput = Omit<MsgCreateVault, "lending" | "trading" | "lockup"> & Partial<Pick<MsgCreateVault, "lending" | "trading">> & {
|
|
23
|
+
lockup: LockupPolicyInput;
|
|
24
|
+
};
|
|
23
25
|
type MsgModifyOrdersInput = Omit<MsgModifyOrders, "orders"> & {
|
|
24
26
|
orders: ModifyOrderInput[];
|
|
25
27
|
};
|
|
26
|
-
type MsgPlaceLimitOrderInput = Omit<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "postOnly" | "timeInForce"> & Partial<Pick<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "postOnly" | "timeInForce">>;
|
|
27
|
-
type MsgPlaceMarketOrderInput = Omit<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice">>;
|
|
28
|
-
type MsgPlaceScaleOrderInput = Omit<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly"> & Partial<Pick<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "postOnly">>;
|
|
28
|
+
type MsgPlaceLimitOrderInput = Omit<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "options" | "postOnly" | "timeInForce"> & Partial<Pick<MsgPlaceLimitOrder, "builderAddress" | "builderFeeRate" | "cloid" | "options" | "postOnly" | "timeInForce">>;
|
|
29
|
+
type MsgPlaceMarketOrderInput = Omit<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "options" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceMarketOrder, "builderAddress" | "builderFeeRate" | "cloid" | "options" | "priceTolerance" | "worstPrice">>;
|
|
30
|
+
type MsgPlaceScaleOrderInput = Omit<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "options" | "postOnly"> & Partial<Pick<MsgPlaceScaleOrder, "builderAddress" | "builderFeeRate" | "options" | "postOnly">>;
|
|
29
31
|
type MsgPlaceTwapOrderInput = Omit<MsgPlaceTwapOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice"> & Partial<Pick<MsgPlaceTwapOrder, "builderAddress" | "builderFeeRate" | "cloid" | "priceTolerance" | "worstPrice">>;
|
|
30
32
|
type MsgRegisterOperatorInput = Omit<MsgRegisterOperator, "commissionRecipient"> & Partial<Pick<MsgRegisterOperator, "commissionRecipient">>;
|
|
31
|
-
type MsgRegisterTokenPairInput = Omit<MsgRegisterTokenPair, "transferLimit"> & Partial<Pick<MsgRegisterTokenPair, "transferLimit">>;
|
|
32
|
-
type MsgSetTransferLimitInput = Omit<MsgSetTransferLimit, "transferLimit"> & {
|
|
33
|
-
transferLimit: TransferLimitConfigInput;
|
|
34
|
-
};
|
|
35
33
|
type MsgSubmitWorkInput = Omit<MsgSubmitWork, "nonce"> & Partial<Pick<MsgSubmitWork, "nonce">>;
|
|
36
34
|
type MsgTransferLicenseInput = Omit<MsgTransferLicense, "openAccountFeeDenom"> & Partial<Pick<MsgTransferLicense, "openAccountFeeDenom">>;
|
|
37
35
|
type MsgUpdateOperatorInfoInput = Omit<MsgUpdateOperatorInfo, "newCommissionRecipient"> & Partial<Pick<MsgUpdateOperatorInfo, "newCommissionRecipient">>;
|
|
36
|
+
type MsgUpdateVaultConfigInput = Omit<MsgUpdateVaultConfig, "lending" | "trading"> & Partial<Pick<MsgUpdateVaultConfig, "lending" | "trading">>;
|
|
38
37
|
export declare const msg: {
|
|
39
38
|
readonly accountx: {
|
|
40
39
|
readonly openAccount: (value: MsgOpenAccount) => Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount">;
|
|
41
|
-
readonly updateFeeTiers: (value: MsgUpdateFeeTiers) => Eip712Msg<MsgUpdateFeeTiers, "/ault.accountx.v1.MsgUpdateFeeTiers">;
|
|
42
|
-
readonly updateParams: (value: MsgUpdateParamsAultAccountxV1) => Eip712Msg<MsgUpdateParamsAultAccountxV1, "/ault.accountx.v1.MsgUpdateParams">;
|
|
43
|
-
readonly updateTradingTiers: (value: MsgUpdateTradingTiers) => Eip712Msg<MsgUpdateTradingTiers, "/ault.accountx.v1.MsgUpdateTradingTiers">;
|
|
44
40
|
};
|
|
45
41
|
readonly agent: {
|
|
46
42
|
readonly approveAgent: (value: MsgApproveAgentInput) => Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent">;
|
|
47
43
|
readonly revokeAgent: (value: MsgRevokeAgent) => Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent">;
|
|
48
|
-
readonly updateParams: (value: MsgUpdateParamsAultAgentV1) => Eip712Msg<MsgUpdateParamsAultAgentV1, "/ault.agent.v1.MsgUpdateParams">;
|
|
49
|
-
};
|
|
50
|
-
readonly authority: {
|
|
51
|
-
readonly grantRole: (value: MsgGrantRole) => Eip712Msg<MsgGrantRole, "/ault.authority.v1.MsgGrantRole">;
|
|
52
|
-
readonly revokeRole: (value: MsgRevokeRole) => Eip712Msg<MsgRevokeRole, "/ault.authority.v1.MsgRevokeRole">;
|
|
53
44
|
};
|
|
54
45
|
readonly clob: {
|
|
55
46
|
readonly cancelOrders: (value: MsgCancelOrders) => Eip712Msg<MsgCancelOrders, "/ault.clob.v1.MsgCancelOrders">;
|
|
@@ -58,35 +49,28 @@ export declare const msg: {
|
|
|
58
49
|
readonly placeMarketOrder: (value: MsgPlaceMarketOrderInput) => Eip712Msg<MsgPlaceMarketOrderInput, "/ault.clob.v1.MsgPlaceMarketOrder">;
|
|
59
50
|
readonly placeScaleOrder: (value: MsgPlaceScaleOrderInput) => Eip712Msg<MsgPlaceScaleOrderInput, "/ault.clob.v1.MsgPlaceScaleOrder">;
|
|
60
51
|
readonly placeTwapOrder: (value: MsgPlaceTwapOrderInput) => Eip712Msg<MsgPlaceTwapOrderInput, "/ault.clob.v1.MsgPlaceTwapOrder">;
|
|
61
|
-
readonly updateParams: (value: MsgUpdateParamsAultClobV1) => Eip712Msg<MsgUpdateParamsAultClobV1, "/ault.clob.v1.MsgUpdateParams">;
|
|
62
52
|
};
|
|
63
53
|
readonly distribution: {
|
|
64
54
|
readonly withdrawDelegatorReward: (value: MsgWithdrawDelegatorReward) => Eip712Msg<MsgWithdrawDelegatorReward, "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward">;
|
|
65
55
|
};
|
|
56
|
+
readonly lending: {
|
|
57
|
+
readonly borrow: (value: MsgBorrow) => Eip712Msg<MsgBorrow, "/ault.lending.v1.MsgBorrow">;
|
|
58
|
+
readonly fundInsuranceFund: (value: MsgFundInsuranceFund) => Eip712Msg<MsgFundInsuranceFund, "/ault.lending.v1.MsgFundInsuranceFund">;
|
|
59
|
+
readonly liquidate: (value: MsgLiquidateAultLendingV1) => Eip712Msg<MsgLiquidateAultLendingV1, "/ault.lending.v1.MsgLiquidate">;
|
|
60
|
+
readonly repay: (value: MsgRepay) => Eip712Msg<MsgRepay, "/ault.lending.v1.MsgRepay">;
|
|
61
|
+
readonly supply: (value: MsgSupply) => Eip712Msg<MsgSupply, "/ault.lending.v1.MsgSupply">;
|
|
62
|
+
readonly supplyCollateral: (value: MsgSupplyCollateral) => Eip712Msg<MsgSupplyCollateral, "/ault.lending.v1.MsgSupplyCollateral">;
|
|
63
|
+
readonly withdraw: (value: MsgWithdrawAultLendingV1) => Eip712Msg<MsgWithdrawAultLendingV1, "/ault.lending.v1.MsgWithdraw">;
|
|
64
|
+
readonly withdrawCollateral: (value: MsgWithdrawCollateral) => Eip712Msg<MsgWithdrawCollateral, "/ault.lending.v1.MsgWithdrawCollateral">;
|
|
65
|
+
};
|
|
66
66
|
readonly license: {
|
|
67
|
-
readonly approveMember: (value: MsgApproveMember) => Eip712Msg<MsgApproveMember, "/ault.license.v1.MsgApproveMember">;
|
|
68
|
-
readonly batchApproveMember: (value: MsgBatchApproveMember) => Eip712Msg<MsgBatchApproveMember, "/ault.license.v1.MsgBatchApproveMember">;
|
|
69
|
-
readonly batchMintLicense: (value: MsgBatchMintLicense) => Eip712Msg<MsgBatchMintLicense, "/ault.license.v1.MsgBatchMintLicense">;
|
|
70
|
-
readonly batchRevokeMember: (value: MsgBatchRevokeMember) => Eip712Msg<MsgBatchRevokeMember, "/ault.license.v1.MsgBatchRevokeMember">;
|
|
71
|
-
readonly burnLicense: (value: MsgBurnLicense) => Eip712Msg<MsgBurnLicense, "/ault.license.v1.MsgBurnLicense">;
|
|
72
|
-
readonly mintLicense: (value: MsgMintLicense) => Eip712Msg<MsgMintLicense, "/ault.license.v1.MsgMintLicense">;
|
|
73
|
-
readonly revokeLicense: (value: MsgRevokeLicense) => Eip712Msg<MsgRevokeLicense, "/ault.license.v1.MsgRevokeLicense">;
|
|
74
|
-
readonly revokeMember: (value: MsgRevokeMember) => Eip712Msg<MsgRevokeMember, "/ault.license.v1.MsgRevokeMember">;
|
|
75
|
-
readonly setKYCApprovers: (value: MsgSetKYCApprovers) => Eip712Msg<MsgSetKYCApprovers, "/ault.license.v1.MsgSetKYCApprovers">;
|
|
76
|
-
readonly setMinters: (value: MsgSetMinters) => Eip712Msg<MsgSetMinters, "/ault.license.v1.MsgSetMinters">;
|
|
77
|
-
readonly setTokenURI: (value: MsgSetTokenURI) => Eip712Msg<MsgSetTokenURI, "/ault.license.v1.MsgSetTokenURI">;
|
|
78
67
|
readonly transferLicense: (value: MsgTransferLicenseInput) => Eip712Msg<MsgTransferLicenseInput, "/ault.license.v1.MsgTransferLicense">;
|
|
79
|
-
readonly updateParams: (value: MsgUpdateParamsAultLicenseV1) => Eip712Msg<MsgUpdateParamsAultLicenseV1, "/ault.license.v1.MsgUpdateParams">;
|
|
80
68
|
};
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly resumeMarkets: (value: MsgResumeMarkets) => Eip712Msg<MsgResumeMarkets, "/ault.market.v1.MsgResumeMarkets">;
|
|
87
|
-
readonly updateMarket: (value: MsgUpdateMarket) => Eip712Msg<MsgUpdateMarket, "/ault.market.v1.MsgUpdateMarket">;
|
|
88
|
-
readonly updateMarketDeployer: (value: MsgUpdateMarketDeployer) => Eip712Msg<MsgUpdateMarketDeployer, "/ault.market.v1.MsgUpdateMarketDeployer">;
|
|
89
|
-
readonly updateParams: (value: MsgUpdateParamsAultMarketV1) => Eip712Msg<MsgUpdateParamsAultMarketV1, "/ault.market.v1.MsgUpdateParams">;
|
|
69
|
+
readonly margin: {
|
|
70
|
+
readonly borrowMargin: (value: MsgBorrowMargin) => Eip712Msg<MsgBorrowMargin, "/ault.margin.v1.MsgBorrowMargin">;
|
|
71
|
+
readonly depositMargin: (value: MsgDepositMargin) => Eip712Msg<MsgDepositMargin, "/ault.margin.v1.MsgDepositMargin">;
|
|
72
|
+
readonly repayMargin: (value: MsgRepayMargin) => Eip712Msg<MsgRepayMargin, "/ault.margin.v1.MsgRepayMargin">;
|
|
73
|
+
readonly withdrawMargin: (value: MsgWithdrawMargin) => Eip712Msg<MsgWithdrawMargin, "/ault.margin.v1.MsgWithdrawMargin">;
|
|
90
74
|
};
|
|
91
75
|
readonly miner: {
|
|
92
76
|
readonly batchSubmitWork: (value: MsgBatchSubmitWorkInput) => Eip712Msg<MsgBatchSubmitWorkInput, "/ault.miner.v1.MsgBatchSubmitWork">;
|
|
@@ -98,37 +82,36 @@ export declare const msg: {
|
|
|
98
82
|
readonly submitWork: (value: MsgSubmitWorkInput) => Eip712Msg<MsgSubmitWorkInput, "/ault.miner.v1.MsgSubmitWork">;
|
|
99
83
|
readonly unregisterOperator: (value: MsgUnregisterOperator) => Eip712Msg<MsgUnregisterOperator, "/ault.miner.v1.MsgUnregisterOperator">;
|
|
100
84
|
readonly updateOperatorInfo: (value: MsgUpdateOperatorInfoInput) => Eip712Msg<MsgUpdateOperatorInfoInput, "/ault.miner.v1.MsgUpdateOperatorInfo">;
|
|
101
|
-
readonly updateParams: (value: MsgUpdateParamsAultMinerV1) => Eip712Msg<MsgUpdateParamsAultMinerV1, "/ault.miner.v1.MsgUpdateParams">;
|
|
102
85
|
};
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
86
|
+
readonly perpetual: {
|
|
87
|
+
readonly deposit: (value: MsgDepositAultPerpetualV1) => Eip712Msg<MsgDepositAultPerpetualV1, "/ault.perpetual.v1.MsgDeposit">;
|
|
88
|
+
readonly liquidate: (value: MsgLiquidateAultPerpetualV1) => Eip712Msg<MsgLiquidateAultPerpetualV1, "/ault.perpetual.v1.MsgLiquidate">;
|
|
89
|
+
readonly modifyPositionMargin: (value: MsgModifyPositionMargin) => Eip712Msg<MsgModifyPositionMargin, "/ault.perpetual.v1.MsgModifyPositionMargin">;
|
|
90
|
+
readonly setMarginConfig: (value: MsgSetMarginConfig) => Eip712Msg<MsgSetMarginConfig, "/ault.perpetual.v1.MsgSetMarginConfig">;
|
|
91
|
+
readonly withdraw: (value: MsgWithdrawAultPerpetualV1) => Eip712Msg<MsgWithdrawAultPerpetualV1, "/ault.perpetual.v1.MsgWithdraw">;
|
|
105
92
|
};
|
|
106
93
|
readonly reward: {
|
|
107
94
|
readonly approveBuilder: (value: MsgApproveBuilder) => Eip712Msg<MsgApproveBuilder, "/ault.reward.v1.MsgApproveBuilder">;
|
|
108
95
|
readonly revokeBuilder: (value: MsgRevokeBuilder) => Eip712Msg<MsgRevokeBuilder, "/ault.reward.v1.MsgRevokeBuilder">;
|
|
109
|
-
readonly setDeployerShare: (value: MsgSetDeployerShare) => Eip712Msg<MsgSetDeployerShare, "/ault.reward.v1.MsgSetDeployerShare">;
|
|
110
96
|
readonly setReferral: (value: MsgSetReferral) => Eip712Msg<MsgSetReferral, "/ault.reward.v1.MsgSetReferral">;
|
|
111
97
|
readonly setReferralCode: (value: MsgSetReferralCode) => Eip712Msg<MsgSetReferralCode, "/ault.reward.v1.MsgSetReferralCode">;
|
|
112
|
-
readonly updateEligibleReferrers: (value: MsgUpdateEligibleReferrers) => Eip712Msg<MsgUpdateEligibleReferrers, "/ault.reward.v1.MsgUpdateEligibleReferrers">;
|
|
113
|
-
readonly updateFeeTierDiscounts: (value: MsgUpdateFeeTierDiscounts) => Eip712Msg<MsgUpdateFeeTierDiscounts, "/ault.reward.v1.MsgUpdateFeeTierDiscounts">;
|
|
114
|
-
readonly updateParams: (value: MsgUpdateParamsAultRewardV1) => Eip712Msg<MsgUpdateParamsAultRewardV1, "/ault.reward.v1.MsgUpdateParams">;
|
|
115
|
-
readonly updateRefereeDiscountRate: (value: MsgUpdateRefereeDiscountRate) => Eip712Msg<MsgUpdateRefereeDiscountRate, "/ault.reward.v1.MsgUpdateRefereeDiscountRate">;
|
|
116
|
-
readonly updateTradingTierBenefits: (value: MsgUpdateTradingTierBenefits) => Eip712Msg<MsgUpdateTradingTierBenefits, "/ault.reward.v1.MsgUpdateTradingTierBenefits">;
|
|
117
98
|
};
|
|
118
99
|
readonly staking: {
|
|
119
100
|
readonly beginRedelegate: (value: MsgBeginRedelegate) => Eip712Msg<MsgBeginRedelegate, "/cosmos.staking.v1beta1.MsgBeginRedelegate">;
|
|
120
101
|
readonly delegate: (value: MsgDelegate) => Eip712Msg<MsgDelegate, "/cosmos.staking.v1beta1.MsgDelegate">;
|
|
121
102
|
readonly undelegate: (value: MsgUndelegate) => Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
|
|
122
103
|
};
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
128
|
-
readonly
|
|
129
|
-
readonly
|
|
130
|
-
readonly
|
|
104
|
+
readonly vault: {
|
|
105
|
+
readonly cancelVaultConfigUpdate: (value: MsgCancelVaultConfigUpdate) => Eip712Msg<MsgCancelVaultConfigUpdate, "/ault.vault.v1.MsgCancelVaultConfigUpdate">;
|
|
106
|
+
readonly createVault: (value: MsgCreateVaultInput) => Eip712Msg<MsgCreateVaultInput, "/ault.vault.v1.MsgCreateVault">;
|
|
107
|
+
readonly deposit: (value: MsgDepositAultVaultV1) => Eip712Msg<MsgDepositAultVaultV1, "/ault.vault.v1.MsgDeposit">;
|
|
108
|
+
readonly reallocate: (value: MsgReallocate) => Eip712Msg<MsgReallocate, "/ault.vault.v1.MsgReallocate">;
|
|
109
|
+
readonly redeem: (value: MsgRedeem) => Eip712Msg<MsgRedeem, "/ault.vault.v1.MsgRedeem">;
|
|
110
|
+
readonly setVaultStatus: (value: MsgSetVaultStatus) => Eip712Msg<MsgSetVaultStatus, "/ault.vault.v1.MsgSetVaultStatus">;
|
|
111
|
+
readonly updateVaultConfig: (value: MsgUpdateVaultConfigInput) => Eip712Msg<MsgUpdateVaultConfigInput, "/ault.vault.v1.MsgUpdateVaultConfig">;
|
|
112
|
+
readonly updateVaultManager: (value: MsgUpdateVaultManager) => Eip712Msg<MsgUpdateVaultManager, "/ault.vault.v1.MsgUpdateVaultManager">;
|
|
113
|
+
readonly vaultTransfer: (value: MsgVaultTransfer) => Eip712Msg<MsgVaultTransfer, "/ault.vault.v1.MsgVaultTransfer">;
|
|
131
114
|
};
|
|
132
115
|
};
|
|
133
|
-
export type AnyEip712Msg = Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount"> | Eip712Msg<
|
|
116
|
+
export type AnyEip712Msg = Eip712Msg<MsgOpenAccount, "/ault.accountx.v1.MsgOpenAccount"> | Eip712Msg<MsgApproveAgentInput, "/ault.agent.v1.MsgApproveAgent"> | Eip712Msg<MsgRevokeAgent, "/ault.agent.v1.MsgRevokeAgent"> | 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<MsgPlaceTwapOrderInput, "/ault.clob.v1.MsgPlaceTwapOrder"> | Eip712Msg<MsgBorrow, "/ault.lending.v1.MsgBorrow"> | Eip712Msg<MsgFundInsuranceFund, "/ault.lending.v1.MsgFundInsuranceFund"> | Eip712Msg<MsgLiquidateAultLendingV1, "/ault.lending.v1.MsgLiquidate"> | Eip712Msg<MsgRepay, "/ault.lending.v1.MsgRepay"> | Eip712Msg<MsgSupply, "/ault.lending.v1.MsgSupply"> | Eip712Msg<MsgSupplyCollateral, "/ault.lending.v1.MsgSupplyCollateral"> | Eip712Msg<MsgWithdrawAultLendingV1, "/ault.lending.v1.MsgWithdraw"> | Eip712Msg<MsgWithdrawCollateral, "/ault.lending.v1.MsgWithdrawCollateral"> | Eip712Msg<MsgTransferLicenseInput, "/ault.license.v1.MsgTransferLicense"> | Eip712Msg<MsgBorrowMargin, "/ault.margin.v1.MsgBorrowMargin"> | Eip712Msg<MsgDepositMargin, "/ault.margin.v1.MsgDepositMargin"> | Eip712Msg<MsgRepayMargin, "/ault.margin.v1.MsgRepayMargin"> | Eip712Msg<MsgWithdrawMargin, "/ault.margin.v1.MsgWithdrawMargin"> | 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<MsgDepositAultPerpetualV1, "/ault.perpetual.v1.MsgDeposit"> | Eip712Msg<MsgLiquidateAultPerpetualV1, "/ault.perpetual.v1.MsgLiquidate"> | Eip712Msg<MsgModifyPositionMargin, "/ault.perpetual.v1.MsgModifyPositionMargin"> | Eip712Msg<MsgSetMarginConfig, "/ault.perpetual.v1.MsgSetMarginConfig"> | Eip712Msg<MsgWithdrawAultPerpetualV1, "/ault.perpetual.v1.MsgWithdraw"> | Eip712Msg<MsgApproveBuilder, "/ault.reward.v1.MsgApproveBuilder"> | Eip712Msg<MsgRevokeBuilder, "/ault.reward.v1.MsgRevokeBuilder"> | Eip712Msg<MsgSetReferral, "/ault.reward.v1.MsgSetReferral"> | Eip712Msg<MsgSetReferralCode, "/ault.reward.v1.MsgSetReferralCode"> | Eip712Msg<MsgCancelVaultConfigUpdate, "/ault.vault.v1.MsgCancelVaultConfigUpdate"> | Eip712Msg<MsgCreateVaultInput, "/ault.vault.v1.MsgCreateVault"> | Eip712Msg<MsgDepositAultVaultV1, "/ault.vault.v1.MsgDeposit"> | Eip712Msg<MsgReallocate, "/ault.vault.v1.MsgReallocate"> | Eip712Msg<MsgRedeem, "/ault.vault.v1.MsgRedeem"> | Eip712Msg<MsgSetVaultStatus, "/ault.vault.v1.MsgSetVaultStatus"> | Eip712Msg<MsgUpdateVaultConfigInput, "/ault.vault.v1.MsgUpdateVaultConfig"> | Eip712Msg<MsgUpdateVaultManager, "/ault.vault.v1.MsgUpdateVaultManager"> | Eip712Msg<MsgVaultTransfer, "/ault.vault.v1.MsgVaultTransfer"> | Eip712Msg<MsgWithdrawDelegatorReward, "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"> | Eip712Msg<MsgBeginRedelegate, "/cosmos.staking.v1beta1.MsgBeginRedelegate"> | Eip712Msg<MsgDelegate, "/cosmos.staking.v1beta1.MsgDelegate"> | Eip712Msg<MsgUndelegate, "/cosmos.staking.v1beta1.MsgUndelegate">;
|
|
134
117
|
export {};
|
|
@@ -9,6 +9,8 @@ export interface FieldSemantics {
|
|
|
9
9
|
isCosmosInt?: boolean;
|
|
10
10
|
isBinary?: boolean;
|
|
11
11
|
isPubKey?: boolean;
|
|
12
|
+
/** google.protobuf.Any accepting a chain interface (see `anyTypes`). */
|
|
13
|
+
isAny?: boolean;
|
|
12
14
|
deprecated?: boolean;
|
|
13
15
|
}
|
|
14
16
|
export interface Eip712MsgTypeConfig {
|
|
@@ -22,8 +24,23 @@ export interface Eip712MsgTypeConfig {
|
|
|
22
24
|
enumFieldPaths?: Record<string, Record<string, string>>;
|
|
23
25
|
optionalFields?: readonly string[];
|
|
24
26
|
legacyAminoRegistered?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Set when the chain cannot verify an EIP-712 signature over this message
|
|
29
|
+
* faithfully; the reason says which path to use instead. The proto encoder
|
|
30
|
+
* still covers it, so the agent path (SIGN_MODE_DIRECT) can send it.
|
|
31
|
+
*/
|
|
32
|
+
eip712Unsupported?: string;
|
|
25
33
|
fieldSemantics?: Record<string, FieldSemantics>;
|
|
34
|
+
/**
|
|
35
|
+
* Interface-typed Any fields (e.g. clob `options`), keyed by field name and
|
|
36
|
+
* then by the type URL of each message the chain accepts there. The chain's
|
|
37
|
+
* legacy amino codec renders such a field as {"type": aminoType, "value": {...}}.
|
|
38
|
+
*/
|
|
39
|
+
anyTypes?: Eip712AnyTypesMap;
|
|
26
40
|
}
|
|
41
|
+
/** Amino/EIP-712 config of one message that can be packed into an interface Any. */
|
|
42
|
+
export type Eip712AnyTypeConfig = Omit<Eip712MsgTypeConfig, "eip712TypeName" | "legacyAminoRegistered" | "eip712Unsupported">;
|
|
43
|
+
export type Eip712AnyTypesMap = Record<string, Record<string, Eip712AnyTypeConfig>>;
|
|
27
44
|
export { EIP712_MSG_TYPES } from "./registry.generated";
|
|
28
45
|
export type { Params as AgentParams } from "../proto/gen/ault/agent/v1/params";
|
|
29
46
|
export { Role } from "../proto/gen/ault/authority/v1/authority";
|