ault-sdk-ts 0.11.0 → 0.12.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.
Files changed (56) hide show
  1. package/README.md +104 -23
  2. package/dist/client.d.ts +2 -0
  3. package/dist/core/address.d.ts +1 -1
  4. package/dist/core/clob-gas.d.ts +4 -0
  5. package/dist/core/clob-msgs.d.ts +14 -6
  6. package/dist/core/clob-responses.d.ts +4 -1
  7. package/dist/core/conditional-msgs.d.ts +98 -0
  8. package/dist/core/manifest-types.d.ts +22 -2
  9. package/dist/core/margin-account.d.ts +8 -0
  10. package/dist/core/network.d.ts +21 -11
  11. package/dist/core/perpetual-msgs.d.ts +8 -0
  12. package/dist/core/vault-gas.d.ts +3 -1
  13. package/dist/core/vault-msgs.d.ts +46 -28
  14. package/dist/eip712/msg.generated.d.ts +19 -8
  15. package/dist/eip712/types.d.ts +5 -0
  16. package/dist/high-level/types.d.ts +172 -32
  17. package/dist/high-level-client.d.ts +1 -1
  18. package/dist/index.cjs +22007 -18578
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.js +21855 -18453
  22. package/dist/index.js.map +1 -1
  23. package/dist/proto/gen/ault/authority/v1/tx.d.ts +12 -0
  24. package/dist/proto/gen/ault/clob/v1/conditional.d.ts +60 -0
  25. package/dist/proto/gen/ault/clob/v1/genesis.d.ts +13 -0
  26. package/dist/proto/gen/ault/clob/v1/group.d.ts +71 -0
  27. package/dist/proto/gen/ault/clob/v1/params.d.ts +5 -0
  28. package/dist/proto/gen/ault/clob/v1/query.d.ts +16 -0
  29. package/dist/proto/gen/ault/clob/v1/twap.d.ts +8 -4
  30. package/dist/proto/gen/ault/clob/v1/tx.d.ts +90 -1
  31. package/dist/proto/gen/ault/lending/v1/params.d.ts +2 -0
  32. package/dist/proto/gen/ault/lending/v1/tx.d.ts +1 -0
  33. package/dist/proto/gen/ault/margin/v1/genesis.d.ts +10 -48
  34. package/dist/proto/gen/ault/margin/v1/margin.d.ts +14 -64
  35. package/dist/proto/gen/ault/margin/v1/query.d.ts +4 -46
  36. package/dist/proto/gen/ault/margin/v1/tx.d.ts +11 -29
  37. package/dist/proto/gen/ault/miner/v1/miner.d.ts +4 -2
  38. package/dist/proto/gen/ault/oracle/v1/oracle.d.ts +5 -7
  39. package/dist/proto/gen/ault/oracle/v1/tx.d.ts +1 -1
  40. package/dist/proto/gen/ault/perpetual/v1/params.d.ts +6 -0
  41. package/dist/proto/gen/ault/perpetual/v1/perpetual.d.ts +10 -7
  42. package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -0
  43. package/dist/proto/gen/ault/spot/v1/params.d.ts +25 -0
  44. package/dist/proto/gen/ault/spot/v1/query.d.ts +29 -0
  45. package/dist/proto/gen/ault/spot/v1/tx.d.ts +30 -0
  46. package/dist/proto/gen/ault/vault/v1/genesis.d.ts +22 -12
  47. package/dist/proto/gen/ault/vault/v1/query.d.ts +4 -18
  48. package/dist/proto/gen/ault/vault/v1/tx.d.ts +25 -5
  49. package/dist/proto/gen/ault/vault/v1/vault.d.ts +29 -57
  50. package/dist/rest/clob.d.ts +35 -3
  51. package/dist/rest/dex-types.generated.d.ts +548 -81
  52. package/dist/rest/dex.d.ts +3 -1
  53. package/dist/rest/dex.generated.d.ts +670 -123
  54. package/dist/rest/margin.d.ts +1 -5
  55. package/dist/rest/spot.d.ts +11 -0
  56. package/package.json +1 -1
@@ -12,11 +12,7 @@ export interface QueryEnabledMarketsRequest {
12
12
  pagination: PageRequest | undefined;
13
13
  }
14
14
  export interface QueryEnabledMarketsResponse {
15
- /**
16
- * market_ids are the markets margin orders may be placed on, raw bytes as
17
- * every other market id on this surface is: QueryMarginAccountRequest takes
18
- * one that way and MarginAccountResponse returns one that way.
19
- */
15
+ /** market_ids are the markets margin orders may be placed on. */
20
16
  marketIds: Uint8Array[];
21
17
  pagination: PageResponse | undefined;
22
18
  }
@@ -25,7 +21,7 @@ export interface QueryMarginAccountRequest {
25
21
  owner: string;
26
22
  /**
27
23
  * market_id selects the isolated margin account of that market; empty selects
28
- * the cross-margin account, matching how the store reads an empty market id.
24
+ * the cross-margin account.
29
25
  */
30
26
  marketId: Uint8Array;
31
27
  }
@@ -42,24 +38,12 @@ export interface QueryMarginOrdersResponse {
42
38
  orderIds: Uint8Array[];
43
39
  pagination: PageResponse | undefined;
44
40
  }
45
- export interface QueryPendingSettlementsRequest {
46
- pagination: PageRequest | undefined;
47
- }
48
- export interface QueryPendingSettlementsResponse {
49
- settlements: PendingSettlementResponse[];
50
- pagination: PageResponse | undefined;
51
- }
52
41
  /**
53
42
  * MarginAccountResponse is one margin account with its reservation ledger
54
- * folded in, so a frontend renders a position from one read.
55
- *
56
- * Every address here is bech32.
43
+ * folded in.
57
44
  */
58
45
  export interface MarginAccountResponse {
59
- /**
60
- * address is the derived margin account address, which is the store key and
61
- * the address x/lending holds the collateral under.
62
- */
46
+ /** address is the derived margin account address. */
63
47
  address: string;
64
48
  /** owner is the address that controls the account. */
65
49
  owner: string;
@@ -71,29 +55,6 @@ export interface MarginAccountResponse {
71
55
  */
72
56
  collateralsInOrder: Coin[];
73
57
  }
74
- /**
75
- * PendingSettlementResponse is one queued settlement with the order id keying
76
- * it, which the stored record does not carry. Its addresses are bech32 for the
77
- * same reason MarginAccountResponse's are.
78
- */
79
- export interface PendingSettlementResponse {
80
- /** order_id is the x/clob order the proceeds came from. */
81
- orderId: Uint8Array;
82
- /** escrow_address is the market escrow the proceeds are drawn from. */
83
- escrowAddress: string;
84
- /**
85
- * orderer is the margin account that receives the proceeds, bech32 like every
86
- * other orderer on this chain, x/clob's order events included. The one
87
- * exception is margin's own settlement_deferred event, which carries the same
88
- * field hex under its own key, orderer_hex, for the reason at
89
- * x/margin/types/events.go.
90
- */
91
- orderer: string;
92
- /** payout is the fill proceeds to credit as collateral. */
93
- payout: Coin | undefined;
94
- /** pool_id is the lending pool the fill was funded from. */
95
- poolId: bigint;
96
- }
97
58
  export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
98
59
  export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
99
60
  export declare const QueryEnabledMarketsRequest: MessageFns<QueryEnabledMarketsRequest>;
@@ -102,10 +63,7 @@ export declare const QueryMarginAccountRequest: MessageFns<QueryMarginAccountReq
102
63
  export declare const QueryMarginAccountResponse: MessageFns<QueryMarginAccountResponse>;
103
64
  export declare const QueryMarginOrdersRequest: MessageFns<QueryMarginOrdersRequest>;
104
65
  export declare const QueryMarginOrdersResponse: MessageFns<QueryMarginOrdersResponse>;
105
- export declare const QueryPendingSettlementsRequest: MessageFns<QueryPendingSettlementsRequest>;
106
- export declare const QueryPendingSettlementsResponse: MessageFns<QueryPendingSettlementsResponse>;
107
66
  export declare const MarginAccountResponse: MessageFns<MarginAccountResponse>;
108
- export declare const PendingSettlementResponse: MessageFns<PendingSettlementResponse>;
109
67
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
110
68
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
111
69
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -34,15 +34,8 @@ export interface MsgWithdrawMarginResponse {
34
34
  }
35
35
  /**
36
36
  * MsgBorrowMargin borrows into the sender's margin account and books the
37
- * borrowed coins straight back as its collateral, so that a later order can be
38
- * funded without borrowing at placement. It is the deliberate counterpart to
39
- * the per-order auto_repay flags: turning those off leaves the account without
40
- * a repayment trigger, and borrowing is refused while the oracle is stale, so
41
- * the buffer has to be raisable while it is not.
42
- *
43
- * The coins never leave the margin account. Withdrawing them is
44
- * MsgWithdrawMargin, which x/lending health gates once the account carries
45
- * debt.
37
+ * borrowed coins back as its collateral. The coins never leave the margin
38
+ * account; withdrawing them is MsgWithdrawMargin.
46
39
  */
47
40
  export interface MsgBorrowMargin {
48
41
  /** sender is the signer address. */
@@ -63,8 +56,7 @@ export interface MsgBorrowMarginResponse {
63
56
  }
64
57
  /**
65
58
  * MsgRepayMargin repays the sender's margin account debt out of the collateral
66
- * the account already holds. Gated on nothing, like MsgWithdrawMargin:
67
- * unwinding must never be trapped by an operator's switch.
59
+ * the account already holds. Gated on nothing, like MsgWithdrawMargin.
68
60
  */
69
61
  export interface MsgRepayMargin {
70
62
  /** sender is the signer address. */
@@ -119,30 +111,20 @@ export interface MsgUpdateParams {
119
111
  export interface MsgUpdateParamsResponse {
120
112
  }
121
113
  /**
122
- * MsgSetMarginLendingPool sets the x/lending pool that backs every margin
123
- * account. It is its own message rather than a Params field because the move is
124
- * only legal against state: the pool must exist and back every enabled market's
125
- * denoms, and no account may still hold anything in the pool being left. None
126
- * of that is expressible in the stateless Params.Validate, and folding it into
127
- * MsgUpdateParams would let this one field block an unrelated parameter change
128
- * after a voting period has already been spent.
114
+ * MsgInitializeMarginPool sets the margin lending pool while it is still unset.
129
115
  * Can only be executed via governance proposal.
130
116
  */
131
- export interface MsgSetMarginLendingPool {
117
+ export interface MsgInitializeMarginPool {
132
118
  /** authority is the address of the governance account. */
133
119
  authority: string;
134
- /**
135
- * pool_id is the x/lending pool to back margin accounts with. Every value is
136
- * syntactically legal, pool ids starting at 0, so existence is checked in the
137
- * msg server against state rather than in ValidateBasic.
138
- */
120
+ /** pool_id is the x/lending pool to back margin accounts with. */
139
121
  poolId: bigint;
140
122
  }
141
123
  /**
142
- * MsgSetMarginLendingPoolResponse is the response type for the
143
- * Msg/SetMarginLendingPool RPC.
124
+ * MsgInitializeMarginPoolResponse is the response type for the
125
+ * Msg/InitializeMarginPool RPC.
144
126
  */
145
- export interface MsgSetMarginLendingPoolResponse {
127
+ export interface MsgInitializeMarginPoolResponse {
146
128
  }
147
129
  export declare const MsgDepositMargin: MessageFns<MsgDepositMargin>;
148
130
  export declare const MsgDepositMarginResponse: MessageFns<MsgDepositMarginResponse>;
@@ -158,8 +140,8 @@ export declare const MsgDisableMarginMarket: MessageFns<MsgDisableMarginMarket>;
158
140
  export declare const MsgDisableMarginMarketResponse: MessageFns<MsgDisableMarginMarketResponse>;
159
141
  export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
160
142
  export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
161
- export declare const MsgSetMarginLendingPool: MessageFns<MsgSetMarginLendingPool>;
162
- export declare const MsgSetMarginLendingPoolResponse: MessageFns<MsgSetMarginLendingPoolResponse>;
143
+ export declare const MsgInitializeMarginPool: MessageFns<MsgInitializeMarginPool>;
144
+ export declare const MsgInitializeMarginPoolResponse: MessageFns<MsgInitializeMarginPoolResponse>;
163
145
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
164
146
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
165
147
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -150,8 +150,10 @@ export interface Params {
150
150
  */
151
151
  maxCommissionRateIncreasePerEpoch: number;
152
152
  /**
153
- * free_mining_until_epoch specifies the epoch until which miners get free gas
154
- * for mining-related messages. Set to 0 to disable.
153
+ * Deprecated: free_mining_until_epoch is no longer enforced by the ante
154
+ * handler. Retained for params compatibility and historical queries.
155
+ *
156
+ * @deprecated
155
157
  */
156
158
  freeMiningUntilEpoch: bigint;
157
159
  /**
@@ -66,11 +66,11 @@ export interface OracleData {
66
66
  */
67
67
  timestamp: bigint;
68
68
  /**
69
- * market_open is the price-confirmed trading flag: true once a price is
70
- * applied while the market is open, reset when a price is dropped during a
71
- * close. It is one input to tradeability; use the IsMarketOpen keeper method,
72
- * which also checks the live session and MarketStatus.opened_at (rejecting
73
- * replayed pre-open prices).
69
+ * market_open is the price-confirmed trading flag: true once a
70
+ * current-session price is applied while the market is open, reset when a
71
+ * price is dropped during a close. GetOracle and GetOracleInDenom return an
72
+ * effective flag that also checks the live session and
73
+ * MarketStatus.opened_at; they do not change this stored flag.
74
74
  */
75
75
  marketOpen: boolean;
76
76
  }
@@ -124,8 +124,6 @@ export interface LinearBridgeState {
124
124
  export interface OracleMetadata {
125
125
  /** bridge is the active linear bridge; absent when no bridge is active. */
126
126
  bridge: LinearBridgeState | undefined;
127
- /** last_payload_hash is the hash of the accepted signed bytes. */
128
- lastPayloadHash: Uint8Array;
129
127
  }
130
128
  export declare const Params: MessageFns<Params>;
131
129
  export declare const Feed: MessageFns<Feed>;
@@ -2,7 +2,7 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "ault.oracle.v1";
3
3
  /**
4
4
  * MsgInjectOraclePrices is the proposer-injected payload batch at the oracle
5
- * system-tx slot (slot 2, after EVM at slot 0 and liquidation at slot 1). It is
5
+ * system-tx slot (slot 1; the EVM system tx occupies slot 0). It is
6
6
  * a system message: unsigned, created only by PrepareProposal.
7
7
  */
8
8
  export interface MsgInjectOraclePrices {
@@ -7,6 +7,12 @@ export interface Params {
7
7
  * in an account after a withdrawal or margin removal.
8
8
  */
9
9
  transferNotionalFloor: string;
10
+ minOrderQuoteAmount: string;
11
+ /**
12
+ * max_liquidation_candidates limits each liquidation message and system
13
+ * batch.
14
+ */
15
+ maxLiquidationCandidates: number;
10
16
  }
11
17
  export declare const Params: MessageFns<Params>;
12
18
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
@@ -58,8 +58,6 @@ export interface PerpetualMarketConfig {
58
58
  * execute to produce an impact price.
59
59
  */
60
60
  impactNotional: string;
61
- /** max_impact_levels bounds the price levels traversed on each side. */
62
- maxImpactLevels: number;
63
61
  /** index_feed_id is the x/oracle feed used as this market's Index. */
64
62
  indexFeedId: string;
65
63
  /**
@@ -100,6 +98,11 @@ export interface MarkPriceState {
100
98
  * accepted price difference EMA sample.
101
99
  */
102
100
  lastPriceDifferenceUpdateTime: bigint;
101
+ /**
102
+ * last_update_time is the Unix time in seconds the mark was last seeded from
103
+ * the index or advanced from at least two price candidates.
104
+ */
105
+ lastUpdateTime: bigint;
103
106
  }
104
107
  /**
105
108
  * ImpactPriceState is one market's impact prices from the latest accepted vote
@@ -110,11 +113,11 @@ export interface ImpactPriceState {
110
113
  bid: string;
111
114
  ask: string;
112
115
  /**
113
- * last_updated_time is the block time in Unix seconds when the prices were
116
+ * last_update_time is the block time in Unix seconds when the prices were
114
117
  * accepted. Funding reads prices older than its last sample as missing
115
118
  * depth.
116
119
  */
117
- lastUpdatedTime: bigint;
120
+ lastUpdateTime: bigint;
118
121
  }
119
122
  /**
120
123
  * InternalPriceState is the effective Index owned by x/perpetual while the
@@ -128,10 +131,10 @@ export interface InternalPriceState {
128
131
  */
129
132
  anchorPrice: string;
130
133
  /**
131
- * last_update_timestamp is the consensus block time of the last internal
132
- * price update, in Unix seconds.
134
+ * last_update_time is the consensus block time of the last internal price
135
+ * update, in Unix seconds.
133
136
  */
134
- lastUpdateTimestamp: bigint;
137
+ lastUpdateTime: bigint;
135
138
  /** max_leverage fixes the anchor's deviation bound for this closed session. */
136
139
  maxLeverage: number;
137
140
  }
@@ -1,8 +1,10 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { SpotOrderRecord } from "./order";
3
+ import { Params } from "./params";
3
4
  export declare const protobufPackage = "ault.spot.v1";
4
5
  export interface GenesisState {
5
6
  orders: SpotOrderRecord[];
7
+ params: Params | undefined;
6
8
  }
7
9
  export declare const GenesisState: MessageFns<GenesisState>;
8
10
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
@@ -0,0 +1,25 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "ault.spot.v1";
3
+ export interface Params {
4
+ minOrderQuoteAmount: string;
5
+ }
6
+ export declare const Params: MessageFns<Params>;
7
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
8
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
9
+ [K in keyof T]?: DeepPartial<T[K]>;
10
+ } : Partial<T>;
11
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
12
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
13
+ [K in keyof P]: Exact<P[K], I[K]>;
14
+ } & {
15
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
16
+ };
17
+ export interface MessageFns<T> {
18
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
19
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
20
+ fromJSON(object: any): T;
21
+ toJSON(message: T): unknown;
22
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
23
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
24
+ }
25
+ export {};
@@ -0,0 +1,29 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Params } from "./params";
3
+ export declare const protobufPackage = "ault.spot.v1";
4
+ export interface QueryParamsRequest {
5
+ }
6
+ export interface QueryParamsResponse {
7
+ params: Params | undefined;
8
+ }
9
+ export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
10
+ export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
11
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
12
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
13
+ [K in keyof T]?: DeepPartial<T[K]>;
14
+ } : Partial<T>;
15
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
16
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
17
+ [K in keyof P]: Exact<P[K], I[K]>;
18
+ } & {
19
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
20
+ };
21
+ export interface MessageFns<T> {
22
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
23
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
24
+ fromJSON(object: any): T;
25
+ toJSON(message: T): unknown;
26
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
27
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
28
+ }
29
+ export {};
@@ -0,0 +1,30 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Params } from "./params";
3
+ export declare const protobufPackage = "ault.spot.v1";
4
+ export interface MsgUpdateParams {
5
+ authority: string;
6
+ params: Params | undefined;
7
+ }
8
+ export interface MsgUpdateParamsResponse {
9
+ }
10
+ export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
11
+ export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
12
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
13
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
14
+ [K in keyof T]?: DeepPartial<T[K]>;
15
+ } : Partial<T>;
16
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
17
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
18
+ [K in keyof P]: Exact<P[K], I[K]>;
19
+ } & {
20
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
21
+ };
22
+ export interface MessageFns<T> {
23
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
24
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
25
+ fromJSON(object: any): T;
26
+ toJSON(message: T): unknown;
27
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
28
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
29
+ }
30
+ export {};
@@ -1,22 +1,27 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Params } from "./params";
3
- import { LendingVaultConfig, OracleFeed, PendingVaultConfigUpdate, Position, RedemptionQueue, RedemptionRequest, TradingVaultConfig, Vault } from "./vault";
3
+ import { OracleFeed, PendingVaultConfigUpdate, Position, RedemptionQueue, RedemptionRequest, Vault, VaultState } from "./vault";
4
4
  export declare const protobufPackage = "ault.vault.v1";
5
5
  /** GenesisState defines the vault module's genesis state. */
6
6
  export interface GenesisState {
7
7
  params: Params | undefined;
8
8
  /** vault_sequence is the next deterministic vault address suffix. */
9
9
  vaultSequence: bigint;
10
- vaults: Vault[];
10
+ vaults: GenesisVault[];
11
+ vaultStates: GenesisVaultState[];
11
12
  positions: GenesisPosition[];
12
13
  vaultTotalShares: GenesisVaultTotalShares[];
13
14
  redemptionRequests: GenesisRedemptionRequest[];
14
15
  redemptionQueues: GenesisRedemptionQueue[];
15
16
  pendingVaultConfigUpdates: GenesisPendingVaultConfigUpdate[];
16
- lendingVaults: GenesisLendingVault[];
17
17
  lastManagementFeeAccrualTimes: GenesisLastManagementFeeAccrualTime[];
18
- tradingVaults: GenesisTradingVault[];
19
18
  oracleFeeds: OracleFeed[];
19
+ vaultExposures: GenesisVaultExposure[];
20
+ }
21
+ /** GenesisVault stores immutable vault terms by vault address. */
22
+ export interface GenesisVault {
23
+ vaultAddress: Uint8Array;
24
+ vault: Vault | undefined;
20
25
  }
21
26
  /** GenesisPosition stores a depositor position by vault address. */
22
27
  export interface GenesisPosition {
@@ -45,30 +50,35 @@ export interface GenesisPendingVaultConfigUpdate {
45
50
  vaultAddress: Uint8Array;
46
51
  update: PendingVaultConfigUpdate | undefined;
47
52
  }
48
- /** GenesisLendingVault stores lending configuration by vault address. */
49
- export interface GenesisLendingVault {
53
+ /** GenesisVaultState stores mutable state by vault address. */
54
+ export interface GenesisVaultState {
50
55
  vaultAddress: Uint8Array;
51
- config: LendingVaultConfig | undefined;
56
+ state: VaultState | undefined;
52
57
  }
53
58
  /** GenesisLastManagementFeeAccrualTime stores fee accrual time by vault address. */
54
59
  export interface GenesisLastManagementFeeAccrualTime {
55
60
  vaultAddress: Uint8Array;
56
61
  accrualTime: Date | undefined;
57
62
  }
58
- /** GenesisTradingVault stores trading configuration by vault address. */
59
- export interface GenesisTradingVault {
63
+ /**
64
+ * GenesisVaultExposure stores one positive trading Vault exposure by
65
+ * denomination.
66
+ */
67
+ export interface GenesisVaultExposure {
60
68
  vaultAddress: Uint8Array;
61
- config: TradingVaultConfig | undefined;
69
+ denom: string;
70
+ amount: string;
62
71
  }
63
72
  export declare const GenesisState: MessageFns<GenesisState>;
73
+ export declare const GenesisVault: MessageFns<GenesisVault>;
64
74
  export declare const GenesisPosition: MessageFns<GenesisPosition>;
65
75
  export declare const GenesisVaultTotalShares: MessageFns<GenesisVaultTotalShares>;
66
76
  export declare const GenesisRedemptionRequest: MessageFns<GenesisRedemptionRequest>;
67
77
  export declare const GenesisRedemptionQueue: MessageFns<GenesisRedemptionQueue>;
68
78
  export declare const GenesisPendingVaultConfigUpdate: MessageFns<GenesisPendingVaultConfigUpdate>;
69
- export declare const GenesisLendingVault: MessageFns<GenesisLendingVault>;
79
+ export declare const GenesisVaultState: MessageFns<GenesisVaultState>;
70
80
  export declare const GenesisLastManagementFeeAccrualTime: MessageFns<GenesisLastManagementFeeAccrualTime>;
71
- export declare const GenesisTradingVault: MessageFns<GenesisTradingVault>;
81
+ export declare const GenesisVaultExposure: MessageFns<GenesisVaultExposure>;
72
82
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
73
83
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
74
84
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -1,7 +1,7 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
3
3
  import { Params } from "./params";
4
- import { FeePolicy, LockupPolicy, OracleFeed, PendingVaultConfigUpdate, Position, VaultConfig, VaultRelationship, VaultStatus, VaultType } from "./vault";
4
+ import { FundWindow, LendingVaultTerms, OracleFeed, PendingVaultConfigUpdate, Position, TradingVaultTerms, VaultConfig, VaultRelationship, VaultStatus, VaultType } from "./vault";
5
5
  export declare const protobufPackage = "ault.vault.v1";
6
6
  /** QueryParamsRequest is the request for module parameters. */
7
7
  export interface QueryParamsRequest {
@@ -22,13 +22,13 @@ export interface VaultResponse {
22
22
  owner: string;
23
23
  manager: string;
24
24
  vaultDenom: string;
25
- lockup: LockupPolicy | undefined;
26
- fee: FeePolicy | undefined;
25
+ fundWindow: FundWindow | undefined;
27
26
  status: VaultStatus;
28
27
  config: VaultConfig | undefined;
29
28
  totalShares: string;
30
29
  pendingConfigUpdate: PendingVaultConfigUpdate | undefined;
31
- exitFeeBps: number;
30
+ lendingTerms?: LendingVaultTerms | undefined;
31
+ tradingTerms?: TradingVaultTerms | undefined;
32
32
  }
33
33
  /** QueryVaultResponse returns a vault public view. */
34
34
  export interface QueryVaultResponse {
@@ -71,20 +71,6 @@ export interface RedemptionRequestResponse {
71
71
  * scaled by 10^18.
72
72
  */
73
73
  depositValue: string;
74
- /**
75
- * tracks the pending one-time proportional close required by
76
- * always_close_on_redemption. cleared after the attempt, regardless of fills;
77
- * does not track forced close.
78
- */
79
- closeOnRedemption: boolean;
80
- /**
81
- * counts rounds that placed at least one forced-close order, regardless of
82
- * fills.
83
- */
84
- forcedCloseRounds: number;
85
- noProgressRounds: number;
86
- /** last_available_amount is denominated in the vault's VaultDenom. */
87
- lastAvailableAmount: string;
88
74
  }
89
75
  /** QueryRedemptionRequestRequest identifies one vault redemption request. */
90
76
  export interface QueryRedemptionRequestRequest {
@@ -1,7 +1,7 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Coin } from "../../../cosmos/base/v1beta1/coin";
3
3
  import { Params } from "./params";
4
- import { FeePolicy, LendingVaultConfig, LockupPolicy, OracleFeed, TradingVaultConfig, VaultRelationship, VaultStatus, VaultType } from "./vault";
4
+ import { FundWindow, LendingVaultConfig, LendingVaultTerms, OracleFeed, TradingVaultConfig, TradingVaultTerms, VaultRelationship, VaultStatus, VaultType } from "./vault";
5
5
  export declare const protobufPackage = "ault.vault.v1";
6
6
  /** MsgCreateVault creates a vault. */
7
7
  export interface MsgCreateVault {
@@ -13,12 +13,12 @@ export interface MsgCreateVault {
13
13
  manager: string;
14
14
  vaultType: VaultType;
15
15
  relationship: VaultRelationship;
16
- vaultDenom: string;
17
- lockup: LockupPolicy | undefined;
18
- fee: FeePolicy | undefined;
16
+ /** fund_window is nil when deposits and redemptions are unrestricted. */
17
+ fundWindow: FundWindow | undefined;
18
+ lendingTerms?: LendingVaultTerms | undefined;
19
+ tradingTerms?: TradingVaultTerms | undefined;
19
20
  lending?: LendingVaultConfig | undefined;
20
21
  trading?: TradingVaultConfig | undefined;
21
- exitFeeBps: number;
22
22
  /**
23
23
  * initial_deposit is the vault-denomination amount supplied when creating a
24
24
  * vault.
@@ -123,6 +123,24 @@ export interface MsgVaultTransfer {
123
123
  /** MsgVaultTransferResponse is the response for MsgVaultTransfer. */
124
124
  export interface MsgVaultTransferResponse {
125
125
  }
126
+ /** MsgBackstopTransfer takes over an eligible derived perpetual account. */
127
+ export interface MsgBackstopTransfer {
128
+ /**
129
+ * sender is the governing parent vault account. its manager or an approved
130
+ * agent signs on behalf of this account.
131
+ */
132
+ sender: string;
133
+ /**
134
+ * source_account is the cross or isolated derived perpetual account to
135
+ * transfer.
136
+ */
137
+ sourceAccount: string;
138
+ /** vault_address is the destination protocol child. */
139
+ vaultAddress: string;
140
+ }
141
+ /** MsgBackstopTransferResponse is the response for MsgBackstopTransfer. */
142
+ export interface MsgBackstopTransferResponse {
143
+ }
126
144
  /** MsgReallocate moves lending vault capital between pools. */
127
145
  export interface MsgReallocate {
128
146
  vaultAddress: string;
@@ -167,6 +185,8 @@ export declare const VaultQueuedRedemptionResult: MessageFns<VaultQueuedRedempti
167
185
  export declare const MsgRedeemResponse: MessageFns<MsgRedeemResponse>;
168
186
  export declare const MsgVaultTransfer: MessageFns<MsgVaultTransfer>;
169
187
  export declare const MsgVaultTransferResponse: MessageFns<MsgVaultTransferResponse>;
188
+ export declare const MsgBackstopTransfer: MessageFns<MsgBackstopTransfer>;
189
+ export declare const MsgBackstopTransferResponse: MessageFns<MsgBackstopTransferResponse>;
170
190
  export declare const MsgReallocate: MessageFns<MsgReallocate>;
171
191
  export declare const MsgReallocateResponse: MessageFns<MsgReallocateResponse>;
172
192
  export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;