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

crosslightning-evm

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crosslightning-evm - npm Package Compare versions

Comparing version 3.0.8 to 3.0.9

7

dist/evm/btcrelay/EVMBtcRelay.js

@@ -276,9 +276,12 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const spvTipCommitment = yield this.contract.getLatestMainChainCommitmentHash();
const highScoreAndBlockHeight = yield this.contract._highScoreAndBlockHeight();
const chainWork = Buffer.from(highScoreAndBlockHeight.and(ethers_1.BigNumber.from("0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")).toHexString().substring(2).padStart(64, "0"), "hex");
const blockheight = highScoreAndBlockHeight.shr(224).toNumber();
if (blockheight === 0)
return null;
const spvTipCommitment = yield this.contract.getLatestMainChainCommitmentHash();
return {
commitHash: spvTipCommitment.substring(2),
chainWork,
blockheight: highScoreAndBlockHeight.shr(224).toNumber()
blockheight
};

@@ -285,0 +288,0 @@ });

{
"name": "crosslightning-evm",
"version": "3.0.8",
"version": "3.0.9",
"description": "EVM specific base implementation",

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

@@ -320,3 +320,2 @@ import {BitcoinRpc, BtcBlock, BtcRelay, StatePredictorUtils} from "crosslightning-base";

const spvTipCommitment: string = await this.contract.getLatestMainChainCommitmentHash();
const highScoreAndBlockHeight: BigNumber = await this.contract._highScoreAndBlockHeight();

@@ -328,7 +327,12 @@

);
const blockheight: number = highScoreAndBlockHeight.shr(224).toNumber();
if(blockheight===0) return null;
const spvTipCommitment: string = await this.contract.getLatestMainChainCommitmentHash();
return {
commitHash: spvTipCommitment.substring(2),
chainWork,
blockheight: highScoreAndBlockHeight.shr(224).toNumber()
blockheight
}

@@ -335,0 +339,0 @@ }

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