Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nft-reader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nft-reader

NFT reader for Algorand blockchain

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NFT reader

Motivation

Abstract the NFTs data manipulation from the business logic. While NFTs can follow different ARC's, this library should abstract the ways of decoding metadata or digital media to show into the different marketplaces. The main idea is to handle metadata & digital media of the NFT easily, doesn't matter the ARC the NFT is following. You as client, should not understand the ARCs at all to develop under Algorand .

Supported ARCs

  • ARC 0003
  • ARC 0019
  • ARC 0069

Available methods

Arc class:

  • getStandard(): <arc3 | arc19 | arc69 | custom>
  • getAssetMetadata()
  • getAssetDigitalMedia()
  • validateDigitalMediaIntegrity()
  • validateMetadataIntegrity()

Examples

Installation
npm i nft-reader
Getting started
Typescript
import { NFTReader } from 'nft-reader';
const nftReader = new NFTReader({
    token: '',
    host: 'http://localhost',
    port: '8980',
});
Javascript vanilla
const { NFTReader } = require('nft-reader');
Getting metadata from ASA id
import { NFTReader } from 'nft-reader';
const nftReader = new NFTReader({
    token: '',
    host: 'http://localhost',
    port: '8980',
});
const asaId = 1;
const metadata = await nftReader.getAssetMetadata(asaId);
console.log(metadata);
From existing Indexer instance
import { Indexer } from 'algosdk';
const token  = "";
const server = "http://localhost";
const port   = 8980;
const indexerClient = new Indexer(token, server, port);

const nftReader = new NFTReader(indexerClient);

TODO:

  • tests for integrity

  • getStandard() should return an array of arcs

  • extra-metadata support

  • localization metadata field integrity check

  • v2:

    • methods for creating NFTs following each ARC

Keywords

FAQs

Package last updated on 06 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc