An educational app that teaches users about Helius and Solana.
To access the full hosted application, please click here
Pyre is a Next.js app that allows users to learn about Helius and Solana through bite-sized questions. Each question is accompanied by unique contexts to provide a dynamic learning experience.
- Ensure you have Node.js installed.
- Clone this repository to your local machine:
git clone https://github.com/helius-labs/pyre.git
- Change to the project directory
cd pyre
- Install the project dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000 to access the Pyre app.
This project is open source and available under the Apache 2.0 License.
Thread with more detail, Google Form to submit questions.
Contributions are welcome! If you'd like to contribute to Helius RPC Playground, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your forked repository.
- Submit a pull request with all relevant details.
Help add questions by following the interface below:
interface Questions {
name: string,
description: string,
difficulty: number, // 1 to 3
api: string, // can leave null
solved: boolean, // always false
type: string, // wallet, tx, NFT, cNFT
example_answer: string, // serves as a placeholder for input
hints: string[] // can leave null
js_code: string, // can leave null, or copy from Helius docs
docs: string, // link to the relevant docs used to solve
tags: string[], // currently only DAS, RPC, ENHANCED API, NFT API
}
Rendered version:
Here is an example:
name: "Number of NFTs Held",
description: "You are provided a wallet address. Make use of Helius' service to determine the number of NFTs held by the provided wallet.",
difficulty: 1,
api: 'nfts_held',
solved: false,
type: 'wallet',
example_answer: "25",
hints: ["There are multiple ways to determine the number of NFTs held, some options include: using the Balances API, using the more efficient DAS protocol.",
"Assuming the wallet provided has fewer NFTs than the limit returned in one query, the answer would simply be the length of the returned NFT array.",
"You can adjust the limit of NFTs returned! For some wallets you may still need to paginate."],
js_code
`const url = "https://rpc.helius.xyz/?api-key=<api-key>"
const getAssetsByOwner = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'getAssetsByOwner',
params: {
ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
page: 1, // Starts at 1
limit: 1000
},
}),
});
const { result } = await response.json();
console.log("Assets by Owner: ", result.items);
};
getAssetsByOwner();`,
docs: "https://docs.helius.xyz/solana-compression/digital-asset-standard-das-api/get-assets-by-owner",
tags: ["DAS", "RPC"]
You can also contribute to the project by opening issues and submitting pull requests to fix bugs or add new features! For any inquiries, visit the Helius Discord or message Tidelaw#0707.
This project is open source and available under the Apache 2.0 License.