Update @types/node and fix problems with types

This commit is contained in:
junderw 2019-09-12 15:20:33 +09:00
parent f376913a4c
commit 34b0b525fc
No known key found for this signature in database
GPG key ID: B256185D3A971908
32 changed files with 14 additions and 34 deletions

13
package-lock.json generated
View file

@ -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": {

View file

@ -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",

View file

@ -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(

View file

@ -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(

View file

@ -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
View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Network } from './networks';
export interface Base58CheckResult {
hash: Buffer;

1
types/block.d.ts vendored
View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Transaction } from './transaction';
export declare class Block {
static fromBuffer(buffer: Buffer): Block;

View file

@ -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
View file

@ -1,4 +1,3 @@
/// <reference types="node" />
declare const types: {
P2MS: string;
NONSTANDARD: string;

1
types/crypto.d.ts vendored
View file

@ -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
View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Network } from './networks';
interface ECPairOptions {
compressed?: boolean;

View file

@ -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
View file

@ -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
View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Stack } from './payments';
import * as scriptNumber from './script_number';
import * as scriptSignature from './script_signature';

View file

@ -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;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
interface ScriptSignature {
signature: Buffer;
hashType: number;

View file

@ -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 {

View file

@ -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 {

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Stack } from '../../payments';
export declare function check(script: Buffer | Stack): boolean;
export declare namespace check {

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Stack } from '../../payments';
export declare function check(script: Buffer | Stack): boolean;
export declare namespace check {

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Stack } from '../../payments';
export declare function check(script: Buffer | Stack): boolean;
export declare namespace check {

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -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;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Stack } from '../../payments';
export declare function check(script: Buffer | Stack): boolean;
export declare namespace check {

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(chunks: Buffer[], allowIncomplete?: boolean): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
export declare namespace check {
var toJSON: () => string;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
export interface BlankOutput {
script: Buffer;
valueBuffer: Buffer;

View file

@ -1,4 +1,3 @@
/// <reference types="node" />
import { Signer } from './ecpair';
import { Network } from './networks';
import { Transaction } from './transaction';