diff --git a/index.js b/index.js index 6da1f37..7ed4a46 100755 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ const repl = require("repl") const SLP = require("./lib/SLP").default const clone = require("git-clone") -program.version("2.1.0", "-v, --version") +program.version("2.1.1", "-v, --version") program .command("new ") diff --git a/lib/TokenType1.js b/lib/TokenType1.js index b6b9d4b..951b45e 100644 --- a/lib/TokenType1.js +++ b/lib/TokenType1.js @@ -90,7 +90,7 @@ var TokenType1 = /** @class */ (function () { return [4 /*yield*/, bitboxNetwork.simpleTokenGenesis(name, symbol, initialTokenQty, documentUri, documentHash, decimals, tokenReceiverAddress, batonReceiverAddress, bchChangeReceiverAddress, balances.nonSlpUtxos)]; case 2: genesisTxid = _a.sent(); - return [2 /*return*/, genesisTxid[0]]; + return [2 /*return*/, genesisTxid]; } }); }); @@ -138,7 +138,7 @@ var TokenType1 = /** @class */ (function () { return [4 /*yield*/, bitboxNetwork.simpleTokenMint(tokenId, mintQty, inputUtxos, tokenReceiverAddress, batonReceiverAddress, bchChangeReceiverAddress)]; case 3: mintTxid = _a.sent(); - return [2 /*return*/, mintTxid[0]]; + return [2 /*return*/, mintTxid]; } }); }); @@ -186,7 +186,7 @@ var TokenType1 = /** @class */ (function () { return [4 /*yield*/, bitboxNetwork.simpleTokenSend(tokenId, amount, inputUtxos, tokenReceiverAddress, bchChangeReceiverAddress)]; case 3: sendTxid = _a.sent(); - return [2 /*return*/, sendTxid[0]]; + return [2 /*return*/, sendTxid]; } }); }); @@ -249,7 +249,7 @@ var TokenType1 = /** @class */ (function () { return [4 /*yield*/, tmpBITBOX_1.RawTransactions.sendRawTransaction(hex)]; case 3: txid = _a.sent(); - return [2 /*return*/, txid[0]]; + return [2 /*return*/, txid]; case 4: error_1 = _a.sent(); return [2 /*return*/, error_1]; @@ -293,7 +293,7 @@ var TokenType1 = /** @class */ (function () { return [4 /*yield*/, bitboxNetwork.simpleTokenBurn(burnConfig.tokenId, amount, inputUtxos, bchChangeReceiverAddress)]; case 3: burnTxid = _a.sent(); - return [2 /*return*/, burnTxid[0]]; + return [2 /*return*/, burnTxid]; case 4: error_2 = _a.sent(); return [2 /*return*/, error_2]; diff --git a/package-lock.json b/package-lock.json index 6cc1968..87bc133 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "slp-sdk", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1783,9 +1783,9 @@ } }, "bitbox-sdk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bitbox-sdk/-/bitbox-sdk-4.0.0.tgz", - "integrity": "sha512-LDvDcSPGqA0lRbtI0EJlPOdEnqPeA2H6pDscvEo++XGyZyUpS2soAjaG/rMk4cPsoSuzcOA20D426LtoYk6daQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bitbox-sdk/-/bitbox-sdk-4.0.1.tgz", + "integrity": "sha512-zS6lf9K0Hicac/w45LshrVEfJrDO7ctAHUdMZuBsTgEHM31X07Zxc6insq6PT3sMX7eiW5uDi6IIf/jdJuzbjA==", "requires": { "assert": "^1.4.1", "axios": "^0.17.1", @@ -2138,9 +2138,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000938", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000938.tgz", - "integrity": "sha512-ekW8NQ3/FvokviDxhdKLZZAx7PptXNwxKgXtnR5y+PR3hckwuP3yJ1Ir+4/c97dsHNqtAyfKUGdw8P4EYzBNgw==" + "version": "1.0.30000939", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000939.tgz", + "integrity": "sha512-oXB23ImDJOgQpGjRv1tCtzAvJr4/OvrHi5SO2vUgB0g0xpdZZoA/BxfImiWfdwoYdUTtQrPsXsvYU/dmCSM8gg==" }, "cardinal": { "version": "2.1.1", diff --git a/package.json b/package.json index 58c0ca3..059a189 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slp-sdk", - "version": "2.1.0", + "version": "2.1.1", "description": "SLP SDK powered by BITBOX", "main": "index.js", "scripts": { @@ -31,7 +31,7 @@ "axios": "^0.17.1", "babel-register": "^6.26.0", "bignumber.js": "^8.0.2", - "bitbox-sdk": "4.0.0", + "bitbox-sdk": "4.0.1", "chalk": "^2.3.0", "clear": "0.1.0", "commander": "^2.13.0", diff --git a/src/TokenType1.ts b/src/TokenType1.ts index ed3503c..2229a09 100644 --- a/src/TokenType1.ts +++ b/src/TokenType1.ts @@ -83,7 +83,7 @@ class TokenType1 { bchChangeReceiverAddress, balances.nonSlpUtxos ) - return genesisTxid[0] + return genesisTxid } async mint(mintConfig: IMintConfig) { @@ -141,7 +141,7 @@ class TokenType1 { batonReceiverAddress, bchChangeReceiverAddress ) - return mintTxid[0] + return mintTxid } async send(sendConfig: ISendConfig) { @@ -194,7 +194,7 @@ class TokenType1 { tokenReceiverAddress, bchChangeReceiverAddress ) - return sendTxid[0] + return sendTxid } async burnAll(burnAllConfig: IBurnAllConfig) { @@ -273,7 +273,7 @@ class TokenType1 { let tx = transactionBuilder.build() let hex = tx.toHex() let txid = await tmpBITBOX.RawTransactions.sendRawTransaction(hex) - return txid[0] + return txid } catch (error) { return error } @@ -317,7 +317,7 @@ class TokenType1 { inputUtxos, bchChangeReceiverAddress ) - return burnTxid[0] + return burnTxid } catch (error) { return error }