Full lesson
squid-sdk
TypeScript ETL toolkit for indexing Ethereum, Solana, and Substrate data, sourced from SQD Network.
What it does
From the project README:
[](https://www.npmjs.com/package/@subsquid/evm-processor) [](./LICENSE) [](https://docs.sqd.dev)
- Original
- subsquid/squid-sdk
- SuperStack fork
- Blockchains/squid-sdk @
aa76c92 - Stars
- 1,345
- Last push (original)
- 2026-11-02
- Languages
- TypeScript, JavaScript, Dockerfile, Shell, Makefile, HCL
- Detected stack
- not detected
- Categories
- DeFiInfrastructure & Tooling
- Licence
- Apache-2.0
- Homepage
- https://sqd.dev/sdk
Architecture
1198 source files. By extension: .ts ×1145, .js ×53.
| Top-level directory | Source files |
|---|---|
substrate | 214 |
util | 194 |
test | 137 |
evm | 122 |
solana | 99 |
meta | 85 |
graphql | 82 |
typeorm | 78 |
Dapp: deploying
This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/squid-sdk/, once it is deployed and checked on devnet. Until then, run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
util/rpc-client/src/transport/ws.ts L37–60 @ aa76c92 · Apache-2.0 · original this.url = options.url this.fixUnsafeIntegers = options.fixUnsafeIntegers || false this.headers = options.headers this.onNotificationMessage = options.onNotificationMessage this.onReset = options.onReset } connect(): Promise<void> { return new Promise<void>((resolve, reject) => { if (this.connected) return resolve() if (this._ws) return reject(new Error('Already connecting')) let ws = this._ws = new WebSocket(this.url, undefined, undefined, this.headers, undefined, { // default: true fragmentOutgoingMessages: true, // default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode) fragmentationThreshold: MB, // default: 1MiB (also align with maxReceivedMessageSize) maxReceivedFrameSize: 24 * MB, // default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that, 16M is ok there) maxReceivedMessageSize: 24 * MB }) ws.onopen = () => {- Line 52
// default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode): Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve. - Line 56
// default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that,: Touches staking state: the amount locked and when it was locked.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
processor/batch-processor | npm run build | rm -rf lib && tsc |
processor/batch-processor | npm run test | vitest --run |
util/util-internal-dump-cli | npm run build | rm -rf lib && tsc |
util/util-internal-dump-cli | npm run test | vitest --run |
util/util-internal-json | npm run build | rm -rf lib && tsc |
util/util-internal-squid-id | npm run build | rm -rf lib && tsc |
util/util-internal-http-server | npm run build | rm -rf lib && tsc |
util/raw-archive-recompress | npm run build | rm -rf lib && tsc |
util/raw-archive-recompress | npm run test | vitest --run |
util/util-timeout | npm run build | rm -rf lib && tsc |
util/util-naming | npm run build | rm -rf lib && tsc |
util/util-internal-ingest-cli | npm run build | rm -rf lib && tsc |
util/util-internal-worker-thread | npm run build | rm -rf lib && tsc |
util/util-internal-commander | npm run build | rm -rf lib && tsc |
util/util-internal-validation | npm run build | rm -rf lib && tsc |
util/util-internal-counters | npm run build | rm -rf lib && tsc |
What you could build from it
- Fork the SuperStack copy and extend it within the DeFi gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)
- Learn the pattern first: SPL Tokens: mints, accounts and transfers