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

@harmony-js/account

Package Overview
Dependencies
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmony-js/account - npm Package Compare versions

Comparing version 0.1.57 to 0.1.58

dist/index.cjs.js

6

dist/hdnode.js

@@ -34,3 +34,5 @@ "use strict";

this.addressCount = addressCount;
this.getHdWallet(menmonic || HDNode.generateMnemonic());
if (menmonic !== null && menmonic !== '') {
this.getHdWallet(menmonic || HDNode.generateMnemonic());
}
this.gasLimit = gasLimit;

@@ -197,3 +199,3 @@ this.gasPrice = gasPrice;

var foundIndex = this.addresses.findIndex(function (value) { return value === address; });
this.addresses.slice(foundIndex, foundIndex + 1);
this.addresses.splice(foundIndex, 1);
this.addresses.unshift(address);

@@ -200,0 +202,0 @@ };

{
"name": "@harmony-js/account",
"version": "0.1.57",
"version": "0.1.58",
"description": "account and wallet for harmony",

@@ -21,10 +21,10 @@ "main": "dist/index.js",

"dependencies": {
"@harmony-js/core": "0.1.57",
"@harmony-js/crypto": "0.1.56",
"@harmony-js/network": "0.1.56",
"@harmony-js/staking": "0.1.56",
"@harmony-js/transaction": "0.1.56",
"@harmony-js/utils": "0.1.56"
"@harmony-js/core": "0.1.58",
"@harmony-js/crypto": "0.1.58",
"@harmony-js/network": "0.1.58",
"@harmony-js/staking": "0.1.58",
"@harmony-js/transaction": "0.1.58",
"@harmony-js/utils": "0.1.58"
},
"gitHead": "99a827782fabcd5f91f025af0d8de228956d42b4"
"gitHead": "5eddd0feb2bfe92c36b194fe0a9ffe40f8173d6c"
}

@@ -99,3 +99,5 @@ /**

this.addressCount = addressCount;
this.getHdWallet(menmonic || HDNode.generateMnemonic());
if (menmonic !== null && menmonic !== '') {
this.getHdWallet(menmonic || HDNode.generateMnemonic());
}
this.gasLimit = gasLimit;

@@ -155,2 +157,3 @@ this.gasPrice = gasPrice;

}
// tslint:disable-next-line: ban-types

@@ -171,2 +174,3 @@ getPrivateKey(address: string, cb?: Function) {

}
// tslint:disable-next-line: ban-types

@@ -244,2 +248,3 @@ async signTransaction(txParams: any | Web3TxPrams) {

}
getAddress(idx?: number) {

@@ -252,5 +257,7 @@ if (!idx) {

}
getAddresses() {
return this.addresses;
}
addByPrivateKey(privateKey: string) {

@@ -266,5 +273,5 @@ const account = new Account(privateKey);

const foundIndex = this.addresses.findIndex((value) => value === address);
this.addresses.slice(foundIndex, foundIndex + 1);
this.addresses.splice(foundIndex, 1);
this.addresses.unshift(address);
}
}

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

import fetch from 'jest-fetch-mock';
import { Account } from '../src/account';

@@ -17,2 +18,12 @@ import { HttpProvider, Messenger } from '@harmony-js/network';

it('test Account.getBalance returns object that implements Balance interface', () => {
fetch.mockResponses(
[
JSON.stringify({"jsonrpc": "2.0", "id": 1, "result": "0x166c690f33421e"}),
{ status: 200 }
],
[
JSON.stringify({"jsonrpc": "2.0", "id": 1, "result": "0x106"}),
{ status: 200 }
]
);
const acc = Account.new();

@@ -19,0 +30,0 @@ acc.setMessenger(messenger);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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