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

btcrelay-bitcoind

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btcrelay-bitcoind - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

1

dist/rpc/BitcoindRpc.d.ts

@@ -44,2 +44,3 @@ /// <reference types="node" />

constructor(protocol: string, user: string, pass: string, host: string, port: number);
getTipHeight(): Promise<number>;
getBlockHeader(blockhash: string): Promise<BitcoindBlock>;

@@ -46,0 +47,0 @@ isInMainChain(blockhash: string): Promise<boolean>;

@@ -27,2 +27,16 @@ "use strict";

}
getTipHeight() {
return __awaiter(this, void 0, void 0, function* () {
const retrievedInfo = yield new Promise((resolve, reject) => {
this.rpc.getBlockchainInfo((err, info) => {
if (err) {
reject(err);
return;
}
resolve(info.result);
});
});
return retrievedInfo.blocks;
});
}
getBlockHeader(blockhash) {

@@ -29,0 +43,0 @@ return __awaiter(this, void 0, void 0, function* () {

4

package.json
{
"name": "btcrelay-bitcoind",
"version": "2.0.0",
"version": "3.0.0",
"description": "Connector and synchronizer using bitcoind for bitcoin relay",

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

"bn.js": "^5.2.1",
"crosslightning-base": "^2.0.2",
"crosslightning-base": "^3.0.4",
"typescript": "^4.9.5"
}
}

@@ -88,2 +88,18 @@ import {BitcoindBlock, BitcoindBlockType} from "./BitcoindBlock";

async getTipHeight(): Promise<number> {
const retrievedInfo: any = await new Promise((resolve, reject) => {
this.rpc.getBlockchainInfo((err, info) => {
if(err) {
reject(err);
return;
}
resolve(info.result);
});
});
return retrievedInfo.blocks;
}
async getBlockHeader(blockhash: string): Promise<BitcoindBlock> {

@@ -90,0 +106,0 @@ const retrievedHeader = await new Promise<BitcoindBlockType>((resolve, reject) => {

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