41 Commits

Author SHA1 Message Date
Franck Royer
98c93c8283
Upgrade libp2p, peer-id, multiaddr
Use new packages and fix most compilation errors.
Remaining error to be dealt with in waku.ts.
2022-07-20 12:40:37 +10:00
Franck Royer
6c30e8d400
Use PeerId.toString() instead of toB58String()
New version of `PeerId` will only support `toString`
2022-07-20 11:55:43 +10:00
Franck Royer
c85c39a427
Consolidate signature verification logic 2022-05-20 12:06:14 +10:00
Franck Royer
6ace11f18f
Remove unused interface 2022-05-20 11:45:48 +10:00
Franck Royer
4cb8769271
Remove unused constant 2022-05-20 11:44:58 +10:00
Franck Royer
b93c876043
Consolidate compress public key functions 2022-05-20 11:42:01 +10:00
Franck Royer
479081f611
Remove unnecessary abstract class 2022-05-20 11:38:44 +10:00
Franck Royer
5e1cd78288
Remove unused code 2022-05-20 11:27:57 +10:00
Franck Royer
17c8335d6f
Remove file 2022-05-20 11:27:15 +10:00
Franck Royer
c6189170e0
Remove unused code 2022-05-20 11:05:44 +10:00
Franck Royer
ee8ba791cc
Move ecdsa sign to crypto.ts 2022-05-20 10:59:33 +10:00
Franck Royer
595fb877eb
Move keccak256 function to crypto.ts 2022-05-20 10:59:32 +10:00
Franck Royer
4639537fd6
Ensure ENR.create is used instead of the constructor 2022-05-19 15:17:19 +10:00
Franck Royer
1d8e3837ea
Replace deprecated multihashes with multiformats 2022-05-19 15:17:16 +10:00
Franck Royer
e8ba7f6440
Calculate peer id at creation
As the peer id method calculation method will become async.
2022-05-19 15:16:35 +10:00
Franck Royer
d3671b7167
Remove secp256k1 usage from entree.ts 2022-05-09 23:10:15 +10:00
Franck Royer
3f6d9fb590
Remove secp256k1 usage from secp256k1.ts 2022-05-09 23:10:14 +10:00
Franck Royer
ae6cb98d5d
Remove secp256k1 usage from enr.ts 2022-05-09 23:10:14 +10:00
Franck Royer
12528acaeb
Remove node crypto import 2022-05-09 16:05:22 +10:00
Franck Royer
a5219efc14
Support ENR waku2 field 2022-05-05 14:40:53 +10:00
Franck Royer
d30a918a44
Fix odd case where 0 is encoded as an empty byte array 2022-05-05 14:40:53 +10:00
Franck Royer
5de2f1996f
Facilitate the use of a polyfill for BigInt
By preferring the use of `BigInt` over integer literal (`n` postfix).
2022-05-02 14:51:14 +10:00
Franck Royer
52009b7be9
Use concat to simplify code 2022-03-25 17:08:03 +11:00
Franck Royer
bf63e85e9e
Move utf-8 utils to utils 2022-03-25 17:08:03 +11:00
Franck Royer
d0dea3884b
Replace Base 64 buggy conversion functions with uint8arrays 2022-03-25 11:02:40 +11:00
Franck R
c806135810
Revert "Use BigInt constructor instead of happening n as it seems to have better browser support. (#611)" (#613)
This reverts commit f4e81dd29ce6a0c98a9c10d7a8bf3e6a3f17b0a0.
2022-03-13 20:33:47 +11:00
Franck R
f4e81dd29c
Use BigInt constructor instead of happening n as it seems to have better browser support. (#611) 2022-03-13 10:11:04 +11:00
Franck Royer
f73afc5244
Handle errors thrown when converting to utf-8 2022-03-01 16:58:15 +11:00
Franck R
64657a250f
Replace rlp with ethers' rlp (#526) 2022-02-16 14:08:48 +11:00
Franck R
297d65ce03
Reduce Buffer usage in ENR module (#522) 2022-02-16 12:11:54 +11:00
Franck R
cfc5eee4ff
Reduce buffer usage (#521) 2022-02-14 10:50:02 +11:00
Franck R
4c80f7f0df
Remove odd prettier config (#500) 2022-02-04 14:12:00 +11:00
Franck R
6cb2b6615b
Update to latest typescript (#438) 2022-01-27 15:25:17 +11:00
Franck R
c31972de02
Reorganize tests to ensure they all display under a section (#421) 2022-01-24 11:00:41 +11:00
Franck R
e1629b1a96
Fix DNS Discovery (#411) 2022-01-17 14:21:23 +11:00
Franck Royer
b65ab17cb9
Expose types to ensure documentation is complete 2022-01-13 16:40:11 +11:00
Franck Royer
6276b1537f
Remove unnecessary declaration of Buffer
It's handled by the polyfill config in webpack.
2022-01-13 16:40:10 +11:00
Franck Royer
e47335f4c0
Implement DNS Discovery and ENR tree 2022-01-13 15:38:22 +11:00
Franck
7a3e46a384
Add encoded value for reference for other implementations 2021-12-07 09:16:32 +11:00
Franck
eb1b384be4
Remove console.log 2021-12-06 14:32:18 +11:00
F
01c66f7e89
Add ENR with multiaddr
Imported from https://github.com/D4nte/discv5/pull/1
Replaced bcrypto backend with secp256k1.
2021-12-06 14:29:08 +11:00