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

@koibanx/nft-generator-sdk

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koibanx/nft-generator-sdk

NFT generator SDK

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
333
increased by16.84%
Maintainers
2
Weekly downloads
 
Created
Source

Koibanx NFT Generator SDK

NFT Generator SDK based in module NFT Generator

Description

The Module NFT Generator handles:

SDK Documentation

Feast yourself

Installation

npm install @koibanx/nft-generator-sdk

NOTE: you must have the npm token in your .npmrc file


Initialization

Node

Using ES6 import

import NFTGeneratorSdk from '@koibanx/nft-generator-sdk';

const nftGenerator = NFTGeneratorSdk({
  baseURL: 'http://your-url',
});

With require

exports.__esModule = true;
const NFTGeneratorSdk = require('@koibanx/nft-generator-sdk')["default"];

const nftGenerator = NFTGeneratorSdk({
  baseURL: 'http://your-url',
});

Types

  • Typescript (@koibanx/nft-generator-sdk/dist/index.d.ts)

Examples

Using ES6 import

import NFTGeneratorSdk from "@koibanx/nft-generator-sdk";

const nftGenerator = NFTGeneratorSdk({
    baseURL: 'http://your-url',
})

const catchError = (err, modulo) => {
  console.log('Modulo: ', modulo);
  console.log('details: ', err.details);
  console.log('shortMessage: ', err.message);
  console.log('errorCode: ', err.code);
}

const address = 'LYLXNUVYIQMKHSOFE3COC5QKYC7HP44RWY66U3ULQOVVJHEDFR37JM2WEM';
const creatorAddr = 'LYLXNUVYIQMKHSOFE3COC5QKYC7HP44RWY66U3ULQOVVJHEDFR37JM2WEM';
const url = 'https://ipfs.io/ipfs/QmXcUsZrYZotT9NKXsjQbGVQNu4QdSUdL3Z7DVMXrDQa8U';

nftGenerator.countNFT({
  address,
  nftAsaId: 114560197,
}).then((data) => console.log('countNFT', JSON.stringify(data)))
  .catch((e) => catchError(e, 'countNFT'));

nftGenerator.getNFT({
  address,
  nftAsaId: 114560197,
}).then((data) => console.log('getNFT', JSON.stringify(data.params)))
  .catch((e) => catchError(e, 'getNFT'));

nftGenerator.createNFT({
  creatorAddr,
  amount: 1,
  defaultFrozen: false,
  unitName: 'Testing',
  url,
}).then((data) => console.log('createNFT', JSON.stringify(data)))
  .catch((e) => catchError(e, 'createNFT'));

nftGenerator.transferNFT({
  amount: 0,
  from: address,
  receiver: address,
  nftAsaId: 114560197,
}).then((data) => console.log('transferNFT', JSON.stringify(data)))
  .catch((e) => catchError(e, 'transferNFT'));

nftGenerator.optInNFT({
  address,
  nftAsaId: 114560197,
}).then((data) => console.log('optInNFT', JSON.stringify(data)))
  .catch((e) => catchError(e, 'optInNFT'));

nftGenerator.commitTransaction({
  blob: [130, 163, 115],
}).then((data) => console.log('commitTransaction', JSON.stringify(data)))
  .catch((e) => catchError(e, 'commitTransaction'));

FAQs

Package last updated on 05 Oct 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

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