This is a Node.js server that provides a set of RESTful API endpoints for querying Algorand blockchain data for Creator NFT Collections.
To get started with this project, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/wxcocoxw/algorand-collection-tools.git
-
Install the dependencies for the project. cd algorand-collection-tools
npm install
-
Create a
.env
file in the project root directory, and add your PureStake API key as a value for thePURESTAKE_API_KEY
variable. You can obtain an API key by signing up for a PureStake account here.PURESTAKE_API_KEY=your_api_key_here
-
Optionally, you can also specify the Algorand network you want to use by setting the
ALGORAND_NETWORK
variable to eithertestnet
ormainnet
. The default istestnet
.ALGORAND_NETWORK=mainnet
-
Start the server.
npm start
The server should now be running at http://localhost:3010.
Retrieves a list of holders and their balances for all assets created by a specific Algorand wallet address, filtered by a specific wallet address.
http://localhost:3010/api/v1/creator/:creatorAddress/asa/holder/:walletAddress
creatorAddress
(required) - The Algorand address of the creator wallet.walletAddress
(required) - The Algorand address of the holder's wallet.
A JSON object with an array of asset IDs and balances held by the wallet address.
Retrieves a list of holders and their assets for all assets created by a specific Algorand wallet address.
http://localhost:3010/api/v1/:creatorAddress/holders
creatorAddress
(required) - The Algorand address of the creator wallet.
A JSON object with an array of wallet addresses and the assets they own.
Retrieves a list of all assets created by a specific Algorand wallet address.
http://localhost:3010/api/v1/creator/:creatorAddress/asas
creatorAddress
(required) - The Algorand address of the creator wallet.
A JSON object with an array of asset IDs and metadata for all assets created by the wallet address.
If you'd like to contribute to this project, feel free to open a pull request or issue on GitHub.
This project is licensed under the MIT License.