Browse Source

import pls work

master
peter 2 years ago
parent
commit
5919d29121
2 changed files with 3 additions and 5 deletions
  1. 2
    4
      hdkey.ts
  2. 1
    1
      package.json

+ 2
- 4
hdkey.ts View File

@@ -8,7 +8,7 @@ type network = 'testnet' | 'mainnet'
8 8
 export
9 9
 type keyType =  "public" | "private"
10 10
 
11
-class HDKey{
11
+export class HDKey{
12 12
     /**
13 13
      * Generate a BIP39 menemonic
14 14
      */
@@ -133,6 +133,4 @@ class HDKey{
133 133
     addressFromHDKey(hdkey:string, net: network = "mainnet"){
134 134
         return <string>bitcoin.payments.p2pkh({ pubkey: Buffer.from(hdkey), network: bitcoin.networks[net] }).address
135 135
     }
136
-}
137
-
138
-export const hdkey = () => new HDKey()
136
+}

+ 1
- 1
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "btc-hdkey",
3
-  "version": "0.0.15",
3
+  "version": "0.0.16",
4 4
   "description": "Hierarchical Deterministic Wallet support for BTC",
5 5
   "main": "hdkey.min.js",
6 6
   "types": "hdkey.d.ts",

Loading…
Cancel
Save