Learning how to use the Assets API
The Asset Register is a GraphQL API that can be interacted with through existing SDKs on JavaScript environments.
React SDK
The React SDK offers a convenient way to query assets within React-based applications. It leverages React's provider and hook-based approach, simplifying asset retrieval and integration within React projects.
Core SDK
The Core SDK is designed for Node.js environments but can also be utilized in frameworks other than React. It provides a versatile means of interacting with the Assets API, offering comprehensive asset querying and manipulation functionality.
For developers seeking more customized functionality or specific use cases, direct interaction with the GraphQL API is also supported. The API is fully Relay specification compliant.
Using the API directly allows for fine-grained control over asset queries and enables the execution of custom calls.
Root and Ethereum Mainnet
Porcini and Goerli
There are two different types of authentication required based on the functionality you are trying to access. This guide will explain to you what they are and show you how to use them.
Sign In with Ethereum (SIWE) is used to create access tokens to communicate with the authenticated endpoints on the Asset Register API (🔒).
You can generate these tokens using this helper tool. The contents generated in the Authorization box, after you sign, should be used as the Authorization
header when making API calls.
Any updates made to the asset register through a transaction (i.e. asset links) will need to be signed by a wallet, similar to any other blockchain transaction (🔑).
#sign-and-send the Asset Link Operations guide explains how you can sign Asset Register transactions.