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 4.0.4 to 4.0.5

3

dist/evm/btcrelay/EVMBtcRelay.d.ts

@@ -15,3 +15,4 @@ /// <reference types="node" />

readonly maxForkHeadersPerTx: number;
constructor(provider: Signer, bitcoinRpc: BitcoinRpc<B>, btcRelayContractAddress: string);
private readonly logBlocksLimit;
constructor(provider: Signer, bitcoinRpc: BitcoinRpc<B>, btcRelayContractAddress: string, logBlocksLimit?: number);
saveInitialHeader(header: B, epochStart: number, pastBlocksTimestamps: number[]): Promise<UnsignedTransaction>;

@@ -18,0 +19,0 @@ retrieveLogAndBlockheight(blockData: {

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

class EVMBtcRelay {
constructor(provider, bitcoinRpc, btcRelayContractAddress) {
constructor(provider, bitcoinRpc, btcRelayContractAddress, logBlocksLimit) {
this.maxHeadersPerTx = 100;

@@ -31,2 +31,3 @@ this.maxForkHeadersPerTx = 50;

this.bitcoinRpc = bitcoinRpc;
this.logBlocksLimit = logBlocksLimit || limit;
}

@@ -65,3 +66,3 @@ saveInitialHeader(header, epochStart, pastBlocksTimestamps) {

address: this.contract.address,
fromBlock: currentBlock - limit,
fromBlock: currentBlock - this.logBlocksLimit,
toBlock: currentBlock

@@ -90,3 +91,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if (storedHeader == null) {

@@ -123,3 +124,3 @@ yield new Promise(resolve => {

address: this.contract.address,
fromBlock: currentBlock - limit,
fromBlock: currentBlock - this.logBlocksLimit,
toBlock: currentBlock

@@ -145,3 +146,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if (storedHeader == null) {

@@ -164,3 +165,3 @@ yield new Promise(resolve => {

address: this.contract.address,
fromBlock: currentBlock - limit,
fromBlock: currentBlock - this.logBlocksLimit,
toBlock: currentBlock

@@ -191,3 +192,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if (storedHeader == null) {

@@ -194,0 +195,0 @@ yield new Promise(resolve => {

@@ -23,3 +23,4 @@ /// <reference types="node" />

readonly btcRelay: EVMBtcRelay<any>;
constructor(signer: Signer, btcRelay: EVMBtcRelay<any>, swapContractAddress: string);
private readonly logBlocksLimit;
constructor(signer: Signer, btcRelay: EVMBtcRelay<any>, swapContractAddress: string, logBlocksLimit?: number);
getNativeCurrencyAddress(): string;

@@ -26,0 +27,0 @@ getHashForOnchain(outputScript: Buffer, amount: BN, nonce: BN): Buffer;

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

}
constructor(signer, btcRelay, swapContractAddress) {
constructor(signer, btcRelay, swapContractAddress, logBlocksLimit) {
this.claimWithSecretTimeout = 45;

@@ -62,2 +62,3 @@ this.claimWithTxDataTimeout = 120;

this.contractInterface = new utils_1.Interface(swapContract_1.swapContract.abi);
this.logBlocksLimit = logBlocksLimit || LOG_FETCH_LIMIT;
}

@@ -395,3 +396,3 @@ getNativeCurrencyAddress() {

topics: topicFilter,
fromBlock: currentBlock - LOG_FETCH_LIMIT,
fromBlock: currentBlock - this.logBlocksLimit,
toBlock: currentBlock

@@ -409,3 +410,3 @@ };

}
currentBlock -= LOG_FETCH_LIMIT;
currentBlock -= this.logBlocksLimit;
if (swapData == null) {

@@ -412,0 +413,0 @@ yield new Promise(resolve => {

{
"name": "crosslightning-evm",
"version": "4.0.4",
"version": "4.0.5",
"description": "EVM specific base implementation",

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

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

constructor(provider: Signer, bitcoinRpc: BitcoinRpc<B>, btcRelayContractAddress: string) {
private readonly logBlocksLimit: number;
constructor(provider: Signer, bitcoinRpc: BitcoinRpc<B>, btcRelayContractAddress: string, logBlocksLimit?: number) {
this.provider = provider;

@@ -31,2 +33,4 @@ this.contract = new Contract(btcRelayContractAddress, btcRelayContract.abi, provider);

this.bitcoinRpc = bitcoinRpc;
this.logBlocksLimit = logBlocksLimit || limit;
}

@@ -80,3 +84,3 @@

address: this.contract.address,
fromBlock: currentBlock-limit,
fromBlock: currentBlock-this.logBlocksLimit,
toBlock: currentBlock

@@ -105,3 +109,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if(storedHeader==null) {

@@ -142,3 +146,3 @@ await new Promise(resolve => {

address: this.contract.address,
fromBlock: currentBlock-limit,
fromBlock: currentBlock-this.logBlocksLimit,
toBlock: currentBlock

@@ -164,3 +168,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if(storedHeader==null) {

@@ -187,3 +191,3 @@ await new Promise(resolve => {

address: this.contract.address,
fromBlock: currentBlock-limit,
fromBlock: currentBlock-this.logBlocksLimit,
toBlock: currentBlock

@@ -214,3 +218,3 @@ };

}
currentBlock -= limit;
currentBlock -= this.logBlocksLimit;
if(storedHeader==null) {

@@ -217,0 +221,0 @@ await new Promise(resolve => {

@@ -70,3 +70,5 @@ import * as BN from "bn.js";

constructor(signer: Signer, btcRelay: EVMBtcRelay<any>, swapContractAddress: string) {
private readonly logBlocksLimit: number;
constructor(signer: Signer, btcRelay: EVMBtcRelay<any>, swapContractAddress: string, logBlocksLimit?: number) {
this.signer = signer;

@@ -77,2 +79,4 @@ this.btcRelay = btcRelay;

this.contractInterface = new Interface(swapContract.abi);
this.logBlocksLimit = logBlocksLimit || LOG_FETCH_LIMIT;
}

@@ -479,3 +483,3 @@

topics: topicFilter,
fromBlock: currentBlock-LOG_FETCH_LIMIT,
fromBlock: currentBlock-this.logBlocksLimit,
toBlock: currentBlock

@@ -492,3 +496,3 @@ };

}
currentBlock -= LOG_FETCH_LIMIT;
currentBlock -= this.logBlocksLimit;
if(swapData==null) {

@@ -495,0 +499,0 @@ await new Promise(resolve => {

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