-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feat: Enable Deposits #268
Conversation
5291e65
to
cf4269b
Compare
…d of manually adding them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a quick look through the three files you mentioned.
Mainly had questions around the types and one about generating the withdrawal creds.
|
||
interface DepositDataJson { | ||
amount: number | ||
pubkey: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw in the previous file there was a Pubkey Type. If we can we should use the actual types to avoid invalid data
interface DepositDataJson { | ||
amount: number | ||
pubkey: string | ||
signature: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here, this should be a signature type (if it exists). Should be a bls sig.
amount: number | ||
pubkey: string | ||
signature: string | ||
withdrawal_credentials: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a hash, pretty sure. Should be the correct hash type if possible.
} | ||
|
||
interface DepositData extends DepositDataJson { | ||
deposit_data_root: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a hash
generateDepositData: ( | ||
mnemonic: string, | ||
index: number, | ||
withdrawalAddress: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address type if it exists
const generateDepositData = async ( | ||
mnemonic: string, | ||
index: number, | ||
withdrawalAddress: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address type
isLoading: boolean | ||
error: string | ||
keyStore: KeyStoreData | undefined | ||
pubKey: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pubkey type if it exists
Co-authored-by: antondlr <anton@delaruelle.net>
Co-authored-by: antondlr <anton@delaruelle.net>
Add handling of creating and reading mnemonics, creation of BLS validator keys, deposit json and allowing uses to deposit via the CLI.
Care needs to be taken to ensure the deposit contract address is clearly written and printed to the UI so users can verify the address before sending and money.
#255