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

@unique-nft/sdk

Package Overview
Dependencies
Maintainers
7
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unique-nft/sdk - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

48

index.js
import Axios from 'axios';
import { Coder } from 'abi-coder';
import FormData from 'form-data';
import { io } from 'socket.io-client';

@@ -394,2 +395,3 @@ var Method = /* @__PURE__ */ ((Method2) => {

this.getCollection = (args) => this.query("collection", args);
this.burn = new Mutation(this.client, Method.DELETE, this.path);
this.createCollection = new Mutation(this.client, Method.POST, `${this.path}/collection`);

@@ -401,2 +403,3 @@ this.getBalance = (args) => this.query("balance", args);

this.allowanceTokens = (args) => this.query("tokens/allowance", args);
this.totalPieces = (args) => this.query("total-pieces", args);
}

@@ -411,2 +414,3 @@ }

this.getCollection = (args) => this.query("collection", args);
this.burn = new Mutation(this.client, Method.DELETE, this.path);
this.getBalance = (args) => this.query("tokens/balance", args);

@@ -420,2 +424,3 @@ this.createCollection = new Mutation(this.client, Method.POST, `${this.path}/collection`);

this.totalPieces = (args) => this.query("tokens/total-pieces", args);
this.accountTokens = (args) => this.query("tokens/account-tokens", args);
}

@@ -529,3 +534,3 @@ }

var version = "0.2.2";
var version = "0.2.3";

@@ -571,2 +576,40 @@ class Common extends Section {

class SocketClient {
constructor(socket) {
this.socket = socket;
}
on(event, listener) {
this.socket.on(event, listener);
}
subscribeHeaders() {
this.socket.emit("subscribe:headers");
return this;
}
subscribeBlocks() {
this.socket.emit("subscribe:blocks");
return this;
}
subscribeExtrinsics(filter) {
this.socket.emit("subscribe:extrinsics", filter);
return this;
}
subscribeEvents(filter) {
this.socket.emit("subscribe:events", filter);
return this;
}
}
class Subscriptions {
constructor(client) {
this.client = client;
}
connect(secondary) {
const options = {
path: secondary ? `/${secondary}/socket.io` : "/socket.io"
};
const socket = io(this.client.options.baseUrl, options);
return new SocketClient(socket);
}
}
class Client {

@@ -587,2 +630,3 @@ constructor(options) {

this.stateQuery = new StateQueries(this);
this.subscriptions = new Subscriptions(this);
this.defaults = {

@@ -604,3 +648,3 @@ baseUrl: ""

const err = (_b = (_a = exception.response) == null ? void 0 : _a.data) == null ? void 0 : _b.error;
throw err ? new ApiError(err) : exception;
throw err && typeof err === "object" ? new ApiError(err) : exception;
});

@@ -607,0 +651,0 @@ {

6

package.json
{
"name": "@unique-nft/sdk",
"version": "0.2.2",
"version": "0.2.3",
"license": "MIT",

@@ -8,3 +8,5 @@ "dependencies": {

"axios": "^0.27.2",
"form-data": "^4.0.0"
"form-data": "^4.0.0",
"socket.io": "^4.5.4",
"socket.io-client": "^4.5.4"
},

@@ -11,0 +13,0 @@ "description": "The @unique-nft/sdk package implements the SDK methods via the REST API. The package implements all the basic methods for working with the Unique Network SDK.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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