0.0.1 • Published 2 years ago

finclusive-test-sdk v0.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
2 years ago

Koibanx Finclusive SDK

Qredo SDK based in module Qredo

Description

The Module Finclusive handles:

SDK Documentation

Feast yourself

Installation

npm install @koibanx/finclusive-sdk

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

Initialization

Node

Using ES6 import

import FinclusiveSdk from '@koibanx/finclusive-sdk';

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

With require

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

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

Types

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

Examples

Using ES6 import

import finclusiveSdk from "@koibanx/finclusive-sdk";

const finclusive = FinclusiveSdk({
    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'));