Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use noble libs for cryptography #2273

Merged
Merged
Show file tree
Hide file tree
Changes from 182 commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
df22831
feat: use noble libs for ripple-keypairs
sublimator Apr 13, 2023
d97b2ce
fix: fix lint issues
sublimator Apr 13, 2023
88dd59b
fix: bring back in brorand
sublimator Apr 13, 2023
961339f
fix: bring back in brorand
sublimator Apr 13, 2023
5d11acc
wip: remove crypto usages so no need for crypto-browserify
sublimator Apr 14, 2023
e4d508d
fix: does not accept string, typing not working in IDE
sublimator Apr 14, 2023
bb5d329
wip: commit debug changes
sublimator Apr 14, 2023
7ea84fe
wip: use type and trigger build to check flake
sublimator Apr 15, 2023
a28579f
chore: bump
sublimator Apr 15, 2023
c9234ea
chore: bump
sublimator Apr 17, 2023
a71ed53
chore: improve Sha512 typing
sublimator Apr 17, 2023
2e7f8e6
chore: bump
sublimator Apr 18, 2023
83af0a7
refactor: replace brorand with noble randomBytes
sublimator Apr 26, 2023
fa57ff2
Merge remote-tracking branch 'origin/main' into nd-use-noble-libs-for…
sublimator Apr 26, 2023
95bcbbd
fix: revert brorand replacement experiment
sublimator Apr 26, 2023
68454be
feat: EOL node 14
sublimator Apr 26, 2023
a2dd5e3
chore: remove brorand
sublimator May 3, 2023
485642a
chore: remove @types/brorand
sublimator May 3, 2023
c3d3705
refactor: remove Buffer usage in ripple-keypairs and update ripple-ad…
sublimator May 3, 2023
235dc6b
chore: remove .prettierrc was using for dev
sublimator May 3, 2023
c16316d
chore: remove random.ts randomBytes indirection
sublimator May 3, 2023
4048fc0
chore: clean up imports
sublimator May 3, 2023
2ec8fc4
refactor: improve Sha512 typing and addU32 method
sublimator May 4, 2023
90603fc
feat: custom sha512 only createHash impl
sublimator May 4, 2023
e9da0ed
chore(ripple-binary-codec): s/create-hash/@nobles/hashes
sublimator May 4, 2023
7fd2aef
chore(ripple-keypairs): tidy up
sublimator May 4, 2023
3718f51
chore: clean imports
sublimator May 4, 2023
02fc2ac
refactor: Bytes -> ByteArray for number[] | Uint8Array
sublimator May 4, 2023
a731e9a
refactor(ripple-address-codec): s/create-hash/@noble/hashes
sublimator May 4, 2023
8ecaef7
refactor: easier to read
sublimator May 4, 2023
b6a2e4c
feat: add ripple-iso-crypto
sublimator May 5, 2023
442094c
feat: update package-lock.json
sublimator May 5, 2023
9f156bf
feat: update package-lock.json
sublimator May 5, 2023
bbe0ef1
refactor: simplify
sublimator May 5, 2023
a48e3ee
Merge remote-tracking branch 'origin/main' into nd-use-noble-libs-for…
sublimator May 5, 2023
cfe7687
feat: update package-lock.json
sublimator May 5, 2023
151b66f
feat: bump typescript to 5.x (#2387)
ckniffen Jul 18, 2023
5b336d8
feat: remove node 14 support (#2386)
ckniffen Jul 20, 2023
ab3adbe
feat: remove `lodash` as a dependency (#2378)
ckniffen Jul 25, 2023
d0c8d09
feat: remove `decimal.js` and `big-integer` (#2379)
ckniffen Jul 26, 2023
3df5004
feat(deps): make `https-proxy-agent` optional (#2388)
ckniffen Jul 26, 2023
e41967f
feat: remove 3 http related polyfills (#2375)
ckniffen Jul 26, 2023
12512d8
feat(deps): remove `assert-browserify` (#2389)
ckniffen Jul 26, 2023
6bdcf62
feat: remove `BroadcastClient` (#2408)
ckniffen Jul 27, 2023
3e37f7b
Merge remote-tracking branch 'origin/3.0' into nd-use-noble-libs-for-…
sublimator Aug 2, 2023
0352614
chore: rename ripple-iso-crypto -> @xrpl/crypto
sublimator Aug 2, 2023
ff768af
chore: fix lint errors
sublimator Aug 2, 2023
83504fa
chore: revert .eslintrc changes
sublimator Aug 2, 2023
ae64cf6
chore: remove stream from xrpl/webpack.config.js
sublimator Aug 2, 2023
71ccf1f
Revert "chore: remove stream from xrpl/webpack.config.js"
sublimator Aug 2, 2023
c822240
switch from `bip32` and `bip39` to `scure` equivalents
ckniffen Aug 2, 2023
5bcfd3b
chore: remove old files, deep .gitignore
sublimator Aug 3, 2023
d9597e1
Merge remote-tracking branch 'me/nd-use-noble-libs-for-ripple-keypair…
sublimator Aug 3, 2023
37a112d
fix: extract validateNode method
sublimator Aug 8, 2023
e4e89fe
chore: use v16 of @types/node
sublimator Aug 8, 2023
67f201e
fix: s/validateNode/validateKey/ and fix
sublimator Aug 8, 2023
5c759f4
remove bn.js dedupe code, more polyfills, and fix crypto/utils browse…
ckniffen Aug 10, 2023
9717d81
Update packages/xrpl-crypto/LICENSE
ckniffen Aug 10, 2023
38cc602
feat: bump typescript to 5.x (#2387)
ckniffen Jul 18, 2023
c36ca7e
feat: remove node 14 support (#2386)
ckniffen Jul 20, 2023
d57183b
feat: remove `lodash` as a dependency (#2378)
ckniffen Jul 25, 2023
fa9afc0
feat: remove `decimal.js` and `big-integer` (#2379)
ckniffen Jul 26, 2023
c3e8b62
feat(deps): make `https-proxy-agent` optional (#2388)
ckniffen Jul 26, 2023
00525d3
feat: remove 3 http related polyfills (#2375)
ckniffen Jul 26, 2023
40ba48b
feat(deps): remove `assert-browserify` (#2389)
ckniffen Jul 26, 2023
5a4ac86
feat: remove `BroadcastClient` (#2408)
ckniffen Jul 27, 2023
3250f58
BREAKING CHANGE(fix): `deriveKeypair` ignoring a manual `algorithm` b…
JST5000 Aug 8, 2023
a075f81
fix: Fix invariant assertion in binary-codec (#2429)
JST5000 Aug 9, 2023
4926fb1
test: remove extra polyfills only for testing (#2428)
ckniffen Aug 12, 2023
e1f5f7a
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Aug 12, 2023
7239db4
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Aug 12, 2023
6e2e589
remove references to stream-browserify
ckniffen Aug 12, 2023
a63ccef
feat: bump typescript to 5.x (#2387)
ckniffen Jul 18, 2023
351d66b
feat: remove node 14 support (#2386)
ckniffen Jul 20, 2023
b1ac7be
feat: remove `lodash` as a dependency (#2378)
ckniffen Jul 25, 2023
b4061b3
feat: remove `decimal.js` and `big-integer` (#2379)
ckniffen Jul 26, 2023
92b22dd
feat(deps): make `https-proxy-agent` optional (#2388)
ckniffen Jul 26, 2023
6ca089d
feat: remove 3 http related polyfills (#2375)
ckniffen Jul 26, 2023
7164415
feat(deps): remove `assert-browserify` (#2389)
ckniffen Jul 26, 2023
12175e5
feat: remove `BroadcastClient` (#2408)
ckniffen Jul 27, 2023
5845482
BREAKING CHANGE(fix): `deriveKeypair` ignoring a manual `algorithm` b…
JST5000 Aug 8, 2023
75fdbcc
fix: Fix invariant assertion in binary-codec (#2429)
JST5000 Aug 9, 2023
5f6923e
test: remove extra polyfills only for testing (#2428)
ckniffen Aug 12, 2023
528b17e
fix: make docs not output confusing information in xrpl client (#2337)
justinr1234 Aug 15, 2023
f397e15
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Aug 17, 2023
0a6c361
Update packages/ripple-keypairs/src/secp256k1.ts
sublimator Aug 17, 2023
6981004
fix: actually use Zero -> ZERO
sublimator Aug 22, 2023
5714484
feat: bump typescript to 5.x (#2387)
ckniffen Jul 18, 2023
f6c301b
feat: remove node 14 support (#2386)
ckniffen Jul 20, 2023
31ed870
feat: remove `lodash` as a dependency (#2378)
ckniffen Jul 25, 2023
cc70579
feat: remove `decimal.js` and `big-integer` (#2379)
ckniffen Jul 26, 2023
0d11467
feat(deps): make `https-proxy-agent` optional (#2388)
ckniffen Jul 26, 2023
f3c343d
feat: remove 3 http related polyfills (#2375)
ckniffen Jul 26, 2023
a5ff0a9
feat(deps): remove `assert-browserify` (#2389)
ckniffen Jul 26, 2023
69805ef
feat: remove `BroadcastClient` (#2408)
ckniffen Jul 27, 2023
ba40ba8
BREAKING CHANGE(fix): `deriveKeypair` ignoring a manual `algorithm` b…
JST5000 Aug 8, 2023
1d9b6c5
fix: Fix invariant assertion in binary-codec (#2429)
JST5000 Aug 9, 2023
67e05cd
test: remove extra polyfills only for testing (#2428)
ckniffen Aug 12, 2023
b03106b
fix: make docs not output confusing information in xrpl client (#2337)
justinr1234 Aug 15, 2023
5a168cf
feat: remove `util` polyfill and fix `HISTORY.md` (#2432)
ckniffen Aug 21, 2023
b76d5b2
Re-add the `walletFromSecretNumbers` custom algorithm test (#2437)
JST5000 Aug 21, 2023
f4d15e9
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Aug 28, 2023
2e58ac5
rename `@xrpl/crypto` to `@xrpl/isomorphic`, add docs, and add greate…
ckniffen Aug 30, 2023
03a0ac6
Removed HISTORY.md entry that was in the wrong spot and fixed top lev…
ckniffen Aug 30, 2023
933f3d5
Fix top level package.json
ckniffen Aug 30, 2023
de25cae
Add tests for `@xrplf/isomorphic` and make them run in the browser
ckniffen Aug 30, 2023
ccb5ab9
Spelled isomorphic wrong.
ckniffen Aug 31, 2023
31ca5ca
feat: bump typescript to 5.x (#2387)
ckniffen Jul 18, 2023
ec12484
feat: remove node 14 support (#2386)
ckniffen Jul 20, 2023
d480bc5
feat: remove `lodash` as a dependency (#2378)
ckniffen Jul 25, 2023
117c8f3
feat: remove `decimal.js` and `big-integer` (#2379)
ckniffen Jul 26, 2023
7fa7dc6
feat(deps): make `https-proxy-agent` optional (#2388)
ckniffen Jul 26, 2023
921c56c
feat: remove 3 http related polyfills (#2375)
ckniffen Jul 26, 2023
75dbb17
feat(deps): remove `assert-browserify` (#2389)
ckniffen Jul 26, 2023
20d16fe
feat: remove `BroadcastClient` (#2408)
ckniffen Jul 27, 2023
880b212
BREAKING CHANGE(fix): `deriveKeypair` ignoring a manual `algorithm` b…
JST5000 Aug 8, 2023
6f03f31
fix: Fix invariant assertion in binary-codec (#2429)
JST5000 Aug 9, 2023
ddae879
test: remove extra polyfills only for testing (#2428)
ckniffen Aug 12, 2023
448f813
fix: make docs not output confusing information in xrpl client (#2337)
justinr1234 Aug 15, 2023
0bb6152
feat: remove `util` polyfill and fix `HISTORY.md` (#2432)
ckniffen Aug 21, 2023
2e17923
Re-add the `walletFromSecretNumbers` custom algorithm test (#2437)
JST5000 Aug 21, 2023
8f9324e
test: update address-codec tests to typescript (#2447)
ckniffen Aug 31, 2023
c0d1db8
feat: add `xrpl-secret-numbers` to the monorepo (#2445)
ckniffen Sep 1, 2023
65a7398
Add `nftoken_id`, `nftoken_ids`, `offer_id` to meta fields (#2450)
tequdev Sep 1, 2023
fb61e8d
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Sep 1, 2023
69c4899
fix xrpl webpack build
ckniffen Sep 1, 2023
553b878
Removed a few more lines from webpack config
ckniffen Sep 5, 2023
020f6a4
remove brorand and force tsc build to build in the right spot.
ckniffen Sep 5, 2023
86777e9
fix linting
ckniffen Sep 5, 2023
7c548f8
fix: remove need to --force builds + cleanup (#2468)
ckniffen Sep 7, 2023
226d67a
feat: tighten up/document getAlgorithmFromKey
sublimator Sep 15, 2023
fa11b0b
feat: use boring if
sublimator Sep 15, 2023
660a76f
feat: ordering
sublimator Sep 15, 2023
7217c6d
test: run address-codec tests in the browser (#2466)
ckniffen Sep 19, 2023
e4649a0
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Sep 20, 2023
5ff5e60
incorporate cleanup from #2466
ckniffen Sep 20, 2023
6747ec5
Apply text suggestions from JST5000 code review
ckniffen Sep 20, 2023
48266c3
Throw exception when trying to verify a tx without a signature.
ckniffen Sep 20, 2023
3335976
Fix linting, Document removing brorand, and add comments
ckniffen Sep 20, 2023
e04e5fa
address feedback on test and readme variables
ckniffen Sep 20, 2023
ef77631
fix unit test, add docstrings for isomorphic/internal and enable expl…
ckniffen Sep 20, 2023
2ac3ecd
feat: flesh out getAlgorithmFromKey
sublimator Sep 21, 2023
a86736a
feat(isomorphic): update typing
sublimator Sep 21, 2023
d112e9a
feat(isomorphic): add TODO
sublimator Sep 21, 2023
8e1c8ac
feat(isomorphic): update toUint8Array
sublimator Sep 21, 2023
d0cdb32
fix: remove straggler
sublimator Sep 21, 2023
a1eddbd
feat(isomorphic): add more comments
sublimator Sep 21, 2023
968cde4
refactor(ripple-address-codec): s/Sequence/ByteArray and modernize ut…
sublimator Sep 21, 2023
600cd94
Add docstrings to where isomorphic wraps hashes
ckniffen Sep 21, 2023
bdbc043
document improved algorithm detection
ckniffen Sep 21, 2023
433d75f
combined aspects of verifySignature and wallet.verifyTransaction
ckniffen Sep 21, 2023
875d57e
fix linting and move authorizeChannel to new location to fix circular…
ckniffen Sep 21, 2023
38111b0
Fix docstring text error
ckniffen Sep 21, 2023
c66ff36
rename `normInput` to `normalizeInput` and `WithReference` to `Uint8A…
ckniffen Sep 21, 2023
18fe4a2
feat: restore tree shaking
sublimator Sep 22, 2023
fd7cba6
fix: clarify table
sublimator Sep 22, 2023
240a39c
refactor: introduce Method interface
sublimator Sep 22, 2023
392ab7b
chore: run lint --fix
sublimator Sep 22, 2023
4a99de8
refactor: s/Method/SigningMethod
sublimator Sep 22, 2023
b298e32
fix: thanks @ckniffen
sublimator Sep 22, 2023
2b72f4f
refactor: selectMethod -> getSigningMethod
sublimator Sep 22, 2023
6bf6dc1
chore: add TODO
sublimator Sep 22, 2023
2ec52ee
refactor(ripple-keypairs): reorganise file structure
sublimator Sep 22, 2023
5d8f397
fix: fix intellij
sublimator Sep 22, 2023
7f49612
refactor: remove unneeded type
sublimator Sep 22, 2023
4326c54
refactor: normedPrivateKey for @mvadari
sublimator Sep 22, 2023
378676f
refactor: colWidth for @mvadari
sublimator Sep 22, 2023
672a365
fix: remove straggling BN terms
sublimator Sep 22, 2023
dc298ca
refactor: s/methods/signing-methods
sublimator Sep 22, 2023
4ea77f9
document why isomorphic utils are typed they way the are
ckniffen Sep 22, 2023
db550d1
refactor: s/method/scheme
sublimator Sep 23, 2023
19c00a6
docs(ripple-keypair): set zip215:false and comment
sublimator Sep 23, 2023
4bf2452
feat: remove unneeded Array.isArray check
sublimator Sep 23, 2023
5894f6d
feat: explicitly set secp256k1 signature options
sublimator Sep 23, 2023
41c3601
fix: fix == to ===
sublimator Sep 23, 2023
8058c82
fix: remove unnecessary directive
sublimator Sep 23, 2023
51e494a
fix: fix ZIP 215 comments
sublimator Sep 23, 2023
fa3447e
specify type keyword in import
ckniffen Sep 28, 2023
6f5ddb5
refactor: address outstanding TODO, ensure consistent SigningScheme i…
sublimator Sep 29, 2023
ae3493e
Revert "refactor: address outstanding TODO, ensure consistent Signing…
sublimator Sep 29, 2023
5a692ec
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Oct 5, 2023
c356b2d
fix: consistent-type-imports for @mvadari
sublimator Oct 6, 2023
13fc7d5
fix: add type keyword, new constants, delete TODOs
ckniffen Oct 6, 2023
0c9ff51
missed one place to use the PRIVATE constant
ckniffen Oct 6, 2023
db67a6d
Merge branch '3.0' into nd-use-noble-libs-for-ripple-keypairs-2023-04-13
ckniffen Oct 6, 2023
3cc7e3d
feat: use literal types consistently
sublimator Oct 7, 2023
4b179ec
chore: quickly remove redundant copy
sublimator Oct 7, 2023
3b96a00
fix: only import methods from `ripple-address-codec` that are used
ckniffen Oct 9, 2023
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
10 changes: 1 addition & 9 deletions UNIQUE_SETUPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ To use `xrpl.js` with React, you need to install shims for core NodeJS modules.
```shell
npm install --save-dev \
buffer \
crypto-browserify \
process \
stream-browserify
process
```

2. Modify your webpack configuration
Expand All @@ -41,8 +39,6 @@ To use `xrpl.js` with React, you need to install shims for core NodeJS modules.
module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
Object.assign(fallback, {
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
ws: require.resolve("xrpl/dist/npm/client/WSWrapper"),
});
config.resolve.fallback = fallback;
Expand Down Expand Up @@ -152,8 +148,6 @@ build: {
resolve: {
alias: {
events: 'events',
crypto: 'crypto-browserify',
stream: 'stream-browserify',
ws: 'xrpl/dist/npm/client/WSWrapper',
},
}})
Expand All @@ -166,8 +160,6 @@ npm install --save-dev @esbuild-plugins/node-globals-polyfill \
rollup-plugin-polyfill-node \
&& npm install
events \
crypto-browserify \
stream-browserify \
xrpl
```

Expand Down
Loading