Commit Graph

107 Commits

Author SHA1 Message Date
Derrick Hammer b578a32a44
fix: wrap db.get in a try/catch 2023-11-18 04:00:00 -05:00
Derrick Hammer 1c63497d2e
fix: convert paths to an object 2023-11-17 09:54:07 -05:00
Derrick Hammer 23b8c01d1c
fix: bad import 2023-11-17 08:31:56 -05:00
Derrick Hammer ec815833ef
feat: add getMetadataByCID and downloadBytesByHash 2023-11-17 08:05:31 -05:00
Derrick Hammer 4693117c76
feat: add metadata structures and ser/der functions 2023-11-17 08:05:00 -05:00
Derrick Hammer 892dd6ccd4
refactor: update constants.ts 2023-11-17 08:04:19 -05:00
Derrick Hammer 6ff8a84ed8
feat: add encrypted_cid.ts 2023-11-17 08:04:01 -05:00
Derrick Hammer 828741f569
fix: export StorageLocationProvider 2023-11-17 05:03:18 -05:00
Derrick Hammer 6d19fdb66e
feat: add StorageLocationProvider 2023-11-17 04:57:15 -05:00
Derrick Hammer 86522e1ffe
feat: add getCachedStorageLocations method 2023-11-17 04:56:57 -05:00
Derrick Hammer 3ad41c75c1
fix: need to store NodeId not the string form of it 2023-11-17 04:56:19 -05:00
Derrick Hammer 155e0b4c0c
fix: bad base32 encoding, multiformats handles the prefix 2023-09-19 19:31:11 -04:00
Derrick Hammer e25087890f
feat: add fromRegistryPublicKey helper 2023-09-11 13:21:39 -04:00
Derrick Hammer e03eb41e96
fix: signRegistryEntry accidentally recursive 2023-09-11 13:15:18 -04:00
Derrick Hammer 517446310d
fix: if the registry entry hash type is not ed25519, return a new cid with the type set to raw 2023-09-09 15:56:00 -04:00
Derrick Hammer 17151d25d0
fix: don't prefix base58 since encoder already does it 2023-09-09 15:30:44 -04:00
Derrick Hammer 0ad6d611a6
refactor: update valid method to be verify, and handle string input 2023-09-08 12:30:50 -04:00
Derrick Hammer 565bed46d5
feat: add valid to CID 2023-09-08 10:01:29 -04:00
Derrick Hammer bf521425b3
feat: add fromRegistry to CID 2023-09-08 09:22:01 -04:00
Derrick Hammer 0c060fde55
fix: export KeyPairEd25519 as a type 2023-09-08 07:53:37 -04:00
Derrick Hammer b74fa99783
feat: add more s5 constants 2023-09-08 06:11:03 -04:00
Derrick Hammer 4a157d9eca
feat: add CID.fromHash 2023-09-07 18:51:40 -04:00
Derrick Hammer cc5cbdb860
feat: add CID class 2023-09-07 18:40:27 -04:00
Derrick Hammer 3c789459ec
refactor: extract signRegistryEntry as a utility function and make the instance method a wrapper 2023-09-07 12:34:05 -04:00
Derrick Hammer 8b87a61925
fix: export util functions 2023-09-04 09:26:03 -04:00
Derrick Hammer 66612e9afc
refactor: make instance methods deserializeRegistryEntry, verifyRegistryEntry, serializeRegistryEntry wrappers of the functional ones 2023-09-04 08:48:01 -04:00
Derrick Hammer 9c471e6949
fix: fix outdated reads. port of s5 08c4bda5c1109673fba907ba119c9855fc3fcf68 0d2bf39845b37dd0b2ebe06be34c5d51e7060280 2023-09-04 07:19:19 -04:00
Derrick Hammer b91f33fb65
refactor: add publicKeyRaw method to ed25519 2023-09-02 22:35:38 -04:00
Derrick Hammer a34bd1b813
refactor: move hash types to frozen object group 2023-09-02 06:10:20 -04:00
Derrick Hammer 6d575a1cec
fix: freeze REGISTRY_TYPES 2023-09-02 05:36:31 -04:00
Derrick Hammer d05d011fcd
refactor: switch to using frozen objects to store CID_TYPES, METADATA_TYPES, and PARENT_LINK_TYPES 2023-09-02 05:33:44 -04:00
Derrick Hammer cc66a0d839
feat: add const groups of the different set of types 2023-09-02 05:19:09 -04:00
Derrick Hammer 6cc0bd6500
fix: if a peer completed the handshake, but our node is stopped, end the peer and abort 2023-09-02 04:50:52 -04:00
Derrick Hammer 8373114d5c
fix: utf8ToBytes no longer needed 2023-09-01 23:31:49 -04:00
Derrick Hammer 384e941b09
fix: set sublevel valueEncoding to buffer 2023-09-01 23:10:18 -04:00
Derrick Hammer a6c02bc772
fix: set sublevel valueEncoding to buffer 2023-09-01 23:09:13 -04:00
Derrick Hammer 419c7f85a8
fix: convert binary string to uint8array 2023-09-01 21:48:17 -04:00
Derrick Hammer deebe15c6f
fix: add started state on node and check it on connectToNode 2023-09-01 21:07:28 -04:00
Derrick Hammer e3b7760050
fix: need to use close not end on WS transport 2023-09-01 21:01:24 -04:00
Derrick Hammer dfe9e3f082
fest: add stop method 2023-09-01 20:55:21 -04:00
Derrick Hammer 90c0614773
refactor: add end method to transports 2023-09-01 20:55:08 -04:00
Derrick Hammer fabda024ad
fix: fix iteration of peers 2023-09-01 20:46:37 -04:00
Derrick Hammer daf357cd63
fix: correct argument order on ed25519.verify 2023-09-01 20:41:32 -04:00
Derrick Hammer 1a3241688c
fix: add try/catch on db.get 2023-09-01 20:27:34 -04:00
Derrick Hammer 4e6f1b3ad3
refactor: use node.services.p2p 2023-09-01 20:20:30 -04:00
Derrick Hammer d9af5bd015
fix: set node registry service in service constructor 2023-09-01 20:20:08 -04:00
Derrick Hammer b34b7a3a01
feat: add eventemitter support on p2p service and have the handshakedone message emit peerConnected 2023-09-01 19:49:42 -04:00
Derrick Hammer 2061f6330d
feat: add BOOTSTRAP_NODES constant 2023-09-01 19:21:59 -04:00
Derrick Hammer ca1a3dd5e7
fix: fix import 2023-09-01 09:24:50 -04:00
Derrick Hammer 5d26f1ec61
refactor: export SignedRegistryEntry 2023-09-01 09:20:12 -04:00