Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

nft-arcs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nft-arcs

Arcs abstraction for NFTs

latest
npmnpm
Version
1.0.7
Version published
Weekly downloads
4
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Arcs lib

Motivation

Abstract the NFTs 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 to develop under Algorand.

Available methods (from any NFT following arcs: 3, 19, or 69)

Arc class:

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

Examples

Installation

npm i nft-arcs

Getting started

Typescript
import { Arc } from 'nft-arcs';
const NFTArc = new Arc({
    token: '',
    host: 'http://localhost',
    port: '8980',
});
Javascript vanilla
const { Arc } = require('nft-arcs');

Getting metadata from ASA id

import { Arc } from 'nft-arcs';
const NFTArc = new Arc({
    token: '',
    host: 'http://localhost',
    port: '8980',
});
const asaId = 1;
const metadata = await NFTArc.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 NFTArc = new Arc(indexerClient);

TODO:

  • getStandard() should return an array of arcs
  • extra-metadata support
  • localization metadata field integrity check
  • v2:
    • methods for creating NFTs according client needs

Keywords

Algorand

FAQs

Package last updated on 29 Dec 2022

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