-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create docs for Assets API endpoint (#614)
- Loading branch information
1 parent
fb43e29
commit 624d931
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Fuel Explorer Indexer - Assets API | ||
### Instructions for consuming Assets data from Indexer API | ||
|
||
API endpoint: | ||
`/assets/<assetId>` - get information about any asset (including NFTs) | ||
|
||
URLs to consume: | ||
- Mainnet: https://explorer-indexer-mainnet.fuel.network | ||
- Testnet: https://explorer-indexer-testnet.fuel.network | ||
|
||
|
||
`curl` example of usage | ||
``` | ||
curl 'https://explorer-indexer-mainnet.fuel.network/assets/0x44b09d7143aa7b1aac7844ee9cfc38893b12d20c3822ecb18dbf2c6846ea63f0' | ||
``` | ||
|
||
|
||
the result contains a JSON with the asset information, here are the details about each prop: | ||
| Property | Description | | ||
|----------|-------------| | ||
| assetId | Actual ID of the asset | | ||
| contractId | Contract ID that minted the asset | | ||
| subId | SubId used to calculate the assetId | | ||
| name | Asset name | | ||
| symbol | Asset symbol | | ||
| decimals | Asset decimals configuration | | ||
| suspicious | true if symbol matches any verified asset symbols | | ||
| metadata | Key-value object with SRC7/SRC9 standard metadata | | ||
| isNFT | true if asset is NFT ( [supply=1, decimals=0](https://docs.fuel.network/docs/sway-standards/src-20-native-asset/#non-fungible-asset-restrictions) )| | ||
| verified | true if asset is in Fuel's verified assets list | | ||
| owner | Current assetId owner (NFTs only) | | ||
| uri | Parsed URL from “metadata.uri” or “metadata.URI”. Some [logic](https://github.com/FuelLabs/fuel-ex-demo/blob/ee73408a0ef0323eeb92414d5ed92d65e3f3f78f/packages/graphql/src/infra/gateway/AssetGateway.ts#L63-L95) is applied to try defining a reasonable uri for the API consumer | |