Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
84ac39a
feat: initial WIP
marvinroger Nov 15, 2019
0a124d7
feat: it works!
marvinroger Nov 16, 2019
8bf1f77
feat: optimize wasm for speed
marvinroger Nov 17, 2019
3deac99
feat: add threshold param to work validation
marvinroger Nov 17, 2019
f48d150
test: fix rust tests
marvinroger Nov 17, 2019
75bffe5
fix: remove useless file
marvinroger Nov 17, 2019
8a629d3
chore(deps): upgrade dependencies
marvinroger Nov 18, 2019
2b9a819
docs: change copyright mail address
marvinroger Nov 18, 2019
07cd3ed
Merge branch 'master' into rust-wasm
marvinroger Mar 2, 2020
6f0a0f9
fix: complete merge
marvinroger Mar 2, 2020
369db3f
refactor: remove a lot of wasm dependencies
marvinroger Mar 3, 2020
e3ec8f3
perf: optimize hash
marvinroger Mar 24, 2020
dc34fe4
perf: optimize more
marvinroger Mar 24, 2020
bf923db
refacto: clean a bit
marvinroger Mar 24, 2020
bfd24c5
feat: modularize
marvinroger Mar 24, 2020
023c979
feat: make code cleaner
marvinroger Mar 24, 2020
9994fe6
fix: update wasm builder to Docker Hub
marvinroger Mar 24, 2020
3f6e83d
chore: update dependencies
marvinroger Mar 24, 2020
5bf8075
fix: update license link
marvinroger Mar 25, 2020
9334d7a
refactor: one buffer per func
marvinroger Mar 25, 2020
c91acfe
fix: update fusee
marvinroger Mar 25, 2020
8a9c3ba
feat: add more work
marvinroger Mar 28, 2020
03b8ae9
feat: implement address decoding in
marvinroger Mar 28, 2020
f896ee1
feat: implement sign / verify lib
marvinroger Mar 28, 2020
0759350
fix: endianness issue on non wasm targets
marvinroger Mar 29, 2020
e12a629
fix: signature
marvinroger Mar 29, 2020
a8157ce
chore: update deps
marvinroger Jun 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
require('@marvinroger/fusee/patches/eslint-deps2')
module.exports = require('./fusee').getEslintConfig()
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
### App ###

dist/
/packages/nanocurrency/assembly.js

### TS ###

Expand Down
2 changes: 2 additions & 0 deletions fusee.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable */

module.exports = require('@marvinroger/fusee').buildFusee({
monorepo: true,
react: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/nanocurrency-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"bugs": "https://github.com/marvinroger/nanocurrency-js/issues",
"dependencies": {
"nanocurrency": ">= 2.2.0 < 3.0.0",
"yargs": "^13.0.0"
"yargs": "^15.0.1"
},
"files": [
"dist/"
Expand Down
11 changes: 0 additions & 11 deletions packages/nanocurrency/assembly.d.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/nanocurrency/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable */

const fusee = require('../../fusee').getJestConfig()

module.exports = {
Expand Down
27 changes: 15 additions & 12 deletions packages/nanocurrency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,25 @@
"bugs": "https://github.com/marvinroger/nanocurrency-js/issues",
"dependencies": {
"bignumber.js": "^9.0.0",
"blakejs": "^1.1.0"
"blakejs": "^1.1.0",
"lerna": "^3.13.1",
"typescript": "^3.3.3333"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/node": "^13.7.7",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-wasm": "^5.0.0",
"@types/node": "^14.0.14",
"cross-env": "^7.0.0",
"cross-os": "^1.2.2",
"cross-var": "^1.1.0",
"puppeteer": "^2.1.1",
"puppeteer": "^4.0.1",
"rimraf": "^3.0.2",
"rollup": "^1.6.0",
"rollup": "^2.2.0",
"rollup-plugin-auto-external": "3.0.0-alpha.0",
"rollup-plugin-license": "^0.13.0",
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-typescript2": "^0.26.0"
"rollup-plugin-license": "^2.1.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-typescript2": "^0.27.1"
},
"files": [
"dist/"
Expand All @@ -56,16 +59,16 @@
"scripts": {
"build:dev": "yarn build:dev:assembly && yarn build:dev:js",
"build:dev:js": "rimraf dist/ && cross-env NODE_ENV=development rollup -c",
"build:dev:assembly": "cross-env EMCC_ARGS=\"\" cross-os build:assembly__cross",
"build:assembly__common": "cross-var docker run --rm -v $PWD:/src trzeci/emscripten:sdk-tag-1.38.29-64bit emcc -o assembly.js $EMCC_ARGS -s MODULARIZE=1 -s SINGLE_FILE=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=[\\\"cwrap\\\"]\" src/assembly/functions.c src/assembly/blake2/ref/blake2b-ref.c",
"build:dev:assembly": "cross-env WASM_MODE=\"debug\" cross-os build:assembly__cross",
"build:assembly__common": "cross-var docker run --rm -v $PWD/wasm:/src -w /src -e WASM_MODE='$WASM_MODE' marvinroger/rust-wasm-builder:2 /bin/bash ./build.sh",
"build:assembly__cross": {
"darwin": "cross-env PWD=\"$(pwd)\" yarn build:assembly__common",
"linux": "cross-env PWD=\"$(pwd)\" yarn build:assembly__common",
"win32": "cross-env PWD=\"%cd%\" yarn build:assembly__common"
},
"build:prod": "yarn build:prod:assembly && yarn build:prod:js",
"build:prod:js": "rimraf dist/ && cross-env NODE_ENV=production rollup -c",
"build:prod:assembly": "cross-env EMCC_ARGS=\"-s FILESYSTEM=0 -O3 --closure 1 --llvm-lto 3\" cross-os build:assembly__cross",
"build:prod:assembly": "cross-env WASM_MODE=\"release\" cross-os build:assembly__cross",
"generate-docs": "fusee generate-docs",
"lint": "fusee lint",
"test": "fusee test",
Expand Down
8 changes: 5 additions & 3 deletions packages/nanocurrency/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import license from 'rollup-plugin-license'
import wasm from '@rollup/plugin-wasm'

import pkg from './package.json'

Expand All @@ -12,8 +13,8 @@ const ENV = process.env.NODE_ENV
const LICENSE_BANNER = `
/*!
* nanocurrency-js v${pkg.version}: A toolkit for the Nano cryptocurrency.
* Copyright (c) <%= moment().format('YYYY') %> Marvin ROGER <dev at marvinroger dot fr>
* Licensed under GPL-3.0 (https://git.io/vAZsK)
* Copyright (c) <%= moment().format('YYYY') %> Marvin ROGER <bonjour+code at marvinroger dot fr>
* Licensed under GPL-3.0 (https://git.io/JvSg6)
*/
`.trim()

Expand All @@ -38,14 +39,15 @@ const configs = outputs.map((output, index) => {
useTsconfigDeclarationDir: true,
tsconfigOverride: { compilerOptions: { declaration: index === 0 } }, // only generate definitions once, otherwise crash
}),
wasm(),
autoExternal({
dependencies: output.format !== 'umd',
}),
],
}

if (ENV === 'production') {
config.plugins.push(terser())
config.plugins.push(terser({ output: { comments: false } }))

config.plugins.push(
license({
Expand Down
Loading