Socket
Socket
Sign inDemoInstall

@unique-nft/rpc-client

Package Overview
Dependencies
434
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @unique-nft/rpc-client

RPC client for unique network


Version published
Weekly downloads
1
Maintainers
6
Created
Weekly downloads
 

Readme

Source

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)}`)
    }
)()

FAQs

Last updated on 13 Apr 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc