From 3f34fe457abe6d19688416e566b6b340cfa959c8 Mon Sep 17 00:00:00 2001 From: junderw Date: Thu, 7 Mar 2019 12:11:15 +0900 Subject: [PATCH] Fix index.ts networks.ts lint --- src/index.js | 8 ++++---- ts_src/index.ts | 12 ++++++------ ts_src/networks.ts | 10 +++++----- types/index.d.ts | 12 ++++++------ types/networks.d.ts | 10 +++++----- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/index.js b/src/index.js index 7455d4a..73ac6f4 100644 --- a/src/index.js +++ b/src/index.js @@ -2,12 +2,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); const bip32 = require("bip32"); exports.bip32 = bip32; -const ECPair = require("./ecpair"); -exports.ECPair = ECPair; const address = require("./address"); exports.address = address; const crypto = require("./crypto"); exports.crypto = crypto; +const ECPair = require("./ecpair"); +exports.ECPair = ECPair; const networks = require("./networks"); exports.networks = networks; const payments = require("./payments"); @@ -16,9 +16,9 @@ const script = require("./script"); exports.script = script; var block_1 = require("./block"); exports.Block = block_1.Block; +var script_1 = require("./script"); +exports.opcodes = script_1.OPS; var transaction_1 = require("./transaction"); exports.Transaction = transaction_1.Transaction; var transaction_builder_1 = require("./transaction_builder"); exports.TransactionBuilder = transaction_builder_1.TransactionBuilder; -var script_1 = require("./script"); -exports.opcodes = script_1.OPS; diff --git a/ts_src/index.ts b/ts_src/index.ts index fce7304..4e76c96 100644 --- a/ts_src/index.ts +++ b/ts_src/index.ts @@ -1,7 +1,7 @@ import * as bip32 from 'bip32'; -import * as ECPair from './ecpair'; import * as address from './address'; import * as crypto from './crypto'; +import * as ECPair from './ecpair'; import * as networks from './networks'; import * as payments from './payments'; import * as script from './script'; @@ -9,12 +9,12 @@ import * as script from './script'; export { ECPair, address, bip32, crypto, networks, payments, script }; export { Block } from './block'; +export { OPS as opcodes } from './script'; export { Transaction } from './transaction'; export { TransactionBuilder } from './transaction_builder'; -export { OPS as opcodes } from './script'; -export { Payment, PaymentOpts } from './payments'; -export { Input as TxInput, Output as TxOutput } from './transaction'; -export { Network } from './networks'; -export { OpCode } from './script'; export { BIP32Interface } from 'bip32'; +export { Network } from './networks'; +export { Payment, PaymentOpts } from './payments'; +export { OpCode } from './script'; +export { Input as TxInput, Output as TxOutput } from './transaction'; diff --git a/ts_src/networks.ts b/ts_src/networks.ts index 0212a44..e66b08c 100644 --- a/ts_src/networks.ts +++ b/ts_src/networks.ts @@ -1,18 +1,18 @@ // https://en.bitcoin.it/wiki/List_of_address_prefixes // Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731 -export type Network = { +export interface Network { messagePrefix: string; bech32: string; - bip32: bip32; + bip32: Bip32; pubKeyHash: number; scriptHash: number; wif: number; -}; +} -type bip32 = { +interface Bip32 { public: number; private: number; -}; +} export const bitcoin: Network = { messagePrefix: '\x18Bitcoin Signed Message:\n', diff --git a/types/index.d.ts b/types/index.d.ts index 3512872..d21454a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,17 +1,17 @@ import * as bip32 from 'bip32'; -import * as ECPair from './ecpair'; import * as address from './address'; import * as crypto from './crypto'; +import * as ECPair from './ecpair'; import * as networks from './networks'; import * as payments from './payments'; import * as script from './script'; export { ECPair, address, bip32, crypto, networks, payments, script }; export { Block } from './block'; +export { OPS as opcodes } from './script'; export { Transaction } from './transaction'; export { TransactionBuilder } from './transaction_builder'; -export { OPS as opcodes } from './script'; -export { Payment, PaymentOpts } from './payments'; -export { Input as TxInput, Output as TxOutput } from './transaction'; -export { Network } from './networks'; -export { OpCode } from './script'; export { BIP32Interface } from 'bip32'; +export { Network } from './networks'; +export { Payment, PaymentOpts } from './payments'; +export { OpCode } from './script'; +export { Input as TxInput, Output as TxOutput } from './transaction'; diff --git a/types/networks.d.ts b/types/networks.d.ts index e402873..d5590fd 100644 --- a/types/networks.d.ts +++ b/types/networks.d.ts @@ -1,15 +1,15 @@ -export declare type Network = { +export interface Network { messagePrefix: string; bech32: string; - bip32: bip32; + bip32: Bip32; pubKeyHash: number; scriptHash: number; wif: number; -}; -declare type bip32 = { +} +interface Bip32 { public: number; private: number; -}; +} export declare const bitcoin: Network; export declare const regtest: Network; export declare const testnet: Network;