cashscript
Advanced tools
Comparing version 0.6.1 to 0.6.2
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 {}; |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135384
2851
Updated@cashscript/utils@^0.6.2