Browse Source

Fix index.ts networks.ts lint

fixTypes
junderw 6 years ago
parent
commit
3f34fe457a
No known key found for this signature in database GPG Key ID: B256185D3A971908
  1. 8
      src/index.js
  2. 10
      ts_src/index.ts
  3. 10
      ts_src/networks.ts
  4. 10
      types/index.d.ts
  5. 10
      types/networks.d.ts

8
src/index.js

@ -2,12 +2,12 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const bip32 = require("bip32"); const bip32 = require("bip32");
exports.bip32 = bip32; exports.bip32 = bip32;
const ECPair = require("./ecpair");
exports.ECPair = ECPair;
const address = require("./address"); const address = require("./address");
exports.address = address; exports.address = address;
const crypto = require("./crypto"); const crypto = require("./crypto");
exports.crypto = crypto; exports.crypto = crypto;
const ECPair = require("./ecpair");
exports.ECPair = ECPair;
const networks = require("./networks"); const networks = require("./networks");
exports.networks = networks; exports.networks = networks;
const payments = require("./payments"); const payments = require("./payments");
@ -16,9 +16,9 @@ const script = require("./script");
exports.script = script; exports.script = script;
var block_1 = require("./block"); var block_1 = require("./block");
exports.Block = block_1.Block; exports.Block = block_1.Block;
var script_1 = require("./script");
exports.opcodes = script_1.OPS;
var transaction_1 = require("./transaction"); var transaction_1 = require("./transaction");
exports.Transaction = transaction_1.Transaction; exports.Transaction = transaction_1.Transaction;
var transaction_builder_1 = require("./transaction_builder"); var transaction_builder_1 = require("./transaction_builder");
exports.TransactionBuilder = transaction_builder_1.TransactionBuilder; exports.TransactionBuilder = transaction_builder_1.TransactionBuilder;
var script_1 = require("./script");
exports.opcodes = script_1.OPS;

10
ts_src/index.ts

@ -1,7 +1,7 @@
import * as bip32 from 'bip32'; import * as bip32 from 'bip32';
import * as ECPair from './ecpair';
import * as address from './address'; import * as address from './address';
import * as crypto from './crypto'; import * as crypto from './crypto';
import * as ECPair from './ecpair';
import * as networks from './networks'; import * as networks from './networks';
import * as payments from './payments'; import * as payments from './payments';
import * as script from './script'; import * as script from './script';
@ -9,12 +9,12 @@ import * as script from './script';
export { ECPair, address, bip32, crypto, networks, payments, script }; export { ECPair, address, bip32, crypto, networks, payments, script };
export { Block } from './block'; export { Block } from './block';
export { OPS as opcodes } from './script';
export { Transaction } from './transaction'; export { Transaction } from './transaction';
export { TransactionBuilder } from './transaction_builder'; export { TransactionBuilder } from './transaction_builder';
export { OPS as opcodes } from './script';
export { Payment, PaymentOpts } from './payments'; export { BIP32Interface } from 'bip32';
export { Input as TxInput, Output as TxOutput } from './transaction';
export { Network } from './networks'; export { Network } from './networks';
export { Payment, PaymentOpts } from './payments';
export { OpCode } from './script'; export { OpCode } from './script';
export { BIP32Interface } from 'bip32'; export { Input as TxInput, Output as TxOutput } from './transaction';

10
ts_src/networks.ts

@ -1,18 +1,18 @@
// https://en.bitcoin.it/wiki/List_of_address_prefixes // https://en.bitcoin.it/wiki/List_of_address_prefixes
// Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731 // Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731
export type Network = { export interface Network {
messagePrefix: string; messagePrefix: string;
bech32: string; bech32: string;
bip32: bip32; bip32: Bip32;
pubKeyHash: number; pubKeyHash: number;
scriptHash: number; scriptHash: number;
wif: number; wif: number;
}; }
type bip32 = { interface Bip32 {
public: number; public: number;
private: number; private: number;
}; }
export const bitcoin: Network = { export const bitcoin: Network = {
messagePrefix: '\x18Bitcoin Signed Message:\n', messagePrefix: '\x18Bitcoin Signed Message:\n',

10
types/index.d.ts

@ -1,17 +1,17 @@
import * as bip32 from 'bip32'; import * as bip32 from 'bip32';
import * as ECPair from './ecpair';
import * as address from './address'; import * as address from './address';
import * as crypto from './crypto'; import * as crypto from './crypto';
import * as ECPair from './ecpair';
import * as networks from './networks'; import * as networks from './networks';
import * as payments from './payments'; import * as payments from './payments';
import * as script from './script'; import * as script from './script';
export { ECPair, address, bip32, crypto, networks, payments, script }; export { ECPair, address, bip32, crypto, networks, payments, script };
export { Block } from './block'; export { Block } from './block';
export { OPS as opcodes } from './script';
export { Transaction } from './transaction'; export { Transaction } from './transaction';
export { TransactionBuilder } from './transaction_builder'; export { TransactionBuilder } from './transaction_builder';
export { OPS as opcodes } from './script'; export { BIP32Interface } from 'bip32';
export { Payment, PaymentOpts } from './payments';
export { Input as TxInput, Output as TxOutput } from './transaction';
export { Network } from './networks'; export { Network } from './networks';
export { Payment, PaymentOpts } from './payments';
export { OpCode } from './script'; export { OpCode } from './script';
export { BIP32Interface } from 'bip32'; export { Input as TxInput, Output as TxOutput } from './transaction';

10
types/networks.d.ts

@ -1,15 +1,15 @@
export declare type Network = { export interface Network {
messagePrefix: string; messagePrefix: string;
bech32: string; bech32: string;
bip32: bip32; bip32: Bip32;
pubKeyHash: number; pubKeyHash: number;
scriptHash: number; scriptHash: number;
wif: number; wif: number;
}; }
declare type bip32 = { interface Bip32 {
public: number; public: number;
private: number; private: number;
}; }
export declare const bitcoin: Network; export declare const bitcoin: Network;
export declare const regtest: Network; export declare const regtest: Network;
export declare const testnet: Network; export declare const testnet: Network;

Loading…
Cancel
Save