Add LBRY-specific bip32 KeyPath constants
This commit is contained in:
parent
a1c5104f4a
commit
ae14ef1355
6 changed files with 33 additions and 3 deletions
5
src/bip32_lbry.d.ts
vendored
Normal file
5
src/bip32_lbry.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export declare enum KeyPath {
|
||||
RECEIVE = 0,
|
||||
CHANGE = 1,
|
||||
CHANNEL = 2
|
||||
}
|
12
src/bip32_lbry.js
Normal file
12
src/bip32_lbry.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
// bip32 stuff specific to LBRY. This file didn't exist in bitcoinjs-lib at the
|
||||
// time of forking. This file may or may not have a better home in a different
|
||||
// library.
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.KeyPath = void 0;
|
||||
var KeyPath;
|
||||
(function(KeyPath) {
|
||||
KeyPath[(KeyPath['RECEIVE'] = 0)] = 'RECEIVE';
|
||||
KeyPath[(KeyPath['CHANGE'] = 1)] = 'CHANGE';
|
||||
KeyPath[(KeyPath['CHANNEL'] = 2)] = 'CHANNEL';
|
||||
})((KeyPath = exports.KeyPath || (exports.KeyPath = {})));
|
3
src/index.d.ts
vendored
3
src/index.d.ts
vendored
|
@ -3,7 +3,8 @@ import * as crypto from './crypto';
|
|||
import * as networks from './networks';
|
||||
import * as payments from './payments';
|
||||
import * as script from './script';
|
||||
export { address, crypto, networks, payments, script };
|
||||
import * as bip32Lbry from './bip32_lbry';
|
||||
export { address, bip32Lbry, crypto, networks, payments, script };
|
||||
export { Block } from './block';
|
||||
export { TaggedHashPrefix } from './crypto';
|
||||
export { Psbt, PsbtTxInput, PsbtTxOutput, Signer, SignerAsync, HDSigner, HDSignerAsync, } from './psbt';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.Transaction = exports.opcodes = exports.Psbt = exports.Block = exports.script = exports.payments = exports.networks = exports.crypto = exports.address = void 0;
|
||||
exports.Transaction = exports.opcodes = exports.Psbt = exports.Block = exports.script = exports.payments = exports.networks = exports.crypto = exports.bip32Lbry = exports.address = void 0;
|
||||
const address = require('./address');
|
||||
exports.address = address;
|
||||
const crypto = require('./crypto');
|
||||
|
@ -11,6 +11,8 @@ const payments = require('./payments');
|
|||
exports.payments = payments;
|
||||
const script = require('./script');
|
||||
exports.script = script;
|
||||
const bip32Lbry = require('./bip32_lbry');
|
||||
exports.bip32Lbry = bip32Lbry;
|
||||
var block_1 = require('./block');
|
||||
Object.defineProperty(exports, 'Block', {
|
||||
enumerable: true,
|
||||
|
|
9
ts_src/bip32_lbry.ts
Normal file
9
ts_src/bip32_lbry.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
// bip32 stuff specific to LBRY. This file didn't exist in bitcoinjs-lib at the
|
||||
// time of forking. This file may or may not have a better home in a different
|
||||
// library.
|
||||
|
||||
export enum KeyPath {
|
||||
RECEIVE = 0,
|
||||
CHANGE = 1,
|
||||
CHANNEL = 2,
|
||||
}
|
|
@ -3,8 +3,9 @@ import * as crypto from './crypto';
|
|||
import * as networks from './networks';
|
||||
import * as payments from './payments';
|
||||
import * as script from './script';
|
||||
import * as bip32Lbry from './bip32_lbry';
|
||||
|
||||
export { address, crypto, networks, payments, script };
|
||||
export { address, bip32Lbry, crypto, networks, payments, script };
|
||||
|
||||
export { Block } from './block';
|
||||
export { TaggedHashPrefix } from './crypto';
|
||||
|
|
Loading…
Reference in a new issue