-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'
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
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)
-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
+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'
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'
-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
-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_'
-export class Convert {
+export default class Convert {
/**
* Convert a string (UTF-8 encoded) to a byte array
-import { Util } from './util'
+import Util from './util'
-export class Curve25519 {
+export default class Curve25519 {
gf0: Int32Array
gf1: Int32Array
-export class Util {
+export default class Util {
/**
* Time constant comparison of two arrays
{
"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"
},
"esModuleInterop": true,
"downlevelIteration": true,
"strictNullChecks": false,
+ "forceConsistentCasingInFileNames": true,
"types": [
"node"
],