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

@harmony-js/staking

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmony-js/staking - npm Package Compare versions

Comparing version 0.1.36 to 0.1.41-alpha.1

tsconfig.tsbuildinfo

3

dist/index.cjs.js

@@ -44,6 +44,7 @@ /**

function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -50,0 +51,0 @@ });

@@ -40,6 +40,7 @@ /**

function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -46,0 +47,0 @@ });

@@ -41,6 +41,7 @@ /**

function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -47,0 +48,0 @@ });

{
"name": "@harmony-js/staking",
"version": "0.1.36",
"version": "0.1.41-alpha.1+3c7e080",
"description": "staking transaction package for harmony",

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

"dependencies": {
"@harmony-js/crypto": "0.1.35",
"@harmony-js/network": "0.1.35",
"@harmony-js/transaction": "0.1.35",
"@harmony-js/utils": "0.1.35",
"@harmony-js/crypto": "^0.1.41-alpha.1+3c7e080",
"@harmony-js/network": "^0.1.41-alpha.1+3c7e080",
"@harmony-js/transaction": "^0.1.41-alpha.1+3c7e080",
"@harmony-js/utils": "^0.1.41-alpha.1+3c7e080",
"text-encoding": "^0.7.0"
},
"gitHead": "9e05298fe7fd60996d81392f921f24a211c1ae0d"
"gitHead": "3c7e080a7dad4f2636f307347132a992a2f76cca"
}

@@ -174,23 +174,23 @@ // tslint:disable-next-line: no-implicit-dependencies

// it('should test sign delegate staking transaction', () => {
// const testTx: any = testTransactions[2];
// const address = getAddressFromPrivateKey(testTx.privateKey);
// expect(isValidAddress(address)).toEqual(true);
// const stakeMsg: Delegate = new Delegate(
// testTx.delegatorAddress,
// testTx.validatorAddress,
// testTx.amount,
// );
it('should test sign delegate staking transaction', () => {
const testTx: any = testTransactions[2];
const address = getAddressFromPrivateKey(testTx.privateKey);
expect(isValidAddress(address)).toEqual(true);
const stakeMsg: Delegate = new Delegate(
testTx.delegatorAddress,
testTx.validatorAddress,
testTx.amount,
);
// const stakingTx: StakingTransaction = new StakingTransaction(
// Directive.DirectiveDelegate,
// stakeMsg,
// testTx.nonce,
// testTx.gasPrice,
// testTx.gasLimit,
// testTx.ChainID,
// );
// const signed = stakingTx.rlpSign(testTx.privateKey);
// expect(signed[1]).toEqual(testTx.encoded);
// });
const stakingTx: StakingTransaction = new StakingTransaction(
Directive.DirectiveDelegate,
stakeMsg,
testTx.nonce,
testTx.gasPrice,
testTx.gasLimit,
testTx.chainID,
);
const signed = stakingTx.rlpSign(testTx.privateKey);
expect(signed[1]).toEqual(testTx.encoded);
});

@@ -197,0 +197,0 @@ it('should test sign delegate staking transaction using factory', () => {

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

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