The Aura DAS (Digital Asset Standard) API Backend is a server-side implementation that interacts with Metaplex’s Aura to fetch, search, and manage digital assets on the Solana blockchain. This backend enables querying for assets, owners, token accounts, and batch asset retrieval via REST APIs.
The Aura DAS API Backend is an Express.js server that interacts with Metaplex Aura’s DAS APIs, providing RESTful endpoints for:
- Fetching assets by ID
- Searching assets with filters
- Retrieving assets owned by a wallet
- Querying token accounts
- Fetching asset proofs
- Batch fetching assets
- Node.js (v16 or higher)
- npm or yarn
- Solana CLI (installed and configured)
- A Solana wallet with SOL for transactions (if required for any extended features)
- Clone the repository:
git clone <repository-url>
cd aura-das-api- Install dependencies:
npm install- Create a
.envfile in the root directory and add the required environment variables:
PORT=3000
RPC_URL=https://api.mainnet-beta.solana.comStart the development server:
npm run devBuild the project:
npm run build-
POST /api/asset- Fetches an assets by ID- Request Body:
{ "id": "asset_id" }
- Request Body:
-
POST /api/assets/batch- Fetches a batch of assets by IDs- Request Body:
{ "assetIds": ["asset1", "asset2"] }
- Request Body:
-
POST /api/assets/proof/batch- Fetches multiple assets proof by their IDs- Request Body:
{ "assetIds": ["asset1", "asset2"] }
- Request Body:
-
POST /api/assets/authority- Fetches a list of assets with a specific authority- Request Body:
{ "auhtorityAddress": "wallet_pubkey", "limit": 10, "page": 1, "sortBy": { "sort_by": "updated", "sort_direction": "desc" } }
- Request Body:
-
POST /api/assets/owner- Retrieves assets owned by a wallet- Request Body:
{ "ownerAddress": "wallet_pubkey", "limit": 10, "page": 1, "sortBy": { "sort_by": "updated", "sort_direction": "desc" } }
- Request Body:
-
POST /api/assets/group- Retrieves list of assets by group key and group value- Request Body:
{ "groupKey": "group_key", "groupValue": "group_pubkey", "limit": 10, "page": 1, "sortBy": { "sort_by": "updated", "sort_direction": "desc" } }
- Request Body:
-
POST /api/assets/creator- Retrieves list of assets created by an address- Request Body:
{ "creatorAddress": "wallet_pubkey", "onlyVerified": "true", "limit": 10, "page": 1, "sortBy": { "sort_by": "updated", "sort_direction": "desc" } }
- Request Body:
-
POST /api/assets/signatures- Retrieves list of signature related to a compressed asset- Request Body:
{ "id": "pubKey", "limit": 10, "page": 1}
- Request Body:
POST /api/assets/search- Searches assets with filters- Request Body:
{ "ownerAddress": "wallet_pubkey", "compressed": true, "sortBy": { "sort_by": "updatedAt", "sort_direction": "desc" } }
- Request Body:
POST /api/token/accounts- Retrieves token accounts for a given mint or owner- Request Body:
{ "mint": "mint_pubkey", "owner": "wallet_pubkey", "limit": 10, "page": 1 }
- Request Body:
POST /api/assets/proof- Retrieves proof of an asset’s existence- Request Body:
{ "id": "asset_pubkey" }
- Request Body:
aura-das-api/
├── dist/ # Compiled JavaScript output
├── node_modules/ # Installed dependencies
├── src/
│ ├── interface.ts # TypeScript interface definitions
│ ├── server.ts # Main server file
├── .env # Environment variables
├── .gitignore # Git ignore file
├── package-lock.json # Lock file for package manager
├── package.json # Dependencies and scripts
├── README.md # Documentation
├── tsconfig.json # TypeScript configuration
express- Web server frameworkdotenv- Environment variable managementaxios- Making HTTP requests to the Aura DAS APItypescript- Type safety and better development experience
-
Error:
RecordNotFound Error: Asset Not Found- Ensure the asset ID exists on Solana Mainnet or Devnet.
- Double-check the network endpoint (
mainnet-betaordevnet).
-
Error:
Invalid params: missing field 'sortBy'- Ensure
sortByfollows the correct structure:{ "sort_by": "updatedAt", "sort_direction": "desc" }
- Ensure
-
Error:
Invalid params: unknown field- Check the request body for invalid fields; refer to Aura DAS API documentation.
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit changes (
git commit -m 'Added new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
MIT License
For support, open an issue in the repository or contact the maintainers.