@sm-lab/recipes 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -0
- package/dist/cl-activate-CPqr6v_D.mjs +653 -0
- package/dist/cl-activate-CPqr6v_D.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1353 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/cm.d.mts +87 -0
- package/dist/cm.d.mts.map +1 -0
- package/dist/cm.mjs +305 -0
- package/dist/cm.mjs.map +1 -0
- package/dist/context-BiYdAnKn.d.mts +8397 -0
- package/dist/context-BiYdAnKn.d.mts.map +1 -0
- package/dist/index.d.mts +393 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/topup-B2NzJV7_.mjs +437 -0
- package/dist/topup-B2NzJV7_.mjs.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-BiYdAnKn.d.mts","names":[],"sources":["../src/client.ts","../src/context.ts"],"mappings":";;;;;;AAQA;;;iBAAgB,UAAA,CAAW,MAAA,0BAAc,MAAA,gBAAA,aAAA,yDAAA,aAAA;;;;;;oFAQkwQ,yBAAA,CAAA,OAAA,MAAA,OAAA,gBAAA,yBAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 @@
|
|
|
1
|
+
import { a as GateSelector, c as contract, d as makeClient, i as Ctx, l as resolveGate, n as ConnectOptions, o as ResolvedAddresses, r as CsmGateSelector, s as connect, t as CmGateSelector, u as RecipeClient } from "./context-BiYdAnKn.mjs";
|
|
2
|
+
import { Abi } from "viem";
|
|
3
|
+
import { Hex } from "@sm-lab/receipts";
|
|
4
|
+
import { TreeDump } from "@sm-lab/merkle";
|
|
5
|
+
|
|
6
|
+
//#region src/act-as.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Run `fn` as a privileged account `who` on the fork. Funds it (anvil_setBalance),
|
|
9
|
+
* unlocks it (anvil_impersonateAccount), runs the body, and always stops impersonating.
|
|
10
|
+
* Replaces every Solidity `broadcast*` modifier. `who` is a RAW address — pass a contract
|
|
11
|
+
* address (e.g. the module, verifier, stakingRouter) or a role member resolved via roleMember.
|
|
12
|
+
*/
|
|
13
|
+
declare function actAs<T>(ctx: Ctx, who: Hex, fn: (from: Hex) => Promise<T>): Promise<T>;
|
|
14
|
+
/** Read `getRoleMember(role, 0)` — the canonical admin/governance member of an AccessControl role. */
|
|
15
|
+
declare function roleMember(ctx: Ctx, target: {
|
|
16
|
+
address: Hex;
|
|
17
|
+
abi: Abi;
|
|
18
|
+
}, role: Hex): Promise<Hex>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/keys.d.ts
|
|
21
|
+
/**
|
|
22
|
+
* Deterministic real BLS validator keys derived from a fixed mnemonic at a seed-derived
|
|
23
|
+
* startIndex. Produces genuine 48-byte G1 pubkeys + 96-byte G2 BLS signatures — NOT
|
|
24
|
+
* keccak-expanded pseudo-keys. Pass a fixed `seed` for reproducible tests.
|
|
25
|
+
*
|
|
26
|
+
* The seed maps to a `startIndex` via `keccak256(seed) % 2^20` so different seeds yield
|
|
27
|
+
* non-overlapping key ranges (1M range >> any realistic `count`).
|
|
28
|
+
*/
|
|
29
|
+
declare function randomKeys(count: number, seed?: Hex): Promise<{
|
|
30
|
+
publicKeys: Hex[];
|
|
31
|
+
signatures: Hex[];
|
|
32
|
+
packedKeys: Hex;
|
|
33
|
+
packedSignatures: Hex;
|
|
34
|
+
}>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/recipes/add-keys.d.ts
|
|
37
|
+
interface AddKeysOptions {
|
|
38
|
+
noId: bigint;
|
|
39
|
+
count: number;
|
|
40
|
+
/** Injectable seed for reproducible keys. */
|
|
41
|
+
seed?: Hex;
|
|
42
|
+
}
|
|
43
|
+
interface AddKeysResult {
|
|
44
|
+
publicKeys: Hex[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Add `count` fresh validator keys to operator `noId`, paying the required bond, as the
|
|
48
|
+
* operator's manager. Returns the generated pubkeys. (Port of `NodeOperators.addKeys`.)
|
|
49
|
+
*/
|
|
50
|
+
declare function addKeys(ctx: Ctx, opts: AddKeysOptions): Promise<AddKeysResult>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/recipes/operator-info.d.ts
|
|
53
|
+
/** Decoded NodeOperator (abitype: uint32/uint8 → number, address → Hex, bool → boolean). */
|
|
54
|
+
interface OperatorInfo {
|
|
55
|
+
totalAddedKeys: number;
|
|
56
|
+
totalWithdrawnKeys: number;
|
|
57
|
+
totalDepositedKeys: number;
|
|
58
|
+
totalVettedKeys: number;
|
|
59
|
+
stuckValidatorsCount: number;
|
|
60
|
+
depositableValidatorsCount: number;
|
|
61
|
+
targetLimit: number;
|
|
62
|
+
targetLimitMode: number;
|
|
63
|
+
totalExitedKeys: number;
|
|
64
|
+
enqueuedCount: number;
|
|
65
|
+
managerAddress: Hex;
|
|
66
|
+
proposedManagerAddress: Hex;
|
|
67
|
+
rewardAddress: Hex;
|
|
68
|
+
proposedRewardAddress: Hex;
|
|
69
|
+
extendedManagerPermissions: boolean;
|
|
70
|
+
usedPriorityQueue: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Typed read of a node operator's on-chain record. (Port of `NodeOperators.operatorInfo`.) */
|
|
73
|
+
declare function operatorInfo(ctx: Ctx, opts: {
|
|
74
|
+
noId: bigint;
|
|
75
|
+
}): Promise<OperatorInfo>;
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/recipes/chain.d.ts
|
|
78
|
+
/** Advance fork time by `seconds` and mine a block (evm_increaseTime + evm_mine). */
|
|
79
|
+
declare function warpBy(ctx: Ctx, seconds: number | bigint): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Warp fork time to an absolute unix timestamp and mine a block
|
|
82
|
+
* (evm_setNextBlockTimestamp + evm_mine). The absolute counterpart of `warpBy` — used by
|
|
83
|
+
* `submitRewards`'s consensus-frame wait. Over RPC, `setNextBlockTimestamp` + `mine` reproduces
|
|
84
|
+
* Foundry's `vm.warp(ts)` (the post-warp `block.timestamp` settles automatically after mining).
|
|
85
|
+
*/
|
|
86
|
+
declare function warpTo(ctx: Ctx, timestamp: number | bigint): Promise<void>;
|
|
87
|
+
/** Take an anvil state snapshot; returns the snapshot id (evm_snapshot). */
|
|
88
|
+
declare function snapshot(ctx: Ctx): Promise<Hex>;
|
|
89
|
+
/** Revert the fork to a snapshot id (evm_revert). */
|
|
90
|
+
declare function revert(ctx: Ctx, id: Hex): Promise<void>;
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/roles.d.ts
|
|
93
|
+
/** OZ AccessControl default admin role (all-zero bytes32). */
|
|
94
|
+
declare const DEFAULT_ADMIN_ROLE: Hex;
|
|
95
|
+
/** MerkleGate: keccak256("SET_TREE_ROLE"). */
|
|
96
|
+
declare const SET_TREE_ROLE: `0x${string}`;
|
|
97
|
+
/** PausableWithRoles: keccak256("RESUME_ROLE"). */
|
|
98
|
+
declare const RESUME_ROLE: `0x${string}`;
|
|
99
|
+
/** BaseModule: keccak256("REPORT_GENERAL_DELAYED_PENALTY_ROLE"). */
|
|
100
|
+
declare const REPORT_GENERAL_DELAYED_PENALTY_ROLE: `0x${string}`;
|
|
101
|
+
/** BaseModule: keccak256("SETTLE_GENERAL_DELAYED_PENALTY_ROLE"). */
|
|
102
|
+
declare const SETTLE_GENERAL_DELAYED_PENALTY_ROLE: `0x${string}`;
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/recipes/address-changes.d.ts
|
|
105
|
+
/** Propose a new manager address for an operator (signed by the current manager). */
|
|
106
|
+
declare function proposeManager(ctx: Ctx, opts: {
|
|
107
|
+
noId: bigint;
|
|
108
|
+
proposed: Hex;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
/** Confirm the proposed manager address (signed by the proposed manager). */
|
|
111
|
+
declare function confirmManager(ctx: Ctx, opts: {
|
|
112
|
+
noId: bigint;
|
|
113
|
+
}): Promise<void>;
|
|
114
|
+
/** Propose a new reward address (signed by the MANAGER, per the on-chain access rule). */
|
|
115
|
+
declare function proposeReward(ctx: Ctx, opts: {
|
|
116
|
+
noId: bigint;
|
|
117
|
+
proposed: Hex;
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
/** Confirm the proposed reward address (signed by the proposed reward address). */
|
|
120
|
+
declare function confirmReward(ctx: Ctx, opts: {
|
|
121
|
+
noId: bigint;
|
|
122
|
+
}): Promise<void>;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/encode.d.ts
|
|
125
|
+
/** A node-operator id packed as the on-chain `bytes8(uint64)` (big-endian). */
|
|
126
|
+
declare function nodeOperatorIdBytes(noId: bigint): Hex;
|
|
127
|
+
/** A key count packed as the on-chain `bytes16(uint128)` (big-endian). */
|
|
128
|
+
declare function keyCountBytes(count: bigint): Hex;
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/recipes/vetting.d.ts
|
|
131
|
+
/** Set an operator's vetted-keys count (StakingRouter-gated). `vettedKeys` is the new absolute count. */
|
|
132
|
+
declare function unvet(ctx: Ctx, opts: {
|
|
133
|
+
noId: bigint;
|
|
134
|
+
vettedKeys: bigint;
|
|
135
|
+
}): Promise<void>;
|
|
136
|
+
/** Set an operator's exited-keys count (StakingRouter-gated). `exitedKeys` is the new absolute total. */
|
|
137
|
+
declare function exit(ctx: Ctx, opts: {
|
|
138
|
+
noId: bigint;
|
|
139
|
+
exitedKeys: bigint;
|
|
140
|
+
}): Promise<void>;
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/recipes/deposit.d.ts
|
|
143
|
+
/**
|
|
144
|
+
* Deposit up to `count` of an operator's depositable keys (StakingRouter-gated). Flushes pending
|
|
145
|
+
* deposit-info, caps to the module's depositable count, and returns the number actually deposited
|
|
146
|
+
* (derived from the keys `obtainDepositData` hands back). Throws if a positive request finds nothing
|
|
147
|
+
* depositable — the Solidity helper silently no-ops there. (Port of `NodeOperators.deposit`.)
|
|
148
|
+
*/
|
|
149
|
+
declare function deposit(ctx: Ctx, opts: {
|
|
150
|
+
count: number | bigint;
|
|
151
|
+
}): Promise<{
|
|
152
|
+
deposited: bigint;
|
|
153
|
+
}>;
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/recipes/topup.d.ts
|
|
156
|
+
/**
|
|
157
|
+
* Top up the allocated balance of a single deposited key (StakingRouter-gated). Validates the key
|
|
158
|
+
* exists and is not withdrawn, then writes a one-element `allocateDeposits` for it. Port of
|
|
159
|
+
* `NodeOperators.increaseAllocatedBalance` — returns the `amountWei` it allocated.
|
|
160
|
+
*/
|
|
161
|
+
declare function increaseAllocatedBalance(ctx: Ctx, opts: {
|
|
162
|
+
noId: bigint;
|
|
163
|
+
keyIndex: bigint;
|
|
164
|
+
amountWei: bigint;
|
|
165
|
+
}): Promise<{
|
|
166
|
+
amountWei: bigint;
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* Top up every not-yet-allocated, not-withdrawn deposited key of an operator, one at a time in
|
|
170
|
+
* strict ascending key-index order — `TopUpQueueOps` enforces a global FIFO queue head, so the
|
|
171
|
+
* writes must be sequential and ordered (capped at `MAX_TOPUP_PER_KEY` per key). Port of
|
|
172
|
+
* `NodeOperators.topUpActiveKeys` — returns the count it topped up.
|
|
173
|
+
*/
|
|
174
|
+
declare function topUpActiveKeys(ctx: Ctx, opts: {
|
|
175
|
+
noId: bigint;
|
|
176
|
+
}): Promise<{
|
|
177
|
+
toppedUp: number;
|
|
178
|
+
}>;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/recipes/validators.d.ts
|
|
181
|
+
/** One withdrawn-validator record for `reportRegularWithdrawnValidators`. */
|
|
182
|
+
interface WithdrawnValidatorInfo {
|
|
183
|
+
nodeOperatorId: bigint;
|
|
184
|
+
keyIndex: bigint;
|
|
185
|
+
exitBalance: bigint;
|
|
186
|
+
slashingPenalty: bigint;
|
|
187
|
+
isSlashed: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** Report a validator slashing for an operator's key (Verifier-gated). `keyIndex` is the storage index. */
|
|
190
|
+
declare function slash(ctx: Ctx, opts: {
|
|
191
|
+
noId: bigint;
|
|
192
|
+
keyIndex: bigint;
|
|
193
|
+
}): Promise<void>;
|
|
194
|
+
/** Report a regular validator withdrawal for one key (Verifier-gated). isSlashed = slashingPenalty > 0. */
|
|
195
|
+
declare function withdraw(ctx: Ctx, opts: {
|
|
196
|
+
noId: bigint;
|
|
197
|
+
keyIndex: bigint;
|
|
198
|
+
exitBalance: bigint;
|
|
199
|
+
slashingPenalty?: bigint;
|
|
200
|
+
}): Promise<void>;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/recipes/penalties.d.ts
|
|
203
|
+
/** Report a general delayed penalty against an operator (penalty-reporter role). */
|
|
204
|
+
declare function reportPenalty(ctx: Ctx, opts: {
|
|
205
|
+
noId: bigint;
|
|
206
|
+
amount: bigint;
|
|
207
|
+
penaltyType?: Hex;
|
|
208
|
+
details?: string;
|
|
209
|
+
}): Promise<void>;
|
|
210
|
+
/** Cancel a previously-reported general delayed penalty (penalty-reporter role). */
|
|
211
|
+
declare function cancelPenalty(ctx: Ctx, opts: {
|
|
212
|
+
noId: bigint;
|
|
213
|
+
amount: bigint;
|
|
214
|
+
}): Promise<void>;
|
|
215
|
+
/**
|
|
216
|
+
* Settle (process) an operator's general delayed penalty (penalty-settler role).
|
|
217
|
+
* The `maxAmount` option is the per-operator settlement cap passed as the contract's 2nd array arg (confusingly named `bondLockNonces` in the ABI); the default `maxUint256` settles the penalty fully.
|
|
218
|
+
*/
|
|
219
|
+
declare function settlePenalty(ctx: Ctx, opts: {
|
|
220
|
+
noId: bigint;
|
|
221
|
+
maxAmount?: bigint;
|
|
222
|
+
}): Promise<void>;
|
|
223
|
+
/** Compensate (pay off) an operator's general delayed penalty — signed by the operator manager. */
|
|
224
|
+
declare function compensatePenalty(ctx: Ctx, opts: {
|
|
225
|
+
noId: bigint;
|
|
226
|
+
}): Promise<void>;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/recipes/bond.d.ts
|
|
229
|
+
/** Top up an operator's bond with ETH (permissionless `depositETH`), signed by the manager. */
|
|
230
|
+
declare function addBond(ctx: Ctx, opts: {
|
|
231
|
+
noId: bigint;
|
|
232
|
+
amount: bigint;
|
|
233
|
+
}): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Charge a penalty against an operator's bond (creating bond debt if uncovered). `Accounting.penalize`
|
|
236
|
+
* is module-only, so we impersonate the module address. Returns whether the penalty was fully covered.
|
|
237
|
+
*/
|
|
238
|
+
declare function createBondDebt(ctx: Ctx, opts: {
|
|
239
|
+
noId: bigint;
|
|
240
|
+
amount: bigint;
|
|
241
|
+
}): Promise<{
|
|
242
|
+
penaltyCovered: boolean;
|
|
243
|
+
}>;
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/recipes/set-gate.d.ts
|
|
246
|
+
interface SetGateAddrsOptions {
|
|
247
|
+
/** Whitelisted addresses to encode into the gate's merkle tree. */
|
|
248
|
+
addresses: Hex[];
|
|
249
|
+
/**
|
|
250
|
+
* Gate selector passed to resolveGate. csm: 'ics' (default) | 'idvtc'; cm:
|
|
251
|
+
* 'po'|'pto'|'pgo'|'do'|'eeo'|'iodc'|'iodcp' (default 'po') or a gate index; any: a raw 0x… address.
|
|
252
|
+
*/
|
|
253
|
+
selector?: GateSelector | string;
|
|
254
|
+
/** Skip IPFS pinning by supplying a precomputed cid (hermetic tests do this). */
|
|
255
|
+
cid?: string;
|
|
256
|
+
}
|
|
257
|
+
interface SetGateAddrsResult {
|
|
258
|
+
treeRoot: Hex;
|
|
259
|
+
treeCid: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Build a gate addresses tree (OZ ['address'], via @sm-lab/merkle) and install it on the gate
|
|
263
|
+
* (`setTreeParams(root, cid)`), impersonating the gate admin. The cid is pinned to IPFS
|
|
264
|
+
* (env-configured: a local @sm-lab/ipfs or Pinata) unless `cid` is supplied.
|
|
265
|
+
*
|
|
266
|
+
* Module-agnostic (port of fork.just `set-gate-addrs` + `update-gate-tree`, both selector-driven):
|
|
267
|
+
* the csm VettedGate and cm CuratedGate share a byte-identical grantRole/setTreeParams/getRoleMember
|
|
268
|
+
* surface, so the only per-module differences are the resolved address, the default selector, and
|
|
269
|
+
* which gate ABI carries the fragments.
|
|
270
|
+
*/
|
|
271
|
+
declare function setGateAddrs(ctx: Ctx, opts: SetGateAddrsOptions): Promise<SetGateAddrsResult>;
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/recipes/rewards.d.ts
|
|
274
|
+
interface RewardsReport {
|
|
275
|
+
/** tree.root, or ZERO_ROOT when there are no leaves. */
|
|
276
|
+
treeRoot: Hex;
|
|
277
|
+
/** pinned (or opts.treeCid); '' when treeRoot is zero. */
|
|
278
|
+
treeCid: string;
|
|
279
|
+
/** pinned (or opts.logCid); '' when treeRoot is zero. */
|
|
280
|
+
logCid: string;
|
|
281
|
+
/** Sum of all per-operator distributed rewards this frame. */
|
|
282
|
+
distributed: bigint;
|
|
283
|
+
/** Always 0n in the mock (matches the source). */
|
|
284
|
+
rebate: bigint;
|
|
285
|
+
/** In-memory OZ tree dump (uint256-as-string → JSON-safe) for tests / re-pin. Undefined when empty. */
|
|
286
|
+
treeDump?: TreeDump;
|
|
287
|
+
/** Cumulative leaves AFTER carry-forward + this frame's deltas, EXCLUDING the pad. */
|
|
288
|
+
cumulatives: Map<bigint, bigint>;
|
|
289
|
+
}
|
|
290
|
+
interface MakeRewardsOptions {
|
|
291
|
+
/** Injectable seed → deterministic per-key reward draw. Omit for fresh randomness. */
|
|
292
|
+
seed?: Hex;
|
|
293
|
+
/** Carry-forward input: the previous cumulative tree as a Map (or [noId, shares][]). */
|
|
294
|
+
previousCumulatives?: Map<bigint, bigint> | [bigint, bigint][];
|
|
295
|
+
/** Hermetic escape hatch: skip pinning the tree, use this cid. */
|
|
296
|
+
treeCid?: string;
|
|
297
|
+
/** Hermetic escape hatch: skip pinning the log, use this cid. */
|
|
298
|
+
logCid?: string;
|
|
299
|
+
/** Injectable clock (unix seconds) for the report log's block_timestamp. Defaults Date.now()/1000. */
|
|
300
|
+
now?: number;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Build the cumulative FeeDistributor rewards tree off on-chain operator state and a seeded mock
|
|
304
|
+
* reward per active key, pin the tree + report log to IPFS (guarded), and return a typed in-memory
|
|
305
|
+
* `RewardsReport`. Port of `mock-rewards.mjs` — but the OUTPUT path stays bigint-typed (no bare
|
|
306
|
+
* `JSON.stringify` of bigints), and the per-key draw is fully seeded (no `Math.random`) so tests can
|
|
307
|
+
* pin `treeRoot`/`distributed`.
|
|
308
|
+
*
|
|
309
|
+
* Carry-forward is via `opts.previousCumulatives` only (option (a) of the design). The pure
|
|
310
|
+
* carry-forward logic — carry every prior leaf forward except the pad, then add this frame's deltas —
|
|
311
|
+
* is identical no matter where the prior Map came from, so the fork path chains calls:
|
|
312
|
+
* `makeRewards(ctx, { previousCumulatives: prev.cumulatives })`.
|
|
313
|
+
* TODO(6f?): on-chain `treeRoot()` → `treeCid()` → IPFS fetch of the prior tree as a default source.
|
|
314
|
+
*/
|
|
315
|
+
declare function makeRewards(ctx: Ctx, opts?: MakeRewardsOptions): Promise<RewardsReport>;
|
|
316
|
+
interface SubmitRewardsResult {
|
|
317
|
+
/** false when treeRoot is zero (a legitimate empty-report skip). */
|
|
318
|
+
submitted: boolean;
|
|
319
|
+
/** present when submitted: the consensus frame's refSlot. */
|
|
320
|
+
refSlot?: bigint;
|
|
321
|
+
/** echo of report.treeRoot when submitted. */
|
|
322
|
+
treeRoot?: Hex;
|
|
323
|
+
/** the keccak256(abi.encode(data)) reached consensus on. */
|
|
324
|
+
reportHash?: Hex;
|
|
325
|
+
/** the consensus members that submitted (fast-lane, or the getMembers fallback). */
|
|
326
|
+
members?: Hex[];
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Submit a `RewardsReport` (from `makeRewards`) on-chain: fund the FeeDistributor, warp to the next
|
|
330
|
+
* consensus frame, build the `ReportData` tuple, reach consensus across the fast-lane members (with
|
|
331
|
+
* a `getMembers` fallback), and submit the report data. Port of `OracleReport.s.sol:submitRewards`.
|
|
332
|
+
*
|
|
333
|
+
* Fork-only in practice (it WRITES + warps); the hermetic tests assert the call sequence, the funding
|
|
334
|
+
* literals, the warp arguments, and the reportHash, not real frame advancement.
|
|
335
|
+
*
|
|
336
|
+
* A zero-root report (no active keys this frame) is a graceful no-op: returns `{ submitted: false }`
|
|
337
|
+
* with no reads/writes, so `submitRewards(ctx, await makeRewards(ctx))` composes on an empty fork.
|
|
338
|
+
*/
|
|
339
|
+
declare function submitRewards(ctx: Ctx, report: RewardsReport): Promise<SubmitRewardsResult>;
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/recipes/cl-activate.d.ts
|
|
342
|
+
interface ClActivateResult {
|
|
343
|
+
pubkey: Hex;
|
|
344
|
+
status: 'active_ongoing';
|
|
345
|
+
effectiveBalanceGwei: bigint;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Read a key's pubkey + allocated balance on-chain, then mark it `active_ongoing` on a running
|
|
349
|
+
* cl-mock with effective balance = 32 ETH + allocated balance, in gwei. Port of
|
|
350
|
+
* `cl-mock.just:cl-activate`. Diverges from the Solidity helper's integer-ETH truncation
|
|
351
|
+
* (`balances[0] / 1 ether`) by keeping full gwei precision (cl-mock stores `effective_balance`
|
|
352
|
+
* in gwei) — the spec-blessed divergence.
|
|
353
|
+
*/
|
|
354
|
+
declare function clActivate(ctx: Ctx, opts: {
|
|
355
|
+
noId: bigint;
|
|
356
|
+
keyIndex: bigint;
|
|
357
|
+
}): Promise<ClActivateResult>;
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/recipes/reads.d.ts
|
|
360
|
+
/** One key's 48-byte pubkey from on-chain storage. Throws if no key exists at `keyIndex`. */
|
|
361
|
+
declare function getPubkey(ctx: Ctx, opts: {
|
|
362
|
+
noId: bigint;
|
|
363
|
+
keyIndex: bigint;
|
|
364
|
+
}): Promise<Hex>;
|
|
365
|
+
/** Allocated balance (wei) for one key. */
|
|
366
|
+
declare function getKeyBalance(ctx: Ctx, opts: {
|
|
367
|
+
noId: bigint;
|
|
368
|
+
keyIndex: bigint;
|
|
369
|
+
}): Promise<bigint>;
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/cl-mock.d.ts
|
|
372
|
+
interface SetValidatorInput {
|
|
373
|
+
pubkey: Hex;
|
|
374
|
+
/** Only status clActivate sets; cl-mock's full union lives in the app, not here. */
|
|
375
|
+
status: 'active_ongoing';
|
|
376
|
+
/** Serialized to a gwei integer string on the wire; omitted when undefined. */
|
|
377
|
+
effectiveBalanceGwei?: bigint;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* POST one validator to a running `@sm-lab/cl` `/admin/validators`. Surfaces the mock's
|
|
381
|
+
* `errors[]` and throws unless the single item was accepted.
|
|
382
|
+
*
|
|
383
|
+
* cl-mock returns 200 (clean), 207 (partial — only when `errors.length > 0` AND `accepted > 0`,
|
|
384
|
+
* which is impossible for a single item), or 400 (all rejected, no `accepted` field). For one
|
|
385
|
+
* item the realistic failure is 400, caught by the `!res.ok` clause. The `(accepted ?? 0) < 1`
|
|
386
|
+
* guard is defensive belt-and-braces for a synthetic accepted:0 / missing-`accepted` body the mock
|
|
387
|
+
* never actually emits — the `?? 0` is load-bearing, since a bare `accepted < 1` is `false` for
|
|
388
|
+
* `undefined` and would let such a body through as a silent success.
|
|
389
|
+
*/
|
|
390
|
+
declare function setClValidator(clMockUrl: string, input: SetValidatorInput): Promise<void>;
|
|
391
|
+
//#endregion
|
|
392
|
+
export { type AddKeysOptions, type AddKeysResult, type ClActivateResult, type CmGateSelector, type ConnectOptions, type CsmGateSelector, type Ctx, DEFAULT_ADMIN_ROLE, type GateSelector, type MakeRewardsOptions, type OperatorInfo, REPORT_GENERAL_DELAYED_PENALTY_ROLE, RESUME_ROLE, type RecipeClient, type ResolvedAddresses, type RewardsReport, SETTLE_GENERAL_DELAYED_PENALTY_ROLE, SET_TREE_ROLE, type SetGateAddrsOptions, type SetGateAddrsResult, type SetValidatorInput, type SubmitRewardsResult, type WithdrawnValidatorInfo, actAs, addBond, addKeys, cancelPenalty, clActivate, compensatePenalty, confirmManager, confirmReward, connect, contract, createBondDebt, deposit, exit, getKeyBalance, getPubkey, increaseAllocatedBalance, keyCountBytes, makeClient, makeRewards, nodeOperatorIdBytes, operatorInfo, proposeManager, proposeReward, randomKeys, reportPenalty, resolveGate, revert, roleMember, setClValidator, setGateAddrs, settlePenalty, slash, snapshot, submitRewards, topUpActiveKeys, unvet, warpBy, warpTo, withdraw };
|
|
393
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/act-as.ts","../src/keys.ts","../src/recipes/add-keys.ts","../src/recipes/operator-info.ts","../src/recipes/chain.ts","../src/roles.ts","../src/recipes/address-changes.ts","../src/encode.ts","../src/recipes/vetting.ts","../src/recipes/deposit.ts","../src/recipes/topup.ts","../src/recipes/validators.ts","../src/recipes/penalties.ts","../src/recipes/bond.ts","../src/recipes/set-gate.ts","../src/recipes/rewards.ts","../src/recipes/cl-activate.ts","../src/recipes/reads.ts","../src/cl-mock.ts"],"mappings":";;;;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AA;;;;;;;;;;;;iBAmBoB,cAAA,CAAe,SAAA,UAAmB,KAAA,EAAO,iBAAA,GAAoB,OAAO"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { _ as contract, a as deposit, c as RESUME_ROLE, d as addKeys, f as randomKeys, g as connect, h as roleMember, i as getPubkey, l as SETTLE_GENERAL_DELAYED_PENALTY_ROLE, m as actAs, n as topUpActiveKeys, o as DEFAULT_ADMIN_ROLE, r as getKeyBalance, s as REPORT_GENERAL_DELAYED_PENALTY_ROLE, t as increaseAllocatedBalance, u as SET_TREE_ROLE, v as resolveGate, y as makeClient } from "./topup-B2NzJV7_.mjs";
|
|
2
|
+
import { C as snapshot, E as operatorInfo, S as revert, T as warpTo, _ as nodeOperatorIdBytes, a as setGateAddrs, b as proposeManager, c as cancelPenalty, d as settlePenalty, f as slash, g as keyCountBytes, h as unvet, i as submitRewards, l as compensatePenalty, m as exit, n as setClValidator, o as addBond, p as withdraw, r as makeRewards, s as createBondDebt, t as clActivate, u as reportPenalty, v as confirmManager, w as warpBy, x as proposeReward, y as confirmReward } from "./cl-activate-CPqr6v_D.mjs";
|
|
3
|
+
export { DEFAULT_ADMIN_ROLE, REPORT_GENERAL_DELAYED_PENALTY_ROLE, RESUME_ROLE, SETTLE_GENERAL_DELAYED_PENALTY_ROLE, SET_TREE_ROLE, actAs, addBond, addKeys, cancelPenalty, clActivate, compensatePenalty, confirmManager, confirmReward, connect, contract, createBondDebt, deposit, exit, getKeyBalance, getPubkey, increaseAllocatedBalance, keyCountBytes, makeClient, makeRewards, nodeOperatorIdBytes, operatorInfo, proposeManager, proposeReward, randomKeys, reportPenalty, resolveGate, revert, roleMember, setClValidator, setGateAddrs, settlePenalty, slash, snapshot, submitRewards, topUpActiveKeys, unvet, warpBy, warpTo, withdraw };
|