Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose withdrawal creds list validators api #396

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

drohit-cb
Copy link
Contributor

What changed? Why?

This PR helps expose withdrawal credentials of ethereum validators in preparation of Pectra. Using this customers can tell if their validator is a 0x01 or a 0x02 validator.

testing

Example local run

> import { Coinbase, ExternalAddress, StakingReward, StakeOptionsMode, Validator, ValidatorStatus, Transaction, Asset, Wallet } from "./src";
undefined

> const coinbase = Coinbase.configureFromJson({ filePath: "~/code/cb/staking/.coinbase_cloud_api_key_production.json" });
undefined

> let validators = await Validator.list("ethereum-mainnet", "eth", ValidatorStatus.ACTIVE);
undefined

> validators.forEach(validator => {console.log(validator.getWithdrawalCredentials()  + " " + validator.getWithdrawalCredentials());});
0x0100000000000000000000007f639032a6d973044b27f90a522b5b4d81466906 0x0100000000000000000000007f639032a6d973044b27f90a522b5b4d81466906

Qualified Impact

@cb-heimdall
Copy link

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@drohit-cb drohit-cb changed the base branch from master to v0.21.0 February 27, 2025 19:59
@drohit-cb drohit-cb requested a review from djoyahoy February 27, 2025 20:00
@drohit-cb drohit-cb marked this pull request as ready for review February 27, 2025 20:00
@drohit-cb drohit-cb merged commit 8121257 into v0.21.0 Feb 27, 2025
6 checks passed
@drohit-cb drohit-cb deleted the expose-withdrawal-creds-list-validators-api branch February 27, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants