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

slopes

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slopes - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

2

package.json
{
"name": "slopes",
"version": "1.1.4",
"version": "1.1.5",
"description": "AVA Platform JS Library",

@@ -5,0 +5,0 @@ "main": "typings/src/index.js",

@@ -212,3 +212,3 @@ # Slopes - The AVA Platform JavaScript Library

let output = new slopes.OutCreateAsset(amount, addresses, threshold);
let unsigned = slopes.TxUnsigned([], [output]);
let unsigned = new slopes.TxUnsigned([], [output]);
let signed = avm.keyChain().signTx(unsigned); //returns a Tx class

@@ -215,0 +215,0 @@ ```

@@ -88,2 +88,11 @@ /**

/**
* Gets the blockchainID and returns it.
*
* @returns The the provided string representing the blockchainID
*/
getBlockchainID = ():string => {
return this.blockchainID;
}
/**
* Gets a reference to the keychain for this class.

@@ -155,3 +164,3 @@ *

return this.callMethod("avm.getUTXOs", params).then((response:RequestResponseData) => {
let utxos:UTXOSet = new UTXOSet;
let utxos:UTXOSet = new UTXOSet();
let data = response.data["result"]["utxos"];

@@ -158,0 +167,0 @@ if(persistOpts && typeof persistOpts === 'object'){

@@ -68,2 +68,9 @@ /**

/**
* Returns the assetID of the input.
*/
getAssetID = ():Buffer => {
return this.assetid;
}
/**
* @ignore

@@ -159,9 +166,11 @@ */

* @param txidx A {@link https://github.com/feross/buffer|Buffer} containing the index of the output in the transaction consumed in the [[Input]]
* @param assetID A {@link https://github.com/feross/buffer|Buffer} representing the assetID of the [[Input]]
* @param amount A {@link https://github.com/indutny/bn.js/|BN} containing the amount of the output to be consumed
*/
constructor(txid?:Buffer, txidx?:Buffer, amount?:BN) {
if(txid && txidx && amount){
constructor(txid?:Buffer, txidx?:Buffer, amount?:BN, assetID?:Buffer) {
if(txid && txidx && amount && assetID){
this.id.writeUInt32BE(0,0);
this.txid = txid;
this.txidx = txidx;
this.assetid = assetID;
this.amountValue = amount;

@@ -168,0 +177,0 @@ this.amount = bintools.fromBNToBuffer(amount, 8);

@@ -81,3 +81,3 @@ /**

importKey = (privk:Buffer):boolean => {
this.keypair = ec.keyFromPrivate(privk);
this.keypair = ec.keyFromPrivate(privk.toString("hex"),"hex");
// doing hex translation to get Buffer class

@@ -142,3 +142,3 @@ this.privk = Buffer.from(this.keypair.getPrivate("hex"), "hex");

*
* @param msg The message to sign
* @param msg The message to sign, be sure to hash first if expected
*

@@ -244,3 +244,4 @@ * @returns A {@link https://github.com/feross/buffer|Buffer} containing the signature

signTx = (utx:TxUnsigned):Tx => {
let txbuff = utx.toBuffer();
let txbuff = utx.toBuffer();
let msg:Buffer = Buffer.from(createHash('sha256').update(txbuff).digest());
let sigs:Array<Signature> = [];

@@ -252,4 +253,5 @@ let ins:Array<Input> = utx.getIns();

let keypair:AVMKeyPair = this.getKey(sigidxs[j].getSource());
let signval:Buffer = keypair.sign(msg)
let sig:Signature = new Signature();
sig.fromBuffer(keypair.sign(txbuff));
sig.fromBuffer(signval);
sigs.push(sig);

@@ -256,0 +258,0 @@ }

@@ -145,3 +145,3 @@ /**

getAssetID = ():Buffer => {
return bintools.fromBNToBuffer(new BN(0));
return undefined;
}

@@ -339,3 +339,3 @@

if(amount && addresses){
this.amountValue = amount.clone();
this.amountValue = amount.clone();
let addrs:Array<Address> = [];

@@ -342,0 +342,0 @@ for(let i = 0; i < addresses.length; i++){

@@ -179,3 +179,3 @@ /**

*/
constructor(ins?:Array<Input>, outs?:Array<Output>, networkid:number = 2, blockchainid:Buffer = Buffer.alloc(32, 16), codec:number = 2,) {
constructor(ins?:Array<Input>, outs?:Array<Output>, networkid:number = 2, blockchainid:Buffer = Buffer.alloc(32, 16), codec:number = 2) {
this.codec.writeUInt32BE(codec, 0);

@@ -182,0 +182,0 @@ this.networkid.writeUInt32BE(networkid, 0);

@@ -68,3 +68,7 @@ /**

getAssetID = ():Buffer => {
return this.output.getAssetID();
let assetID = this.output.getAssetID();
if(assetID){
return assetID;
}
return this.getTxID();
}

@@ -329,3 +333,3 @@

for(let i = 0; i < utxoids.length; i++){
if(utxoids[i] in this.utxos){
if(utxoids[i] in this.utxos && !(utxoids[i] in results)){
results.push(this.utxos[utxoids[i]]);

@@ -386,5 +390,8 @@ }

for(let i = 0; i < address.length; i++){
for(let [utxoid, locktime] of Object.entries(this.addressUTXOs[address[i]])){
if((spendable && locktime.lte(now)) || !spendable) {
results.push(utxoid);
if(address[i] in this.addressUTXOs){
let entries = Object.entries(this.addressUTXOs[address[i]]);
for(let [utxoid, locktime] of entries){
if(results.indexOf(utxoid) == -1 && (spendable && locktime.lte(now)) || !spendable) {
results.push(utxoid);
}
}

@@ -424,3 +431,3 @@ }

if(utxos[i].getAssetID().toString("hex") == asset.toString("hex") && utxos[i].meetsThreshold(addresses, asOf)){
spend.add(utxos[i].getAmount());
spend = spend.add(utxos[i].getAmount());
}

@@ -478,3 +485,3 @@ }

let txidx:Buffer = utxos[i].getTxIdx();
let input:Input = new Input(txid, txidx, amt);
let input:Input = new Input(txid, txidx, amt, assetID);
let spenders:Array<string> = utxos[i].getSpenders(fromAddresses, asOf);

@@ -486,3 +493,3 @@ for(let j = 0; j < spenders.length; j++){

/* istanbul ignore next */
throw new Error("Error - UTXOSet.signersToUnsignedTx: no such address in output: " + spenders[j]);
throw new Error("Error - UTXOSet.makeUnsignedTx: no such address in output: " + spenders[j]);
}

@@ -513,3 +520,3 @@ input.addSignatureIdx(idx, spenders[j]);

/* istanbul ignore next */
throw new Error("Error - UTXOSet.signersToUnsignedTx: insufficient funds to create the transaction");
throw new Error("Error - UTXOSet.makeUnsignedTx: insufficient funds to create the transaction");
}

@@ -516,0 +523,0 @@

@@ -67,2 +67,5 @@ /**

/**
* Returns the networkID;
*/
getNetworkID = ():number => {

@@ -75,3 +78,3 @@ return this.networkID;

*/
protected setNetworkID = (netid:number) => {
setNetworkID = (netid:number) => {
this.networkID = netid;

@@ -78,0 +81,0 @@ }

@@ -111,3 +111,7 @@ /**

resp.data = JSON.parse(resp.data);
}
if(typeof resp.data === 'object' && 'error' in resp.data) {
throw new Error("Error returned: " + JSON.stringify(resp.data));
}
return resp;

@@ -114,0 +118,0 @@ }

@@ -14,7 +14,7 @@ import mockAxios from 'jest-mock-axios';

let slopes:Slopes = new Slopes(ip,port,protocol, 49, undefined, true);
let slopes:Slopes = new Slopes(ip,port,protocol, 49, "What is my purpose? You pass butter. Oh my god.", false);
let admin:AdminAPI;
beforeAll(() => {
admin = new AdminAPI(slopes);
admin = slopes.Admin();
});

@@ -26,2 +26,38 @@

test("getNetworkID", async ()=>{
let result:Promise<number> = admin.getNetworkID();
let payload:object = {
"result": {
"networkID": 49
}
};
let responseObj = {
data: payload
};
mockAxios.mockResponse(responseObj);
let response:number = await result;
expect(mockAxios.request).toHaveBeenCalledTimes(1);
expect(response).toBe(49);
});
test("getBlockchainID", async ()=>{
let result:Promise<string> = admin.getBlockchainID('avm');
let payload:object = {
"result": {
"blockchainID": slopes.AVM().getBlockchainID()
}
};
let responseObj = {
data: payload
};
mockAxios.mockResponse(responseObj);
let response:string = await result;
expect(mockAxios.request).toHaveBeenCalledTimes(1);
expect(response).toBe("What is my purpose? You pass butter. Oh my god.");
});
test("lockProfile", async ()=>{

@@ -28,0 +64,0 @@ let result:Promise<boolean> = admin.lockProfile('filename');

@@ -190,4 +190,5 @@ import mockAxios from 'jest-mock-axios';

txidx = u.getTxIdx();
let asset = u.getAssetID();
let input:Input = new Input(txid, txidx, amount);
let input:Input = new Input(txid, txidx, amount, asset);
inputs.push(input);

@@ -194,0 +195,0 @@ }

@@ -74,4 +74,5 @@ import { UTXOSet, UTXO } from 'src/apis/avm/utxos';

txidx = u.getTxIdx();
let asset = u.getAssetID();
input = new Input(txid, txidx, amount);
input = new Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -99,4 +100,5 @@ expect(input.getInputType()).toBe(0);

txidx = u.getTxIdx();
let asset = u.getAssetID();
input = new Input(txid, txidx, amount);
input = new Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -124,4 +126,5 @@ expect(input.getInputType()).toBe(0);

txidx = u.getTxIdx();
let asset = u.getAssetID();
input = new Input(txid, txidx, amount);
input = new Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -140,5 +143,5 @@ expect(input.getInputType()).toBe(0);

test('comparitor', () => {
let in1:Input = new Input(utxos[0].getTxID(), utxos[0].getTxIdx(), utxos[0].getAmount());
let in2:Input = new Input(utxos[1].getTxID(), utxos[1].getTxIdx(), utxos[1].getAmount());
let in3:Input = new Input(utxos[2].getTxID(), utxos[2].getTxIdx(), utxos[2].getAmount());
let in1:Input = new Input(utxos[0].getTxID(), utxos[0].getTxIdx(), utxos[0].getAmount(), utxos[0].getAssetID());
let in2:Input = new Input(utxos[1].getTxID(), utxos[1].getTxIdx(), utxos[1].getAmount(), utxos[1].getAssetID());
let in3:Input = new Input(utxos[2].getTxID(), utxos[2].getTxIdx(), utxos[2].getAmount(), utxos[2].getAssetID());

@@ -145,0 +148,0 @@ let cmp = Input.comparitor();

@@ -142,3 +142,3 @@ import BN from "bn.js";

expect(out.getAssetID().toString("hex")).toBe("00");
expect(out.getAssetID()).toBeUndefined();

@@ -145,0 +145,0 @@ let r = out.getAddressIdx(addrs[2]);

@@ -79,4 +79,5 @@ import { UTXOSet, UTXO } from 'src/apis/avm/utxos';

txidx = u.getTxIdx();
let asset = u.getAssetID();
let input:Input = new Input(txid, txidx, amount);
let input:Input = new Input(txid, txidx, amount, asset);
inputs.push(input);

@@ -83,0 +84,0 @@ }

@@ -56,6 +56,13 @@ import BN from "bn.js";

});
test('getAssetID', () => {
test('getAssetID NonCA', () => {
let assetid:Buffer = u1.getAssetID();
expect(assetid.toString("hex", 0, assetid.length)).toBe("8a5d2d32e68bc50036e4d086044617fe4a0a0296b274999ba568ea92da46d533");
});
test('getAssetID CA', () => {
let ca:UTXO = new UTXO(CAUTXOstr);
let assetid:Buffer = ca.getAssetID();
let txid:Buffer = ca.getTxID();
expect(assetid.toString("hex", 0, assetid.length)).toBe(txid.toString("hex", 0, txid.length));
});
test('getTxID', () => {

@@ -62,0 +69,0 @@ let txid:Buffer = u1.getTxID();

@@ -30,3 +30,7 @@ import mockAxios from 'jest-mock-axios';

expect(slopes.getURL()).toBe(`${protocol}://${ip}:${port}`);
expect(slopes.getNetworkID()).toBe(49);
slopes.setNetworkID(50);
expect(slopes.getNetworkID()).toBe(50);
slopes.setNetworkID(49);
expect(slopes.getNetworkID()).toBe(49);
});

@@ -33,0 +37,0 @@

@@ -64,2 +64,8 @@ /**

/**
* Gets the blockchainID and returns it.
*
* @returns The the provided string representing the blockchainID
*/
getBlockchainID: () => string;
/**
* Gets a reference to the keychain for this class.

@@ -66,0 +72,0 @@ *

@@ -98,2 +98,10 @@ "use strict";

/**
* Gets the blockchainID and returns it.
*
* @returns The the provided string representing the blockchainID
*/
this.getBlockchainID = () => {
return this.blockchainID;
};
/**
* Gets a reference to the keychain for this class.

@@ -161,3 +169,3 @@ *

return this.callMethod("avm.getUTXOs", params).then((response) => {
let utxos = new utxos_1.UTXOSet;
let utxos = new utxos_1.UTXOSet();
let data = response.data["result"]["utxos"];

@@ -254,2 +262,2 @@ if (persistOpts && typeof persistOpts === 'object') {

exports.default = AVMAPI;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaXMvYXZtL2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUlBLG9DQUFpQztBQUNqQyw2Q0FBaUU7QUFDakUsbUNBQWtDO0FBQ2xDLG1DQUE2QztBQUM3Qyx5Q0FBeUM7QUFDekMsNkJBQXNDO0FBQ3RDLGtE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WUoKSkpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZkFycmF5OkFycmF5PHN0cmluZz4gPSB0aGlzLmRiLmdldChwZXJzaXN0T3B0cy5nZXROYW1lKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KHNlbGZBcnJheSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgdXR4b3MuYWRkQXJyYXkoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZjpVVFhPU2V0ID0gbmV3IFVUWE9TZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWRkQXJyYXkoc2VsZkFycmF5KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubWVyZ2VCeVJ1bGUodXR4b3MsIHBlcnNpc3RPcHRzLmdldE1lcmdlUnVsZSgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IHNlbGYuZ2V0QWxsVVRYT1N0cmluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmRiLnNldChwZXJzaXN0T3B0cy5nZXROYW1lKCksIGRhdGEsIHBlcnNpc3RPcHRzLmdldE92ZXJ3cml0ZSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHV0eG9zLmFkZEFycmF5KGRhdGEpO1xuICAgICAgICAgICAgcmV0dXJuIHV0eG9zO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBIZWxwZXIgZnVuY3Rpb24gd2hpY2ggY3JlYXRlcyBhbiB1bnNpZ25lZCB0cmFuc2FjdGlvbi4gRm9yIG1vcmUgZ3JhbnVsYXIgY29udHJvbCwgeW91IG1heSBjcmVhdGUgeW91ciBvd25cbiAgICAgKiBbW1R4VW5zaWduZWRdXSBtYW51YWxseSAod2l0aCB0aGVpciBjb3JyZXNwb25kaW5nIFtbSW5wdX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qL1xuICAgIGNvbnN0cnVjdG9yKGNvcmU6U2xvcGVzQ29yZSwgYmFzZXVybDpzdHJpbmcgPSBcIi9leHQvc3VibmV0L2F2bVwiLCBibG9ja2NoYWluSUQ6c3RyaW5nID0gXCJcIil7IFxuICAgICAgICBzdXBlcihjb3JlLCBiYXNldXJsKTtcbiAgICAgICAgdGhpcy5rZXljaGFpbiA9IG5ldyBBVk1LZXlDaGFpbigpO1xuICAgICAgICB0aGlzLmJsb2NrY2hhaW5JRCA9IGJsb2NrY2hhaW5JRFxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQVZNQVBJOyJdfQ==

@@ -46,2 +46,6 @@ /**

/**
* Returns the assetID of the input.
*/
getAssetID: () => Buffer;
/**
* @ignore

@@ -78,6 +82,7 @@ */

* @param txidx A {@link https://github.com/feross/buffer|Buffer} containing the index of the output in the transaction consumed in the [[Input]]
* @param assetID A {@link https://github.com/feross/buffer|Buffer} representing the assetID of the [[Input]]
* @param amount A {@link https://github.com/indutny/bn.js/|BN} containing the amount of the output to be consumed
*/
constructor(txid?: Buffer, txidx?: Buffer, amount?: BN);
constructor(txid?: Buffer, txidx?: Buffer, amount?: BN, assetID?: Buffer);
}
//# sourceMappingURL=inputs.d.ts.map

@@ -36,5 +36,6 @@ "use strict";

* @param txidx A {@link https://github.com/feross/buffer|Buffer} containing the index of the output in the transaction consumed in the [[Input]]
* @param assetID A {@link https://github.com/feross/buffer|Buffer} representing the assetID of the [[Input]]
* @param amount A {@link https://github.com/indutny/bn.js/|BN} containing the amount of the output to be consumed
*/
constructor(txid, txidx, amount) {
constructor(txid, txidx, amount, assetID) {
this.id = buffer_1.Buffer.alloc(4);

@@ -67,2 +68,8 @@ this.txid = buffer_1.Buffer.alloc(32);

/**
* Returns the assetID of the input.
*/
this.getAssetID = () => {
return this.assetid;
};
/**
* @ignore

@@ -149,6 +156,7 @@ */

};
if (txid && txidx && amount) {
if (txid && txidx && amount && assetID) {
this.id.writeUInt32BE(0, 0);
this.txid = txid;
this.txidx = txidx;
this.assetid = assetID;
this.amountValue = amount;

@@ -169,2 +177,2 @@ this.amount = bintools.fromBNToBuffer(amount, 8);

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwaXMvYXZtL2lucHV0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztHQUVHO0FBQ0gsb0NBQStCO0FBQy9CLG9FQUE0QztBQUM1QyxrREFBdUI7QUFDdkIsbUNBQWlDO0FBRWpDOztHQUVHO0FBQ0gsTUFBTSxRQUFRLEdBQUcsa0JBQVEsQ0FBQyxXQUFXLEVBQUUsQ0FBQztBQUV4Qzs7Ozs7Ozs7Ozs7O0dBWUc7QUFDSCxNQUFhLEtBQUs7SUE4SGQ7Ozs7OztPQU1HO0lBQ0gsWUFBWSxJQUFZLEVBQUUsS0FBYSxFQUFFLE1BQVU7UUFwSXpDLE9BQUUsR0FBVSxlQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzVCLFNBQUksR0FBVSxlQUFNLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQy9CLFVBQUssR0FBVSxlQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQy9CLFlBQU8sR0FBVSxlQUFNLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQ2xDLFdBQU0sR0FBVSxlQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2hDLGdCQUFXLEdBQU0sSUFBSSxlQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDM0IsWUFBTyxHQUFVLGVBQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDakMsWU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WZmZXJ8QnVmZmVyfSByZXByZXNlbnRpbmcgdGhlIGFzc2V0SUQgb2YgdGhlIFtbSW5wdXRdXVxuICAgICAqIEBwYXJhbSBhbW91bnQgQSB7QGxpbmsgaHR0cHM6Ly9naXRodWIuY29tL2luZHV0bnkvYm4uanMvfEJOfSBjb250YWluaW5nIHRoZSBhbW91bnQgb2YgdGhlIG91dHB1dCB0byBiZSBjb25zdW1lZFxuICAgICAqL1xuICAgIGNvbnN0cnVjdG9yKHR4aWQ/OkJ1ZmZlciwgdHhpZHg/OkJ1ZmZlciwgYW1vdW50PzpCTiwgYXNzZXRJRD86QnVmZmVyKSB7XG4gICAgICAgIGlmKHR4aWQgJiYgdHhpZHggJiYgYW1vdW50ICYmIGFzc2V0SUQpe1xuICAgICAgICAgICAgdGhpcy5pZC53cml0ZVVJbnQzMkJFKDAsMCk7XG4gICAgICAgICAgICB0aGlzLnR4aWQgPSB0eGlkO1xuICAgICAgICAgICAgdGhpcy50eGlkeCA9IHR4aWR4O1xuICAgICAgICAgICAgdGhpcy5hc3NldGlkID0gYXNzZXRJRDtcbiAgICAgICAgICAgIHRoaXMuYW1vdW50VmFsdWUgPSBhbW91bnQ7XG4gICAgICAgICAgICB0aGlzLmFtb3VudCA9IGJpbnRvb2xzLmZyb21CTlRvQnVmZmVyKGFtb3VudCwgOCk7XG4gICAgICAgICAgICB0aGlzLnNpZ0lkeHMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICB9XG59Il19

@@ -60,3 +60,3 @@ /**

*
* @param msg The message to sign
* @param msg The message to sign, be sure to hash first if expected
*

@@ -63,0 +63,0 @@ * @returns A {@link https://github.com/feross/buffer|Buffer} containing the signature

@@ -85,3 +85,3 @@ "use strict";

this.importKey = (privk) => {
this.keypair = ec.keyFromPrivate(privk);
this.keypair = ec.keyFromPrivate(privk.toString("hex"), "hex");
// doing hex translation to get Buffer class

@@ -141,3 +141,3 @@ this.privk = buffer_1.Buffer.from(this.keypair.getPrivate("hex"), "hex");

*
* @param msg The message to sign
* @param msg The message to sign, be sure to hash first if expected
*

@@ -238,2 +238,3 @@ * @returns A {@link https://github.com/feross/buffer|Buffer} containing the signature

let txbuff = utx.toBuffer();
let msg = buffer_1.Buffer.from(create_hash_1.default('sha256').update(txbuff).digest());
let sigs = [];

@@ -245,4 +246,5 @@ let ins = utx.getIns();

let keypair = this.getKey(sigidxs[j].getSource());
let signval = keypair.sign(msg);
let sig = new types_1.Signature();
sig.fromBuffer(keypair.sign(txbuff));
sig.fromBuffer(signval);
sigs.push(sig);

@@ -256,2 +258,2 @@ }

exports.AVMKeyChain = AVMKeyChain;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5Y2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBpcy9hdm0va2V5Y2hhaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUE7O0dBRUc7QUFDSCxvQ0FBK0I7QUFDL0IsbURBQXFDO0FBQ3JDLG9FQUE0QztBQUM1Qyw2QkFBc0M7QUFDdEMsbUNBQTRDO0FBRTVDLDhEQUFxQztBQUNyQyw2Q0FBc0Q7QUFFdEQ7O0dBRUc7QUFDSCxNQUFNLEVBQUUsR0FBRyxRQUFRLENBQUMsRUFBRSxDQUFDO0FBRXZCOztHQUVHO0FBQ0gsTUFBTSxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsV0FBVyxDQUFDLENBQUM7QUFFL0I7O0dBRUc7QUFDSCxNQUFNLFFBQVEsR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDO0FBRTFCOztHQUVHO0FBQ0gsTUFBTSxFQUFFLEdBQUcsUUFBUSxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUM7QUFFbEM7O0dBRUc7QUFDSCxNQUFNLFFBQVEsR0FBRyxrQkFBUSxDQUFDLFdBQVcsRUF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qIFxuICAgICAqIEBwYXJhbSBwcml2ayBBIHtAbGluayBodHRwczovL2dpdGh1Yi5jb20vZmVyb3NzL2J1ZmZlcnxCdWZmZXJ9IG9yIEFWQSBzZXJpYWxpemVkIHN0cmluZyByZXByZXNlbnRpbmcgdGhlIHByaXZhdGUga2V5IFxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIEFkZHJlc3Mgb2YgdGhlIG5ldyBrZXkgcGFpclxuICAgICAqL1xuICAgIGltcG9ydEtleSA9IChwcml2azpCdWZmZXIgfCBzdHJpbmcpOnN0cmluZyA9PiB7XG4gICAgICAgIGxldCBrZXlwYWlyOkFWTUtleVBhaXIgPSBuZXcgQVZNS2V5UGFpcigpO1xuICAgICAgICBsZXQgcGs6QnVmZmVyO1xuICAgICAgICBpZih0eXBlb2YgcHJpdmsgPT09ICdzdHJpbmcnKXtcbiAgICAgICAgICAgIHBrID0gYmludG9vbHMuYXZhRGVzZXJpYWxpemUocHJpdmspO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcGsgPSBiaW50b29scy5jb3B5RnJvbShwcml2ayk7XG4gICAgICAgIH1cbiAgICAgICAga2V5cGFpci5pbXBvcnRLZXkocGspO1xuICAgICAgICBpZighKGtleXBhaXIuZ2V0QWRkcmVzcygpIGluIHRoaXMua2V5cykpe1xuICAgICAgICAgICAgdGhpcy5hZGRLZXkoa2V5cGFpcik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGtleXBhaXIuZ2V0QWRkcmVzcygpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFNpZ25zIGEgW1tUeFVuc2lnbmVkXV0gYW5kIHJldHVybnMgc2lnbmVkIFtbVHhdXVxuICAgICAqIFxuICAgICAqIEBwYXJhbSB1dHggQSBbW1R4VW5zaWduZWRdXSB0aGF0IG5lZWRzIHRvIGJlIHNpZ25lZFxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIEEgc2lnbmVkIFtbVHhdXVxuICAgICAqL1xuICAgIHNpZ25UeCA9ICh1dHg6VHhVbnNpZ25lZCk6VHggPT4ge1xuICAgICAgICBsZXQgdHhidWZmID0gdXR4LnRvQnVmZmVyKCk7IFxuICAgICAgICBsZXQgc2lnczpBcnJheTxTaWduYXR1cmU+ID0gW107XG4gICAgICAgIGxldCBpbnM6QXJyYXk8SW5wdXQ+ID0gdXR4LmdldElucygpO1xuICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgaW5zLmxlbmd0aDsgaSsrKXtcbiAgICAgICAgICAgIGxldCBzaWdpZHhzOkFycmF5PFNpZ0lkeD4gPSBpbnNbaV0uZ2V0U2lnSWR4cygpO1xuICAgICAgICAgICAgZm9yKGxldCBqID0gMDsgaiA8IHNpZ2lkeHMubGVuZ3RoOyBqKyspe1xuICAgICAgICAgICAgICAgIGxldCBrZXlwYWlyOkFWTUtleVBhaXIgPSB0aGlzLmdldEtleShzaWdpZHhzW2pdLmdldFNvdXJjZSgpKTtcbiAgICAgICAgICAgICAgICBsZXQgc2lnOlNpZ25hdHVyZSA9IG5ldyBTaWduYXR1cmUoKTtcbiAgICAgICAgICAgICAgICBzaWcuZnJvbUJ1ZmZlcihrZXlwYWlyLnNpZ24odHhidWZmKSk7XG4gICAgICAgICAgICAgICAgc2lncy5wdXNoKHNpZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyBUeCh1dHgsIHNpZ3MpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgaW5zdGFuY2Ugb2YgQVZNS2V5Q2hhaW4uXG4gICAgICovXG4gICAgY29uc3RydWN0b3IoKXtcbiAgICAgICAgc3VwZXIoKTtcbiAgICB9XG59Il19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5Y2hhaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBpcy9hdm0va2V5Y2hhaW4udH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bnRpbmcgdGhlIHByaXZhdGUga2V5IFxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIEFkZHJlc3Mgb2YgdGhlIG5ldyBrZXkgcGFpclxuICAgICAqL1xuICAgIGltcG9ydEtleSA9IChwcml2azpCdWZmZXIgfCBzdHJpbmcpOnN0cmluZyA9PiB7XG4gICAgICAgIGxldCBrZXlwYWlyOkFWTUtleVBhaXIgPSBuZXcgQVZNS2V5UGFpcigpO1xuICAgICAgICBsZXQgcGs6QnVmZmVyO1xuICAgICAgICBpZih0eXBlb2YgcHJpdmsgPT09ICdzdHJpbmcnKXtcbiAgICAgICAgICAgIHBrID0gYmludG9vbHMuYXZhRGVzZXJpYWxpemUocHJpdmspO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcGsgPSBiaW50b29scy5jb3B5RnJvbShwcml2ayk7XG4gICAgICAgIH1cbiAgICAgICAga2V5cGFpci5pbXBvcnRLZXkocGspO1xuICAgICAgICBpZighKGtleXBhaXIuZ2V0QWRkcmVzcygpIGluIHRoaXMua2V5cykpe1xuICAgICAgICAgICAgdGhpcy5hZGRLZXkoa2V5cGFpcik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGtleXBhaXIuZ2V0QWRkcmVzcygpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFNpZ25zIGEgW1tUeFVuc2lnbmVkXV0gYW5kIHJldHVybnMgc2lnbmVkIFtbVHhdXVxuICAgICAqIFxuICAgICAqIEBwYXJhbSB1dHggQSBbW1R4VW5zaWduZWRdXSB0aGF0IG5lZWRzIHRvIGJlIHNpZ25lZFxuICAgICAqIFxuICAgICAqIEByZXR1cm5zIEEgc2lnbmVkIFtbVHhdXVxuICAgICAqL1xuICAgIHNpZ25UeCA9ICh1dHg6VHhVbnNpZ25lZCk6VHggPT4ge1xuICAgICAgICBsZXQgdHhidWZmID0gdXR4LnRvQnVmZmVyKCk7XG4gICAgICAgIGxldCBtc2c6QnVmZmVyID0gQnVmZmVyLmZyb20oY3JlYXRlSGFzaCgnc2hhMjU2JykudXBkYXRlKHR4YnVmZikuZGlnZXN0KCkpOyBcbiAgICAgICAgbGV0IHNpZ3M6QXJyYXk8U2lnbmF0dXJlPiA9IFtdO1xuICAgICAgICBsZXQgaW5zOkFycmF5PElucHV0PiA9IHV0eC5nZXRJbnMoKTtcbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IGlucy5sZW5ndGg7IGkrKyl7XG4gICAgICAgICAgICBsZXQgc2lnaWR4czpBcnJheTxTaWdJZHg+ID0gaW5zW2ldLmdldFNpZ0lkeHMoKTtcbiAgICAgICAgICAgIGZvcihsZXQgaiA9IDA7IGogPCBzaWdpZHhzLmxlbmd0aDsgaisrKXtcbiAgICAgICAgICAgICAgICBsZXQga2V5cGFpcjpBVk1LZXlQYWlyID0gdGhpcy5nZXRLZXkoc2lnaWR4c1tqXS5nZXRTb3VyY2UoKSk7XG4gICAgICAgICAgICAgICAgbGV0IHNpZ252YWw6QnVmZmVyID0ga2V5cGFpci5zaWduKG1zZylcbiAgICAgICAgICAgICAgICBsZXQgc2lnOlNpZ25hdHVyZSA9IG5ldyBTaWduYXR1cmUoKTtcbiAgICAgICAgICAgICAgICBzaWcuZnJvbUJ1ZmZlcihzaWdudmFsKTtcbiAgICAgICAgICAgICAgICBzaWdzLnB1c2goc2lnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IFR4KHV0eCwgc2lncyk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBpbnN0YW5jZSBvZiBBVk1LZXlDaGFpbi5cbiAgICAgKi9cbiAgICBjb25zdHJ1Y3Rvcigpe1xuICAgICAgICBzdXBlcigpO1xuICAgIH1cbn0iXX0=

@@ -277,2 +277,2 @@ "use strict";

exports.Tx = Tx;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHguanMiLCJzb3VyY2VSb290IjoiIiwic291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bShieXRlcywgb2Zmc2V0LCBvZmZzZXQgKyA0KTtcbiAgICAgICAgb2Zmc2V0ICs9IDQ7XG4gICAgICAgIGxldCBvdXRjb3VudDpudW1iZXIgPSB0aGlzLm51bW91dHMucmVhZFVJbnQzMkJFKDApO1xuICAgICAgICB0aGlzLm91dHMgPSBbXTtcbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IG91dGNvdW50OyBpKyspe1xuICAgICAgICAgICAgbGV0IG91dGJ1ZmY6QnVmZmVyID0gYmludG9vbHMuY29weUZyb20oYnl0ZXMsIG9mZnNldCwgYnl0ZXMubGVuZ3RoKTtcbiAgICAgICAgICAgIGxldCBvdXQ6T3V0cHV0ID0gU2VsZWN0T3V0cHV0Q2xhc3Mob3V0YnVmZik7XG4gICAgICAgICAgICBvZmZzZXQgKz0gb3V0LmZyb21CdWZmZXIob3V0YnVmZik7XG4gICAgICAgICAgICB0aGlzLm91dHMucHVzaChvdXQpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMubnVtaW5zID0gYmludG9vbHMuY29weUZyb20oYnl0ZXMsIG9mZnNldCwgb2Zmc2V0ICsgNCk7XG4gICAgICAgIG9mZnNldCArPSA0O1xuICAgICAgICBsZXQgaW5jb3VudDpudW1iZXIgPSB0aGlzLm51bWlucy5yZWFkVUludDMyQkUoMCk7XG4gICAgICAgIHRoaXMuaW5zID0gW107XG4gICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBpbmNvdW50OyBpKyspe1xuICAgICAgICAgICAgbGV0IGluYnVmZjpCdWZmZXIgPSBiaW50b29scy5jb3B5RnJvbShieXRlcywgb2Zmc2V0LCBieXRlcy5sZW5ndGgpO1xuICAgICAgICAgICAgbGV0IGlucHV0OklucHV0ID0gbmV3IElucHV0KCk7XG4gICAgICAgICAgICBvZmZzZXQgKz0gaW5wdXQuZnJvbUJ1ZmZlcihpbmJ1ZmYpO1xuICAgICAgICAgICAgdGhpcy5pbnMucHVzaChpbnB1dCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9mZnNldDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAaWdub3JlXG4gICAgICovXG4gICAgcHJvdGVjdGVkIF9iYXNpY1R4QnVmZmVyID0gKCk6QnVmZmVyID0+IHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRoaXMub3V0cy5zb3J0KE91dHB1dC5jb21wYXJpdG9yKCkpO1xuICAgICAgICAgICAgdGhpcy5pbnMuc29ydChJbnB1dC5jb21wYXJpdG9yKCkpO1xuICAgICAgICAgICAgdGhpcy5udW1vdXRzLndyaXRlVUludDMyQkUodGhpcy5vdXRzLmxlbmd0aCwgMCk7XG4gICAgICAgICAgICB0aGlzLm51bWlucy53cml0ZVVJbnQzMkJFKHRoaXMuaW5zLmxlbmd0aCwgMCk7XG4gICAgICAgICAgICBsZXQgYnNpemU6bnVtYmVyID0gdGhpcy5jb2RlYy5sZW5ndGggKyB0aGlzLm5ldHdvcmtpZC5sZW5ndGggKyB0aGlzLmJsb2NrY2hhaW5pZC5sZW5ndGggKyB0aGlzLm51bW91dHMubGVuZ3RoO1xuICAgICAgICAgICAgbGV0IGJhcnI6QXJyYXk8QnVmZmVyPiA9IFt0aGlzLmNvZGVjLCB0aGlzLm5ldHdvcmtpZCwgdGhpcy5ibG9ja2NoYWluaWQsIHRoaXMubnVtb3V0c107XG4gICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgdGhpcy5vdXRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IGI6QnVmZmVyID0gdGhpcy5vdXRzW2ldLnRvQnVmZmVyKCk7XG4gICAgICAgICAgICAgICAgYmFyci5wdXNoKGIpO1xuICAgICAgICAgICAgICAgIGJzaXplICs9IGIubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYmFyci5wdXNoKHRoaXMubnVtaW5zKTtcbiAgICAgICAgICAgIGJzaXplICs9IHRoaXMubnVtaW5zLmxlb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gYmludG9vbHMuY29weUZyb20oYnl0ZXMsIG9mZnNldCwgb2Zmc2V0ICsgNCk7XG4gICAgICAgIG9mZnNldCArPSA0O1xuICAgICAgICB0aGlzLmJsb2NrY2hhaW5pZCA9IGJpbnRvb2xzLmNvcHlGcm9tKGJ5dGVzLCBvZmZzZXQsIG9mZnNldCArIDMyKTtcbiAgICAgICAgb2Zmc2V0ICs9IDMyO1xuICAgICAgICB0aGlzLm51bW91dHMgPSBiaW50b29scy5jb3B5RnJvbShieXRlcywgb2Zmc2V0LCBvZmZzZXQgKyA0KTtcbiAgICAgICAgb2Zmc2V0ICs9IDQ7XG4gICAgICAgIGxldCBvdXRjb3VudDpudW1iZXIgPSB0aGlzLm51bW91dHMucmVhZFVJbnQzMkJFKDApO1xuICAgICAgICB0aGlzLm91dHMgPSBbXTtcbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IG91dGNvdW50OyBpKyspe1xuICAgICAgICAgICAgbGV0IG91dGJ1ZmY6QnVmZmVyID0gYmludG9vbHMuY29weUZyb20oYnl0ZXMsIG9mZnNldCwgYnl0ZXMubGVuZ3RoKTtcbiAgICAgICAgICAgIGxldCBvdXQ6T3V0cHV0ID0gU2VsZWN0T3V0cHV0Q2xhc3Mob3V0YnVmZik7XG4gICAgICAgICAgICBvZmZzZXQgKz0gb3V0LmZyb21CdWZmZXIob3V0YnVmZik7XG4gICAgICAgICAgICB0aGlzLm91dHMucHVzaChvdXQpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMubnVtaW5zID0gYmludG9vbHMuY29weUZyb20oYnl0ZXMsIG9mZnNldCwgb2Zmc2V0ICsgNCk7XG4gICAgICAgIG9mZnNldCArPSA0O1xuICAgICAgICBsZXQgaW5jb3VudDpudW1iZXIgPSB0aGlzLm51bWlucy5yZWFkVUludDMyQkUoMCk7XG4gICAgICAgIHRoaXMuaW5zID0gW107XG4gICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBpbmNvdW50OyBpKyspe1xuICAgICA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GFzcyByZXByZXNlbnRpbmcgYSBzaWduZWQgdHJhbnNhY3Rpb24uXG4gICAgICogXG4gICAgICogQHBhcmFtIHR4IE9wdGlvbmFsIFtbVHhdXVxuICAgICAqIEBwYXJhbSBzaWduYXR1cmVzIE9wdGlvbmFsIGFycmF5IG9mIFtbU2lnbmF0dXJlXV1zXG4gICAgICovXG4gICAgY29uc3RydWN0b3IodHg/OlR4VW5zaWduZWQsIHNpZ25hdHVyZXM/OkFycmF5PFNpZ25hdHVyZT4pIHtcbiAgICAgICAgaWYodHgpe1xuICAgICAgICAgICAgdGhpcy50eCA9IHR4O1xuICAgICAgICAgICAgaWYoc2lnbmF0dXJlcyl7XG4gICAgICAgICAgICAgICAgdGhpcy5zaWduYXR1cmVzID0gc2lnbmF0dXJlc1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuXG5cbiJdfQ==

@@ -48,2 +48,5 @@ /**

getURL: () => string;
/**
* Returns the networkID;
*/
getNetworkID: () => number;

@@ -53,3 +56,3 @@ /**

*/
protected setNetworkID: (netid: number) => void;
setNetworkID: (netid: number) => void;
/**

@@ -56,0 +59,0 @@ * Adds an API to the middleware. The API resolves to a registered subnet's RPC.

@@ -77,2 +77,5 @@ "use strict";

};
/**
* Returns the networkID;
*/
this.getNetworkID = () => {

@@ -229,2 +232,2 @@ return this.networkID;

exports.default = SlopesCore;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xvcGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Nsb3Blcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBOztHQUVHO0FBQ0gseUNBQTZEO0FBQzdELGtEQUEwQjtBQUcxQjs7Ozs7Ozs7R0FRRztBQUNILE1BQXFCLFVBQVU7SUE4TTNCOzs7Ozs7T0FNRztJQUNILFlBQVksRUFBUyxFQUFF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gfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICBiYXNlVVJMOnRoaXMucHJvdG9jb2wrXCI6Ly9cIit0aGlzLmlwK1wiOlwiK3RoaXMucG9ydCxcbiAgICAgICAgICAgICAgICByZXNwb25zZVR5cGU6ICd0ZXh0J1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBjb25maWcudXJsID0gYmFzZXVybDtcbiAgICAgICAgY29uZmlnLm1ldGhvZCA9IHhocm1ldGhvZDtcbiAgICAgICAgY29uZmlnLmhlYWRlcnMgPSBoZWFkZXJzO1xuICAgICAgICBjb25maWcuZGF0YSA9IHBvc3RkYXRhO1xuICAgICAgICBjb25maWcucGFyYW1zID0gZ2V0ZGF0YTtcbiAgICAgICAgcmV0dXJuIGF4aW9zLnJlcXVlc3QoY29uZmlnKS50aGVuKChyZXNwOkF4aW9zUmVzcG9uc2U8YW55PikgPT4ge1xuICAgICAgICAgICAgLy9wdXJnaW5nIGFsbCB0aGF0IGlzIGF4aW9zXG4gICAgICAgICAgICBsZXQgeGhyZGF0YTpSZXF1ZXN0UmVzcG9uc2VEYXRhID0gbmV3IFJlcXVlc3RSZXNwb25zZURhdGEoKTtcbiAgICAgICAgICAgIHhocmRhdGEuZGF0YSA9IHJlc3AuZGF0YTtcbiAgICAgICAgICAgIHhocmRhdGEuaGVhZGVycyA9IHJlc3AuaGVhZGVycztcbiAgICAgICAgICAgIHhocmRhdGEucmVxdWVzdCA9IHJlc3AucmVxdWVzdDtcbiAgICAgICAgICAgIHhocmRhdGEuc3RhdHVzID0gcmVzcC5zdGF0dXM7XG4gICAgICAgICAgICB4aHJkYXRhLnN0YXR1c1RleHQgPSByZXNwLnN0YXR1c1RleHQ7XG4gICAgICAgICAgICByZXR1cm4geGhyZGF0YTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTWFrZXMgYSBHRVQgY2FsbCB0byBhbiBBUEkuX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GF4aW9zQ29uZmlnKTtcbiAgICB9XG4gICAgXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhIG5ldyBBVkFKUyBpbnN0YW5jZS4gU2V0cyB0aGUgYWRkcmVzcyBhbmQgcG9ydCBvZiB0aGUgbWFpbiBBVkEgQ2xpZW50LlxuICAgICAqIFxuICAgICAqIEBwYXJhbSBpcCBUaGUgaG9zdG5hbWUgdG8gcmVzb2x2ZSB0byByZWFjaCB0aGUgQVZBIENsaWVudCBBUElzXG4gICAgICogQHBhcmFtIHBvcnQgVGhlIHBvcnQgdG8gcmVvbHZlIHRvIHJlYWNoIHRoZSBBVkEgQ2xpZW50IEFQSXNcbiAgICAgKiBAcGFyYW0gcHJvdG9jb2wgVGhlIHByb3RvY29sIHN0cmluZyB0byB1c2UgYmVmb3JlIGEgXCI6Ly9cIiBpbiBhIHJlcXVlc3QsIGV4OiBcImh0dHBcIiwgXCJodHRwc1wiLCBcImdpdFwiLCBcIndzXCIsIGV0YyAuLi5cbiAgICAgKi9cbiAgICBjb25zdHJ1Y3RvcihpcDpzdHJpbmcsIHBvcnQ6bnVtYmVyLCBwcm90b2NvbDpzdHJpbmcgPSBcImh0dHBcIil7XG4gICAgICAgIHRoaXMuc2V0QWRkcmVzcyhpcCwgcG9ydCwgcHJvdG9jb2wpO1xuICAgIH1cbn0iXX0=

@@ -110,2 +110,5 @@ "use strict";

}
if (typeof resp.data === 'object' && 'error' in resp.data) {
throw new Error("Error returned: " + JSON.stringify(resp.data));
}
return resp;

@@ -277,2 +280,2 @@ }

exports.NBytes = NBytes;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFJQSxvQ0FBaUM7QUFDakMsOENBQXN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tjaGFyc2V0PVVURi04XCJ9O1xuXG4gICAgICAgIGxldCBheENvbmY6QXhpb3NSZXF1ZXN0Q29uZmlnID0ge1xuICAgICAgICAgICAgYmFzZVVSTDp0aGlzLmNvcmUuZ2V0UHJvdG9jb2woKStcIjovL1wiK3RoaXMuY29yZS5nZXRJUCgpK1wiOlwiK3RoaXMuY29yZS5nZXRQb3J0KCksXG4gICAgICAgICAgICByZXNwb25zZVR5cGU6ICdqc29uJ1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiB0aGlzLmNvcmUucG9zdChlcCwge30sIEpTT04uc3RyaW5naWZ5KHJwYyksIGhlYWRlcnMsIGF4Q29uZikudGhlbiggKHJlc3A6UmVxdWVzdFJlc3BvbnNlRGF0YSkgPT4ge1xuICAgICAgICAgICAgaWYocmVzcC5zdGF0dXMgPj0gMjAwICYmIHJlc3Auc3RhdHVzIDwgMzAwKXtcbiAgICAgICAgICAgICAgICB0aGlzLnJwY2lkICs9IDE7XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHJlc3AuZGF0YSA9PT0gXCJzdHJpbmdcIil7XG4gICAgICAgICAgICAgICAgICAgIHJlc3AuZGF0YSA9IEpTT04ucGFyc2UocmVzcC5kYXRhKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3A7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0gICBcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgdGhlIHJwY2lkLCBhIHN0cmljdGx5LWluY3JlYXNpbmcgbnVtYmVyLCBzdGFydGluZyBmcm9tIDEsIGluZGljYXRpbmcgdGhlIG5leHQgcmVxdWVzdCBJRCB0aGF0IHdpbGwgYmUgc2VudC5cbiAgICAgKi9cbiAgICBnZXRSUENJRCA9ICgpOm51bWJlciA9PiB7XG4gICAgICAgIHJldHVybiB0aGlzLnJwY2lkO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFxuICAgICAqIE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AgICAgICAgICBycGNbXCJqc29ucnBjXCJdID0gdGhpcy5qcnBjVmVyc2lvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBoZWFkZXJzOm9iamVjdCA9IHtcIkNvbnRlbnQtVHlwZVwiOiBcImFwcGxpY2F0aW9uL2pzb247Y2hhcnNldD1VVEYtOFwifTtcblxuICAgICAgICBsZXQgYXhDb25mOkF4aW9zUmVxdWVzdENvbmZpZyA9IHtcbiAgICAgICAgICAgIGJhc2VVUkw6dGhpcy5jb3JlLmdldFByb3RvY29sKCkrXCI6Ly9cIit0aGlzLmNvcmUuZ2V0SVAoKStcIjpcIit0aGlzLmNvcmUuZ2V0UG9ydCgpLFxuICAgICAgICAgICAgcmVzcG9uc2VUeXBlOiAnanNvbidcbiAgICAgICAgfTtcblxuICAgICAgICByZXR1cm4gdGhpcy5jb3JlLnBvc3QoZXAsIHt9LCBKU09OLnN0cmluZ2lmeShycGMpLCBoZWFkZXJzLCBheENvbmYpLnRoZW4oIChyZXNwOlJlcXVlc3RSZXNwb25zZURhdGEpID0+IHtcbiAgICAgICAgICAgIGlmKHJlc3Auc3RhdHVzID49IDIwMCAmJiByZXNwLnN0YXR1cyA8IDMwMCl7XG4gICAgICAgICAgICAgICAgdGhpcy5ycGNpZCArPSAxO1xuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiByZXNwLmRhdGEgPT09IFwic3RyaW5nXCIpe1xuICAgICAgICAgICAgICAgICAgICByZXNwLmRhdGEgPSBKU09OLnBhcnNlKHJlc3AuZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgcmVzcC5kYXRhID09PSAnb2JqZWN0JyAmJiAnZXJyb3InIGluIHJlc3AuZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFcnJvciByZXR1cm5lZDogXCIgKyBKU09OLnN0cmluZ2lmeShyZXNwLmR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gICogUmV0dXJucyBpbnN0YW5jZSBvZiBbW05CeXRlc11dLlxuICAgICAqL1xuICAgIGNvbnN0cnVjdG9yKCkge31cbn1cbiJdfQ==

@@ -17,3 +17,2 @@ "use strict";

const src_1 = require("src");
const api_1 = __importDefault(require("src/apis/admin/api"));
describe("Admin", () => {

@@ -25,6 +24,6 @@ const ip = '127.0.0.1';

let password = 'password';
let slopes = new src_1.Slopes(ip, port, protocol, 49, undefined, true);
let slopes = new src_1.Slopes(ip, port, protocol, 49, "What is my purpose? You pass butter. Oh my god.", false);
let admin;
beforeAll(() => {
admin = new api_1.default(slopes);
admin = slopes.Admin();
});

@@ -34,2 +33,32 @@ afterEach(() => {

});
test("getNetworkID", () => __awaiter(void 0, void 0, void 0, function* () {
let result = admin.getNetworkID();
let payload = {
"result": {
"networkID": 49
}
};
let responseObj = {
data: payload
};
jest_mock_axios_1.default.mockResponse(responseObj);
let response = yield result;
expect(jest_mock_axios_1.default.request).toHaveBeenCalledTimes(1);
expect(response).toBe(49);
}));
test("getBlockchainID", () => __awaiter(void 0, void 0, void 0, function* () {
let result = admin.getBlockchainID('avm');
let payload = {
"result": {
"blockchainID": slopes.AVM().getBlockchainID()
}
};
let responseObj = {
data: payload
};
jest_mock_axios_1.default.mockResponse(responseObj);
let response = yield result;
expect(jest_mock_axios_1.default.request).toHaveBeenCalledTimes(1);
expect(response).toBe("What is my purpose? You pass butter. Oh my god.");
}));
test("lockProfile", () => __awaiter(void 0, void 0, void 0, function* () {

@@ -112,2 +141,2 @@ let result = admin.lockProfile('filename');

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90ZXN0cy9hcGlzL2FkbWluL2FwaS50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0FBQUEsc0VBQXdDO0F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CBwYXlsb2FkOm9iamVjdCA9IHtcbiAgICAgICAgICAgIFwicmVzdWx0XCI6IHtcbiAgICAgICAgICAgICAgICBcInN1Y2Nlc3NcIjogdHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICBkYXRhOiBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgbW9ja0F4aW9zLm1vY2tSZXNwb25zZShyZXNwb25zZU9iaik7XG4gICAgICAgIGxldCByZXNwb25zZTpib29sZWFuID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICBleHBlY3QocmVzcG9uc2UpLnRvQmUodHJ1ZSk7XG4gICAgfSk7XG5cbiAgICB0ZXN0KFwicGVlcnNcIiwgYXN5bmMgKCk9PntcbiAgICAgICAgbGV0IHBlZXJzID0gWydwMScsICdwMiddO1xuICAgICAgICBsZXQgcmVzdWx0OlByb21pc2U8QXJyYXk8c3RyaW5nPj4gPSBhZG1pbi5wZWVycygpO1xuICAgICAgICBsZXQgcGF5bG9hZDpvYmplY3QgPSB7XG4gICAgICAgICAgICBcInJlc3VsdFwiOiB7XG4gICAgICAgICAgICAgICAgXCJwZWVyc1wiOiBwZWVyc1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICBkYXRhOiBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgbW9ja0F4aW9zLm1vY2tSZXNwb25zZShyZXNwb25zZU9iaik7XG4gICAgICAgIGxldCByZXNwb25zZTpBcnJheTxzdHJpbmc+ID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRp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c3luYyAoKT0+e1xuICAgICAgICBsZXQgcmVzdWx0OlByb21pc2U8bnVtYmVyPiA9IGFkbWluLmdldE5ldHdvcmtJRCgpO1xuICAgICAgICBsZXQgcGF5bG9hZDpvYmplY3QgPSB7XG4gICAgICAgICAgICBcInJlc3VsdFwiOiB7XG4gICAgICAgICAgICAgICAgXCJuZXR3b3JrSURcIjogNDlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgbGV0IHJlc3BvbnNlT2JqID0ge1xuICAgICAgICAgICAgZGF0YTogcGF5bG9hZFxuICAgICAgICB9O1xuXG4gICAgICAgIG1vY2tBeGlvcy5tb2NrUmVzcG9uc2UocmVzcG9uc2VPYmopO1xuICAgICAgICBsZXQgcmVzcG9uc2U6bnVtYmVyID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICBleHBlY3QocmVzcG9uc2UpLnRvQmUoNDkpO1xuICAgIH0pO1xuXG4gICAgdGVzdChcImdldEJsb2NrY2hhaW5JRFwiLCBhc3luYyAoKT0+e1xuICAgICAgICBsZXQgcmVzdWx0OlByb21pc2U8c3RyaW5nPiA9IGFkbWluLmdldEJsb2NrY2hhaW5JRCgnYXZtJyk7XG4gICAgICAgIGxldCBwYXlsb2FkOm9iamVjdCA9IHtcbiAgICAgICAgICAgIFwicmVzdWx0XCI6IHtcbiAgICAgICAgICAgICAgICBcImJsb2NrY2hhaW5JRFwiOiBzbG9wZXMuQVZNKCkuZ2V0QmxvY2tjaGFpbklEKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgbGV0IHJlc3BvbnNlT2JqID0ge1xuICAgICAgICAgICAgZGF0YTogcGF5bG9hZFxuICAgICAgICB9O1xuXG4gICAgICAgIG1vY2tBeGlvcy5tb2NrUmVzcG9uc2UocmVzcG9uc2VPYmopO1xuICAgICAg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CBwYXlsb2FkOm9iamVjdCA9IHtcbiAgICAgICAgICAgIFwicmVzdWx0XCI6IHtcbiAgICAgICAgICAgICAgICBcInN1Y2Nlc3NcIjogdHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICBkYXRhOiBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgbW9ja0F4aW9zLm1vY2tSZXNwb25zZShyZXNwb25zZU9iaik7XG4gICAgICAgIGxldCByZXNwb25zZTpib29sZWFuID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICBleHBlY3QocmVzcG9uc2UpLnRvQmUodHJ1ZSk7XG4gICAgfSk7XG5cbiAgICB0ZXN0KFwicGVlcnNcIiwgYXN5bmMgKCk9PntcbiAgICAgICAgbGV0IHBlZXJzID0gWydwMScsICdwMiddO1xuICAgICAgICBsZXQgcmVzdWx0OlByb21pc2U8QXJyYXk8c3RyaW5nPj4gPSBhZG1pbi5wZWVycygpO1xuICAgICAgICBsZXQgcGF5bG9hZDpvYmplY3QgPSB7XG4gICAgICAgICAgICBcInJlc3VsdFwiOiB7XG4gICAgICAgICAgICAgICAgXCJwZWVyc1wiOiBwZWVyc1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICBkYXRhOiBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgbW9ja0F4aW9zLm1vY2tSZXNwb25zZShyZXNwb25zZU9iaik7XG4gICAgICAgIGxldCByZXNwb25zZTpBcnJheTxzdHJpbmc+ID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRp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ICAgICAgICBkYXRhOiBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgbW9ja0F4aW9zLm1vY2tSZXNwb25zZShyZXNwb25zZU9iaik7XG4gICAgICAgIGxldCByZXNwb25zZTpib29sZWFuID0gYXdhaXQgcmVzdWx0O1xuXG4gICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICBleHBlY3QocmVzcG9uc2UpLnRvQmUodHJ1ZSk7XG4gICAgfSk7XG59KTsiXX0=

@@ -177,3 +177,4 @@ "use strict";

txidx = u.getTxIdx();
let input = new inputs_1.Input(txid, txidx, amount);
let asset = u.getAssetID();
let input = new inputs_1.Input(txid, txidx, amount, asset);
inputs.push(input);

@@ -253,2 +254,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90ZXN0cy9hcGlzL2F2bS9hcGkudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzRUFBd0M7QUFDeEMsNkJBQTZCO0FBQzdCLHdEQUE4RDtBQUM5RCxvREFBZ0U7QUFDaEUsb0NBQStCO0FBQy9CLGtEQUF1QjtBQUN2QixrRUFBMEM7QUFDMUMsOENBQW1EO0FBQ25ELGtEQUEwRjtBQUMxRixnREFBNEM7QUFDNUMsOERBQXFDO0FBRXJDLDhDQUE2QztBQUU3Qzs7R0FFRztBQUNILE1BQU0sUUFBUSxHQUFHLGtCQUFRLENBQUMsV0FBVyxFQUFFLENBQUM7QUFFeEMsUUFBUSxDQUFDLFFBQVEsRUFBRSxHQUFHLEVBQUU7SUFDcEIsTUFBTSxTQUFTLEdBQVUsRUFBRSxDQUFDO0lBQzVCLE1BQU0sWUFBW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zdHJpbmc+O1xuICAgICAgICBsZXQgYWRkcnMzOkFycmF5PHN0cmluZz47XG4gICAgICAgIGxldCB1dHhvczpBcnJheTxVVFhPPjtcbiAgICAgICAgbGV0IGlucHV0czpBcnJheTxJbnB1dD47XG4gICAgICAgIGxldCBvdXRwdXRzOkFycmF5PE91dHB1dD47XG4gICAgICAgIGNvbnN0IGFtbnQ6bnVtYmVyID0gMTAwMDA7XG4gICAgICAgIGxldCBhc3NldElEOkJ1ZmZlciA9IEJ1ZmZlci5mcm9tKGNyZWF0ZUhhc2goXCJzaGEyNTZcIikudXBkYXRlKFwibWFyeSBoYWQgYSBsaXR0bGUgbGFtYlwiKS5kaWdlc3QoKSk7XG4gICAgICAgIFxuICAgICAgICBiZWZvcmVFYWNoKCgpID0+IHtcbiAgICAgICAgICAgIHNldCA9IG5ldyBVVFhPU2V0KCk7XG4gICAgICAgICAgICBhcGkubmV3S2V5Q2hhaW4oKVxuICAgICAgICAgICAga2V5bWdyMiA9IG5ldyBBVk1LZXlDaGFpbigpO1xuICAgICAgICAgICAga2V5bWdyMyA9IG5ldyBBVk1LZXlDaGFpbigpO1xuICAgICAgICAgICAgYWRkcnMxID0gW107XG4gICAgICAgICAgICBhZGRyczIgPSBbXTtcbiAgICAgICAgICAgIGFkZHJzMyA9IFtdO1xuICAgICAgICAgICAgdXR4b3MgPSBbXTtcbiAgICAgICAgICAgIGlucHV0cyA9IFtdO1xuICAgICAgICAgICAgb3V0cHV0cyA9IFtdO1xuXG5cblxuICAgICAgICAgICAgZm9yKGxldCBpOm51bWJlciA9IDA7IGkgPCAzOyBpKyspe1xuICAgICAgICAgICAgICAgIGFkZHJzMS5wdXNoKGFwaS5rZXlDaGFpbigpLm1ha2VLZXkoKSk7XG4gICAgICAgICAgICAgICAgYWRkcnMyLnB1c2goa2V5bWdyMi5tYWtlS2V5KCkpO1xuICAgICAgICAgICAgICAgIGFkZHJzMy5wdXNoKGtleW1ncjMubWFrZUtleSgpKTtcbiAgICAgICAgICA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Ck7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRUYWtlT3JMZWF2ZShhc3NldElELCBhbW91bnQsIGFkZHJlc3NlcywgZmFsbEFkZHJlc3NlcywgbG9ja3RpbWUsIGZhbGxMb2NrdGltZSwgdGhyZXNob2xkLCBmYWxsVGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSBuZXcgT3V0Q3JlYXRlQXNzZXQoYW1vdW50LCBhZGRyZXNzZXMsIGxvY2t0aW1lLCB0aHJlc2hvbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dHMucHVzaChvdXQpO1xuICAgIFxuICAgICAgICAgICAgICAgIGxldCB1OlVUWE8gPSBuZXcgVVRYTygpO1xuICAgICAgICAgICAgICAgIHUuZnJvbUJ1ZmZlcihCdWZmZXIuY29uY2F0KFt0eGlkLCB0eGlkeCwgb3V0LnRvQnVmZmVyKCldKSk7XG4gICAgICAgICAgICAgICAgdXR4b3MucHVzaCh1KTtcbiAgICBcbiAgICAgICAgICAgICAgICB0eGlkID0gdS5nZXRUeElEKCk7XG4gICAgICAgICAgICAgICAgdHhpZHggPSB1LmdldFR4SWR4KCk7XG4gICAgXG4gICAgICAgICAgICAgICAgbGV0IGlucHV0OklucHV0ID0gbmV3IElucHV0KHR4aWQsIHR4aWR4LCBhbW91bnQpO1xuICAgICAgICAgICAgICAgIGlucHV0cy5wdXNoKGlucHV0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNldC5hZGRBcnJheSh1dHhvcyk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRlc3Q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25lZFR4KFxuICAgICAgICAgICAgICAgIG5ldHdvcmtpZCwgYmludG9vbHMuYXZhRGVzZXJpYWxpemUoYmxvY2tjaGFpbmlkKSwgbmV3IEJOKGFtbnQpLCBcbiAgICAgICAgICAgICAgICBhZGRyczMsIGFkZHJzMSwgYWRkcnMxLCBhc3NldElELCBVbml4Tm93KCksIFxuICAgICAgICAgICAgICAgIG5ldyBCTigwKSwgMSwgdW5kZWZpbmVkLCBVbml4Tm93KCksIDFcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGxldCB0eDE6VHggPSBhcGkuc2lnblR4KHR4dTEpO1xuICAgICAgICAgICAgbGV0IHR4MjpUeCA9IGFwaS5zaWduVHgodHh1Mik7XG5cbiAgICAgICAgICAgIGV4cGVjdCh0eDIudG9CdWZmZXIoKS50b1N0cmluZyhcImhleFwiKSkudG9CZSh0eDEudG9CdWZmZXIoKS50b1N0cmluZyhcImhleFwiKSk7XG4gICAgICAgICAgICBleHBlY3QodHgyLnRvU3RyaW5nKCkpLnRvQmUodHgxLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRlc3QoJ2lzc3VlVHggU2VyaWFsaXplZCcsIGFzeW5jICgpPT57XG4gICAgICAgICAgICBsZXQgdHh1OlR4VW5zaWduZWQgPSBhcGkubWFrZVVuc2lnbmVkVHgoc2V0LCBuZXcgQk4oYW1udCksIGFkZHJzMywgYWRkcnMxLCBhZGRyczEsIGJpbnRvb2xzLmF2YVNlcmlhbGl6ZShhc3NldElEKSk7XG4gICAgICAgICAgICBsZXQgdHggPSBhcGkuc2lnblR4KHR4dSk7XG5cbiAgICAgICAgICAgIGxldCB0eGlkOnN0cmluZyA9IFwiZjk2Njc1MGY0Mzg4NjdjM2M5ODI4ZGRjZGJlNjYwZTIxY2NkYmIzNmE5Mjc2OTU4ZjAxMWJhNDcyZjc1ZDRlN1wiO1xuICAgIFxuICAgICAgICAgICAg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HJlc3VsdDpQcm9taXNlPHN0cmluZz4gPSBhcGkuaXNzdWVUeCh0eC50b0J1ZmZlcigpKTtcbiAgICAgICAgICAgIGxldCBwYXlsb2FkOm9iamVjdCA9IHtcbiAgICAgICAgICAgICAgICBcInJlc3VsdFwiOiB7XG4gICAgICAgICAgICAgICAgICAgICd0eElEJzogdHhpZFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICAgICAgZGF0YTogcGF5bG9hZFxuICAgICAgICAgICAgfTtcbiAgICBcbiAgICAgICAgICAgIG1vY2tBeGlvcy5tb2NrUmVzcG9uc2UocmVzcG9uc2VPYmopO1xuICAgICAgICAgICAgbGV0IHJlc3BvbnNlOnN0cmluZyA9IGF3YWl0IHJlc3VsdDtcbiAgICBcbiAgICAgICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICAgICAgZXhwZWN0KHJlc3BvbnNlKS50b0JlKHR4aWQpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0ZXN0KCdpc3N1ZVR4IENsYXNzIFR4JywgYXN5bmMgKCk9PntcbiAgICAgICAgICAgIGxldCB0eHU6VHhVbnNpZ25lZCA9IGFwaS5tYWtlVW5zaWduZWRUeChzZXQsIG5ldyBCTihhbW50KSwgYWRkcnMzLCBhZGRyczEsIGFkZHJzMSwgYmludG9vbHMuYXZhU2VyaWFsaXplKGFzc2V0SUQpKTtcbiAgICAgICAgICAgIGxldCB0eCA9IGFwaS5zaWduVHgodHh1KTtcblxuICAgICAgICAgICAgbGV0IHR4aWQ6c3RyaW5nID0gXCJmOTY2NzUwZjQzODg2N2MzYzk4MjhkZGNkYmU2NjBlMjFjY2RiYjM2YTkyNzY5NThmMDExYmE0NzJmNzVkNGU3XCI7XG4gICAgXG4gICAgICAgICAgICBsZXQgcmVzdWx0OlByb21pc2U8c3RyaW5nPiA9IGFwaS5pc3N1ZVR4KHR4KTtcbiAgICAgICAgICAgIGxldCBwYXlsb2FkOm9iamVjdCA9IHtcbiAgICAgICAgICAgICAgICBcInJlc3VsdFwiOiB7XG4gICAgICAgICAgICAgICAgICAgICd0eElEJzogdHhpZFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBsZXQgcmVzcG9uc2VPYmogPSB7XG4gICAgICAgICAgICAgICAgZGF0YTogcGF5bG9hZFxuICAgICAgICAgICAgfTtcbiAgICBcbiAgICAgICAgICAgIG1vY2tBeGlvcy5tb2NrUmVzcG9uc2UocmVzcG9uc2VPYmopO1xuICAgICAgICAgICAgbGV0IHJlc3BvbnNlOnN0cmluZyA9IGF3YWl0IHJlc3VsdDtcbiAgICBcbiAgICAgICAgICAgIGV4cGVjdChtb2NrQXhpb3MucmVxdWVzdCkudG9IYXZlQmVlbkNhbGxlZFRpbWVzKDEpO1xuICAgICAgICAgICAgZXhwZWN0KHJlc3BvbnNlKS50b0JlKHR4aWQpO1xuICAgICAgICB9KTtcblxuICAgIH0pO1xuICAgIFxuXG59KTsiXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90ZXN0cy9hcGlzL2F2bS9hcGkudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzRUFBd0M7QUFDeEMsNkJBQTZCO0FBQzdCLHdEQUE4RDtBQUM5RCxvREFBZ0U7QUFDaEUsb0NBQStCO0FBQy9CLGtEQUF1QjtBQUN2QixrRUFBMEM7QUFDMUMsOENBQW1EO0FBQ25ELGtEQUEwRjtBQUMxRixnREFBNEM7QUFDNUMsOERBQXFDO0FBRXJDLDhDQUE2QztBQUU3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0pO1xuXG4gICAgZGVzY3JpYmUoJ1RyYW5zYWN0aW9ucycsICgpID0+IHtcbiAgICAgICAgbGV0IHNldDpVVFhPU2V0O1xuICAgICAgICBsZXQga2V5bWdyMjpBVk1LZXlDaGFpbjtcbiAgICAgICAgbGV0IGtleW1ncjM6QVZNS2V5Q2hhaW47XG4gICAgICAgIGxldCBhZGRyczE6QXJyYXk8c3RyaW5nPjtcbiAgICAgICAgbGV0IGFkZHJzMjpBcnJheTxzdHJpbmc+O1xuICAgICAgICBsZXQgYWRkcnMzOkFycmF5PHN0cmluZz47XG4gICAgICAgIGxldCB1dHhvczpBcnJheTxVVFhPPjtcbiAgICAgICAgbGV0IGlucHV0czpBcnJheTxJbnB1dD47XG4gICAgICAgIGxldCBvdXRwdXRzOkFycmF5PE91dHB1dD47XG4gICAgICAgIGNvbnN0IGFtbnQ6bnVtYmVyID0gMTAwMDA7XG4gICAgICAgIGxldCBhc3NldElEOkJ1ZmZlciA9IEJ1ZmZlci5mcm9tKGNyZWF0ZUhhc2goXCJzaGEyNTZcIikudXBkYXRlKFwibWFyeSBoYWQgYSBsaXR0bGUgbGFtYlwiKS5kaWdlc3QoKSk7XG4gICAgICAgIFxuICAgICAgICBiZWZvcmVFYWNoKCgpID0+IHtcbiAgICAgICAgICAgIHNldCA9IG5ldyBVVFhPU2V0KCk7XG4gICAgICAgICAgICBhcGkubmV3S2V5Q2hhaW4oKVxuICAgICAgICAgICAga2V5bWdyMiA9IG5ldyBBVk1LZXlDaGFpbigpO1xuICAgICAgICAgICAga2V5bWdyMyA9IG5ldyBBVk1LZXlDaGFpbigpO1xuICAgICAgICAgICAgYWRkcnMxID0gW107XG4gICAgICAgICAgICBhZGRyczIgPSBbXTtcbiAgICAgICAgICAgIGFkZHJzMyA9IFtdO1xuICAgICAgICAgICAgdXR4b3MgPSBbXTtcbiAgICAgICAgICAgIGlucHV0cyA9IFtdO1xuICAgICAgICAgICAgb3V0cHV0cyA9IFtdO1xuXG5cblxuICAgICAgIC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J1ZmZlcihuZXcgQk4oaSksIDQpKTtcbiAgICAgICAgICAgICAgICBsZXQgb3V0Ok91dHB1dDtcbiAgICAgICAgICAgICAgICBzd2l0Y2goaSAlIDMpe1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSBuZXcgT3V0UGF5bWVudChhc3NldElELCBhbW91bnQsIGFkZHJlc3NlcywgbG9ja3RpbWUsIHRocmVzaG9sZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRUYWtlT3JMZWF2ZShhc3NldElELCBhbW91bnQsIGFkZHJlc3NlcywgZmFsbEFkZHJlc3NlcywgbG9ja3RpbWUsIGZhbGxMb2NrdGltZSwgdGhyZXNob2xkLCBmYWxsVGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSBuZXcgT3V0Q3JlYXRlQXNzZXQoYW1vdW50LCBhZGRyZXNzZXMsIGxvY2t0aW1lLCB0aHJlc2hvbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dHMucHVzaChvdXQpO1xuICAgIFxuICAgICAgICAgICAgICAgIGxldCB1OlVUWE8gPSBuZXcgVVRYTygpO1xuICAgICAgICAgICAgICAgIHUuZnJvbUJ1ZmZlcihCdWZmZXIuY29uY2F0KFt0eGlkLCB0eGlkeCwgb3V0LnRvQnVmZmVyKCldKSk7XG4gICAgICAgICAgICAgICAgdXR4b3MucHVzaCh1KTtcbiAgICBcbiAgICAgICAgICAgICAgICB0eGlkID0gdS5nZXRUeElEKCk7XG4gICAgICAgICAgICAgICAgdHhpZHggPSB1LmdldFR4SWR4KCk7XG4gICAgICAgICAgICAgICAgbGV0IGFzc2V0ID0gdS5nZXRBc3NldElEKCk7XG4gICAgXG4gICAgICAgICAgICAgICAgbGV0IGlucHV0OklucHV0ID0gbmV3IElucHV0KHR4aWQsIHR4aWR4LCBhbW91bnQsIGFzc2V0KTtcbiAgICAgICAgICAgICAgICBpbnB1dHMucHVzaChpbnB1dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzZXQuYWRkQXJyYXkodXR4b3MpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0ZXN0KCdtYWtlVW5zaWduZWRUeCcsICgpID0+IHtcbiAgICBcbiAgICAgICAgICAgIGxldCB0eHUxOlR4VW5zaWduZWQgPSBhcGkubWFrZVVuc2lnbmVkVHgoc2V0LCBuZXcgQk4oYW1udCksIGFkZHJzMywgYWRkcnMxLCBhZGRyczEsIGJpbnRvb2xzLmF2YVNlcmlhbGl6ZShhc3NldElEKSk7XG4gICAgICAgICAgICBsZXQgdHh1MjpUeFVuc2lnbmVkID0gc2V0Lm1ha2VVbnNpZ25lZFR4KFxuICAgICAgICAgICAgICAgIG5ldHdvcmtpZCwgYmludG9vbHMuYXZhRGVzZXJpYWxpemUoYmxvY2tjaGFpbmlkKSwgbmV3IEJOKGFtbnQpLCBcbiAgICAgICAgICAgICAgICBhZGRyczMsIGFkZHJzMSwgYWRkcnMxLCBhc3NldElELCBcbiAgICAgICAgICAgICAgICBVbml4Tm93KCksIG5ldyBCTigwKSwgMSwgdW5kZWZpbmVkLCBVbml4Tm93KCksIDFcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGV4cGVjdCh0eHUyLnRvQnVmZmVyKCkudG9TdHJpbmcoXCJoZXhcIikpLnRvQmUodHh1MS50b0J1ZmZlcigpLnRvU3RyaW5nKFwiaGV4XCIpKTtcbiAgICAgICAgICAgIGV4cGVjdCh0eHUyLnRvU3RyaW5nKCkpLnRvQmUodHh1MS50b1N0cmluZygpKTtcbiAgICAgICAgICAgIFxuICAgICAgICB9KTtcblxuICAgICAgICB0ZXN0KCdzaWduVHgnLCAoKSA9PiB7XG4gICAgICAgICAgICBsZXQgdHh1MTpUeFVuc2lnbmVkID0gYXBpLm1ha2VVbnNpZ25lZFR4KHNldCwgbmV3IEJOKGFtbnQpLCBhZGRyczMsIGFkZHJzMSwgYWRkcnMxLCBiaW50b29scy5hdmFTZXJpYWxpemUoYXNzZXRJRCkpO1xuICAgICAgICAgICAgbGV0IHR4dTI6VHhVbnNpZ25lZCA9IHNldC5tYWtlVW5zaWduZWRUeChcbiAgICAgICAgICAgICAgICBuZXR3b3JraWQsIGJpbnRvb2xzLmF2YURlc2VyaWFsaXplKGJsb2NrY2hhaW5pZCksIG5ldyBCTihhbW50KSwgXG4gICAgICAgICAgICAgICAgYWRkcnMzLCBhZGRyczEsIGFkZHJzMSwgYXNzZXRJRCwgVW5peE5vdygpLCBcbiAgICAgICAgICAgICAgICBuZXcgQk4oMCksIDEsIHVuZGVmaW5lZCwgVW5peE5vdygpLCAxXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBsZXQgdHgxOlR4ID0gYXBpLnNpZ25UeCh0eHUxKTtcbiAgICAgICAgICAgIGxldCB0eDI6VHggPSBhcGkuc2lnblR4KHR4dTIpO1xuXG4gICAgICAgICAgICBleHBlY3QodHgyLnRvQnVmZmVyKCkudG9TdHJpbmcoXCJoZXhcIikpLnRvQmUodHgxLnRvQnVmZmVyKCkudG9TdHJpbmcoXCJoZXhcIikpO1xuICAgICAgICAgICAgZXhwZWN0KHR4Mi50b1N0cmluZygpKS50b0JlKHR4MS50b1N0cmluZygpKTtcbiAgICAgICAgICAgIFxuICAgICAgICB9KTtcblxuICAgICAgICB0ZXN0KCdpc3N1ZVR4IFNlcmlhbGl6ZWQnLCBhc3luYyAoKT0+e1xuICAgICAgICAgICAgbGV0IHR4dTpUeFVuc2lnbmVkID0gYXBpLm1ha2VVb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c2lnbmVkVHgoc2V0LCBuZXcgQk4oYW1udCksIGFkZHJzMywgYWRkcnMxLCBhZGRyczEsIGJpbnRvb2xzLmF2YVNlcmlhbGl6ZShhc3NldElEKSk7XG4gICAgICAgICAgICBsZXQgdHggPSBhcGkuc2lnblR4KHR4dSk7XG5cbiAgICAgICAgICAgIGxldCB0eGlkOnN0cmluZyA9IFwiZjk2Njc1MGY0Mzg4NjdjM2M5ODI4ZGRjZGJlNjYwZTIxY2NkYmIzNmE5Mjc2OTU4ZjAxMWJhNDcyZjc1ZDRlN1wiO1xuICAgIFxuICAgICAgICAgICAgbGV0IHJlc3VsdDpQcm9taXNlPHN0cmluZz4gPSBhcGkuaXNzdWVUeCh0eCk7XG4gICAgICAgICAgICBsZXQgcGF5bG9hZDpvYmplY3QgPSB7XG4gICAgICAgICAgICAgICAgXCJyZXN1bHRcIjoge1xuICAgICAgICAgICAgICAgICAgICAndHhJRCc6IHR4aWRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgbGV0IHJlc3BvbnNlT2JqID0ge1xuICAgICAgICAgICAgICAgIGRhdGE6IHBheWxvYWRcbiAgICAgICAgICAgIH07XG4gICAgXG4gICAgICAgICAgICBtb2NrQXhpb3MubW9ja1Jlc3BvbnNlKHJlc3BvbnNlT2JqKTtcbiAgICAgICAgICAgIGxldCByZXNwb25zZTpzdHJpbmcgPSBhd2FpdCByZXN1bHQ7XG4gICAgXG4gICAgICAgICAgICBleHBlY3QobW9ja0F4aW9zLnJlcXVlc3QpLnRvSGF2ZUJlZW5DYWxsZWRUaW1lcygxKTtcbiAgICAgICAgICAgIGV4cGVjdChyZXNwb25zZSkudG9CZSh0eGlkKTtcbiAgICAgICAgfSk7XG5cbiAgICB9KTtcbiAgICBcblxufSk7Il19

@@ -75,3 +75,4 @@ "use strict";

txidx = u.getTxIdx();
input = new inputs_1.Input(txid, txidx, amount);
let asset = u.getAssetID();
input = new inputs_1.Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -95,3 +96,4 @@ expect(input.getInputType()).toBe(0);

txidx = u.getTxIdx();
input = new inputs_1.Input(txid, txidx, amount);
let asset = u.getAssetID();
input = new inputs_1.Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -115,3 +117,4 @@ expect(input.getInputType()).toBe(0);

txidx = u.getTxIdx();
input = new inputs_1.Input(txid, txidx, amount);
let asset = u.getAssetID();
input = new inputs_1.Input(txid, txidx, amount, asset);
expect(input.getUTXOID()).toBe(u.getUTXOID());

@@ -127,5 +130,5 @@ expect(input.getInputType()).toBe(0);

test('comparitor', () => {
let in1 = new inputs_1.Input(utxos[0].getTxID(), utxos[0].getTxIdx(), utxos[0].getAmount());
let in2 = new inputs_1.Input(utxos[1].getTxID(), utxos[1].getTxIdx(), utxos[1].getAmount());
let in3 = new inputs_1.Input(utxos[2].getTxID(), utxos[2].getTxIdx(), utxos[2].getAmount());
let in1 = new inputs_1.Input(utxos[0].getTxID(), utxos[0].getTxIdx(), utxos[0].getAmount(), utxos[0].getAssetID());
let in2 = new inputs_1.Input(utxos[1].getTxID(), utxos[1].getTxIdx(), utxos[1].getAmount(), utxos[1].getAssetID());
let in3 = new inputs_1.Input(utxos[2].getTxID(), utxos[2].getTxIdx(), utxos[2].getAmount(), utxos[2].getAssetID());
let cmp = inputs_1.Input.comparitor();

@@ -139,2 +142,2 @@ expect(cmp(in1, in2)).toBe(-1);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXRzLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90ZXN0cy9hcGlzL2F2bS9pbnB1dHMudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDhDQUFtRDtBQUNuRCxvREFBb0Q7QUFDcEQsZ0RBQTRDO0FBQzVDLDhEQUF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uZnJvbShiaW50b29scy5mcm9tQk5Ub0J1ZmZlcihuZXcgQk4oaSksIDQpKTtcbiAgICAgICAgICAgIGxldCBhc3NldElEOkJ1ZmZlciA9IEJ1ZmZlci5mcm9tKGNyZWF0ZUhhc2goXCJzaGEyNTZcIikudXBkYXRlKHR4aWQpLmRpZ2VzdCgpKTtcbiAgICAgICAgICAgIGxldCBvdXQ6T3V0cHV0O1xuICAgICAgICAgICAgc3dpdGNoKGkgJSAzKXtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRQYXltZW50KGFzc2V0SUQsIGFtb3VudCwgYWRkcmVzc2VzLCBsb2NrdGltZSwgdGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7IFxuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gbmV3IE91dFRha2VPckxlYXZlKGFzc2V0SUQsIGFtb3VudCwgYWRkcmVzc2VzLCBmYWxsQWRkcmVzc2VzLCBsb2NrdGltZSwgZmFsbExvY2t0aW1lLCB0aHJlc2hvbGQsIGZhbGxUaHJlc2hvbGQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRDcmVhdGVBc3NldChhbW91bnQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxldCB1OlVUWE8gPSBuZXcgVVRYTygpO1xuICAgICAgICAgICAgdS5mcm9tQnVmZmVyKEJ1ZmZlci5jb25jYXQoW3R4aWQsIHR4aWR4LCBvdXQudG9CdWZmZXIoKV0pKTtcbiAgICAgICAgICAgIHV0eG9zLnB1c2godSk7XG4gICAgICAgIH1cbiAgICAgICAgc2V0LmFkZEFycmF5KHV0eG9zKTtcbiAgICB9KTtcbiAgICB0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AgICAgICAgZm9yKGxldCBpOm51bWJlciA9IDA7IGkgPCA1OyBpKyspe1xuICAgICAgICAgICAgbGV0IHR4aWQ6QnVmZmVyID0gQnVmZmVyLmZyb20oY3JlYXRlSGFzaChcInNoYTI1NlwiKS51cGRhdGUoYmludG9vbHMuZnJvbUJOVG9CdWZmZXIobmV3IEJOKGkpLCAzMikpLmRpZ2VzdCgpKTtcbiAgICAgICAgICAgIGxldCB0eGlkeDpCdWZmZXIgPSBCdWZmZXIuZnJvbShiaW50b29scy5mcm9tQk5Ub0J1ZmZlcihuZXcgQk4oaSksIDQpKTtcbiAgICAgICAgICAgIGxldCBhc3NldElEOkJ1ZmZlciA9IEJ1ZmZlci5mcm9tKGNyZWF0ZUhhc2goXCJzaGEyNTZcIikudXBkYXRlKHR4aWQpLmRpZ2VzdCgpKTtcbiAgICAgICAgICAgIGxldCBvdXQ6T3V0cHV0O1xuICAgICAgICAgICAgc3dpdGNoKGkgJSAzKXtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRQYXltZW50KGFzc2V0SUQsIGFtb3VudCwgYWRkcmVzc2VzLCBsb2NrdGltZSwgdGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7IFxuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gbmV3IE91dFRha2VPckxlYXZlKGFzc2V0SUQsIGFtb3VudCwgYWRkcmVzc2VzLCBmYWxsQWRkcmVzc2VzLCBsb2NrdGltZSwgZmFsbExvY2t0aW1lLCB0aHJlc2hvbGQsIGZhbGxUaHJlc2hvbGQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRDcmVhdGVBc3NldChhbW91bnQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAg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ICAgICBleHBlY3QoY21wKGluMiwgaW4yKSkudG9CZSgwKTtcbiAgICAgICAgZXhwZWN0KGNtcChpbjMsIGluMykpLnRvQmUoMCk7XG4gICAgfSk7XG5cbn0pOyJdfQ==

@@ -120,3 +120,3 @@ "use strict";

expect(out.getLocktime().toNumber()).toBe(locktime.toNumber());
expect(out.getAssetID().toString("hex")).toBe("00");
expect(out.getAssetID()).toBeUndefined();
let r = out.getAddressIdx(addrs[2]);

@@ -142,2 +142,2 @@ expect(out.getAddress(...r)).toBe(addrs[2]);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0cy50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vdGVzdHMvYXBpcy9hdm0vb3V0cHV0cy50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsa0RBQXVCO0FBQ3ZCLG9DQUErQjtBQUMvQixrRUFBMEM7QUFDMUMsa0RBQTZHO0FBRTdHLE1BQU0sUUFBUSxHQUFHLGtCQUFRLENBQUMsV0FBVyxFQUFFLENBQUM7QUFFeEMsUUFBUSxDQUFDLFNBQVMsRUFBRSxHQUFHLEVBQUU7SUFDckIsSUFBSSxPQUFPLEdBQVUsa0VBQWtFLENBQUM7SUFDeEYsSUFBSSxXQUFXLEdBQVUsZUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDckQsSUFBSSxLQUFLLEdBQWlCO1FBQ3RCLG1DQUFtQztRQUNuQyxtQ0FBbUM7UUFDbkMsbUNBQW1DO0tBQ3RDLENBQUMsSUFBSSxFQUFFLENBQUM7SUFFVCxJQUFJLFFBQVEsR0FBTSxJQUFJLGVBQUUsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUNoQyxJQUFJLE9BQU8sR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLEN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XG4gICAgICAgIGV4cGVjdChKU09OLnN0cmluZ2lmeShPYmplY3Qua2V5cyhvdXQuZ2V0QWRkcmVzc2VzKCkpLnNvcnQoKSkpLnRvQmUoSlNPTi5zdHJpbmdpZnkoYWRkcnMuc29ydCgpKSk7XG4gICAgICAgIFxuICAgICAgICBleHBlY3Qob3V0LmdldEFkZHJlc3NlcygpW2FkZHJzWzFdXS50b051bWJlcigpKS50b0JlKGxvY2t0aW1lLnRvTnVtYmVyKCkpO1xuICAgICAgICBleHBlY3Qob3V0LmdldEFkZHJlc3NlcygpW2FkZHJzWzJdXS50b051bWJlcigpKS50b0JlKGZhbGxMb2NrdGltZS50b051bWJlcigpKTtcbiAgICAgICAgZXhwZWN0KG91dC5nZXRBZGRyZXNzZXMoKVthZGRyc1swXV0udG9OdW1iZXIoKSkudG9CZShsb2NrdGltZS50b051bWJlcigpKTtcblxuICAgICAgICBleHBlY3Qob3V0LmdldFRocmVzaG9sZCgpKS50b0JlKDIpO1xuICAgICAgICBleHBlY3Qob3V0LmdldExvY2t0aW1lKCkudG9OdW1iZXIoKSkudG9CZShsb2NrdGltZS50b051bWJlcigpKTtcblxuICAgICAgICBleHBlY3Qob3V0LmdldEZhbGxUaHJlc2hvbGQoKSkudG9CZSgxKTtcbiAgICAgICAgZXhwZWN0KG91dC5nZXRGYWxsTG9ja3RpbWUoKS50b051bWJlcigpKS50b0JlKGZhbGxMb2NrdGltZS50b051bWJlcigpKTtcblxuICAgICAgICBleHBlY3Qob3V0LmdldEFzc2V0SUQoKS50b1N0cmluZyhcImhleFwiKSkudG9CZShhc3NldElEKTtcblxuICAgICAgICBsZXQgciA9IG91dC5nZXRBZGRyZXNzSWR4KGFkZHJzWzJdKTtcbiAgICAgICAgZXhwZWN0KG91dC5nZXRBZGRyZXNzKC4uLnIpKS50b0JlKGFkZHJzWzJdKTtcbiAgICAgICAgZXhwZWN0KCgpID0+IHtcbiAgICAgICAgICAgIG91dC5nZXRBZGRyZXNzKDQwMCwgZmFsc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KSA9PiB7XG4gICAgICAgICAgICBvdXQuZ2V0QWRkcmVzcyg0MDAsIGZhbHNlKVxuICAgICAgICB9KS50b1Rocm93KCk7XG5cbiAgICAgICAgZXhwZWN0KG91dC5nZXRBbW91bnQoKS50b051bWJlcigpKS50b0JlKDEwMDAwKTtcblxuICAgICAgICBsZXQgYjpCdWZmZXIgPSBvdXQudG9CdWZmZXIoKTtcbiAgICAgICAgZXhwZWN0KG91dC50b1N0cmluZygpKS50b0JlKGJpbnRvb2xzLmJ1ZmZlclRvQjU4KGIpKTtcblxuICAgICAgICBsZXQgczpBcnJheTxzdHJpbmc+ID0gb3V0LmdldFNwZW5kZXJzKGFkZHJzKTtcbiAgICAgICAgZXhwZWN0KEpTT04uc3RyaW5naWZ5KHMuc29ydCgpKSkudG9CZShKU09OLnN0cmluZ2lmeShhZGRycy5zb3J0KCkpKTtcblxuICAgICAgICBsZXQgbTE6Ym9vbGVhbiA9IG91dC5tZWV0c1RocmVzaG9sZChbYWRkcnNbMF1dKTtcbiAgICAgICAgZXhwZWN0KG0xKS50b0JlKGZhbHNlKTtcbiAgICAgICAgbGV0IG0yOmJvb2xlYW4gPSBvdXQubWVldHNUaHJlc2hvbGQoYWRkcnMsIG5ldyBCTigxMDApKTtcbiAgICAgICAgZXhwZWN0KG0yKS50b0JlKGZhbHNlKTtcbiAgICAgICAgbGV0IG0zOmJvb2xlYW4gPSBvdXQubWVldHNUaHJlc2hvbGQoYWRkcnMpO1xuICAgICAgICBleHBlY3QobTMpLnRvQmUodHJ1ZSk7XG4gICAgICAgIGxldCBtNDpib29sZWFuID0gb3V0Lm1lZXRzVGhyZXNob2xkKGFkZHJzLCBsb2NrdGltZS5hZGQobmV3IEJOKDEwMCkpKTtcbiAgICAgICAgZXhwZWN0KG00KS50b0JlKHRydWUpO1xuICAgIH0pO1xufSk7Il19

@@ -79,3 +79,4 @@ "use strict";

txidx = u.getTxIdx();
let input = new inputs_1.Input(txid, txidx, amount);
let asset = u.getAssetID();
let input = new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rdGltZSwgdGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7IFxuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gbmV3IE91dFRha2VPckxlYXZlKGFzc2V0SUQsIGFtb3VudCwgYWRkcmVzc2VzLCBmYWxsQWRkcmVzc2VzLCBsb2NrdGltZSwgZmFsbExvY2t0aW1lLCB0aHJlc2hvbGQsIGZhbGxUaHJlc2hvbGQpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIG91dCA9IG5ldyBPdXRDcmVhdGVBc3NldChhbW91bnQsIGFkZHJlc3NlcywgbG9ja3RpbWUsIHRocmVzaG9sZCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb3V0cHV0cy5wdXNoKG91dCk7XG5cbiAgICAgICAgICAgIGxldCB1OlVUWE8gPSBuZXcgVVRYTygpO1xuICAgICAgICAgICAgdS5mcm9tQnVmZmVyKEJ1ZmZlci5jb25jYXQoW3R4aWQsIHR4aWR4LCBvdXQudG9CdWZmZXIoKV0pKTtcbiAgICAgICAgICAgIHV0eG9zLnB1c2godSk7XG5cbiAgICAgICAgICAgIHR4aWQgPSB1LmdldFR4SUQoKTtcbiAgICAgICAgICAgIHR4aWR4ID0gdS5nZXRUeElkeCgpO1xuXG4gICAgICAgICAgICBsZXQgaW5wdXQ6SW5wdXQgPSBuZXcgSW5wdXQodHhpZCwgdHhpZHgsIGFtb3VudCk7XG4gICAgICAgICAgICBpbnB1dHMucHVzaChpbnB1dCk7XG4gICAgICAgIH1cbiAgICAgICAgc2V0LmFkZEFycmF5KHV0eG9zKTtcbiAgICB9KTtcblxuICAgIHRlc3QoJ0NyZWF0aW9uIFR4VW5zaWduZWQnLCAoKSA9PiB7XG4gICAgICAgIGxldCB0eHU6VHhVbn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Om51bWJlciA9IDA7IGkgPCB0eG91dHMubGVuZ3RoOyBpKyspe1xuICAgICAgICAgICAgYS5wdXNoKHR4b3V0c1tpXS50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGIucHVzaChvdXRwdXRzW2ldLnRvU3RyaW5nKCkpO1xuICAgICAgICB9XG4gICAgICAgIGV4cGVjdChKU09OLnN0cmluZ2lmeShhLnNvcnQoKSkpLnRvQmUoSlNPTi5zdHJpbmdpZnkoYi5zb3J0KCkpKTtcblxuICAgICAgICBsZXQgdHh1bmV3OlR4VW5zaWduZWQgPSBuZXcgVHhVbnNpZ25lZCgpO1xuICAgICAgICB0eHVuZXcuZnJvbUJ1ZmZlcih0eHUudG9CdWZmZXIoKSk7XG4gICAgICAgIGV4cGVjdCh0eHVuZXcudG9CdWZmZXIoKS50b1N0cmluZyhcImhleFwiKSkudG9CZSh0eHUudG9CdWZmZXIoKS50b1N0cmluZyhcImhleFwiKSk7XG4gICAgICAgIGV4cGVjdCh0eHVuZXcudG9TdHJpbmcoKSkudG9CZSh0eHUudG9TdHJpbmcoKSk7XG4gICAgfSk7XG5cbiAgICB0ZXN0KCdDcmVhdGlvbiBUeFVuc2lnbmVkIENoZWNrIEFtb3VudCcsICgpID0+IHtcbiAgICAgICAgZXhwZWN0KCgpID0+IHtcbiAgICAgICAgICAgIHNldC5tYWtlVW5zaWduZWRUeChcbiAgICAgICAgICAgICAgICBuZXRpZCwgYmxvY2tjaGFpbklELFxuICAgICAgICAgICAgICAgIG5ldyBCTihhbW50ICogMTAwMCksIFxuICAgICAgICAgICAgICAgIGFkZHJzMywgYWRkcnMxLCBhZGRyczEsIGFzc2V0SURcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0pLnRvVGhyb3coKTtcbiAgICB9KTtcblxuICAgIHRlc3QoJ0NyZWF0aW9uIFR4MScsICgpID0+IHtcbiAgICAgICAgbGV0IHR4dTpUeFVuc2lnbmVkID0gc2V0Lm1ha2VVbnNpZ25lZFR4KFxuICAgICAgICAgICAgbmV0aWQsIGJsb2NrY2hhaW5JRCxcbiAgICAgICAgICAgIG5ldyBCTig5MDAwKSwgXG4gICAgICAgICAgICBhZGRyczMsIGFkZHJzMSwgYWRkcnMxLCBhc3NldElELCBcbiAgICAgICAgICAgIFVuaXhOb3coKSwgVW5peE5vdygpLmFkZChuZXcgQk4oNTApKSwgMywgXG4gICAgICAgICAgICBhZGRyczIsIFVuaXhOb3coKS5hZGQobmV3IEJOKDEwMCkpLCAyXG4gICAgICAgICk7XG4gICAgICAgIGxldCB0eDpUeCA9IGtleW1ncjEuc2lnblR4KHR4dSk7XG4gICAgICAgIGxldCB0eDI6VHggPSBuZXcgVHgoKTtcbiAgICAgICAgdHgyLmZyb21TdHJpbmcodHgudG9TdHJpbmcoKSk7XG4gICAgICAgIGV4cGVjdCh0eDIudG9CdWZmZXIoKS50b1N0cmluZyhcImhleFwiKSkudG9CZSh0eC50b0J1ZmZlcigpLnRvU3RyaW5nKFwiaGV4XCIpKTtcbiAgICAgICAgZXhwZWN0KHR4Mi50b1N0cmluZygpKS50b0JlKHR4LnRvU3RyaW5nKCkpO1xuICAgIH0pO1xuICAgIHRlc3QoJ0NyZWF0aW9uIFR4MicsICgpID0+IHtcbiAgICAgICAgbGV0IHR4dTpUeFVuc2lnbmVkID0gc2V0Lm1ha2VVbnNpZ25lZFR4KFxuICAgICAgICAgICAgbmV0aWQsIGJsb2NrY2hhaW5JRCxcbiAgICAgICAgICAgIG5ldyBCTig5MDAwKSwgXG4gICAgICAgICAgICBhZGRyczMsIGFkZHJzMSwgYWRkcnMxLCBhc3NldElEXG4gICAgICAgICk7XG4gICAgICAgIGxldCB0eDpUeCA9IGtleW1ncjEuc2lnblR4KHR4dSk7XG4gICAgICAgIGxldCB0eDI6VHggPSBuZXcgVHgoKTtcbiAgICAgICAgdHgyLmZyb21TdHJpbmcodHgudG9TdHJpbmcoKSk7XG4gICAgICAgIGV4cGVjdCh0eDIudG9CdWZmZXIoKS50b1N0cmluZyhcImhleF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1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gbmV3IE91dENyZWF0ZUFzc2V0KGFtb3VudCwgYWRkcmVzc2VzLCBsb2NrdGltZSwgdGhyZXNob2xkKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvdXRwdXRzLnB1c2gob3V0KTtcblxuICAgICAgICAgICAgbGV0IHU6VVRYTyA9IG5ldyBVVFhPKCk7XG4gICAgICAgICAgICB1LmZyb21CdWZmZXIoQnVmZmVyLmNvbmNhdChbdHhpZCwgdHhpZHgsIG91dC50b0J1ZmZlcigpXSkpO1xuICAgICAgICAgICAgdXR4b3MucHVzaCh1KTtcblxuICAgICAgICAgICAgdHhpZCA9IHUuZ2V0VHhJRCgpO1xuICAgICAgICAgICAgdHhpZHggPSB1LmdldFR4SWR4KCk7XG4gICAgICAgICAgICBsZXQgYXNzZXQgPSB1LmdldEFzc2V0SUQoKTtcblxuICAgICAgICAgICAgbGV0IGlucHV0OklucHV0ID0gbmV3IElucHV0KHR4aWQsIHR4aWR4LCBhbW91bnQsIGFzc2V0KTtcbiAgICAgICAgICAgIGlucHV0cy5wdXNoKGlucHV0KTtcbiAgICAgICAgfVxuICAgICAgICBzZXQuYWRkQXJyYXkodXR4b3MpO1xuICAgIH0pO1xuXG4gICAgdGVzdCgnQ3JlYXRpb24gVHhVbnNpZ25lZCcsICgpID0+IHtcbiAgICAgICAgbGV0IHR4dTpUeFVuc2lnbmVkID0gbmV3IFR4VW5zaWduZWQoaW5wdXRzLCBvdXRwdXRzLCBuZXRpZCwgYmxvY2tjaGFpbklELCA5OSk7XG4gICAgICAgIGxldCB0eGluczpBcnJheTxJbnB1dD4gID0gdHh1LmdldElucygpO1xuICAgICAgICBsZXQgdHhvdXRzOkFycmF5PE91dHB1dD4gPSB0eHUuZ2V0T3V0cygpO1xuICAgICAgICBleHBlY3QodHhpbnMubGVuZ3RoKS50b0JlKGlucHV0cy5sZW5ndGgpO1xuICAgICAgICBleHBlY3QodHhvdXRzLmxlbmd0aCkudG9CZShvdXRwdXRzLmxlbmd0aCk7XG4gICAgICAgIFxuICAgICAgICBleHBlY3QodHh1LmdldENvZGVjKCkpLnRvQmUoOTkpO1xuICAgICAgICBleHBlY3QodHh1LmdldE5ldHdvcmtJRCgpKS50b0JlKDQ5KTtcbiAgICAgICAgZXhwZWN0KHR4dS5nZXRCbG9ja2NoYWluSUQoKS50b1N0cmluZyhcImhleFwiKSkudG9CZShibG9ja2NoYWluSUQudG9TdHJpbmcoXCJoZXhcIikpO1xuICAgICAgICBcbiAgICAgICAgbGV0IGE6QXJyYXk8c3RyaW5nPiA9IFtdO1xuICAgICAgICBsZXQgYjpBcnJheTxzdHJpbmc+ID0gW107XG4gICAgICAgIGZvcihsZXQgaTpudW1iZXIgPSAwOyBpIDwgdHhpbnMubGVuZ3RoOyBpKyspe1xuICAgICAgICAgICAgYS5wdXNoKHR4aW5zW2ldLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgYi5wdXNoKGlucHV0c1tpXS50b1N0cmluZygpKTtcbiAgICAgICAgfVxuICAgICAgICBleHBlY3QoSlNPTi5zdHJpbmdpZnkoYS5zb3J0KCkpKS50b0JlKEpTT04uc3RyaW5naWZ5KGIuc29ydCgpKSk7XG4gICAgICAgIFxuICAgICAgICBhID0gW107XG4gICAgICAgIGIgPSBbXTtcblxuICAgICAgICBmb3IobGV0IGk6bnVtYmVyID0gMDsgaSA8IHR4b3V0cy5sZW5ndGg7IGkrKyl7XG4gICAgICAgICAgICBhLnB1c2godHhvdXRzW2ldLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgYi5wdXNoKG91dHB1dHNbaV0udG9TdHJpbmcoKSk7XG4gICAgICAgIH1cbiAgICAgICAgZXhwZWN0KEpTT04uc3RyaW5naWZ5KGEuc29ydCgpKSkudG9CZShKU09OLnN0cmluZ2lmeShiLnNvcnQoKSkpO1xuXG4gIC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AgICAgICBuZXRpZCwgYmxvY2tjaGFpbklELFxuICAgICAgICAgICAgbmV3IEJOKDkwMDApLCBcbiAgICAgICAgICAgIGFkZHJzMywgYWRkcnMxLCBhZGRyczFcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IHR4OlR4ID0ga2V5bWdyMS5zaWduVHgodHh1KTtcbiAgICAgICAgbGV0IHR4MjpUeCA9IG5ldyBUeCgpO1xuICAgICAgICB0eDIuZnJvbVN0cmluZyh0eC50b1N0cmluZygpKTtcbiAgICAgICAgZXhwZWN0KHR4Mi50b0J1ZmZlcigpLnRvU3RyaW5nKFwiaGV4XCIpKS50b0JlKHR4LnRvQnVmZmVyKCkudG9TdHJpbmcoXCJoZXhcIikpO1xuICAgICAgICBleHBlY3QodHgyLnRvU3RyaW5nKCkpLnRvQmUodHgudG9TdHJpbmcoKSk7XG4gICAgfSk7XG59KTtcbiAgICAiXX0=

@@ -40,2 +40,7 @@ "use strict";

expect(slopes.getURL()).toBe(`${protocol}://${ip}:${port}`);
expect(slopes.getNetworkID()).toBe(49);
slopes.setNetworkID(50);
expect(slopes.getNetworkID()).toBe(50);
slopes.setNetworkID(49);
expect(slopes.getNetworkID()).toBe(49);
});

@@ -169,2 +174,2 @@ test('Endpoints correct', () => {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xvcGVzLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90ZXN0cy9zbG9wZXMudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLHNFQUF3QztBQUN4Qyw2QkFBNkI7QUFDN0IsMkRBQXVDO0FBQ3ZDLDZEQUEyQztBQUMzQyxnRUFBaUQ7QUFDakQsZ0VBQWlEO0FBQ2pELHVDQUFvQztBQUtwQyxRQUFRLENBQUMsUUFBUSxFQUFFLEdBQUcsRUFBRTtJQUNwQixNQUFNLFlBQ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BsZXQgcmVzcG9uc2U6b2JqZWN0ID0gYXdhaXQgcmVzdWx0O1xuICAgICAgICBleHBlY3QobW9ja0F4aW9zLnJlcXVlc3QpLnRvSGF2ZUJlZW5DYWxsZWRUaW1lcygxKTtcbiAgICAgICAgZXhwZWN0KHJlc3BvbnNlW1wib3V0cHV0XCJdKS50b0JlKGlucHV0KTtcbiAgICB9KTtcbn0pO1xuIl19

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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