@unique-nft/sdk
Advanced tools
Comparing version
22
index.js
@@ -398,5 +398,24 @@ import Axios from 'axios'; | ||
this.transferTokens = new Mutation(this.client, Method.POST, `${this.path}/tokens/transfer`); | ||
this.approveTokens = new Mutation(this.client, Method.POST, `${this.path}/tokens/approve`); | ||
this.allowanceTokens = (args) => this.query("tokens/allowance", args); | ||
} | ||
} | ||
class Refungible extends Section { | ||
constructor() { | ||
super(...arguments); | ||
this.path = "refungible"; | ||
this.baseUrl = `${this.client.options.baseUrl}/${this.path}`; | ||
this.getCollection = (args) => this.query("collection", args); | ||
this.getBalance = (args) => this.query("tokens/balance", args); | ||
this.createCollection = new Mutation(this.client, Method.POST, `${this.path}/collection`); | ||
this.createToken = new Mutation(this.client, Method.POST, `${this.path}/tokens`); | ||
this.transferToken = new Mutation(this.client, Method.POST, `${this.path}/tokens/transfer`); | ||
this.approveToken = new Mutation(this.client, Method.POST, `${this.path}/tokens/approve`); | ||
this.allowanceToken = (args) => this.query("tokens/allowance", args); | ||
this.repartitionToken = new Mutation(this.client, Method.POST, `${this.path}/tokens/repartition`); | ||
this.totalPieces = (args) => this.query("tokens/total-pieces", args); | ||
} | ||
} | ||
const isFileLike = (input) => Object.hasOwnProperty.call(input, "content"); | ||
@@ -507,3 +526,3 @@ class Ipfs extends Section { | ||
var version = "0.1.13"; | ||
var version = "0.2.0"; | ||
@@ -557,2 +576,3 @@ class Common extends Section { | ||
this.fungible = new Fungible(this); | ||
this.refungible = new Refungible(this); | ||
this.collections = new Collections(this); | ||
@@ -559,0 +579,0 @@ this.tokens = new Tokens(this); |
{ | ||
"name": "@unique-nft/sdk", | ||
"version": "0.1.13", | ||
"version": "0.2.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
120831
7.55%3494
7.18%