Skip to content

squid-solana-typegen renamed to @subsquid/solana-typegen #438

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/solana-indexing/how-to-start/indexing-orca.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm i
First, we inspect the data available for indexing. In Solana, most programs use the [Anchor framework](https://www.anchor-lang.com/). Anchor makes the metadata describing the shape of the instructions, transactions and contract variables available as an [Interface Definition Language](https://www.quicknode.com/guides/solana-development/anchor/what-is-an-idl) (IDL) JSON file. For many popular programs (including Whirlpool) IDL files are published on-chain. SQD provides a [tool](/solana-indexing/sdk/typegen) for retrieving program IDLs and generating boilerplate ABI code for data decoding. This can be done with

```bash
npx squid-solana-typegen src/abi whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc#whirlpool
npx @subsquid/solana-typegen src/abi whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc#whirlpool
```
Here, `src/abi` is the destination folder and the `whirlpool` suffix sets the base name for the generated file.

Expand Down
8 changes: 4 additions & 4 deletions docs/solana-indexing/sdk/typegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ Install with
npm install @subsquid/solana-typegen
```

The `squid-solana-typegen` tool generates TypeScript facades for Solana instructions and logs. It takes JSON IDLs as inputs. The IDLs can be specified in three ways:
The `@subsquid/solana-typegen` tool generates TypeScript facades for Solana instructions and logs. It takes JSON IDLs as inputs. The IDLs can be specified in three ways:

1. as a plain JSON file(s):

```bash
npx squid-solana-typegen src/abi whirlpool.json
npx @subsquid/solana-typegen src/abi whirlpool.json
```

If you use this option, you can also place your JSON IDLs to the `idl` folder and run

```bash
npx squid-solana-typegen src/abi ./idl/*
npx @subsquid/solana-typegen src/abi ./idl/*
```

2. load IDL from a Solana node and generate types:

```bash
npx squid-solana-typegen src/abi whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc#whirlpool
npx @subsquid/solana-typegen src/abi whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc#whirlpool
```

## Usage
Expand Down