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

Update restore-keypair.md to include web3.js v2 examples #623

Closed
wants to merge 8 commits into from

Conversation

metasal1
Copy link
Contributor

Problem

Added Solana Web3.js v2 examples

Summary of Changes

Fixes #

@metasal1 metasal1 requested a review from nickfrosty as a code owner November 19, 2024 02:34
Copy link
Collaborator

@nickfrosty nickfrosty left a 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.

content/cookbook/wallets/restore-keypair.md Outdated Show resolved Hide resolved
content/cookbook/wallets/restore-keypair.md Outdated Show resolved Hide resolved
content/cookbook/wallets/restore-keypair.md Outdated Show resolved Hide resolved
content/cookbook/wallets/restore-keypair.md Outdated Show resolved Hide resolved
content/cookbook/wallets/restore-keypair.md Outdated Show resolved Hide resolved
content/cookbook/wallets/restore-keypair.md Show resolved Hide resolved
@metasal1 metasal1 requested a review from ZYJLiu as a code owner November 19, 2024 23:53
Comment on lines +73 to +85
<Tab value="web3.js v1">

```typescript
import { createKeyPairFromBytes, getBase58Encoder } from "@solana/web3.js";

const keypair = await createKeyPairFromBytes(
getBase58Encoder().decode("5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG")
);

console.log(keypair);
```

</Tab>
Copy link
Collaborator

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.

@ZYJLiu
Copy link
Collaborator

ZYJLiu commented Nov 20, 2024

Could you please also run prettier on the file to fix the lint error. I think the command is:

npx prettier --write "content/cookbook/wallets/restore-keypair.md"

@ZYJLiu
Copy link
Collaborator

ZYJLiu commented Nov 21, 2024

same as #638

@ZYJLiu ZYJLiu closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants