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

@arcblock/nft

Package Overview
Dependencies
Maintainers
4
Versions
476
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/nft

Utility to create standard asset on forge powered blockchain

  • 1.18.116
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
311
decreased by-45.44%
Maintainers
4
Weekly downloads
 
Created
Source

nft

styled with prettier docs Gitter

Utility to create standard assets that can be rendered in DID Wallet

Table of Contents

Install

npm install @arcblock/nft
// or
yarn add @arcblock/nft

Usage

const { fromRandom } = require('@ocap/wallet');
const { NFTFactory, NFTIssuer } = require('@arcblock/nft');

const wallet = fromRandom();
const factory = new NFTFactory({
  chainId: 'beta',
  chainHost: 'https://beta.abtnetwork.io/api',
  wallet,
  issuer: {
    name: 'test case',
    url: 'https://www.arcblock.io',
    logo: 'https://www.arcblock.io/favicon.ico',
  },
});

const [asset, hash] = await factory.createTicket({
  backgroundUrl: 'https://www.arcblock.io',
  type: 'DummyMovieTicket',
  data: {
    name: '复仇者联盟4的电影票',
    description: '单场次单人座',
    location: '北京市朝阳区青年路朝阳大悦城万达影院',
    startTime: Date.now(),
    endTime: Date.now() + 24 * 60 * 60 * 1000,
    host: new NFTIssuer({
      wallet,
      name: '万达影城',
      logo: 'https://www.baidu.com',
      url: 'https://www.baidu.com',
    }),
  },
});

Documentation

For full documentation, checkout https://asset-chain.netlify.com

Keywords

FAQs

Package last updated on 30 Apr 2024

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