Skip to main content

DAS API

DAS API fully implements Metaplex's Digital Asset Standard (DAS) API.

Introduction

The DAS API provides a unified interface for interacting with digital assets on Solana, supporting both standard (SPL Token) and compressed (Metapex Bubblegum) assets. We also index the Metaplex Token Metadata, and Metaplex Core programs.

View the specification for the DAS API here.

Overview

The hashes representing compressed assets are stored in Merkle Trees by the SPL Account Compression Program. Metaplex's Bubblegum program uses the Merkle tree abstractions provided by the account compression program to manage Merkle Trees that represent compressed NFTs (cNFTs). The state of any given cNFT can be fully determined by examining all transactions involving the leaf account that holds the hashed Bubblegum LeafSchema.

Each inode (inner node) of the tree holds a hash of its child nodes. Each leaf node stores the hashed metadata of an asset. This way, the root node (Merkle root) stores a single hash cryptographically representing the data integrity of the entire tree.

You can learn more about how Metaplex's Bubblegum program works here.

The getAsset and getAssetProof methods provide the Merkle tree data that is required when interacting with compressed NFTs (transfer, burn, etc). The getAssetsByOwner and searchAssets methods provide information about both fungible tokens and non-fungible tokens.

Our implementation of the DAS API also indexes non-compressed assets as well, letting you query the state of SPL Tokens through the same API.

Getting Started

Syndica implements the full Metaplex DAS API standard and all of its methods. To see what methods are available and what parameters each method accepts, you can visit the Metaplex DAS API Docs.

Making a DAS API request on Syndica is similar to making any other RPC request on Syndica. All DAS API requests utilize JRPC and only differ from a non-DAS API request by the das name-space.

See an example DAS API request below:

Sample DAS API Request
{
"jsonrpc": "2.0",
"id": 123,
"method": "das-mainnet.getAsset",
"params": {
"id": "<ASSET_ID>"
}
}

And the response would look something like this:

Sample DAS API Response
{
"interface": "V1_NFT",
"id": "Az9QTysJj1LW1F7zkYF21HgBj3FRpq3zpxTFdPnAJYm8",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://baze.one/posts/rMb9dU7X2lSu/m",
"files": [],
"metadata": {
"name": "B-BCKSNW-4",
"symbol": "BCKSNW",
"token_standard": "NonFungible"
},
"links": {}
},
"authorities": [
{
"address": "5S5CHHQ69Q2gdRVRV45TVnZpy6eExzq5Zw5BRQozC3Ap",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "2MJeqBXcRmy3PXvQP5RRPqeig2CTfnXv5nGT3wRD1xW5"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.1,
"basis_points": 1000,
"primary_sale_happened": false,
"locked": false
},
"creators": [
{
"address": "8dpwoPxMkCd9LnsDEbrRuBL5sw3mqcWLf9vPcwgpeRMS",
"share": 100,
"verified": false
},
{
"address": "2kKisVa2VmNk6iA2avQpZdDXtDGBWgzEE9ib7iWmKemw",
"share": 0,
"verified": false
},
{
"address": "94huX4Ya45pA41AfeBkqadbBFjgFDrv5riZQXVLqsoVT",
"share": 0,
"verified": true
}
],
"ownership": {
"frozen": false,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "HkdmoXct4zKyAfgZgpuavKzmuvf2Z5UZ35v1UUW3Z9Jk"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 253
},
"mutable": true,
"burnt": false
}

Syndica-specific Methods

Beyond the standard DAS API methods, Syndica offers a custom method called getAssets.

getAssets

The getAssets method allows you to retrieve multiple assets at once by passing in an array of asset IDs. See example request below:

Sample getAssets Request
{
"jsonrpc": "2.0",
"id": 123,
"method": "das.getAssets",
"params": {
"ids": ["<ASSET_ID>", "<ASSET_ID>"]
}
}

DAS Resources