genlayer 0.40.0-clarke.1 → 0.40.0-clarke.2

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 (120) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +9 -0
  3. package/dist/index.js +3798 -480
  4. package/docs/api-references/_meta.json +2 -1
  5. package/docs/api-references/contracts/deploy.mdx +1 -0
  6. package/docs/api-references/contracts/write.mdx +1 -0
  7. package/docs/api-references/finalize-batch.mdx +1 -0
  8. package/docs/api-references/finalize.mdx +1 -0
  9. package/docs/api-references/index.mdx +1 -0
  10. package/docs/api-references/staking/staking/delegator-claim.mdx +1 -0
  11. package/docs/api-references/staking/staking/delegator-exit.mdx +1 -0
  12. package/docs/api-references/staking/staking/delegator-join.mdx +1 -0
  13. package/docs/api-references/staking/staking/prime-all.mdx +1 -0
  14. package/docs/api-references/staking/staking/set-identity.mdx +1 -0
  15. package/docs/api-references/staking/staking/set-operator.mdx +1 -0
  16. package/docs/api-references/staking/staking/validator-claim.mdx +1 -0
  17. package/docs/api-references/staking/staking/validator-deposit.mdx +1 -0
  18. package/docs/api-references/staking/staking/validator-exit.mdx +1 -0
  19. package/docs/api-references/staking/staking/validator-join.mdx +1 -0
  20. package/docs/api-references/staking/staking/validator-prime.mdx +1 -0
  21. package/docs/api-references/staking/staking/wizard.mdx +1 -0
  22. package/docs/api-references/transactions/appeal.mdx +1 -0
  23. package/docs/api-references/vesting/claim.mdx +1 -0
  24. package/docs/api-references/vesting/delegate.mdx +1 -0
  25. package/docs/api-references/vesting/undelegate.mdx +1 -0
  26. package/docs/api-references/vesting/validator/claim.mdx +2 -1
  27. package/docs/api-references/vesting/validator/create.mdx +1 -0
  28. package/docs/api-references/vesting/validator/deposit.mdx +2 -1
  29. package/docs/api-references/vesting/validator/exit.mdx +2 -1
  30. package/docs/api-references/vesting/validator/join.mdx +1 -0
  31. package/docs/api-references/vesting/validator/operator-transfer/cancel.mdx +2 -1
  32. package/docs/api-references/vesting/validator/operator-transfer/complete.mdx +2 -1
  33. package/docs/api-references/vesting/validator/operator-transfer/initiate.mdx +2 -1
  34. package/docs/api-references/vesting/validator/set-identity.mdx +2 -1
  35. package/docs/api-references/vesting/withdraw.mdx +1 -0
  36. package/docs/api-references/wallet/connect.mdx +17 -0
  37. package/docs/api-references/wallet/disconnect.mdx +15 -0
  38. package/docs/api-references/wallet/status.mdx +15 -0
  39. package/docs/api-references/wallet.mdx +25 -0
  40. package/package.json +1 -1
  41. package/src/commands/account/index.ts +1 -0
  42. package/src/commands/account/show.ts +16 -4
  43. package/src/commands/balances/BalancesAction.ts +276 -0
  44. package/src/commands/balances/index.ts +18 -0
  45. package/src/commands/contracts/deploy.ts +24 -10
  46. package/src/commands/contracts/index.ts +28 -25
  47. package/src/commands/contracts/write.ts +6 -0
  48. package/src/commands/staking/StakingAction.ts +79 -18
  49. package/src/commands/staking/delegatorClaim.ts +44 -0
  50. package/src/commands/staking/delegatorExit.ts +60 -0
  51. package/src/commands/staking/delegatorJoin.ts +46 -0
  52. package/src/commands/staking/index.ts +170 -145
  53. package/src/commands/staking/setIdentity.ts +62 -0
  54. package/src/commands/staking/setOperator.ts +42 -0
  55. package/src/commands/staking/validatorClaim.ts +39 -0
  56. package/src/commands/staking/validatorDeposit.ts +42 -0
  57. package/src/commands/staking/validatorExit.ts +57 -0
  58. package/src/commands/staking/validatorJoin.ts +50 -0
  59. package/src/commands/staking/validatorPrime.ts +88 -0
  60. package/src/commands/staking/wizard.ts +511 -28
  61. package/src/commands/transactions/appeal.ts +7 -0
  62. package/src/commands/transactions/finalize.ts +27 -2
  63. package/src/commands/transactions/index.ts +29 -25
  64. package/src/commands/vesting/VestingAction.ts +19 -1
  65. package/src/commands/vesting/claim.ts +43 -0
  66. package/src/commands/vesting/delegate.ts +49 -0
  67. package/src/commands/vesting/index.ts +32 -26
  68. package/src/commands/vesting/undelegate.ts +57 -0
  69. package/src/commands/vesting/validatorClaim.ts +49 -4
  70. package/src/commands/vesting/validatorCreate.ts +59 -0
  71. package/src/commands/vesting/validatorDeposit.ts +52 -4
  72. package/src/commands/vesting/validatorExit.ts +61 -4
  73. package/src/commands/vesting/validatorOperatorTransfer.ts +148 -10
  74. package/src/commands/vesting/validatorSetIdentity.ts +70 -4
  75. package/src/commands/vesting/withdraw.ts +45 -0
  76. package/src/commands/wallet/WalletAction.ts +190 -0
  77. package/src/commands/wallet/index.ts +36 -0
  78. package/src/index.ts +4 -0
  79. package/src/lib/actions/BaseAction.ts +135 -1
  80. package/src/lib/vesting/availableToStake.ts +29 -0
  81. package/src/lib/wallet/bridgePage.ts +266 -0
  82. package/src/lib/wallet/browserBridge.ts +694 -0
  83. package/src/lib/wallet/browserSend.ts +316 -0
  84. package/src/lib/wallet/sessionClient.ts +148 -0
  85. package/src/lib/wallet/sessionConstants.ts +50 -0
  86. package/src/lib/wallet/sessionDaemon.ts +238 -0
  87. package/src/lib/wallet/sessionDescriptor.ts +95 -0
  88. package/src/lib/wallet/sessionResolver.ts +131 -0
  89. package/src/lib/wallet/spawnDaemon.ts +104 -0
  90. package/src/lib/wallet/stakingTx.ts +12 -0
  91. package/src/lib/wallet/txBuilders.ts +114 -0
  92. package/src/lib/wallet/walletOption.ts +23 -0
  93. package/tests/actions/balances.test.ts +247 -0
  94. package/tests/actions/customNetworkProfiles.test.ts +3 -0
  95. package/tests/actions/deploy.test.ts +42 -0
  96. package/tests/actions/hasLiveWalletSession.test.ts +55 -0
  97. package/tests/actions/show.test.ts +94 -0
  98. package/tests/actions/staking.test.ts +311 -5
  99. package/tests/actions/stakingWizard.test.ts +417 -0
  100. package/tests/actions/vesting.test.ts +160 -0
  101. package/tests/actions/walletConnect.test.ts +161 -0
  102. package/tests/actions/walletSession.test.ts +86 -0
  103. package/tests/actions/write.test.ts +43 -0
  104. package/tests/commands/balances.test.ts +73 -0
  105. package/tests/commands/staking.test.ts +66 -10
  106. package/tests/commands/vesting.test.ts +62 -0
  107. package/tests/commands/wallet.test.ts +64 -0
  108. package/tests/index.test.ts +8 -0
  109. package/tests/libs/browserBridge.test.ts +412 -0
  110. package/tests/libs/browserSend.test.ts +183 -0
  111. package/tests/libs/sessionClient.test.ts +155 -0
  112. package/tests/libs/sessionDaemon.test.ts +141 -0
  113. package/tests/libs/sessionDescriptor.test.ts +95 -0
  114. package/tests/libs/sessionResolver.test.ts +283 -0
  115. package/tests/libs/spawnDaemon.test.ts +117 -0
  116. package/tests/libs/stakingTx.test.ts +116 -0
  117. package/tests/libs/txBuilders.test.ts +152 -0
  118. package/tests/setup.ts +33 -0
  119. package/vitest.config.ts +1 -0
  120. package/.github/workflows/npm-dist-tag.yml +0 -81
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.40.0-clarke.2](https://github.com/genlayerlabs/genlayer-cli/compare/v0.40.0-clarke.1...v0.40.0-clarke.2) (2026-07-09)
4
+
5
+ ### Features
6
+
7
+ * **staking:** browser-wallet signing for validator-join and wizard ([#367](https://github.com/genlayerlabs/genlayer-cli/issues/367)) ([ab128c0](https://github.com/genlayerlabs/genlayer-cli/commit/ab128c0b76b4f9d97ed660d91a556a5f769cef6f))
8
+
3
9
  ## [0.40.0-clarke.1](https://github.com/genlayerlabs/genlayer-cli/compare/v0.40.0-rc2...v0.40.0-clarke.1) (2026-07-08)
4
10
 
5
11
  ## [0.40.0-rc2](https://github.com/genlayerlabs/genlayer-cli/compare/v0.40.0-rc1...v0.40.0-rc2) (2026-07-08)
package/README.md CHANGED
@@ -478,6 +478,7 @@ COMMON OPTIONS (all commands):
478
478
  OPTIONS (validator-join):
479
479
  --amount <amount> Amount to stake (in wei or with 'gen' suffix)
480
480
  --operator <address> Operator address (defaults to signer)
481
+ --wallet <mode> 'keystore' (default) or 'browser' (sign in MetaMask)
481
482
 
482
483
  OPTIONS (delegator-join):
483
484
  --validator <address> Validator address to delegate to
@@ -497,6 +498,14 @@ EXAMPLES:
497
498
  # Join as validator with 42000 GEN
498
499
  genlayer staking validator-join --amount 42000gen
499
500
 
501
+ # Sign the validator-join with a browser wallet (MetaMask) instead of a keystore.
502
+ # The CLI serves a page on 127.0.0.1 and opens it; connect + confirm in the wallet.
503
+ # Remote/SSH: forward the printed port first (ssh -L <port>:127.0.0.1:<port> ...).
504
+ genlayer staking validator-join --amount 42000gen --wallet browser --network testnet-bradbury
505
+
506
+ # The wizard can also use a browser wallet as the owner (operator keystore is still generated locally):
507
+ genlayer staking wizard --wallet browser
508
+
500
509
  # Join as delegator with 42 GEN
501
510
  genlayer staking delegator-join --validator 0x... --amount 42gen
502
511