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

cashscript

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cashscript - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

29

dist/main/network/BitcoinRpcNetworkProvider.d.ts
import { Utxo, Network } from '../interfaces';
import NetworkProvider from './NetworkProvider';
declare const RpcClientRetry: any;
export default class BitcoinRpcNetworkProvider implements NetworkProvider {

@@ -13,1 +14,29 @@ network: Network;

}
interface ListUnspentItem {
txid: string;
vout: number;
address: string;
label: string;
scriptPubKey: string;
amount: number;
confirmations: number;
redeemScript: string;
spendable: boolean;
solvable: boolean;
safe: boolean;
}
interface RpcClientRetry {
constructor(url: string, opts?: object): void;
listUnspent(minconf?: number, maxconf?: number, addresses?: string[], include_unsafe?: boolean, query_options?: object): Promise<ListUnspentItem[]>;
getBlockCount(): Promise<number>;
getRawTransaction(txid: string, verbose?: boolean, blockhash?: string): Promise<string>;
sendRawTransaction(hexstring: string, allowhighfees?: boolean): Promise<string>;
generate(nblocks: number, maxtries?: number): Promise<string[]>;
generateToAddress(nblocks: number, address: string, maxtries?: number): Promise<string[]>;
getNewAddress(label?: string): Promise<string>;
dumpPrivKey(address: string): Promise<string>;
getBalance(dummy?: string, minconf?: number, include_watchonly?: boolean): Promise<number>;
getBlock(blockhash: string, verbosity?: number): Promise<string>;
importAddress(address: string, label?: string, rescan?: boolean, p2sh?: boolean): Promise<void>;
}
export {};

7

dist/main/network/BitcoinRpcNetworkProvider.js

@@ -11,11 +11,8 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const bitcoin_rpc_promise_retry_1 = __importDefault(require("bitcoin-rpc-promise-retry"));
const RpcClientRetry = require('bitcoin-rpc-promise-retry');
class BitcoinRpcNetworkProvider {
constructor(network, url, opts) {
this.network = network;
this.rpcClient = new bitcoin_rpc_promise_retry_1.default(url, opts);
this.rpcClient = new RpcClientRetry(url, opts);
}

@@ -22,0 +19,0 @@ getUtxos(address) {

import { Utxo, Network } from '../interfaces';
import NetworkProvider from './NetworkProvider';
declare const RpcClientRetry: any;
export default class BitcoinRpcNetworkProvider implements NetworkProvider {

@@ -13,1 +14,29 @@ network: Network;

}
interface ListUnspentItem {
txid: string;
vout: number;
address: string;
label: string;
scriptPubKey: string;
amount: number;
confirmations: number;
redeemScript: string;
spendable: boolean;
solvable: boolean;
safe: boolean;
}
interface RpcClientRetry {
constructor(url: string, opts?: object): void;
listUnspent(minconf?: number, maxconf?: number, addresses?: string[], include_unsafe?: boolean, query_options?: object): Promise<ListUnspentItem[]>;
getBlockCount(): Promise<number>;
getRawTransaction(txid: string, verbose?: boolean, blockhash?: string): Promise<string>;
sendRawTransaction(hexstring: string, allowhighfees?: boolean): Promise<string>;
generate(nblocks: number, maxtries?: number): Promise<string[]>;
generateToAddress(nblocks: number, address: string, maxtries?: number): Promise<string[]>;
getNewAddress(label?: string): Promise<string>;
dumpPrivKey(address: string): Promise<string>;
getBalance(dummy?: string, minconf?: number, include_watchonly?: boolean): Promise<number>;
getBlock(blockhash: string, verbosity?: number): Promise<string>;
importAddress(address: string, label?: string, rescan?: boolean, p2sh?: boolean): Promise<void>;
}
export {};

@@ -10,3 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
import RpcClientRetry from 'bitcoin-rpc-promise-retry';
const RpcClientRetry = require('bitcoin-rpc-promise-retry');
export default class BitcoinRpcNetworkProvider {

@@ -13,0 +13,0 @@ constructor(network, url, opts) {

{
"name": "cashscript",
"version": "0.6.1",
"version": "0.6.2",
"description": "Easily write and interact with Bitcoin Cash contracts",

@@ -45,3 +45,3 @@ "keywords": [

"@bitauth/libauth": "^1.18.1",
"@cashscript/utils": "^0.6.1",
"@cashscript/utils": "^0.6.2",
"bip68": "^1.0.4",

@@ -48,0 +48,0 @@ "bitcoin-rpc-promise-retry": "^1.3.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