Update @types/node and fix problems with types
This commit is contained in:
parent
f376913a4c
commit
34b0b525fc
32 changed files with 14 additions and 34 deletions
13
package-lock.json
generated
13
package-lock.json
generated
|
@ -156,9 +156,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "10.12.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
|
||||
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
|
||||
"version": "12.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.5.tgz",
|
||||
"integrity": "sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w=="
|
||||
},
|
||||
"@types/proxyquire": {
|
||||
"version": "1.3.28",
|
||||
|
@ -261,6 +261,13 @@
|
|||
"tiny-secp256k1": "^1.1.0",
|
||||
"typeforce": "^1.11.5",
|
||||
"wif": "^2.0.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.12.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
|
||||
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"bip39": {
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/node": "10.12.18",
|
||||
"@types/node": "12.7.5",
|
||||
"bech32": "^1.1.2",
|
||||
"bip174": "^1.0.1",
|
||||
"bip32": "^2.0.4",
|
||||
|
|
|
@ -10,7 +10,7 @@ function toOutputScript(address: string): Buffer {
|
|||
}
|
||||
|
||||
function idToHash(txid: string): Buffer {
|
||||
return Buffer.from(txid, 'hex').reverse() as Buffer;
|
||||
return Buffer.from(txid, 'hex').reverse();
|
||||
}
|
||||
|
||||
const alice = bitcoin.ECPair.fromWIF(
|
||||
|
|
|
@ -10,7 +10,7 @@ function toOutputScript(address: string): Buffer {
|
|||
}
|
||||
|
||||
function idToHash(txid: string): Buffer {
|
||||
return Buffer.from(txid, 'hex').reverse() as Buffer;
|
||||
return Buffer.from(txid, 'hex').reverse();
|
||||
}
|
||||
|
||||
const alice = bitcoin.ECPair.fromWIF(
|
||||
|
|
|
@ -14,7 +14,7 @@ const initBuffers = (object: any): typeof preFixtures =>
|
|||
const data = result[1];
|
||||
const encoding = result[2];
|
||||
|
||||
return Buffer.from(data, encoding);
|
||||
return Buffer.from(data, encoding as any);
|
||||
});
|
||||
|
||||
const fixtures = initBuffers(preFixtures);
|
||||
|
|
1
types/address.d.ts
vendored
1
types/address.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Network } from './networks';
|
||||
export interface Base58CheckResult {
|
||||
hash: Buffer;
|
||||
|
|
1
types/block.d.ts
vendored
1
types/block.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Transaction } from './transaction';
|
||||
export declare class Block {
|
||||
static fromBuffer(buffer: Buffer): Block;
|
||||
|
|
1
types/bufferutils.d.ts
vendored
1
types/bufferutils.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function readUInt64LE(buffer: Buffer, offset: number): number;
|
||||
export declare function writeUInt64LE(buffer: Buffer, value: number, offset: number): number;
|
||||
export declare function reverseBuffer(buffer: Buffer): Buffer;
|
||||
|
|
1
types/classify.d.ts
vendored
1
types/classify.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
declare const types: {
|
||||
P2MS: string;
|
||||
NONSTANDARD: string;
|
||||
|
|
1
types/crypto.d.ts
vendored
1
types/crypto.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function ripemd160(buffer: Buffer): Buffer;
|
||||
export declare function sha1(buffer: Buffer): Buffer;
|
||||
export declare function sha256(buffer: Buffer): Buffer;
|
||||
|
|
1
types/ecpair.d.ts
vendored
1
types/ecpair.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Network } from './networks';
|
||||
interface ECPairOptions {
|
||||
compressed?: boolean;
|
||||
|
|
1
types/payments/index.d.ts
vendored
1
types/payments/index.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Network } from '../networks';
|
||||
import { p2data as embed } from './embed';
|
||||
import { p2ms } from './p2ms';
|
||||
|
|
1
types/psbt.d.ts
vendored
1
types/psbt.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Psbt as PsbtBase } from 'bip174';
|
||||
import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput } from 'bip174/src/lib/interfaces';
|
||||
import { Signer, SignerAsync } from './ecpair';
|
||||
|
|
1
types/script.d.ts
vendored
1
types/script.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from './payments';
|
||||
import * as scriptNumber from './script_number';
|
||||
import * as scriptSignature from './script_signature';
|
||||
|
|
1
types/script_number.d.ts
vendored
1
types/script_number.d.ts
vendored
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="node" />
|
||||
export declare function decode(buffer: Buffer, maxLength?: number, minimal?: boolean): number;
|
||||
export declare function encode(_number: number): Buffer;
|
||||
|
|
1
types/script_signature.d.ts
vendored
1
types/script_signature.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
interface ScriptSignature {
|
||||
signature: Buffer;
|
||||
hashType: number;
|
||||
|
|
1
types/templates/multisig/input.d.ts
vendored
1
types/templates/multisig/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean;
|
||||
export declare namespace check {
|
||||
|
|
1
types/templates/multisig/output.d.ts
vendored
1
types/templates/multisig/output.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean;
|
||||
export declare namespace check {
|
||||
|
|
1
types/templates/nulldata.d.ts
vendored
1
types/templates/nulldata.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/templates/pubkey/input.d.ts
vendored
1
types/templates/pubkey/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack): boolean;
|
||||
export declare namespace check {
|
||||
|
|
1
types/templates/pubkey/output.d.ts
vendored
1
types/templates/pubkey/output.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack): boolean;
|
||||
export declare namespace check {
|
||||
|
|
1
types/templates/pubkeyhash/input.d.ts
vendored
1
types/templates/pubkeyhash/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack): boolean;
|
||||
export declare namespace check {
|
||||
|
|
1
types/templates/pubkeyhash/output.d.ts
vendored
1
types/templates/pubkeyhash/output.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/templates/scripthash/input.d.ts
vendored
1
types/templates/scripthash/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>, allowIncomplete?: boolean): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/templates/scripthash/output.d.ts
vendored
1
types/templates/scripthash/output.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/templates/witnesspubkeyhash/input.d.ts
vendored
1
types/templates/witnesspubkeyhash/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Stack } from '../../payments';
|
||||
export declare function check(script: Buffer | Stack): boolean;
|
||||
export declare namespace check {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/templates/witnessscripthash/input.d.ts
vendored
1
types/templates/witnessscripthash/input.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(chunks: Buffer[], allowIncomplete?: boolean): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
||||
export declare namespace check {
|
||||
var toJSON: () => string;
|
||||
|
|
1
types/transaction.d.ts
vendored
1
types/transaction.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
export interface BlankOutput {
|
||||
script: Buffer;
|
||||
valueBuffer: Buffer;
|
||||
|
|
1
types/transaction_builder.d.ts
vendored
1
types/transaction_builder.d.ts
vendored
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { Signer } from './ecpair';
|
||||
import { Network } from './networks';
|
||||
import { Transaction } from './transaction';
|
||||
|
|
Loading…
Reference in a new issue