[go: up one dir, main page]

@unique-nft/rpc-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

unique-rpc-client

ALPHA - The purpose and content of the package may change dramatically without notice. Use at your own risk

Installation

Install the package using npm:

npm i -S @unique-nft/rpc-client

Usage

import rpcClient

import { rpcClient } from "@unique-nft/rpc-client"

Add settings object in format:

const settings = {
    "blockchain": {
        "escrowAddress": "5DymvaYC4QNyA2KSR1kzaa44YhiPLWgD71ymgT8pSujzpnsg",
        "unique": {
            "wsEndpoint": "wss://quartz.unique.network",
            "collectionIds": [
                5
            ],
            "contractAddress": "0x3C87F245628FB443f63DccF38D4e18F921A3c2e2"
        },
        "kusama": {
            "wsEndpoint": "wss://ws-relay-opal.unique.network",
            "marketCommission": "10"
        }
    },
    "auction": {
        "commission": 10,
        "address": "yGEeaYLrnw8aiTFj5QZAmwWRKu6QdxUkaASLCQznuZX2Lyj7q"
    }
};

Use rpcCLint:

(
    async () => {
        await rpcClient.initialize(settings)
        const token = await rpcClient.nftController?.getToken(2, 2)
        console.log(`token: ${JSON.stringify(token)}`)
    }
)()

Readme

Keywords

none

Package Sidebar

Install

npm i @unique-nft/rpc-client

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

3.96 MB

Total Files

193

Last publish

Collaborators

  • max.andreev
  • ashkuc
  • ut-akuznetsov
  • lach
  • nonfungible