ault-sdk-ts 0.0.2-alpha.5

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 (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +932 -0
  3. package/dist/agent/create-agent-client.d.ts +3 -0
  4. package/dist/agent/sign-and-broadcast.d.ts +38 -0
  5. package/dist/agent/tx/clob.d.ts +7 -0
  6. package/dist/agent/tx-executor.d.ts +17 -0
  7. package/dist/client.d.ts +61 -0
  8. package/dist/core/address.d.ts +14 -0
  9. package/dist/core/base64.d.ts +2 -0
  10. package/dist/core/clob-msgs.d.ts +33 -0
  11. package/dist/core/errors.d.ts +17 -0
  12. package/dist/core/http.d.ts +14 -0
  13. package/dist/core/network.d.ts +59 -0
  14. package/dist/core/pagination.d.ts +14 -0
  15. package/dist/core/query.d.ts +5 -0
  16. package/dist/core/with-status-fallback.d.ts +5 -0
  17. package/dist/eip712/builder.d.ts +45 -0
  18. package/dist/eip712/field-order.d.ts +2 -0
  19. package/dist/eip712/msg-encoders.generated.d.ts +1 -0
  20. package/dist/eip712/msg.generated.d.ts +109 -0
  21. package/dist/eip712/registry.d.ts +36 -0
  22. package/dist/eip712/registry.generated.d.ts +2 -0
  23. package/dist/eip712/sign-and-broadcast.d.ts +55 -0
  24. package/dist/eip712/signers.d.ts +83 -0
  25. package/dist/eip712/types.d.ts +58 -0
  26. package/dist/high-level/address-utils.d.ts +2 -0
  27. package/dist/high-level/create-client.d.ts +26 -0
  28. package/dist/high-level/query-helpers.d.ts +3 -0
  29. package/dist/high-level/signer.d.ts +6 -0
  30. package/dist/high-level/tx/agent.d.ts +3 -0
  31. package/dist/high-level/tx/authority.d.ts +3 -0
  32. package/dist/high-level/tx/clob.d.ts +3 -0
  33. package/dist/high-level/tx/context.d.ts +5 -0
  34. package/dist/high-level/tx/license.d.ts +3 -0
  35. package/dist/high-level/tx/market.d.ts +3 -0
  36. package/dist/high-level/tx/miner.d.ts +3 -0
  37. package/dist/high-level/tx/ratelimit.d.ts +3 -0
  38. package/dist/high-level/tx/reward.d.ts +3 -0
  39. package/dist/high-level/tx/staking.d.ts +3 -0
  40. package/dist/high-level/tx/tokenregistry.d.ts +3 -0
  41. package/dist/high-level/tx-executor.d.ts +18 -0
  42. package/dist/high-level/types.d.ts +477 -0
  43. package/dist/high-level-client.d.ts +2 -0
  44. package/dist/index.cjs +18434 -0
  45. package/dist/index.cjs.map +1 -0
  46. package/dist/index.d.ts +38 -0
  47. package/dist/index.js +18162 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/proto/duration-json.d.ts +6 -0
  50. package/dist/proto/gen/amino/amino.d.ts +1 -0
  51. package/dist/proto/gen/ault/agent/v1/agent.d.ts +63 -0
  52. package/dist/proto/gen/ault/agent/v1/genesis.d.ts +44 -0
  53. package/dist/proto/gen/ault/agent/v1/params.d.ts +42 -0
  54. package/dist/proto/gen/ault/agent/v1/query.d.ts +73 -0
  55. package/dist/proto/gen/ault/agent/v1/tx.d.ts +91 -0
  56. package/dist/proto/gen/ault/authority/v1/authority.d.ts +15 -0
  57. package/dist/proto/gen/ault/authority/v1/genesis.d.ts +36 -0
  58. package/dist/proto/gen/ault/authority/v1/query.d.ts +53 -0
  59. package/dist/proto/gen/ault/authority/v1/tx.d.ts +50 -0
  60. package/dist/proto/gen/ault/clob/v1/fee.d.ts +37 -0
  61. package/dist/proto/gen/ault/clob/v1/genesis.d.ts +56 -0
  62. package/dist/proto/gen/ault/clob/v1/order_book.d.ts +32 -0
  63. package/dist/proto/gen/ault/clob/v1/params.d.ts +29 -0
  64. package/dist/proto/gen/ault/clob/v1/query.d.ts +56 -0
  65. package/dist/proto/gen/ault/clob/v1/tx.d.ts +116 -0
  66. package/dist/proto/gen/ault/license/v1/genesis.d.ts +140 -0
  67. package/dist/proto/gen/ault/license/v1/license.d.ts +151 -0
  68. package/dist/proto/gen/ault/license/v1/query.d.ts +273 -0
  69. package/dist/proto/gen/ault/license/v1/tx.d.ts +227 -0
  70. package/dist/proto/gen/ault/market/v1/genesis.d.ts +28 -0
  71. package/dist/proto/gen/ault/market/v1/market.d.ts +66 -0
  72. package/dist/proto/gen/ault/market/v1/params.d.ts +34 -0
  73. package/dist/proto/gen/ault/market/v1/query.d.ts +48 -0
  74. package/dist/proto/gen/ault/market/v1/tx.d.ts +87 -0
  75. package/dist/proto/gen/ault/miner/v1/genesis.d.ts +166 -0
  76. package/dist/proto/gen/ault/miner/v1/miner.d.ts +232 -0
  77. package/dist/proto/gen/ault/miner/v1/query.d.ts +254 -0
  78. package/dist/proto/gen/ault/miner/v1/tx.d.ts +207 -0
  79. package/dist/proto/gen/ault/ratelimit/v1/genesis.d.ts +27 -0
  80. package/dist/proto/gen/ault/ratelimit/v1/params.d.ts +35 -0
  81. package/dist/proto/gen/ault/ratelimit/v1/query.d.ts +42 -0
  82. package/dist/proto/gen/ault/ratelimit/v1/tx.d.ts +32 -0
  83. package/dist/proto/gen/ault/reward/v1/genesis.d.ts +67 -0
  84. package/dist/proto/gen/ault/reward/v1/query.d.ts +93 -0
  85. package/dist/proto/gen/ault/reward/v1/reward.d.ts +53 -0
  86. package/dist/proto/gen/ault/reward/v1/tx.d.ts +120 -0
  87. package/dist/proto/gen/ault/spot/v1/genesis.d.ts +26 -0
  88. package/dist/proto/gen/ault/spot/v1/order.d.ts +66 -0
  89. package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +34 -0
  90. package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +77 -0
  91. package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +118 -0
  92. package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +132 -0
  93. package/dist/proto/gen/cosmos/base/query/v1beta1/pagination.d.ts +82 -0
  94. package/dist/proto/gen/cosmos/base/v1beta1/coin.d.ts +59 -0
  95. package/dist/proto/gen/cosmos/distribution/v1beta1/distribution.d.ts +162 -0
  96. package/dist/proto/gen/cosmos/distribution/v1beta1/tx.d.ts +140 -0
  97. package/dist/proto/gen/cosmos/msg/v1/msg.d.ts +1 -0
  98. package/dist/proto/gen/cosmos/staking/v1beta1/staking.d.ts +310 -0
  99. package/dist/proto/gen/cosmos/staking/v1beta1/tx.d.ts +144 -0
  100. package/dist/proto/gen/cosmos_proto/cosmos.d.ts +80 -0
  101. package/dist/proto/gen/gogoproto/gogo.d.ts +1 -0
  102. package/dist/proto/gen/google/api/annotations.d.ts +1 -0
  103. package/dist/proto/gen/google/api/http.d.ts +379 -0
  104. package/dist/proto/gen/google/protobuf/any.d.ts +144 -0
  105. package/dist/proto/gen/google/protobuf/descriptor.d.ts +1285 -0
  106. package/dist/proto/gen/google/protobuf/duration.d.ts +99 -0
  107. package/dist/proto/gen/google/protobuf/timestamp.d.ts +128 -0
  108. package/dist/proto/gen/tendermint/abci/types.d.ts +507 -0
  109. package/dist/proto/gen/tendermint/crypto/keys.d.ts +27 -0
  110. package/dist/proto/gen/tendermint/crypto/proof.d.ts +57 -0
  111. package/dist/proto/gen/tendermint/types/params.d.ts +112 -0
  112. package/dist/proto/gen/tendermint/types/types.d.ts +197 -0
  113. package/dist/proto/gen/tendermint/types/validator.d.ts +54 -0
  114. package/dist/proto/gen/tendermint/version/types.d.ts +41 -0
  115. package/dist/proto/tx-encode.d.ts +78 -0
  116. package/dist/rest/agent.d.ts +12 -0
  117. package/dist/rest/authority.d.ts +12 -0
  118. package/dist/rest/clob.d.ts +11 -0
  119. package/dist/rest/context.d.ts +22 -0
  120. package/dist/rest/dex-fetcher.d.ts +10 -0
  121. package/dist/rest/dex-types.generated.d.ts +780 -0
  122. package/dist/rest/dex.d.ts +34 -0
  123. package/dist/rest/dex.generated.d.ts +1381 -0
  124. package/dist/rest/license.d.ts +79 -0
  125. package/dist/rest/market.d.ts +11 -0
  126. package/dist/rest/miner.d.ts +59 -0
  127. package/dist/rest/ratelimit.d.ts +7 -0
  128. package/dist/rest/reward.d.ts +25 -0
  129. package/dist/rest/staking.d.ts +38 -0
  130. package/dist/rest/tokenregistry.d.ts +11 -0
  131. package/dist/rest/types.d.ts +871 -0
  132. package/dist/utils/address.d.ts +6 -0
  133. package/dist/utils/chain-id.d.ts +1 -0
  134. package/dist/utils/cosmos-dec.d.ts +2 -0
  135. package/dist/ws/client.d.ts +37 -0
  136. package/dist/ws/index.d.ts +5 -0
  137. package/dist/ws/types.d.ts +66 -0
  138. package/package.json +103 -0
@@ -0,0 +1,87 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { MarketType } from "./market";
3
+ import { Params } from "./params";
4
+ export declare const protobufPackage = "ault.market.v1";
5
+ export interface MsgCreateMarket {
6
+ sender: string;
7
+ marketType: MarketType;
8
+ baseDenom: string;
9
+ quoteDenom: string;
10
+ tickPrecision: number;
11
+ }
12
+ export interface MsgCreateMarketResponse {
13
+ marketId: Uint8Array;
14
+ }
15
+ export interface MarketUpdate {
16
+ marketId: Uint8Array;
17
+ makerFeeRate: string;
18
+ takerFeeRate: string;
19
+ }
20
+ export interface MsgUpdateMarket {
21
+ authority: string;
22
+ updates: MarketUpdate[];
23
+ }
24
+ export interface MsgUpdateMarketResponse {
25
+ }
26
+ export interface MsgUpdateParams {
27
+ authority: string;
28
+ params: Params | undefined;
29
+ }
30
+ export interface MsgUpdateParamsResponse {
31
+ }
32
+ export interface MsgHaltMarkets {
33
+ authority: string;
34
+ marketIds: Uint8Array[];
35
+ }
36
+ export interface MsgHaltMarketsResponse {
37
+ }
38
+ export interface MsgResumeMarkets {
39
+ authority: string;
40
+ marketIds: Uint8Array[];
41
+ }
42
+ export interface MsgResumeMarketsResponse {
43
+ }
44
+ export interface MsgHaltAllMarkets {
45
+ authority: string;
46
+ }
47
+ export interface MsgHaltAllMarketsResponse {
48
+ }
49
+ export interface MsgResumeAllMarkets {
50
+ authority: string;
51
+ }
52
+ export interface MsgResumeAllMarketsResponse {
53
+ }
54
+ export declare const MsgCreateMarket: MessageFns<MsgCreateMarket>;
55
+ export declare const MsgCreateMarketResponse: MessageFns<MsgCreateMarketResponse>;
56
+ export declare const MarketUpdate: MessageFns<MarketUpdate>;
57
+ export declare const MsgUpdateMarket: MessageFns<MsgUpdateMarket>;
58
+ export declare const MsgUpdateMarketResponse: MessageFns<MsgUpdateMarketResponse>;
59
+ export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
60
+ export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
61
+ export declare const MsgHaltMarkets: MessageFns<MsgHaltMarkets>;
62
+ export declare const MsgHaltMarketsResponse: MessageFns<MsgHaltMarketsResponse>;
63
+ export declare const MsgResumeMarkets: MessageFns<MsgResumeMarkets>;
64
+ export declare const MsgResumeMarketsResponse: MessageFns<MsgResumeMarketsResponse>;
65
+ export declare const MsgHaltAllMarkets: MessageFns<MsgHaltAllMarkets>;
66
+ export declare const MsgHaltAllMarketsResponse: MessageFns<MsgHaltAllMarketsResponse>;
67
+ export declare const MsgResumeAllMarkets: MessageFns<MsgResumeAllMarkets>;
68
+ export declare const MsgResumeAllMarketsResponse: MessageFns<MsgResumeAllMarketsResponse>;
69
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
70
+ 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 {} ? {
71
+ [K in keyof T]?: DeepPartial<T[K]>;
72
+ } : Partial<T>;
73
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
74
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
75
+ [K in keyof P]: Exact<P[K], I[K]>;
76
+ } & {
77
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
78
+ };
79
+ export interface MessageFns<T> {
80
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
81
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
82
+ fromJSON(object: any): T;
83
+ toJSON(message: T): unknown;
84
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
85
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
86
+ }
87
+ export {};
@@ -0,0 +1,166 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Coin } from "../../../cosmos/base/v1beta1/coin";
3
+ import { EpochInfo, LicenseInfo, MiningDelegation, OperatorInfo, OwnerVRFKey, Params, Winner } from "./miner";
4
+ export declare const protobufPackage = "ault.miner.v1";
5
+ /** GenesisState defines the miner module's genesis state */
6
+ export interface GenesisState {
7
+ /** params contains all module parameters */
8
+ params: Params | undefined;
9
+ /** current_epoch is the current epoch number */
10
+ currentEpoch: bigint;
11
+ /** current_threshold is the current threshold (Q.128 as bytes) */
12
+ currentThreshold: Uint8Array;
13
+ /** owner_keys contains registered owner VRF keys */
14
+ ownerKeys: OwnerVRFKey[];
15
+ /** last_submit_epochs tracks last submission per license */
16
+ lastSubmitEpochs: LastSubmitEpoch[];
17
+ /** epochs contains recent epoch info (ring buffer) */
18
+ epochs: EpochInfo[];
19
+ /** license_infos contains license stats (credits and payouts) for each epoch */
20
+ licenseInfos: EpochLicenseInfo[];
21
+ /** epoch_winners contains winners for each epoch */
22
+ epochWinners: EpochWinnersInfo[];
23
+ /** randao_mix is the current RANDAO mix value */
24
+ randaoMix: Uint8Array;
25
+ /** last_settled_epoch is the last epoch that was settled for payouts */
26
+ lastSettledEpoch: bigint;
27
+ /** operators contains registered mining operators */
28
+ operators: OperatorInfo[];
29
+ /** mining_delegations contains license to operator delegations */
30
+ miningDelegations: MiningDelegation[];
31
+ /** delegation_queue contains pending delegation changes */
32
+ delegationQueue: MiningDelegation[];
33
+ /**
34
+ * epoch_start_time (seconds since Unix epoch) shifts the epoch clock start.
35
+ *
36
+ * Purpose: avoid pointless early emission accumulation and give initial
37
+ * miners adequate time to onboard before emissions begin. Guidance: set this
38
+ * to at least two weeks AFTER the actual chain launch time. Behavior: epochs
39
+ * are calculated from this timestamp; before it, expected epoch stays at zero
40
+ * and emissions remain paused.
41
+ */
42
+ epochStartTime: bigint;
43
+ /** payout_queue contains pending payouts */
44
+ payoutQueue: PayoutQueueItem[];
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[];
55
+ /**
56
+ * carryover_emission is accumulated emission from epochs with no eligible
57
+ * payouts
58
+ */
59
+ 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
+ }
65
+ /** LastSubmitEpoch tracks the last epoch a license submitted work */
66
+ export interface LastSubmitEpoch {
67
+ /** license_id */
68
+ licenseId: bigint;
69
+ /** epoch number */
70
+ epoch: bigint;
71
+ }
72
+ /** EpochLicenseInfo tracks license stats for genesis export/import */
73
+ export interface EpochLicenseInfo {
74
+ /** epoch number */
75
+ epoch: bigint;
76
+ /** license_id */
77
+ licenseId: bigint;
78
+ /** license info (credits and payout) */
79
+ info: LicenseInfo | undefined;
80
+ }
81
+ /** EpochWinnersInfo tracks winners for an epoch in genesis export/import */
82
+ export interface EpochWinnersInfo {
83
+ /** epoch number */
84
+ epoch: bigint;
85
+ /** winners for this epoch (directly stored, no wrapper) */
86
+ winners: Winner[];
87
+ }
88
+ /** PayoutQueueItem represents a pending payout in the queue */
89
+ export interface PayoutQueueItem {
90
+ /** license_id */
91
+ licenseId: bigint;
92
+ /** epoch number */
93
+ epoch: bigint;
94
+ /** recipient address */
95
+ recipient: string;
96
+ /** amount as string */
97
+ amount: string;
98
+ }
99
+ /** RateLimitEntry represents rate limit count for a license in an epoch */
100
+ export interface RateLimitEntry {
101
+ /** epoch number */
102
+ 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
+ }
138
+ export declare const GenesisState: MessageFns<GenesisState>;
139
+ export declare const LastSubmitEpoch: MessageFns<LastSubmitEpoch>;
140
+ export declare const EpochLicenseInfo: MessageFns<EpochLicenseInfo>;
141
+ export declare const EpochWinnersInfo: MessageFns<EpochWinnersInfo>;
142
+ export declare const PayoutQueueItem: MessageFns<PayoutQueueItem>;
143
+ export declare const RateLimitEntry: MessageFns<RateLimitEntry>;
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>;
148
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
149
+ 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
+ [K in keyof T]?: DeepPartial<T[K]>;
151
+ } : Partial<T>;
152
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
153
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
154
+ [K in keyof P]: Exact<P[K], I[K]>;
155
+ } & {
156
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
157
+ };
158
+ export interface MessageFns<T> {
159
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
160
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
161
+ fromJSON(object: any): T;
162
+ toJSON(message: T): unknown;
163
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
164
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
165
+ }
166
+ export {};
@@ -0,0 +1,232 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "ault.miner.v1";
3
+ /** OwnerVRFKey represents a registered VRF key for an owner */
4
+ export interface OwnerVRFKey {
5
+ /** owner is the owner address (raw 20 bytes) */
6
+ owner: Uint8Array;
7
+ /** pubkey is the VRF public key (32 bytes) */
8
+ pubkey: Uint8Array;
9
+ /** nonce for rotation tracking */
10
+ nonce: bigint;
11
+ /**
12
+ * last_rotation_time is the timestamp when key was last rotated (Unix
13
+ * timestamp in seconds)
14
+ */
15
+ lastRotationTime: bigint;
16
+ /**
17
+ * registration_epoch is the epoch when this key was registered
18
+ * Used to enforce MinKeyAgeEpochs to prevent key-grinding attacks
19
+ */
20
+ registrationEpoch: bigint;
21
+ /**
22
+ * registration_chain_id is the chain ID when key was registered
23
+ * Binds the key to a specific chain
24
+ */
25
+ registrationChainId: string;
26
+ }
27
+ /** Winner represents a winning submission for an epoch */
28
+ export interface Winner {
29
+ /** license_id of the winner */
30
+ licenseId: bigint;
31
+ /** y is the VRF output (32 bytes) */
32
+ y: Uint8Array;
33
+ }
34
+ /** EpochWinners is a wrapper for a list of winners for an epoch */
35
+ export interface EpochWinners {
36
+ /** winners is the list of winners for this epoch */
37
+ winners: Winner[];
38
+ }
39
+ /** EpochInfo contains information about an epoch */
40
+ export interface EpochInfo {
41
+ /** epoch number */
42
+ epoch: bigint;
43
+ /** seed for this epoch (32 bytes) */
44
+ seed: Uint8Array;
45
+ /** threshold for winning (Q.128 fixed point as 32 bytes) */
46
+ threshold: Uint8Array;
47
+ /** beacon_r is the beacon value R for this epoch (32 bytes) */
48
+ beaconR: Uint8Array;
49
+ /** finalized indicates if beacon is finalized */
50
+ finalized: boolean;
51
+ }
52
+ /** LicenseInfo tracks license stats for a specific epoch */
53
+ export interface LicenseInfo {
54
+ /** credits earned */
55
+ credits: bigint;
56
+ /** payout is the total payout amount for this license in this epoch */
57
+ payout: string;
58
+ /** owner is the license owner at the time credits were earned */
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;
84
+ }
85
+ /** OperatorInfo represents a registered mining operator */
86
+ export interface OperatorInfo {
87
+ /** operator is the operator address */
88
+ operator: string;
89
+ /** commission_rate is the commission percentage (0-100) */
90
+ commissionRate: number;
91
+ /**
92
+ * commission_recipient is the address to receive commission rewards
93
+ * If empty, commission is sent to the operator address
94
+ */
95
+ 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
+ }
102
+ /** MiningDelegation represents a delegation from a license to an operator */
103
+ export interface MiningDelegation {
104
+ /** license_id that is delegated */
105
+ licenseId: bigint;
106
+ /** operator is the delegated operator address */
107
+ operator: string;
108
+ }
109
+ /** Params defines the parameters for the miner module */
110
+ export interface Params {
111
+ /** epoch_length_seconds is the duration of each epoch in seconds */
112
+ epochLengthSeconds: bigint;
113
+ /** target_winners_per_epoch is the target number of winners per epoch */
114
+ targetWinnersPerEpoch: number;
115
+ /** max_winners_per_epoch is the maximum winners allowed per epoch */
116
+ maxWinnersPerEpoch: number;
117
+ /**
118
+ * submission_window_seconds is the window after epoch end for submissions (in
119
+ * seconds)
120
+ */
121
+ submissionWindowSeconds: number;
122
+ /** controller_alpha_q16 is the controller gain in Q.16 fixed point */
123
+ controllerAlphaQ16: number;
124
+ /** controller_window is the number of epochs to average for control */
125
+ controllerWindow: number;
126
+ /** threshold_min is the minimum threshold (256-bit as hex string) */
127
+ thresholdMin: string;
128
+ /** threshold_max is the maximum threshold (256-bit as hex string) */
129
+ thresholdMax: string;
130
+ /** beacon_window_epochs is the number of epochs to mix for beacon */
131
+ beaconWindowEpochs: number;
132
+ /** key_rotation_cooldown_seconds is the cooldown for key rotation (in seconds) */
133
+ keyRotationCooldownSeconds: bigint;
134
+ /** vrf_verify_gas charges this much gas in ante for VRF verification */
135
+ vrfVerifyGas: number;
136
+ /**
137
+ * min_key_age_epochs is the minimum age in epochs a key must have before it
138
+ * can be used This prevents key-grinding attacks where attackers generate
139
+ * keys after seeing the epoch seed
140
+ */
141
+ minKeyAgeEpochs: number;
142
+ /**
143
+ * initial_emission_per_epoch is the initial emission amount per epoch
144
+ * This is the starting emission rate that decays over time
145
+ */
146
+ initialEmissionPerEpoch: string;
147
+ /** emission_decay_rate is the annual decay factor as basis points / 10^8 */
148
+ emissionDecayRate: string;
149
+ /** max_emission_years is the maximum number of emission years */
150
+ maxEmissionYears: number;
151
+ /**
152
+ * max_payouts_per_block limits the number of payouts processed per block
153
+ * for deterministic execution. Each payout (transfer + bookkeeping) is
154
+ * atomic. Prevents unbounded work per block and double-payout bugs. Default:
155
+ * 500, Range: 1-100000
156
+ */
157
+ maxPayoutsPerBlock: number;
158
+ /**
159
+ * max_epochs_per_block limits the number of epochs that can be advanced per
160
+ * block to prevent excessive gas usage in epoch advancement Default: 100
161
+ */
162
+ maxEpochsPerBlock: bigint;
163
+ /**
164
+ * staking_reward_percentage is the percentage of emissions to send to the
165
+ * staking reward pool via distribution module (0-100)
166
+ * Default: 5 (5% to stakers, 95% to miners)
167
+ * Example: 20 means 20% to stakers, 80% to miners
168
+ */
169
+ stakingRewardPercentage: number;
170
+ /**
171
+ * max_commission_rate is the maximum commission rate operators can set
172
+ * (0-100) Default: 50 (50%)
173
+ */
174
+ maxCommissionRate: number;
175
+ /**
176
+ * max_commission_rate_increase_per_epoch is the maximum commission rate
177
+ * increase allowed per epoch (0-100) Default: 5 (5%)
178
+ * This protects delegators from sudden commission rate increases
179
+ */
180
+ maxCommissionRateIncreasePerEpoch: number;
181
+ /**
182
+ * free_mining_until_epoch specifies the epoch until which miners get free gas
183
+ * for mining-related messages. Set to 0 to disable.
184
+ */
185
+ freeMiningUntilEpoch: bigint;
186
+ /**
187
+ * free_mining_max_gas_limit is the maximum gas allowed per transaction for
188
+ * free mining. Prevents abuse even with free gas.
189
+ */
190
+ freeMiningMaxGasLimit: bigint;
191
+ /**
192
+ * Deprecated: miner_allowed_msgs is ignored by the ante handler.
193
+ * Retained for backward compatibility and historical queries.
194
+ *
195
+ * @deprecated
196
+ */
197
+ minerAllowedMsgs: string[];
198
+ /**
199
+ * Deprecated: max_free_tx_per_epoch is not in use
200
+ *
201
+ * @deprecated
202
+ */
203
+ maxFreeTxPerEpoch: number;
204
+ }
205
+ export declare const OwnerVRFKey: MessageFns<OwnerVRFKey>;
206
+ export declare const Winner: MessageFns<Winner>;
207
+ export declare const EpochWinners: MessageFns<EpochWinners>;
208
+ export declare const EpochInfo: MessageFns<EpochInfo>;
209
+ export declare const LicenseInfo: MessageFns<LicenseInfo>;
210
+ export declare const RewardQueueItem: MessageFns<RewardQueueItem>;
211
+ export declare const OperatorInfo: MessageFns<OperatorInfo>;
212
+ export declare const MiningDelegation: MessageFns<MiningDelegation>;
213
+ export declare const Params: MessageFns<Params>;
214
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
215
+ 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 {} ? {
216
+ [K in keyof T]?: DeepPartial<T[K]>;
217
+ } : Partial<T>;
218
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
219
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
220
+ [K in keyof P]: Exact<P[K], I[K]>;
221
+ } & {
222
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
223
+ };
224
+ export interface MessageFns<T> {
225
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
226
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
227
+ fromJSON(object: any): T;
228
+ toJSON(message: T): unknown;
229
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
230
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
231
+ }
232
+ export {};