-
Notifications
You must be signed in to change notification settings - Fork 282
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
Update restore-keypair.md to include web3.js v2 examples #623
Conversation
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.
Thanks for adding :)
Requested several changes on this one. If you have questions, let me know.
Co-authored-by: Nick Frostbutter <[email protected]>
Co-authored-by: Nick Frostbutter <[email protected]>
Co-authored-by: Nick Frostbutter <[email protected]>
Co-authored-by: Nick Frostbutter <[email protected]>
Co-authored-by: Nick Frostbutter <[email protected]>
<Tab value="web3.js v1"> | ||
|
||
```typescript | ||
import { createKeyPairFromBytes, getBase58Encoder } from "@solana/web3.js"; | ||
|
||
const keypair = await createKeyPairFromBytes( | ||
getBase58Encoder().decode("5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG") | ||
); | ||
|
||
console.log(keypair); | ||
``` | ||
|
||
</Tab> |
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.
It looks like you might have accidently deleted the v1 snippet. This is the v2 snippet.
Could you please also run prettier on the file to fix the lint error. I think the command is:
|
same as #638 |
Problem
Added Solana Web3.js v2 examples
Summary of Changes
Fixes #