Rust and TypeScript example code for finding all members from a collection id.

Overview

get-collection-rs

Use the Crawler

cargo build --release
./target/release/get-collection <rpc_node> <collection_id>

Example:

./target/release/get-collection https://api.metaplex.solana.com/ 66gy1CNSpMzTtf6P8CFGY1mo5K3n7wn2bE249p31tehv

Note: do not use a Solana public RPC for this call as it makes many rapid requests in parallel.

Outputs the list of mints to a file named <collection_id>_mints.json.

get-collection-ts

yarn install
ts-node index.ts <collection_id>

Example:

ts-node index.ts 66gy1CNSpMzTtf6P8CFGY1mo5K3n7wn2bE249p31tehv

Outputs the list of mints to a file named <collection_id>_mints.json.

You might also like...
ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-text search.
ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-text search.

ReefDB ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-

Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite.
Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite.

Description Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLit

Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

asynchronous and synchronous interfaces and persistence implementations for your OOD architecture

OOD Persistence Asynchronous and synchronous interfaces and persistence implementations for your OOD architecture Installation Add ood_persistence = {

Efficient and fast querying and parsing of GTDB's data

xgt xgt is a Rust tool that enables efficient querying and parsing of the GTDB database. xgt consists of a collection of commands mirroring the GTDB A

High-performance, lock-free local and concurrent object memory pool with automated allocation, cleanup, and verification.

Opool: Fast lock-free concurrent and local object pool Opool is a high-performance Rust library that offers a concurrent and local object pool impleme

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx 🧰 The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

⚡🦀 🧨 make your rust types fit DynamoDB and visa versa

🦀 🧨 dynomite dynomite makes DynamoDB fit your types (and visa versa) Overview Goals ⚡ make writing dynamodb applications in rust a productive experi

Comments
  • Support custom rpc node on `get-collection-ts`

    Support custom rpc node on `get-collection-ts`

    Currently we can't use a custom RPC node url when using get-collection-ts, the default node https://api.metaplex.com/ isn't working anymore so we can't fetch mint addresses at all using the Typescript version.

    This pull request let us use a custom node url, if it's not specified it will use the default Metaplex one instead.

    opened by tpompon 1
  • Can't run `npx ts-node index.ts [collection_id]`

    Can't run `npx ts-node index.ts [collection_id]`

    Problem

    When running npx ts-node index.ts [collection_id], I'm getting a fetch error with the following reason Client network socket disconnected before secure TLS connection was established.

    Here are the logs:

    Getting signatures...
    /Users/***/***/get-collection/get-collection-ts/node_modules/node-fetch/lib/index.js:1491
    			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
              ^
    FetchError: request to https://api.metaplex.com/ failed, reason: Client network socket disconnected before secure TLS connection was established
        at ClientRequest.<anonymous> (/Users/***/***/get-collection/get-collection-ts/node_modules/node-fetch/lib/index.js:1491:11)
        at ClientRequest.emit (node:events:513:28)
        at ClientRequest.emit (node:domain:489:12)
        at TLSSocket.socketErrorListener (node:_http_client:488:9)
        at TLSSocket.emit (node:events:513:28)
        at TLSSocket.emit (node:domain:489:12)
        at emitErrorNT (node:internal/streams/destroy:151:8)
        at emitErrorCloseNT (node:internal/streams/destroy:116:3)
        at processTicksAndRejections (node:internal/process/task_queues:82:21) {
      type: 'system',
      errno: 'ECONNRESET',
      code: 'ECONNRESET'
    }
    
    opened by tpompon 1
Owner
Metaplex Foundation
Metaplex Foundation
A place for the community to upload example Scrypto code

community-scrypto A place for the community to upload example Scrypto code. Please fork from main, work out of a sub-directory of your choosing, and t

Radix DLT 80 Dec 13, 2022
The most efficient, scalable, and fast production-ready serverless REST API backend which provides CRUD operations for a MongoDB collection

Optimal CRUD Mongo Goals of This Project This is meant to be the most efficient, scalable, and fast production-ready serverless REST API backend which

Evaluates2 1 Feb 22, 2022
Example sqlite3 Dynamic Loadable Extension in Rust - vfs and vtab modules - port of vfsstat.c

Example sqlite3 Dynamic Loadable Extension in Rust - vfs and vtab modules The vfs and vtab This is a port of the official ext/misc/vfsstat.c sqlite3 e

Manos Pitsidianakis 28 Oct 10, 2022
CRUD example with Rocket, Toql and MySQL

Todo (Rocket, Toql, MySQL) This is a little REST server built with Rocket, Toql and MySQL. The server allows to call CRUD functions on a Todo item. It

Artos 7 Jan 5, 2022
Für Elise (short for Elise) is a concurrent garbage collection attempt based on shifgrethor.

Für Elise (short for Elise) is a concurrent garbage collection attempt based on shifgrethor. The goal is to define an API for precise, tracing garbage collection in Rust which upholds all of Rust's safety guarantees. A user using the API defined in this library will not be at risk for any of the kinds of memory errors that Rust can prevent.

Ngo Iok Ui (Wu Yu Wei) 38 Dec 29, 2022
All in one (aka Aio) database with async support

All in one (aka Aio) database with async support. Based on libsql/Sqlite, bevy_reflect and tokio, includes a dead simple API to be used (no SQL needed just pure Rust). Comes with automigration.

Milen Denev 11 May 4, 2024
rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

Foretag 3 Mar 24, 2022
Command-line tool to make Rust source code entities from Postgres tables.

pg2rs Command-line tool to make Rust source code entities from Postgres tables. Generates: enums structs which can be then used like mod structs; use

Stanislav 10 May 20, 2022
Macros that allow for implicit await in your async code.

suspend fn Disclaimer: this was mostly made as a proof of concept for the proposal below. I haven't tested if there is a performance cost to this macr

null 6 Dec 22, 2021
This code features a viper-client, which can connect to a viper-server, a custom interface made for Comelit devices.

Viper Client ?? (WIP) This is code for my intercom; specifically for the Comelit Mini Wi-Fi MSFV. This features a ViperClient which can talk to the Co

Gerard 4 Feb 20, 2023