JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 134
  • Score
    100M100P100Q66654F
  • License MIT

The @unique-nft/client package implements the SDK methods via the REST API. The package implements all the basic methods for working with the Unique Network SDK.

Package Exports

  • @unique-nft/client

Readme

Unique Network

polkadotjs uniquenetwork language license GitHub Release Date GitHub stability-alpha

Client

Table of Contents

About Client package

The @unique-nft/client package implements the SDK methods via the REST API. The package implements all the basic methods for working with the SDK:

  • collection creating;
  • token minting and transferring;
  • balance transferring
  • etc.

The package is under construction. Check the SDK package methods list to learn more about the methods, that will be implemented in the @unique-nft/client package.

Installation

npm

npm i @unique-nft/client

Initialization

Node.js

import { Client, Options, AllBalancesResponse, ExtrinsicResultResponse, BalanceTransferParsed } from ‘@unique-nft/client’;
const options: Options = {
    baseUrl: ‘url for rest api’
};
const client = new Client(options);

Method call examples

const balanceResponse: AllBalancesResponse = await client.balance.get(
  {
   address: ‘your address’,
  });
const transferResult: ExtrinsicResultResponse<BalanceTransferParsed> = await client.balance.transfer.submitWaitResult(
  {
    address: ‘address from’,
    destination: ‘address to’,
    amount: 0.001,
  });