ault-sdk-ts 0.0.2-alpha.21 → 0.0.2-alpha.23
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 -0
- package/dist/core/clob-msgs.d.ts +2 -3
- package/dist/eip712/msg.generated.d.ts +10 -4
- package/dist/eip712/registry.d.ts +2 -0
- package/dist/high-level/types.d.ts +10 -6
- package/dist/index.cjs +618 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +607 -307
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/accountx/v1/query.d.ts +32 -0
- package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +0 -7
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +25 -3
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
- package/dist/proto/gen/ault/license/v1/license.d.ts +0 -14
- package/dist/proto/gen/ault/license/v1/query.d.ts +44 -18
- package/dist/proto/gen/ault/market/v1/market.d.ts +1 -0
- package/dist/proto/gen/ault/market/v1/tx.d.ts +9 -0
- package/dist/proto/gen/ault/miner/v1/genesis.d.ts +52 -84
- package/dist/proto/gen/ault/miner/v1/miner.d.ts +10 -45
- package/dist/proto/gen/ault/miner/v1/query.d.ts +0 -13
- package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -2
- package/dist/proto/gen/ault/spot/v1/order.d.ts +12 -4
- package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +3 -3
- package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +2 -2
- package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +24 -15
- package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +1 -1
- package/dist/rest/dex-types.generated.d.ts +59 -1
- package/dist/rest/dex.d.ts +1 -0
- package/dist/rest/dex.generated.d.ts +151 -4
- package/dist/rest/license.d.ts +1 -2
- package/dist/rest/types.d.ts +1 -2
- package/package.json +1 -1
|
@@ -29,12 +29,44 @@ export interface QueryParamsResponse {
|
|
|
29
29
|
/** params defines the current module parameters. */
|
|
30
30
|
params: Params | undefined;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* QueryFeeFreeGasLimitsRequest is the request type for the
|
|
34
|
+
* Query/FeeFreeGasLimits RPC method.
|
|
35
|
+
*/
|
|
36
|
+
export interface QueryFeeFreeGasLimitsRequest {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* QueryFeeFreeGasLimitsResponse is the response type for the
|
|
40
|
+
* Query/FeeFreeGasLimits RPC method.
|
|
41
|
+
*/
|
|
42
|
+
export interface QueryFeeFreeGasLimitsResponse {
|
|
43
|
+
/** gas_limits defines the fee-free minimum gas settings by message. */
|
|
44
|
+
gasLimits: FeeFreeGasLimit[];
|
|
45
|
+
}
|
|
46
|
+
/** FeeFreeGasLimit defines the minimum gas setting for a fee-free message. */
|
|
47
|
+
export interface FeeFreeGasLimit {
|
|
48
|
+
/** msg_type_url is the protobuf type URL of the fee-free message. */
|
|
49
|
+
msgTypeUrl: string;
|
|
50
|
+
/**
|
|
51
|
+
* base_gas_limit is the fixed gas limit, or the constant term for messages
|
|
52
|
+
* computed as base + per_unit * n.
|
|
53
|
+
*/
|
|
54
|
+
baseGasLimit: bigint;
|
|
55
|
+
/**
|
|
56
|
+
* per_unit_gas_limit is the per-item term for messages computed as base +
|
|
57
|
+
* per_unit * n.
|
|
58
|
+
*/
|
|
59
|
+
perUnitGasLimit: bigint;
|
|
60
|
+
}
|
|
32
61
|
export declare const QueryLabelRequest: MessageFns<QueryLabelRequest>;
|
|
33
62
|
export declare const QueryLabelResponse: MessageFns<QueryLabelResponse>;
|
|
34
63
|
export declare const QueryIsOpenedRequest: MessageFns<QueryIsOpenedRequest>;
|
|
35
64
|
export declare const QueryIsOpenedResponse: MessageFns<QueryIsOpenedResponse>;
|
|
36
65
|
export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
|
|
37
66
|
export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
|
|
67
|
+
export declare const QueryFeeFreeGasLimitsRequest: MessageFns<QueryFeeFreeGasLimitsRequest>;
|
|
68
|
+
export declare const QueryFeeFreeGasLimitsResponse: MessageFns<QueryFeeFreeGasLimitsResponse>;
|
|
69
|
+
export declare const FeeFreeGasLimit: MessageFns<FeeFreeGasLimit>;
|
|
38
70
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
39
71
|
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 {} ? {
|
|
40
72
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { Any } from "../../../google/protobuf/any";
|
|
3
|
-
import { Duration } from "../../../google/protobuf/duration";
|
|
4
3
|
import { Agent } from "./agent";
|
|
5
4
|
import { Params } from "./params";
|
|
6
5
|
export declare const protobufPackage = "ault.agent.v1";
|
|
@@ -23,11 +22,11 @@ export interface MsgApproveAgent {
|
|
|
23
22
|
*/
|
|
24
23
|
name: string;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* If not provided, params.default_expiry is used. Cannot exceed
|
|
28
|
-
* params.max_expiry.
|
|
25
|
+
* expires_at is the absolute timestamp when the agent authorization expires.
|
|
26
|
+
* If not provided, block_time + params.default_expiry is used. Cannot exceed
|
|
27
|
+
* block_time + params.max_expiry.
|
|
29
28
|
*/
|
|
30
|
-
|
|
29
|
+
expiresAt: Date | undefined;
|
|
31
30
|
}
|
|
32
31
|
export interface MsgApproveAgentResponse {
|
|
33
32
|
/** agent is the newly created or updated agent record. */
|
|
@@ -9,8 +9,6 @@ export interface GenesisState {
|
|
|
9
9
|
totalOrdersByOrderer: TotalOrdersByOrdererEntry[];
|
|
10
10
|
/** Orders by deadline index entries: deadline_unix_nano + order_id */
|
|
11
11
|
ordersByDeadlineIndex: OrdersByDeadlineIndexEntry[];
|
|
12
|
-
/** Closed orders index entries: market_id + order_id */
|
|
13
|
-
closedOrdersIndex: ClosedOrdersIndexEntry[];
|
|
14
12
|
}
|
|
15
13
|
export interface OrderBookIndexEntry {
|
|
16
14
|
marketId: Uint8Array;
|
|
@@ -26,15 +24,10 @@ export interface OrdersByDeadlineIndexEntry {
|
|
|
26
24
|
deadlineUnixNano: bigint;
|
|
27
25
|
orderId: Uint8Array;
|
|
28
26
|
}
|
|
29
|
-
export interface ClosedOrdersIndexEntry {
|
|
30
|
-
marketId: Uint8Array;
|
|
31
|
-
orderId: Uint8Array;
|
|
32
|
-
}
|
|
33
27
|
export declare const GenesisState: MessageFns<GenesisState>;
|
|
34
28
|
export declare const OrderBookIndexEntry: MessageFns<OrderBookIndexEntry>;
|
|
35
29
|
export declare const TotalOrdersByOrdererEntry: MessageFns<TotalOrdersByOrdererEntry>;
|
|
36
30
|
export declare const OrdersByDeadlineIndexEntry: MessageFns<OrdersByDeadlineIndexEntry>;
|
|
37
|
-
export declare const ClosedOrdersIndexEntry: MessageFns<ClosedOrdersIndexEntry>;
|
|
38
31
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
39
32
|
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 {} ? {
|
|
40
33
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { Coin } from "../../../cosmos/base/v1beta1/coin";
|
|
3
|
-
import { Duration } from "../../../google/protobuf/duration";
|
|
4
3
|
import { Params } from "./params";
|
|
5
4
|
export declare const protobufPackage = "ault.clob.v1";
|
|
6
5
|
export interface MsgPlaceLimitOrder {
|
|
@@ -9,7 +8,8 @@ export interface MsgPlaceLimitOrder {
|
|
|
9
8
|
isBuy: boolean;
|
|
10
9
|
price: string;
|
|
11
10
|
quantity: string;
|
|
12
|
-
|
|
11
|
+
/** deadline is the absolute time when the order expires. */
|
|
12
|
+
deadline: Date | undefined;
|
|
13
13
|
postOnly: boolean;
|
|
14
14
|
/** builder_address identifies the builder for this order (optional). */
|
|
15
15
|
builderAddress: string;
|
|
@@ -50,6 +50,23 @@ export interface MsgCancelOrdersResponse {
|
|
|
50
50
|
succeeded: Uint8Array[];
|
|
51
51
|
failed: Uint8Array[];
|
|
52
52
|
}
|
|
53
|
+
export interface MsgModifyOrders {
|
|
54
|
+
sender: string;
|
|
55
|
+
orders: ModifyOrder[];
|
|
56
|
+
}
|
|
57
|
+
export interface ModifyOrder {
|
|
58
|
+
orderId: Uint8Array;
|
|
59
|
+
newPrice: string;
|
|
60
|
+
newQuantity: string;
|
|
61
|
+
}
|
|
62
|
+
export interface MsgModifyOrdersResponse {
|
|
63
|
+
succeeded: ModifyOrderResult[];
|
|
64
|
+
failed: Uint8Array[];
|
|
65
|
+
}
|
|
66
|
+
export interface ModifyOrderResult {
|
|
67
|
+
oldOrderId: Uint8Array;
|
|
68
|
+
newOrderId: Uint8Array;
|
|
69
|
+
}
|
|
53
70
|
export interface MsgPlaceScaleOrder {
|
|
54
71
|
sender: string;
|
|
55
72
|
marketId: Uint8Array;
|
|
@@ -59,7 +76,8 @@ export interface MsgPlaceScaleOrder {
|
|
|
59
76
|
totalQuantity: string;
|
|
60
77
|
/** In basis points (bps); sum must equal 10000 */
|
|
61
78
|
weights: number[];
|
|
62
|
-
|
|
79
|
+
/** deadline is the absolute time when the orders expire. */
|
|
80
|
+
deadline: Date | undefined;
|
|
63
81
|
postOnly: boolean;
|
|
64
82
|
/** builder_address identifies the builder for this order (optional). */
|
|
65
83
|
builderAddress: string;
|
|
@@ -90,6 +108,10 @@ export declare const MsgPlaceMarketOrder: MessageFns<MsgPlaceMarketOrder>;
|
|
|
90
108
|
export declare const MsgPlaceMarketOrderResponse: MessageFns<MsgPlaceMarketOrderResponse>;
|
|
91
109
|
export declare const MsgCancelOrders: MessageFns<MsgCancelOrders>;
|
|
92
110
|
export declare const MsgCancelOrdersResponse: MessageFns<MsgCancelOrdersResponse>;
|
|
111
|
+
export declare const MsgModifyOrders: MessageFns<MsgModifyOrders>;
|
|
112
|
+
export declare const ModifyOrder: MessageFns<ModifyOrder>;
|
|
113
|
+
export declare const MsgModifyOrdersResponse: MessageFns<MsgModifyOrdersResponse>;
|
|
114
|
+
export declare const ModifyOrderResult: MessageFns<ModifyOrderResult>;
|
|
93
115
|
export declare const MsgPlaceScaleOrder: MessageFns<MsgPlaceScaleOrder>;
|
|
94
116
|
export declare const MsgPlaceScaleOrderResponse: MessageFns<MsgPlaceScaleOrderResponse>;
|
|
95
117
|
export declare const ScaleOrderResult: MessageFns<ScaleOrderResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import { LicenseStatus, Params
|
|
2
|
+
import { LicenseStatus, Params } from "./license";
|
|
3
3
|
export declare const protobufPackage = "ault.license.v1";
|
|
4
4
|
/** GenesisState defines the license module's genesis state */
|
|
5
5
|
export interface GenesisState {
|
|
@@ -38,15 +38,8 @@ export interface GenesisState {
|
|
|
38
38
|
* members
|
|
39
39
|
*/
|
|
40
40
|
totalCapped: bigint;
|
|
41
|
-
/** proposal_snapshots stores voting power state for active proposals */
|
|
42
|
-
proposalSnapshots: ProposalSnapshotEntry[];
|
|
43
41
|
/** owner_active_counts maps owner addresses to their active license counts */
|
|
44
42
|
ownerActiveCounts: OwnerActiveCount[];
|
|
45
|
-
/**
|
|
46
|
-
* owner_active_count_snapshots maps owner addresses and timestamps to their
|
|
47
|
-
* active license counts at those times
|
|
48
|
-
*/
|
|
49
|
-
ownerActiveCountSnapshots: OwnerActiveCountSnapshot[];
|
|
50
43
|
}
|
|
51
44
|
/** OwnerCount represents the count of licenses for an owner */
|
|
52
45
|
export interface OwnerCount {
|
|
@@ -69,21 +62,6 @@ export interface OwnerActiveCount {
|
|
|
69
62
|
/** count is the number of active licenses owned */
|
|
70
63
|
count: bigint;
|
|
71
64
|
}
|
|
72
|
-
export interface OwnerActiveCountSnapshot {
|
|
73
|
-
/** owner is the owner address */
|
|
74
|
-
owner: string;
|
|
75
|
-
/** timestamp is the time to query active license count snapshot at */
|
|
76
|
-
timestamp: Date | undefined;
|
|
77
|
-
/** count is the number of active licenses owned at the given timestamp */
|
|
78
|
-
count: bigint;
|
|
79
|
-
}
|
|
80
|
-
/** ProposalSnapshotEntry represents a proposal snapshot for genesis export */
|
|
81
|
-
export interface ProposalSnapshotEntry {
|
|
82
|
-
/** proposal_id is the governance proposal ID */
|
|
83
|
-
proposalId: bigint;
|
|
84
|
-
/** snapshot is the voting power snapshot */
|
|
85
|
-
snapshot: ProposalSnapshot | undefined;
|
|
86
|
-
}
|
|
87
65
|
/** GenesisLicense defines a soul-bound token license */
|
|
88
66
|
export interface GenesisLicense {
|
|
89
67
|
/** start_id is the unique identifier of the first license */
|
|
@@ -102,7 +80,6 @@ export interface GenesisLicense {
|
|
|
102
80
|
createdAt: Date | undefined;
|
|
103
81
|
/**
|
|
104
82
|
* revoked_at is the timestamp when the license was revoked.
|
|
105
|
-
* Used for snapshot-based governance voting power calculation.
|
|
106
83
|
* Nil means the license has never been revoked.
|
|
107
84
|
*/
|
|
108
85
|
revokedAt: Date | undefined;
|
|
@@ -116,8 +93,6 @@ export declare const GenesisState: MessageFns<GenesisState>;
|
|
|
116
93
|
export declare const OwnerCount: MessageFns<OwnerCount>;
|
|
117
94
|
export declare const OwnerIndex: MessageFns<OwnerIndex>;
|
|
118
95
|
export declare const OwnerActiveCount: MessageFns<OwnerActiveCount>;
|
|
119
|
-
export declare const OwnerActiveCountSnapshot: MessageFns<OwnerActiveCountSnapshot>;
|
|
120
|
-
export declare const ProposalSnapshotEntry: MessageFns<ProposalSnapshotEntry>;
|
|
121
96
|
export declare const GenesisLicense: MessageFns<GenesisLicense>;
|
|
122
97
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
123
98
|
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 {} ? {
|
|
@@ -30,7 +30,6 @@ export interface License {
|
|
|
30
30
|
createdAt: Date | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* revoked_at is the timestamp when the license was revoked.
|
|
33
|
-
* Used for snapshot-based governance voting power calculation.
|
|
34
33
|
* Nil means the license has never been revoked.
|
|
35
34
|
*/
|
|
36
35
|
revokedAt: Date | undefined;
|
|
@@ -103,21 +102,8 @@ export interface Params {
|
|
|
103
102
|
*/
|
|
104
103
|
maxVotingPowerPerAddress: bigint;
|
|
105
104
|
}
|
|
106
|
-
/** ProposalSnapshot stores voting power state captured at proposal creation */
|
|
107
|
-
export interface ProposalSnapshot {
|
|
108
|
-
/** timestamp is when the snapshot was taken (proposal submission time) */
|
|
109
|
-
timestamp: Date | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* total_capped is the sum of min(active_licenses_i, cap) for all approved
|
|
112
|
-
* members at snapshot time
|
|
113
|
-
*/
|
|
114
|
-
totalCapped: bigint;
|
|
115
|
-
/** cap is the MaxVotingPowerPerAddress parameter value at snapshot time */
|
|
116
|
-
cap: bigint;
|
|
117
|
-
}
|
|
118
105
|
export declare const License: MessageFns<License>;
|
|
119
106
|
export declare const Params: MessageFns<Params>;
|
|
120
|
-
export declare const ProposalSnapshot: MessageFns<ProposalSnapshot>;
|
|
121
107
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
122
108
|
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 {} ? {
|
|
123
109
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -200,23 +200,46 @@ export interface QueryIsKYCApproverResponse {
|
|
|
200
200
|
/** is_approver indicates whether the address is a KYC approver */
|
|
201
201
|
isApprover: boolean;
|
|
202
202
|
}
|
|
203
|
-
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
export interface QueryActiveLicenseCountAtRequest {
|
|
208
|
-
/** owner is the address to query license count for */
|
|
209
|
-
owner: string;
|
|
210
|
-
/** snapshot_time is the time to query at */
|
|
211
|
-
snapshotTime: Date | undefined;
|
|
203
|
+
/** QueryVotingPowersRequest is the request for the VotingPowers RPC method */
|
|
204
|
+
export interface QueryVotingPowersRequest {
|
|
205
|
+
/** pagination defines the pagination in the request */
|
|
206
|
+
pagination: PageRequest | undefined;
|
|
212
207
|
}
|
|
213
|
-
/**
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
208
|
+
/** VotingPower is the voting power of an approved DAO member */
|
|
209
|
+
export interface VotingPower {
|
|
210
|
+
/** address is the address of the approved member */
|
|
211
|
+
address: string;
|
|
212
|
+
/** active_license_count is the number of active licenses owned by the member */
|
|
213
|
+
activeLicenseCount: bigint;
|
|
214
|
+
/**
|
|
215
|
+
* voting_power is the member's voting power, which is the active license
|
|
216
|
+
* count capped by the max voting power per address
|
|
217
|
+
*/
|
|
218
|
+
votingPower: bigint;
|
|
219
|
+
}
|
|
220
|
+
/** QueryVotingPowersResponse is the response for the VotingPowers RPC method */
|
|
221
|
+
export interface QueryVotingPowersResponse {
|
|
222
|
+
/** voting_powers is the list of voting powers of approved members */
|
|
223
|
+
votingPowers: VotingPower[];
|
|
224
|
+
/** total_voting_power is the total voting power of all approved members */
|
|
225
|
+
totalVotingPower: bigint;
|
|
226
|
+
/** pagination defines the pagination in the response */
|
|
227
|
+
pagination: PageResponse | undefined;
|
|
228
|
+
}
|
|
229
|
+
/** QueryVotingPowerRequest is the request for the VotingPower RPC method */
|
|
230
|
+
export interface QueryVotingPowerRequest {
|
|
231
|
+
/** address is the address of the approved member */
|
|
232
|
+
address: string;
|
|
233
|
+
}
|
|
234
|
+
/** QueryVotingPowerResponse is the response for the VotingPower RPC method */
|
|
235
|
+
export interface QueryVotingPowerResponse {
|
|
236
|
+
/** active_license_count is the number of active licenses owned by the member */
|
|
237
|
+
activeLicenseCount: bigint;
|
|
238
|
+
/**
|
|
239
|
+
* voting_power is the member's voting power, which is the active license
|
|
240
|
+
* count capped by the max voting power per address
|
|
241
|
+
*/
|
|
242
|
+
votingPower: bigint;
|
|
220
243
|
}
|
|
221
244
|
export declare const QueryLicenseRequest: MessageFns<QueryLicenseRequest>;
|
|
222
245
|
export declare const QueryLicenseResponse: MessageFns<QueryLicenseResponse>;
|
|
@@ -250,8 +273,11 @@ export declare const QueryIsApprovedMemberRequest: MessageFns<QueryIsApprovedMem
|
|
|
250
273
|
export declare const QueryIsApprovedMemberResponse: MessageFns<QueryIsApprovedMemberResponse>;
|
|
251
274
|
export declare const QueryIsKYCApproverRequest: MessageFns<QueryIsKYCApproverRequest>;
|
|
252
275
|
export declare const QueryIsKYCApproverResponse: MessageFns<QueryIsKYCApproverResponse>;
|
|
253
|
-
export declare const
|
|
254
|
-
export declare const
|
|
276
|
+
export declare const QueryVotingPowersRequest: MessageFns<QueryVotingPowersRequest>;
|
|
277
|
+
export declare const VotingPower: MessageFns<VotingPower>;
|
|
278
|
+
export declare const QueryVotingPowersResponse: MessageFns<QueryVotingPowersResponse>;
|
|
279
|
+
export declare const QueryVotingPowerRequest: MessageFns<QueryVotingPowerRequest>;
|
|
280
|
+
export declare const QueryVotingPowerResponse: MessageFns<QueryVotingPowerResponse>;
|
|
255
281
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
256
282
|
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 {} ? {
|
|
257
283
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -8,9 +8,18 @@ export interface MsgCreateMarket {
|
|
|
8
8
|
baseDenom: string;
|
|
9
9
|
quoteDenom: string;
|
|
10
10
|
tickPrecision: number;
|
|
11
|
+
makerFeeRate: string;
|
|
12
|
+
takerFeeRate: string;
|
|
11
13
|
}
|
|
12
14
|
export interface MsgCreateMarketResponse {
|
|
13
15
|
marketId: Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* maker_fee_rate is the resolved maker fee rate the market was created with
|
|
18
|
+
* (the provided override, or the module default when none was given).
|
|
19
|
+
*/
|
|
20
|
+
makerFeeRate: string;
|
|
21
|
+
/** taker_fee_rate is the resolved taker fee rate the market was created with. */
|
|
22
|
+
takerFeeRate: string;
|
|
14
23
|
}
|
|
15
24
|
export interface MarketUpdate {
|
|
16
25
|
marketId: Uint8Array;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { Coin } from "../../../cosmos/base/v1beta1/coin";
|
|
3
|
-
import { EpochInfo,
|
|
3
|
+
import { EpochInfo, LicenseInfoSnapshot, MiningDelegation, OperatorInfo, OwnerVRFKey, Params, Winner } from "./miner";
|
|
4
4
|
export declare const protobufPackage = "ault.miner.v1";
|
|
5
5
|
/** GenesisState defines the miner module's genesis state */
|
|
6
6
|
export interface GenesisState {
|
|
@@ -12,24 +12,31 @@ export interface GenesisState {
|
|
|
12
12
|
currentThreshold: Uint8Array;
|
|
13
13
|
/** owner_keys contains registered owner VRF keys */
|
|
14
14
|
ownerKeys: OwnerVRFKey[];
|
|
15
|
-
|
|
16
|
-
lastSubmitEpochs: LastSubmitEpoch[];
|
|
15
|
+
licenseCredits: LicenseCreditsEntry[];
|
|
17
16
|
/** epochs contains recent epoch info (ring buffer) */
|
|
18
17
|
epochs: EpochInfo[];
|
|
19
|
-
/**
|
|
20
|
-
|
|
18
|
+
/** LicenseInfoSnapshotEntry contains snapshots of license info for each epoch */
|
|
19
|
+
licenseInfoSnapshots: LicenseInfoSnapshotEntry[];
|
|
21
20
|
/** epoch_winners contains winners for each epoch */
|
|
22
21
|
epochWinners: EpochWinnersInfo[];
|
|
23
22
|
/** randao_mix is the current RANDAO mix value */
|
|
24
23
|
randaoMix: Uint8Array;
|
|
25
24
|
/** last_settled_epoch is the last epoch that was settled for payouts */
|
|
26
25
|
lastSettledEpoch: bigint;
|
|
27
|
-
/**
|
|
28
|
-
|
|
26
|
+
/**
|
|
27
|
+
* operators_info_snapshots contains registered mining operators info
|
|
28
|
+
* snapshots for each epoch
|
|
29
|
+
*/
|
|
30
|
+
operatorInfoSnapshots: OperatorInfoSnapshotEntry[];
|
|
29
31
|
/** mining_delegations contains license to operator delegations */
|
|
30
32
|
miningDelegations: MiningDelegation[];
|
|
31
33
|
/** delegation_queue contains pending delegation changes */
|
|
32
34
|
delegationQueue: MiningDelegation[];
|
|
35
|
+
/**
|
|
36
|
+
* last_undelegated_epochs records, per operator, the most recent epoch at
|
|
37
|
+
* which any license was removed from the operator's delegation set
|
|
38
|
+
*/
|
|
39
|
+
lastUndelegatedEpochs: LastUndelegatedEpochEntry[];
|
|
33
40
|
/**
|
|
34
41
|
* epoch_start_time (seconds since Unix epoch) shifts the epoch clock start.
|
|
35
42
|
*
|
|
@@ -40,43 +47,40 @@ export interface GenesisState {
|
|
|
40
47
|
* and emissions remain paused.
|
|
41
48
|
*/
|
|
42
49
|
epochStartTime: bigint;
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
/** rate_limits contains rate limit counts per epoch per license */
|
|
46
|
-
rateLimits: RateLimitEntry[];
|
|
47
|
-
/** last_delegation_epochs tracks last delegation change epoch per license */
|
|
48
|
-
lastDelegationEpochs: LastDelegationEpochEntry[];
|
|
49
|
-
/**
|
|
50
|
-
* Deprecated: signer_rate_limits is no longer used by runtime.
|
|
51
|
-
*
|
|
52
|
-
* @deprecated
|
|
53
|
-
*/
|
|
54
|
-
signerRateLimits: SignerRateLimitEntry[];
|
|
50
|
+
/** pending_payouts contains pending payouts aggregated by recipient */
|
|
51
|
+
pendingPayouts: PendingPayoutEntry[];
|
|
55
52
|
/**
|
|
56
53
|
* carryover_emission is accumulated emission from epochs with no eligible
|
|
57
54
|
* payouts
|
|
58
55
|
*/
|
|
59
56
|
carryoverEmission: Coin | undefined;
|
|
60
|
-
/** all_time_credits contains accumulated credits per license */
|
|
61
|
-
allTimeCredits: AllTimeCreditsEntry[];
|
|
62
|
-
/** all_time_payouts contains accumulated payouts per license */
|
|
63
|
-
allTimePayouts: AllTimePayoutsEntry[];
|
|
64
57
|
}
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
export interface LicenseCreditsEntry {
|
|
59
|
+
epoch: bigint;
|
|
60
|
+
licenseId: bigint;
|
|
61
|
+
credits: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* LicenseInfoSnapshotEntry tracks license info snapshots for genesis
|
|
65
|
+
* export/import
|
|
66
|
+
*/
|
|
67
|
+
export interface LicenseInfoSnapshotEntry {
|
|
67
68
|
/** license_id */
|
|
68
69
|
licenseId: bigint;
|
|
69
70
|
/** epoch number */
|
|
70
71
|
epoch: bigint;
|
|
72
|
+
/** snapshot of license info for this epoch */
|
|
73
|
+
snapshot: LicenseInfoSnapshot | undefined;
|
|
71
74
|
}
|
|
72
|
-
/**
|
|
73
|
-
|
|
75
|
+
/**
|
|
76
|
+
* OperatorInfoSnapshotEntry tracks operator info snapshots for genesis
|
|
77
|
+
* export/import
|
|
78
|
+
*/
|
|
79
|
+
export interface OperatorInfoSnapshotEntry {
|
|
74
80
|
/** epoch number */
|
|
75
81
|
epoch: bigint;
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
/** license info (credits and payout) */
|
|
79
|
-
info: LicenseInfo | undefined;
|
|
82
|
+
/** snapshot of operator info for this epoch */
|
|
83
|
+
snapshot: OperatorInfo | undefined;
|
|
80
84
|
}
|
|
81
85
|
/** EpochWinnersInfo tracks winners for an epoch in genesis export/import */
|
|
82
86
|
export interface EpochWinnersInfo {
|
|
@@ -85,66 +89,30 @@ export interface EpochWinnersInfo {
|
|
|
85
89
|
/** winners for this epoch (directly stored, no wrapper) */
|
|
86
90
|
winners: Winner[];
|
|
87
91
|
}
|
|
88
|
-
/**
|
|
89
|
-
export interface
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
epoch: bigint;
|
|
94
|
-
/** recipient address */
|
|
95
|
-
recipient: string;
|
|
96
|
-
/** amount as string */
|
|
92
|
+
/** PendingPayoutEntry represents a pending payout */
|
|
93
|
+
export interface PendingPayoutEntry {
|
|
94
|
+
/** recipient address (raw 20 bytes) */
|
|
95
|
+
recipient: Uint8Array;
|
|
96
|
+
/** pending payout amount */
|
|
97
97
|
amount: string;
|
|
98
98
|
}
|
|
99
|
-
/**
|
|
100
|
-
|
|
99
|
+
/**
|
|
100
|
+
* LastUndelegatedEpochEntry tracks per-operator the most recent epoch at
|
|
101
|
+
* which any license was undelegated from this operator.
|
|
102
|
+
*/
|
|
103
|
+
export interface LastUndelegatedEpochEntry {
|
|
104
|
+
/** operator address */
|
|
105
|
+
operator: string;
|
|
101
106
|
/** epoch number */
|
|
102
107
|
epoch: bigint;
|
|
103
|
-
/** license_id */
|
|
104
|
-
licenseId: bigint;
|
|
105
|
-
/** count */
|
|
106
|
-
count: number;
|
|
107
|
-
}
|
|
108
|
-
/** LastDelegationEpochEntry tracks the last delegation change epoch per license */
|
|
109
|
-
export interface LastDelegationEpochEntry {
|
|
110
|
-
/** license_id */
|
|
111
|
-
licenseId: bigint;
|
|
112
|
-
/** epoch of last delegation change */
|
|
113
|
-
epoch: bigint;
|
|
114
|
-
}
|
|
115
|
-
/** Deprecated: SignerRateLimitEntry is retained only for backward compatibility. */
|
|
116
|
-
export interface SignerRateLimitEntry {
|
|
117
|
-
/** epoch number */
|
|
118
|
-
epoch: bigint;
|
|
119
|
-
/** signer address */
|
|
120
|
-
signer: Uint8Array;
|
|
121
|
-
/** count */
|
|
122
|
-
count: number;
|
|
123
|
-
}
|
|
124
|
-
/** AllTimeCreditsEntry tracks cumulative credits for a license */
|
|
125
|
-
export interface AllTimeCreditsEntry {
|
|
126
|
-
/** license_id */
|
|
127
|
-
licenseId: bigint;
|
|
128
|
-
/** credits accumulated */
|
|
129
|
-
credits: bigint;
|
|
130
|
-
}
|
|
131
|
-
/** AllTimePayoutsEntry tracks cumulative payouts for a license */
|
|
132
|
-
export interface AllTimePayoutsEntry {
|
|
133
|
-
/** license_id */
|
|
134
|
-
licenseId: bigint;
|
|
135
|
-
/** payout accumulated */
|
|
136
|
-
payout: string;
|
|
137
108
|
}
|
|
138
109
|
export declare const GenesisState: MessageFns<GenesisState>;
|
|
139
|
-
export declare const
|
|
140
|
-
export declare const
|
|
110
|
+
export declare const LicenseCreditsEntry: MessageFns<LicenseCreditsEntry>;
|
|
111
|
+
export declare const LicenseInfoSnapshotEntry: MessageFns<LicenseInfoSnapshotEntry>;
|
|
112
|
+
export declare const OperatorInfoSnapshotEntry: MessageFns<OperatorInfoSnapshotEntry>;
|
|
141
113
|
export declare const EpochWinnersInfo: MessageFns<EpochWinnersInfo>;
|
|
142
|
-
export declare const
|
|
143
|
-
export declare const
|
|
144
|
-
export declare const LastDelegationEpochEntry: MessageFns<LastDelegationEpochEntry>;
|
|
145
|
-
export declare const SignerRateLimitEntry: MessageFns<SignerRateLimitEntry>;
|
|
146
|
-
export declare const AllTimeCreditsEntry: MessageFns<AllTimeCreditsEntry>;
|
|
147
|
-
export declare const AllTimePayoutsEntry: MessageFns<AllTimePayoutsEntry>;
|
|
114
|
+
export declare const PendingPayoutEntry: MessageFns<PendingPayoutEntry>;
|
|
115
|
+
export declare const LastUndelegatedEpochEntry: MessageFns<LastUndelegatedEpochEntry>;
|
|
148
116
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
149
117
|
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 {} ? {
|
|
150
118
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -49,38 +49,13 @@ export interface EpochInfo {
|
|
|
49
49
|
/** finalized indicates if beacon is finalized */
|
|
50
50
|
finalized: boolean;
|
|
51
51
|
}
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
owner: string;
|
|
60
|
-
/**
|
|
61
|
-
* commission_recipient is the address to receive commission
|
|
62
|
-
* Empty if not delegated
|
|
63
|
-
*/
|
|
64
|
-
commissionRecipient: string;
|
|
65
|
-
/**
|
|
66
|
-
* commission_rate is the operator's commission rate at the time credits were
|
|
67
|
-
* earned (0-100)
|
|
68
|
-
*/
|
|
69
|
-
commissionRate: number;
|
|
70
|
-
/**
|
|
71
|
-
* operator is the operator address at the time credits were earned
|
|
72
|
-
* Empty if not delegated
|
|
73
|
-
*/
|
|
74
|
-
operator: string;
|
|
75
|
-
}
|
|
76
|
-
/** RewardQueueItem represents a reward to be paid out */
|
|
77
|
-
export interface RewardQueueItem {
|
|
78
|
-
/** license_id to receive the reward */
|
|
79
|
-
licenseId: bigint;
|
|
80
|
-
/** epoch when the reward was earned */
|
|
81
|
-
epoch: bigint;
|
|
82
|
-
/** amount to be paid (in sdk.Int format) */
|
|
83
|
-
amount: string;
|
|
52
|
+
/**
|
|
53
|
+
* LicenseInfoSnapshot represents a snapshot of license info for a specific
|
|
54
|
+
* epoch
|
|
55
|
+
*/
|
|
56
|
+
export interface LicenseInfoSnapshot {
|
|
57
|
+
owner: Uint8Array;
|
|
58
|
+
operator: Uint8Array;
|
|
84
59
|
}
|
|
85
60
|
/** OperatorInfo represents a registered mining operator */
|
|
86
61
|
export interface OperatorInfo {
|
|
@@ -88,16 +63,8 @@ export interface OperatorInfo {
|
|
|
88
63
|
operator: string;
|
|
89
64
|
/** commission_rate is the commission percentage (0-100) */
|
|
90
65
|
commissionRate: number;
|
|
91
|
-
/**
|
|
92
|
-
* commission_recipient is the address to receive commission rewards
|
|
93
|
-
* If empty, commission is sent to the operator address
|
|
94
|
-
*/
|
|
66
|
+
/** commission_recipient is the address to receive commission rewards */
|
|
95
67
|
commissionRecipient: string;
|
|
96
|
-
/**
|
|
97
|
-
* last_update_epoch is the epoch when operator info was last updated
|
|
98
|
-
* Used to enforce per-epoch rate limiting on commission rate changes
|
|
99
|
-
*/
|
|
100
|
-
lastUpdateEpoch: bigint;
|
|
101
68
|
}
|
|
102
69
|
/** MiningDelegation represents a delegation from a license to an operator */
|
|
103
70
|
export interface MiningDelegation {
|
|
@@ -151,8 +118,7 @@ export interface Params {
|
|
|
151
118
|
/**
|
|
152
119
|
* max_payouts_per_block limits the number of payouts processed per block
|
|
153
120
|
* for deterministic execution. Each payout (transfer + bookkeeping) is
|
|
154
|
-
* atomic. Prevents unbounded work per block
|
|
155
|
-
* 500, Range: 1-100000
|
|
121
|
+
* atomic. Prevents unbounded work per block. Default: 500, Range: 1-100000
|
|
156
122
|
*/
|
|
157
123
|
maxPayoutsPerBlock: number;
|
|
158
124
|
/**
|
|
@@ -206,8 +172,7 @@ export declare const OwnerVRFKey: MessageFns<OwnerVRFKey>;
|
|
|
206
172
|
export declare const Winner: MessageFns<Winner>;
|
|
207
173
|
export declare const EpochWinners: MessageFns<EpochWinners>;
|
|
208
174
|
export declare const EpochInfo: MessageFns<EpochInfo>;
|
|
209
|
-
export declare const
|
|
210
|
-
export declare const RewardQueueItem: MessageFns<RewardQueueItem>;
|
|
175
|
+
export declare const LicenseInfoSnapshot: MessageFns<LicenseInfoSnapshot>;
|
|
211
176
|
export declare const OperatorInfo: MessageFns<OperatorInfo>;
|
|
212
177
|
export declare const MiningDelegation: MessageFns<MiningDelegation>;
|
|
213
178
|
export declare const Params: MessageFns<Params>;
|
|
@@ -31,21 +31,8 @@ export interface QueryLicenseMinerInfoRequest {
|
|
|
31
31
|
export interface QueryLicenseMinerInfoResponse {
|
|
32
32
|
/** vrf_pubkey registered for this license */
|
|
33
33
|
vrfPubkey: Uint8Array;
|
|
34
|
-
/** last_submit_epoch is the last epoch this license submitted work */
|
|
35
|
-
lastSubmitEpoch: bigint;
|
|
36
34
|
/** eligible_now indicates if license can mine now */
|
|
37
35
|
eligibleNow: boolean;
|
|
38
|
-
/** quarantined_local indicates miner-local quarantine flag */
|
|
39
|
-
quarantinedLocal: boolean;
|
|
40
|
-
/** quarantined_source indicates quarantine per x/license */
|
|
41
|
-
quarantinedSource: boolean;
|
|
42
|
-
/** all_time_credits is the cumulative count of successful work submissions */
|
|
43
|
-
allTimeCredits: bigint;
|
|
44
|
-
/**
|
|
45
|
-
* all_time_payouts is the cumulative amount paid out to this license (sdk.Int
|
|
46
|
-
* string)
|
|
47
|
-
*/
|
|
48
|
-
allTimePayouts: string;
|
|
49
36
|
}
|
|
50
37
|
/** QueryBeaconRequest is the request for Query/Beacon */
|
|
51
38
|
export interface QueryBeaconRequest {
|