@wireio/stake 0.7.2 → 1.0.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.
@@ -207,14 +207,18 @@ export class SolanaStakingClient implements IStakingClient {
207
207
  throw new Error('Deposit amount must be greater than zero.');
208
208
  }
209
209
 
210
- const tx = await this.depositClient.buildDepositTx(amountLamports);
211
- const { tx: prepared, blockhash, lastValidBlockHeight } =
212
- await this.prepareTx(tx);
213
- const signed = await this.signTransaction(prepared);
214
- return await this.sendAndConfirmHttp(signed, {
215
- blockhash,
216
- lastValidBlockHeight,
217
- });
210
+ try {
211
+ const tx = await this.depositClient.buildDepositTx(amountLamports);
212
+ const { tx: prepared, blockhash, lastValidBlockHeight } =
213
+ await this.prepareTx(tx);
214
+ const signed = await this.signTransaction(prepared);
215
+ return await this.sendAndConfirmHttp(signed, {
216
+ blockhash,
217
+ lastValidBlockHeight,
218
+ });
219
+ } catch (err) {
220
+ throw new Error(`Failed to deposit Solana: ${err}`);
221
+ }
218
222
  }
219
223
 
220
224
  /**
@@ -233,14 +237,18 @@ export class SolanaStakingClient implements IStakingClient {
233
237
  throw new Error('Withdraw amount must be greater than zero.');
234
238
  }
235
239
 
236
- const tx = await this.depositClient.buildWithdrawTx(amountLamports);
237
- const { tx: prepared, blockhash, lastValidBlockHeight } =
238
- await this.prepareTx(tx);
239
- const signed = await this.signTransaction(prepared);
240
- return await this.sendAndConfirmHttp(signed, {
241
- blockhash,
242
- lastValidBlockHeight,
243
- });
240
+ try {
241
+ const tx = await this.depositClient.buildWithdrawTx(amountLamports);
242
+ const { tx: prepared, blockhash, lastValidBlockHeight } =
243
+ await this.prepareTx(tx);
244
+ const signed = await this.signTransaction(prepared);
245
+ return await this.sendAndConfirmHttp(signed, {
246
+ blockhash,
247
+ lastValidBlockHeight,
248
+ });
249
+ } catch (err) {
250
+ throw new Error(`Failed to withdraw Solana: ${err}`);
251
+ }
244
252
  }
245
253
 
246
254
  /**
@@ -253,20 +261,24 @@ export class SolanaStakingClient implements IStakingClient {
253
261
  throw new Error('Stake amount must be greater than zero.');
254
262
  }
255
263
 
256
- const user = this.solPubKey;
264
+ try {
265
+ const user = this.solPubKey;
257
266
 
258
- // Build compute budget increase instruction
259
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
267
+ // Build compute budget increase instruction
268
+ const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
260
269
 
261
- // Build the Outpost synd instruction
262
- const ix = await this.outpostClient.buildStakeIx(amountLamports, user);
270
+ // Build the Outpost synd instruction
271
+ const ix = await this.outpostClient.buildStakeIx(amountLamports, user);
263
272
 
264
- // Wrap in a transaction and send
265
- const tx = new Transaction().add(cuIx, ix);
266
- const prepared = await this.prepareTx(tx);
267
- const signed = await this.signTransaction(prepared.tx);
273
+ // Wrap in a transaction and send
274
+ const tx = new Transaction().add(cuIx, ix);
275
+ const prepared = await this.prepareTx(tx);
276
+ const signed = await this.signTransaction(prepared.tx);
268
277
 
269
- return this.sendAndConfirmHttp(signed, prepared);
278
+ return this.sendAndConfirmHttp(signed, prepared);
279
+ } catch (err) {
280
+ throw new Error(`Failed to stake Solana: ${err}`);
281
+ }
270
282
  }
271
283
 
272
284
  /**
@@ -279,20 +291,25 @@ export class SolanaStakingClient implements IStakingClient {
279
291
  throw new Error('Unstake amount must be greater than zero.');
280
292
  }
281
293
 
282
- const user = this.solPubKey;
294
+ try {
295
+ const user = this.solPubKey;
283
296
 
284
- // Build compute budget increase instruction
285
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
297
+ // Build compute budget increase instruction
298
+ const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
286
299
 
287
- // Build the Outpost desynd instruction
288
- const ix = await this.outpostClient.buildUnstakeIx(amountLamports, user);
300
+ // Build the Outpost desynd instruction
301
+ const ix = await this.outpostClient.buildUnstakeIx(amountLamports, user);
289
302
 
290
- // Wrap in a transaction and send
291
- const tx = new Transaction().add(cuIx, ix);
292
- const prepared = await this.prepareTx(tx);
293
- const signed = await this.signTransaction(prepared.tx);
303
+ // Wrap in a transaction and send
304
+ const tx = new Transaction().add(cuIx, ix);
305
+ const prepared = await this.prepareTx(tx);
306
+ const signed = await this.signTransaction(prepared.tx);
294
307
 
295
- return this.sendAndConfirmHttp(signed, prepared);
308
+ return this.sendAndConfirmHttp(signed, prepared);
309
+ }
310
+ catch (err) {
311
+ throw new Error(`Failed to unstake Solana: ${err}`);
312
+ }
296
313
  }
297
314
 
298
315
  /**
@@ -307,17 +324,22 @@ export class SolanaStakingClient implements IStakingClient {
307
324
  throw new Error('liqSOL pretoken purchase requires a positive amount.');
308
325
  }
309
326
 
310
- const user = this.solPubKey;
311
- const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
312
- const ix = await this.tokenClient.buildPurchaseIx(amountLamports, user);
313
- const tx = new Transaction().add(cuIx, ix);
314
- const { tx: prepared, blockhash, lastValidBlockHeight } =
315
- await this.prepareTx(tx);
316
- const signed = await this.signTransaction(prepared);
317
- return await this.sendAndConfirmHttp(signed, {
318
- blockhash,
319
- lastValidBlockHeight,
320
- });
327
+ try {
328
+ const user = this.solPubKey;
329
+ const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
330
+ const ix = await this.tokenClient.buildPurchaseIx(amountLamports, user);
331
+ const tx = new Transaction().add(cuIx, ix);
332
+ const { tx: prepared, blockhash, lastValidBlockHeight } =
333
+ await this.prepareTx(tx);
334
+ const signed = await this.signTransaction(prepared);
335
+ return await this.sendAndConfirmHttp(signed, {
336
+ blockhash,
337
+ lastValidBlockHeight,
338
+ });
339
+ }
340
+ catch (err) {
341
+ throw new Error(`Failed to buy liqSOL pretokens: ${err}`);
342
+ }
321
343
  }
322
344
 
323
345
  /**
@@ -332,140 +354,145 @@ export class SolanaStakingClient implements IStakingClient {
332
354
  async getPortfolio(): Promise<Portfolio> {
333
355
  if (!this.pubKey) throw new Error('User pubKey is undefined');
334
356
 
335
- const user = this.solPubKey;
336
-
337
- const reservePoolPDA = deriveReservePoolPda();
338
- const vaultPDA = deriveVaultPda();
339
- const liqsolMint = deriveLiqsolMintPda();
340
-
341
- const userLiqsolAta = getAssociatedTokenAddressSync(
342
- liqsolMint,
343
- user,
344
- false,
345
- TOKEN_2022_PROGRAM_ID,
346
- ASSOCIATED_TOKEN_PROGRAM_ID,
347
- );
348
-
349
- // NOTE:
350
- // - nativeLamports: wallet SOL
351
- // - actualBalResp: liqSOL balance in user ATA
352
- // - snapshot: Outpost + pretokens + global index/shares
353
- const [nativeLamports, actualBalResp, snapshot] = await Promise.all([
354
- this.connection.getBalance(user, 'confirmed'),
355
- this.connection
356
- .getTokenAccountBalance(userLiqsolAta, 'confirmed')
357
- .catch(() => null),
358
- this.outpostClient.fetchWireState(user).catch(() => null),
359
- ]);
357
+ try {
358
+ const user = this.solPubKey;
359
+
360
+ const reservePoolPDA = deriveReservePoolPda();
361
+ const vaultPDA = deriveVaultPda();
362
+ const liqsolMint = deriveLiqsolMintPda();
363
+
364
+ const userLiqsolAta = getAssociatedTokenAddressSync(
365
+ liqsolMint,
366
+ user,
367
+ false,
368
+ TOKEN_2022_PROGRAM_ID,
369
+ ASSOCIATED_TOKEN_PROGRAM_ID,
370
+ );
360
371
 
361
- const LIQSOL_DECIMALS = 9;
362
-
363
- const actualAmountStr = actualBalResp?.value?.amount ?? '0';
364
-
365
- const globalState = snapshot?.globalState ?? null;
366
- const outpostAccount = snapshot?.outpostAccount ?? null;
367
- const trancheState = snapshot?.trancheState ?? null;
368
- const userPretokenRecord = snapshot?.userPretokenRecord ?? null;
369
-
370
- // -----------------------------
371
- // Staked liqSOL (Outpost)
372
- // -----------------------------
373
- // This is the liqSOL that has been syndicated into Outpost via `synd`.
374
- // It lives on the outpost account as `stakedLiqsol`.
375
- const stakedLiqsolStr =
376
- outpostAccount?.stakedLiqsol?.toString?.() ?? '0';
377
-
378
- // -----------------------------
379
- // WIRE pretokens (1e8 scale)
380
- // -----------------------------
381
- // This is NOT stake — it’s the prelaunch WIRE position.
382
- const wirePretokensStr =
383
- userPretokenRecord?.totalPretokensPurchased?.toString?.() ??
384
- '0';
385
-
386
- // -----------------------------
387
- // Yield view (index + shares)
388
- // -----------------------------
389
- // We expose:
390
- // - currentIndex: globalState.currentIndex (1e12 scale)
391
- // - totalShares: globalState.totalShares
392
- // - userShares: outpostAccount.stakedShares
393
- // - estimatedClaimLiqsol: floor(userShares * index / INDEX_SCALE)
394
- // - estimatedYield: max(0, estimatedClaim - stakedLiqsol)
395
- //
396
- // This matches the capital-staking math:
397
- // sharesToTokens(shares, index) = shares * index / INDEX_SCALE
398
- const currentIndexStr =
399
- globalState?.currentIndex?.toString?.() ?? '0';
400
- const totalSharesStr =
401
- globalState?.totalShares?.toString?.() ?? '0';
402
- const userSharesStr =
403
- outpostAccount?.stakedShares?.toString?.() ?? '0';
404
-
405
- const stakedLiqsol = BigInt(stakedLiqsolStr);
406
- const currentIndex = BigInt(currentIndexStr);
407
- const totalShares = BigInt(totalSharesStr);
408
- const userShares = BigInt(userSharesStr);
409
-
410
- let estimatedClaim = BigInt(0);
411
- let estimatedYield = BigInt(0);
412
-
413
- if (userShares > BigInt(0) && currentIndex > BigInt(0)) {
414
- // sharesToTokens(userShares, currentIndex)
415
- estimatedClaim = (userShares * currentIndex) / INDEX_SCALE;
416
-
417
- if (estimatedClaim > stakedLiqsol) {
418
- estimatedYield = estimatedClaim - stakedLiqsol;
372
+ // NOTE:
373
+ // - nativeLamports: wallet SOL
374
+ // - actualBalResp: liqSOL balance in user ATA
375
+ // - snapshot: Outpost + pretokens + global index/shares
376
+ const [nativeLamports, actualBalResp, snapshot] = await Promise.all([
377
+ this.connection.getBalance(user, 'confirmed'),
378
+ this.connection
379
+ .getTokenAccountBalance(userLiqsolAta, 'confirmed')
380
+ .catch(() => null),
381
+ this.outpostClient.fetchWireState(user).catch(() => null),
382
+ ]);
383
+
384
+ const LIQSOL_DECIMALS = 9;
385
+
386
+ const actualAmountStr = actualBalResp?.value?.amount ?? '0';
387
+
388
+ const globalState = snapshot?.globalState ?? null;
389
+ const outpostAccount = snapshot?.outpostAccount ?? null;
390
+ const trancheState = snapshot?.trancheState ?? null;
391
+ const userPretokenRecord = snapshot?.userPretokenRecord ?? null;
392
+
393
+ // -----------------------------
394
+ // Staked liqSOL (Outpost)
395
+ // -----------------------------
396
+ // This is the liqSOL that has been syndicated into Outpost via `synd`.
397
+ // It lives on the outpost account as `stakedLiqsol`.
398
+ const stakedLiqsolStr =
399
+ outpostAccount?.stakedLiqsol?.toString?.() ?? '0';
400
+
401
+ // -----------------------------
402
+ // WIRE pretokens (1e8 scale)
403
+ // -----------------------------
404
+ // This is NOT stake it’s the prelaunch WIRE position.
405
+ const wirePretokensStr =
406
+ userPretokenRecord?.totalPretokensPurchased?.toString?.() ??
407
+ '0';
408
+
409
+ // -----------------------------
410
+ // Yield view (index + shares)
411
+ // -----------------------------
412
+ // We expose:
413
+ // - currentIndex: globalState.currentIndex (1e12 scale)
414
+ // - totalShares: globalState.totalShares
415
+ // - userShares: outpostAccount.stakedShares
416
+ // - estimatedClaimLiqsol: floor(userShares * index / INDEX_SCALE)
417
+ // - estimatedYield: max(0, estimatedClaim - stakedLiqsol)
418
+ //
419
+ // This matches the capital-staking math:
420
+ // sharesToTokens(shares, index) = shares * index / INDEX_SCALE
421
+ const currentIndexStr =
422
+ globalState?.currentIndex?.toString?.() ?? '0';
423
+ const totalSharesStr =
424
+ globalState?.totalShares?.toString?.() ?? '0';
425
+ const userSharesStr =
426
+ outpostAccount?.stakedShares?.toString?.() ?? '0';
427
+
428
+ const stakedLiqsol = BigInt(stakedLiqsolStr);
429
+ const currentIndex = BigInt(currentIndexStr);
430
+ const totalShares = BigInt(totalSharesStr);
431
+ const userShares = BigInt(userSharesStr);
432
+
433
+ let estimatedClaim = BigInt(0);
434
+ let estimatedYield = BigInt(0);
435
+
436
+ if (userShares > BigInt(0) && currentIndex > BigInt(0)) {
437
+ // sharesToTokens(userShares, currentIndex)
438
+ estimatedClaim = (userShares * currentIndex) / INDEX_SCALE;
439
+
440
+ if (estimatedClaim > stakedLiqsol) {
441
+ estimatedYield = estimatedClaim - stakedLiqsol;
442
+ }
419
443
  }
420
- }
421
444
 
422
- return {
423
- native: {
424
- amount: BigInt(nativeLamports),
425
- symbol: 'SOL',
426
- decimals: 9,
427
- },
428
- liq: {
429
- amount: BigInt(actualAmountStr),
430
- symbol: 'LiqSOL',
431
- decimals: LIQSOL_DECIMALS,
432
- ata: userLiqsolAta,
433
- },
434
- staked: {
435
- // liqSOL staked in Outpost via `synd`
436
- amount: stakedLiqsol,
437
- symbol: 'LiqSOL',
438
- decimals: LIQSOL_DECIMALS,
439
- },
440
- wire: {
441
- // Prelaunch WIRE pretokens (1e8 scale)
442
- amount: BigInt(wirePretokensStr),
443
- symbol: '$WIRE',
444
- decimals: 8,
445
- },
446
- yield: {
447
- // Raw primitives so the frontend can display curves, charts, etc.
448
- currentIndex,
449
- indexScale: INDEX_SCALE,
450
- totalShares,
451
- userShares,
452
- // liqSOL amounts (lamports) implied by index/shares
453
- estimatedClaim,
454
- estimatedYield,
455
- },
456
- extras: {
457
- userLiqsolAta: userLiqsolAta.toBase58(),
458
- reservePoolPDA: reservePoolPDA.toBase58(),
459
- vaultPDA: vaultPDA.toBase58(),
460
- globalIndex: globalState?.currentIndex?.toString(),
461
- totalShares: globalState?.totalShares?.toString(),
462
- currentTrancheNumber:
463
- trancheState?.currentTrancheNumber?.toString(),
464
- currentTranchePriceUsd:
465
- trancheState?.currentTranchePriceUsd?.toString(), // 1e8 USD
466
- },
467
- chainID: this.network.chainId,
468
- };
445
+ return {
446
+ native: {
447
+ amount: BigInt(nativeLamports),
448
+ symbol: 'SOL',
449
+ decimals: 9,
450
+ },
451
+ liq: {
452
+ amount: BigInt(actualAmountStr),
453
+ symbol: 'LiqSOL',
454
+ decimals: LIQSOL_DECIMALS,
455
+ ata: userLiqsolAta,
456
+ },
457
+ staked: {
458
+ // liqSOL staked in Outpost via `synd`
459
+ amount: stakedLiqsol,
460
+ symbol: 'LiqSOL',
461
+ decimals: LIQSOL_DECIMALS,
462
+ },
463
+ wire: {
464
+ // Prelaunch WIRE pretokens (1e8 scale)
465
+ amount: BigInt(wirePretokensStr),
466
+ symbol: '$WIRE',
467
+ decimals: 8,
468
+ },
469
+ yield: {
470
+ // Raw primitives so the frontend can display curves, charts, etc.
471
+ currentIndex,
472
+ indexScale: INDEX_SCALE,
473
+ totalShares,
474
+ userShares,
475
+ // liqSOL amounts (lamports) implied by index/shares
476
+ estimatedClaim,
477
+ estimatedYield,
478
+ },
479
+ extras: {
480
+ userLiqsolAta: userLiqsolAta.toBase58(),
481
+ reservePoolPDA: reservePoolPDA.toBase58(),
482
+ vaultPDA: vaultPDA.toBase58(),
483
+ globalIndex: globalState?.currentIndex?.toString(),
484
+ totalShares: globalState?.totalShares?.toString(),
485
+ currentTrancheNumber:
486
+ trancheState?.currentTrancheNumber?.toString(),
487
+ currentTranchePriceUsd:
488
+ trancheState?.currentTranchePriceUsd?.toString(), // 1e8 USD
489
+ },
490
+ chainID: this.network.chainId,
491
+ };
492
+ }
493
+ catch (err) {
494
+ throw new Error(`Failed to get Solana portfolio: ${err}`);
495
+ }
469
496
  }
470
497
 
471
498
  /**
@@ -497,29 +524,34 @@ export class SolanaStakingClient implements IStakingClient {
497
524
  windowBefore?: number;
498
525
  windowAfter?: number;
499
526
  }): Promise<TrancheSnapshot> {
500
- const {
501
- chainID = SolChainID.WireTestnet,
502
- windowBefore,
503
- windowAfter,
504
- } = options ?? {};
505
-
506
- const [globalState, trancheState] = await Promise.all([
507
- this.tokenClient.fetchGlobalState(),
508
- this.tokenClient.fetchTrancheState(),
509
- ]);
510
-
511
- const { price: solPriceUsd, timestamp } =
512
- await this.tokenClient.getSolPriceUsdSafe();
513
-
514
- return buildSolanaTrancheSnapshot({
515
- chainID,
516
- globalState,
517
- trancheState,
518
- solPriceUsd,
519
- nativePriceTimestamp: timestamp,
520
- ladderWindowBefore: windowBefore,
521
- ladderWindowAfter: windowAfter,
522
- });
527
+ try {
528
+ const {
529
+ chainID = SolChainID.WireTestnet,
530
+ windowBefore,
531
+ windowAfter,
532
+ } = options ?? {};
533
+
534
+ const [globalState, trancheState] = await Promise.all([
535
+ this.tokenClient.fetchGlobalState(),
536
+ this.tokenClient.fetchTrancheState(),
537
+ ]);
538
+
539
+ const { price: solPriceUsd, timestamp } =
540
+ await this.tokenClient.getSolPriceUsdSafe();
541
+
542
+ return buildSolanaTrancheSnapshot({
543
+ chainID,
544
+ globalState,
545
+ trancheState,
546
+ solPriceUsd,
547
+ nativePriceTimestamp: timestamp,
548
+ ladderWindowBefore: windowBefore,
549
+ ladderWindowAfter: windowAfter,
550
+ });
551
+ }
552
+ catch (err) {
553
+ throw new Error(`Failed to build Solana tranche snapshot: ${err}`);
554
+ }
523
555
  }
524
556
 
525
557
  /**
@@ -528,16 +560,20 @@ export class SolanaStakingClient implements IStakingClient {
528
560
  * cluster-derived epochs-per-year.
529
561
  */
530
562
  async getSystemAPY(): Promise<number> {
531
- // 1) Per-epoch rate (decimal) from on-chain stakeMetrics
532
- const ratePerEpoch = await this.getEpochRateDecimalFromProgram();
533
- // 2) Live epochs-per-year estimate from cluster
534
- const epochsPerYear = await this.getEpochsPerYearFromCluster();
535
- // 3) Compound: (1 + r)^N - 1
536
- const apyDecimal = Math.pow(1 + ratePerEpoch, epochsPerYear) - 1;
537
- // 4) Convert to percent
538
- const apyPercent = apyDecimal * 100;
539
-
540
- return apyPercent;
563
+ try {
564
+ // 1) Per-epoch rate (decimal) from on-chain stakeMetrics
565
+ const ratePerEpoch = await this.getEpochRateDecimalFromProgram();
566
+ // 2) Live epochs-per-year estimate from cluster
567
+ const epochsPerYear = await this.getEpochsPerYearFromCluster();
568
+ // 3) Compound: (1 + r)^N - 1
569
+ const apyDecimal = Math.pow(1 + ratePerEpoch, epochsPerYear) - 1;
570
+ // 4) Convert to percent
571
+ const apyPercent = apyDecimal * 100;
572
+
573
+ return apyPercent;
574
+ } catch (err) {
575
+ throw new Error(`Failed to compute Solana system APY: ${err}`);
576
+ }
541
577
  }
542
578
 
543
579
  /**
@@ -546,18 +582,24 @@ export class SolanaStakingClient implements IStakingClient {
546
582
  * de-scaled using PAY_RATE_SCALE_FACTOR (1e12).
547
583
  */
548
584
  private async getEpochRateDecimalFromProgram(): Promise<number> {
549
- const liqSolCoreProgram = this.program.getProgram('liqsolCore');
550
- const stakeMetricsPda = deriveStakeMetricsPda();
551
- const stakeMetrics =
552
- await liqSolCoreProgram.account.stakeMetrics.fetch(stakeMetricsPda);
585
+ try {
553
586
 
554
- // solSystemPayRate is stored on-chain with PAY_RATE_SCALE_FACTOR (1e12)
555
- const raw = BigInt(stakeMetrics.solSystemPayRate.toString());
587
+ const liqSolCoreProgram = this.program.getProgram('liqsolCore');
588
+ const stakeMetricsPda = deriveStakeMetricsPda();
589
+ const stakeMetrics =
590
+ await liqSolCoreProgram.account.stakeMetrics.fetch(stakeMetricsPda);
556
591
 
557
- // Convert to JS number in **decimal per epoch** units
558
- const rateDecimal = Number(raw) / Number(PAY_RATE_SCALE_FACTOR);
592
+ // solSystemPayRate is stored on-chain with PAY_RATE_SCALE_FACTOR (1e12)
593
+ const raw = BigInt(stakeMetrics.solSystemPayRate.toString());
559
594
 
560
- return rateDecimal;
595
+ // Convert to JS number in **decimal per epoch** units
596
+ const rateDecimal = Number(raw) / Number(PAY_RATE_SCALE_FACTOR);
597
+
598
+ return rateDecimal;
599
+ }
600
+ catch (err) {
601
+ throw new Error(`Failed to read stakeMetrics from program: ${err}`);
602
+ }
561
603
  }
562
604
 
563
605
  // Simple cache so we don’t hammer RPC
package/src/staker.ts CHANGED
@@ -36,14 +36,12 @@ export class Staker {
36
36
 
37
37
  config.forEach((cfg) => {
38
38
  switch (cfg.network.chainId) {
39
- case SolChainID.Devnet:
40
- case SolChainID.WireTestnet:
39
+ case SolChainID.Mainnet:
41
40
  this.clients.set(cfg.network.chainId, new SolanaStakingClient(cfg));
42
41
  break;
43
42
 
44
43
  case EvmChainID.Ethereum:
45
- case EvmChainID.Hoodi:
46
- this.clients.set(EvmChainID.Hoodi, new EthereumStakingClient(cfg));
44
+ this.clients.set(cfg.network.chainId, new EthereumStakingClient(cfg));
47
45
  break;
48
46
 
49
47
  default: