Skip to content

Commit

Permalink
feat: assorted fixes (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfrosty authored Sep 13, 2024
1 parent 8e88041 commit 411f49c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 344 deletions.
6 changes: 3 additions & 3 deletions content/cookbook/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
sidebarSortOrder: 0
title: Solana Cookbook
seoTitle: Code examples for Solana development
seoTitle: Solana Cookbook - Code examples for Solana development
description:
"The Solana cookbook is a collection of useful examples and references for
building on Solana"
"The Solana Cookbook is a collection of code snippets, useful examples, and
references for building on Solana."
---

The _Solana Cookbook_ is a developer resource that provides examples and
Expand Down
2 changes: 2 additions & 0 deletions content/cookbook/tokens/create-mint-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: How to Create a Token
sidebarSortOrder: 1
description: "Learn how to create tokens on Solana."
altRoutes:
- /developers/cookbook/tokens
---

Creating tokens is done by creating what is called a "mint account". This mint
Expand Down
2 changes: 2 additions & 0 deletions content/guides/getstarted/hello-world-in-your-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ keywords:
altRoutes:
- /developers/guides/hello-world-in-your-browser
- /developers/guides/solana-playground
- /developers/guides/solang/solang-getting-started
- /developers/guides/solang-getting-started
---

For this "hello world" quickstart guide, we will use
Expand Down
17 changes: 9 additions & 8 deletions content/guides/javascript/get-program-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ altRoutes:
---

An RPC method that returns all accounts owned by a program. Currently pagination
is not supported. Requests to `getProgramAccounts` should include the
`dataSlice` and/or `filters` parameters to improve response time and return only
intended results.
is not supported. Requests to
[`getProgramAccounts`](/docs/rpc//http/getProgramAccounts.mdx) should include
the `dataSlice` and/or `filters` parameters to improve response time and return
only intended results.

## getProgramAccounts has the following syntax:
## getProgramAccounts RPC Method

The `getProgramAccounts` RPC method has the following syntax:

```md
- `programId`: `string` - Pubkey of the program to query, provided as a base58
encoded string
- (optional) `configOrCommitment`: `object` - Configuration parameters
Expand All @@ -47,7 +49,6 @@ intended results.
data size
- (optional) `withContext`: `boolean` - Wrap the result in an
[RpcResponse JSON object](https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure)
```

### Response

Expand Down Expand Up @@ -192,7 +193,7 @@ import { clusterApiUrl, Connection } from "@solana/web3.js";

The output should look like:

```text
```shell
Found 2 token account(s) for wallet FriELggez2Dy3phZeHHAdpcoEXkKQVkv6tx3zDtCVP8T:
-- Token Account Address 0: H12yCcKLHFJFfohkeKiN8v3zgaLnUMwRcnJTyB4igAsy --
Mint: CKKDsBT6KiT4GDKs3e39Ue9tDkhuGUKM3cC2a7pmV9YK
Expand Down Expand Up @@ -255,7 +256,7 @@ import { clusterApiUrl, Connection } from "@solana/web3.js";
})();
```

The output should look like (notice the empty <Buffer > at acccount.data):
The output should look like (notice the empty `<Buffer >` at `account.data`):

```text
Found 3 token account(s) for mint BUGuuhPsHpk8YZrL2GctsCtXGneL1gmT5zYb7eMHZDWf
Expand Down
Loading

0 comments on commit 411f49c

Please sign in to comment.