]> zoso.dev Git - libnemo.git/commitdiff
add default exports, clear dist before compile
authorMiro Metsänheimo <miro@metsanheimo.fi>
Fri, 18 Oct 2019 16:03:17 +0000 (19:03 +0300)
committerMiro Metsänheimo <miro@metsanheimo.fi>
Fri, 18 Oct 2019 16:03:17 +0000 (19:03 +0300)
13 files changed:
index.ts
lib/address-generator.ts
lib/address-importer.ts
lib/bip32-key-derivation.ts
lib/bip39-mnemonic.ts
lib/block-signer.ts
lib/ed25519.ts
lib/nano-address.ts
lib/util/convert.ts
lib/util/curve25519.ts
lib/util/util.ts
package.json
tsconfig.json

index 8133a472d0848ea46e3c591bb6ac6b4627306f73..c7e69418119d36a117041397b50164de6dc57f67 100644 (file)
--- a/index.ts
+++ b/index.ts
@@ -1,5 +1,5 @@
-import { AddressGenerator } from './lib/address-generator'
-import { AddressImporter, Account, Wallet } from './lib/address-importer'
+import AddressGenerator from './lib/address-generator'
+import AddressImporter, { Account, Wallet } from './lib/address-importer'
 import BlockSigner, { TransactionBlock, RepresentativeBlock, SignedBlock } from './lib/block-signer'
 import BigNumber from 'bignumber.js'
 import NanoConverter from './lib/nano-converter'
index 629cc95286a3aa4f8f5c4990656475cb8dc665b7..c03f27e7efe2ae40cdf8f4eb5a0dd7cdf270990c 100644 (file)
@@ -1,10 +1,10 @@
 import Bip32KeyDerivation from './bip32-key-derivation'
 import Bip39Mnemonic from './bip39-mnemonic'
-import { Ed25519 } from './ed25519'
-import { NanoAddress } from './nano-address'
+import Ed25519 from './ed25519'
+import NanoAddress from './nano-address'
 import { Wallet } from './address-importer'
 
-export class AddressGenerator {
+export default class AddressGenerator {
 
        /**
         * Generates the wallet
index fe6418a3e784e2c0d72fb464e124e9f45bd9928f..ea57594a3508fbd862776db513c36aca3eb07f71 100644 (file)
@@ -1,9 +1,9 @@
 import Bip32KeyDerivation from './bip32-key-derivation'
 import Bip39Mnemonic from './bip39-mnemonic'
-import { Ed25519 } from './ed25519'
-import { NanoAddress } from './nano-address'
+import Ed25519 from './ed25519'
+import NanoAddress from './nano-address'
 
-export class AddressImporter {
+export default class AddressImporter {
 
        fromMnemonic(mnemonic: string, seedPassword = ''): Wallet {
                const bip39 = new Bip39Mnemonic(seedPassword)
index 5c739137a29c333262037a84033f2b1a3cf3cbb3..5a258016bc0a316d6653d87ba5fa20ff311a5613 100644 (file)
@@ -1,7 +1,6 @@
-import { Convert } from './util/convert'
-
 //@ts-ignore
 import { enc, algo } from 'crypto-js'
+import Convert from './util/convert'
 
 const ED25519_CURVE = 'ed25519 seed'
 const HARDENED_OFFSET = 0x80000000
index 94dc7520c7b8243c4c763b86950ba76af7de0017..931d25c36f10e6d0cc15e728871ef8d0fce81bab 100644 (file)
@@ -1,6 +1,6 @@
+import Convert from './util/convert'
+import Util from './util/util'
 import words from './words'
-import { Util } from './util/util'
-import { Convert } from './util/convert'
 
 //@ts-ignore
 import { algo, enc, lib, PBKDF2, SHA256 } from 'crypto-js'
index 27c87b82a32c72b29e2d10d05214f10a384d44e7..e02249ed3abbf009c42aff784b89a243befde469 100644 (file)
@@ -1,8 +1,8 @@
 import BigNumber from 'bignumber.js'
-import { Ed25519 } from './ed25519'
-import { NanoAddress } from './nano-address'
+import Convert from './util/convert'
+import Ed25519 from './ed25519'
+import NanoAddress from './nano-address'
 import NanoConverter from './nano-converter'
-import { Convert } from './util/convert'
 
 //@ts-ignore
 import { blake2b, blake2bInit, blake2bUpdate, blake2bFinal } from 'blakejs'
index 4797ef1d167b7bc3d9ab8102e490d915b44bb77c..e14fd4ef327de89f6eaeadb70e2dcb3077b51dcb 100644 (file)
@@ -1,10 +1,10 @@
-import { Convert } from './util/convert'
-import { Curve25519 } from './util/curve25519'
+import Convert from './util/convert'
+import Curve25519 from './util/curve25519'
 
 //@ts-ignore
 import { blake2b } from 'blakejs'
 
-export class Ed25519 {
+export default class Ed25519 {
 
        curve: Curve25519
        X: Int32Array
index 407945832363dc2fab010cd4c450dee700c6893c..8f37cb9c3faf858ef8673e8f2d1be9879765f4ea 100644 (file)
@@ -1,9 +1,9 @@
-import { Convert } from './util/convert'
+import Convert from './util/convert'
 
 //@ts-ignore
 import { blake2b } from 'blakejs'
 
-export class NanoAddress {
+export default class NanoAddress {
 
        readonly alphabet = '13456789abcdefghijkmnopqrstuwxyz'
        readonly prefix = 'nano_'
index dad46e9e1f0b0756b6755c70d0e7c8d225d80e03..63dba1b97dae5934e4fa4251b026bbee45dc7fbe 100644 (file)
@@ -1,4 +1,4 @@
-export class Convert {
+export default class Convert {
 
        /**
         * Convert a string (UTF-8 encoded) to a byte array
index b006acbb7af04100d5ea2e0cddfb99037b82bc7b..7c712222e18c2d7ab368d0ac812584b670197e8d 100644 (file)
@@ -1,6 +1,6 @@
-import { Util } from './util'
+import Util from './util'
 
-export class Curve25519 {
+export default class Curve25519 {
 
        gf0: Int32Array
        gf1: Int32Array
index 4f5e4b666c7cde4b24968a20137dad7dcbfc8c5a..7e3bb8bf1b79c51966f557c7f583e223771683e2 100644 (file)
@@ -1,4 +1,4 @@
-export class Util {
+export default class Util {
 
        /**
         * Time constant comparison of two arrays
index c534f97187fcbc104b8b4b08875c42ba1bcf5a55..e4c5ba7770cf9eb1e7ae24db272434c70d5d00e3 100644 (file)
@@ -1,7 +1,7 @@
 {
        "name": "nanocurrency-web",
-       "version": "1.0.3",
-       "description": "Toolset for Nano cryptocurrency client side offline integrations",
+       "version": "1.0.4",
+       "description": "Toolkit for Nano cryptocurrency client side offline integrations",
        "author": "Miro Metsänheimo <miro@metsanheimo.fi>",
        "license": "MIT",
        "homepage": "https://github.com/numsu/nanocurrency-web-js#readme",
                "nano",
                "currency",
                "mnemonic",
-               "crypto"
+               "crypto",
+               "wallet",
+               "block",
+               "sign"
        ],
        "main": "dist/index.js",
        "types": "dist/index.d.ts",
        "unpkg": "dist/index.min.js",
        "scripts": {
-               "build": "tsc && npm run build:webpack",
+               "build": "rm -rf dist && tsc && npm run build:webpack",
                "build:webpack": "webpack",
                "test": "mocha --reporter spec"
        },
index 8c3ddd8f807e2d908103fe98c40d1694eb697f87..440093c199a6e7284573000ad59c583a68c4b202 100644 (file)
@@ -8,6 +8,7 @@
                "esModuleInterop": true,
                "downlevelIteration": true,
                "strictNullChecks": false,
+               "forceConsistentCasingInFileNames": true,
                "types": [
                        "node"
                ],