You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any contributions to OrbitDB are very welcome, We can add the repo to the orbitdb organization and give you full access to be able to maintain the official repo.
Before moving ahead, I would like to confirm the new repo with one of our other maintainers so if you don't mind holding of while I confirm this.
Hi, I went ahead and started a fork the other day. At the moment, I have a rough draft going. It took quite a while and although I tried keeping files as .js at first, I ended up just going all in with .ts. I'm currently working towards getting the tests passing again.
Hello,
I agree that a TypeScript implementation would help a lot. As of now we have a separate types repository, if that helps anyone, but sometimes it's briefly out of date with the main repo's releases.
Any contributions to OrbitDB are very welcome, We can add the repo to the orbitdb organization and give you full access to be able to maintain the official repo.
Before moving ahead, I would like to confirm the new repo with one of our other maintainers so if you don't mind holding of while I confirm this.
Thanks for your interest in OrbitDB.
Are you considering a new (parallel) repository for TS or rather converting this JS repo to TS?
@julienmalard I was just considering converting this JS repo to TS unless you think we should do otherwise. Let me know. However, I must mention that I did make some upgrades as well. Right now I'm in the process of getting tests working again.
That would be my personal recommendation as well @robksawyer because maintaining two repositories (whether TS and JS or JS and TS types) is very complicated. However, the only doubt is that I'm not sure if the OrbitDB project owners agree to switching to TS... if they do I'd be very happy to help out if you like!
Regarding upgrades, did you upgrade to libp2p v3? If so, that might be the issue, since it's so far incompatible with the @chainsage/libp2p-gossipsub module that is used for syncing OrbitDB databases and which is still working on libp2p v3 compatibility (ChainSafe/js-libp2p-gossipsub#532).
@julienmalard I honestly just plunged in to this without really doing much research as I should have. However, I approach most projects like that and end up learning throughout. So, with that said, maybe have a look and you can see where I'm at via the fork here https://github.com/shmaplex/orbitdb. I ended up changing over to vitest as well. It'd be great to get your feedback and the help on making the tests work. I'm not opposed to switching anything currently setup in the fork as well if you have better solutions.
@robksawyer I do believe that vitest is a good tool to adopt.
I looked quickly at your fork and it looks quite good. Do you have any particular compilation difficulties or specific tests that are failing?
@julienmalard sorry for the delay, I've actually started to go ahead and implement the existing version with your core types. They're working really well so far!
However, I'm getting a bit confused on some implementation and could use some help here. I'm working with a Wails app and trying to save the identity and restore it to use on existing local saved databases. And well, I keep running into various errors, considering I've tried multiple ways of restoring, via getIdentity.
Mostly this one:
2025/11/29 12:56:03 [P2P] ✨ Creating new OrbitDB identity...
2025/11/29 12:56:03 [P2P] 💾 Saved new identity: 02dd95dd82f5a0ee6a3578eee4ed92a49f245d40d7c890c6260e3c2ea3fbc2cab8
[P2P] 2025-11-29T03:56:03.209Z - ❌ Failed to open Debug DB: CBOR decode error: data to decode must be a Uint8Array
2025/11/29 12:56:03 [P2P] [P2P] 2025-11-29T03:56:03.216Z - ⚠️ Fallback to in-memory Debug DB
[P2P] 2025-11-29T03:56:03.216Z - ❌ Failed to initialize debug DB entries: CBOR decode error: data to decode must be a Uint8Array
[P2P] 2025-11-29T03:56:03.228Z - Critical error initializing OrbitDB databases: CBOR decode error: data to decode must be a Uint8Array
Failed to start P2P node: Error: Failed to initialize databases. Node cannot start.
at wa (file:///Users/robksawyer/Sites/Nous/nous-app/frontend/dist/p2p/setup.js:23:173868)
at async UI (file:///Users/robksawyer/Sites/Nous/nous-app/frontend/dist/p2p/setup.js:23:188071)
It all works fine on first load, but then when restoring the identity or the databases, I start to run into trouble.
it doesn't seem to like it. Say for instance I save the identity to a json file and then use getIdentity(savedIdentity.hash), it is throwing an error. Should this work, or is my implementation off?
@julienmalard Yeah, I figured as much. Hopefully, I can finish getting these tests working soon and then we'll have an up to date version of orbitdb. I ended up getting a bit side tracked by a project. But, I'm using orbitdb in it, so I'm going to need to make it happen soon enough.
Activity
haydenyoung commentedon May 18, 2025
Any contributions to OrbitDB are very welcome, We can add the repo to the orbitdb organization and give you full access to be able to maintain the official repo.
Before moving ahead, I would like to confirm the new repo with one of our other maintainers so if you don't mind holding of while I confirm this.
Thanks for your interest in OrbitDB.
haydenyoung commentedon May 19, 2025
@vacekj If you would like to start the implementation in your own repo and then we can review and add to the OrbitDB repo once ready.
vacekj commentedon May 19, 2025
I already started the ts impl in vacekj/orbitdb. I'll also be reworking the build system to be faster and more modern. Still WIP
robksawyer commentedon Nov 6, 2025
@vacekj Any new developments here? Considering this for a new project in the future.
vacekj commentedon Nov 7, 2025
@robksawyer feel free to take it on, build on my fork if you'd like.
robksawyer commentedon Nov 8, 2025
Hi, I went ahead and started a fork the other day. At the moment, I have a rough draft going. It took quite a while and although I tried keeping files as .js at first, I ended up just going all in with .ts. I'm currently working towards getting the tests passing again.
julienmalard commentedon Nov 17, 2025
Hello,
I agree that a TypeScript implementation would help a lot. As of now we have a separate types repository, if that helps anyone, but sometimes it's briefly out of date with the main repo's releases.
julienmalard commentedon Nov 17, 2025
Are you considering a new (parallel) repository for TS or rather converting this JS repo to TS?
robksawyer commentedon Nov 18, 2025
@julienmalard I was just considering converting this JS repo to TS unless you think we should do otherwise. Let me know. However, I must mention that I did make some upgrades as well. Right now I'm in the process of getting tests working again.
julienmalard commentedon Nov 19, 2025
That would be my personal recommendation as well @robksawyer because maintaining two repositories (whether TS and JS or JS and TS types) is very complicated. However, the only doubt is that I'm not sure if the OrbitDB project owners agree to switching to TS... if they do I'd be very happy to help out if you like!
Regarding upgrades, did you upgrade to libp2p v3? If so, that might be the issue, since it's so far incompatible with the
@chainsage/libp2p-gossipsubmodule that is used for syncing OrbitDB databases and which is still working on libp2p v3 compatibility (ChainSafe/js-libp2p-gossipsub#532).robksawyer commentedon Nov 19, 2025
@julienmalard I honestly just plunged in to this without really doing much research as I should have. However, I approach most projects like that and end up learning throughout. So, with that said, maybe have a look and you can see where I'm at via the fork here https://github.com/shmaplex/orbitdb. I ended up changing over to vitest as well. It'd be great to get your feedback and the help on making the tests work. I'm not opposed to switching anything currently setup in the fork as well if you have better solutions.
julienmalard commentedon Nov 20, 2025
@robksawyer I do believe that vitest is a good tool to adopt.
I looked quickly at your fork and it looks quite good. Do you have any particular compilation difficulties or specific tests that are failing?
robksawyer commentedon Nov 29, 2025
@julienmalard sorry for the delay, I've actually started to go ahead and implement the existing version with your core types. They're working really well so far!
However, I'm getting a bit confused on some implementation and could use some help here. I'm working with a Wails app and trying to save the identity and restore it to use on existing local saved databases. And well, I keep running into various errors, considering I've tried multiple ways of restoring, via getIdentity.
Mostly this one:
It all works fine on first load, but then when restoring the identity or the databases, I start to run into trouble.
Is there anyone (maybe @vacekj ?) available that can explain the proper way to implement this or take a look at: https://github.com/shmaplex/nous/blob/main/frontend/server/src/identity.ts here and give me any suggestions.
If you want to contribute to the project as well, would love to have some help. It's not a small task.
julienmalard commentedon Nov 29, 2025
Thanks @robksawyer !
Regarding identities, I think you need to use
decodeIdentity(https://github.com/orbitdb/orbitdb/blob/main/src/identities/identity.js) due to the Uint8Arrays in the identity object.robksawyer commentedon Nov 29, 2025
@julienmalard I'll give that a shot. Thanks!
[UPDATE]: Upon further investigation I see that
decodeIdentityis being run ingetIdentity:I am actually trying to run
getIdentitywith the saved hash. However, when I pass the hash that was retrieved from:it doesn't seem to like it. Say for instance I save the identity to a json file and then use
getIdentity(savedIdentity.hash), it is throwing an error. Should this work, or is my implementation off?[UPDATE]: It seems my issue is related to #1244.
julienmalard commentedon Nov 30, 2025
@robksawyer Ah, that might be it! Are you on libp2p@v2 ?
robksawyer commentedon Dec 10, 2025
@julienmalard I'm currently using
"libp2p": "^3.1.2",and"@orbitdb/core": "^3.0.2",. 🤔julienmalard commentedon Dec 10, 2025
That might explain things...orbitdb currently requires libp2p@2 (as well as the corresponding helia and blockstore versions).
robksawyer commentedon Dec 10, 2025
@julienmalard Yeah, I figured as much. Hopefully, I can finish getting these tests working soon and then we'll have an up to date version of orbitdb. I ended up getting a bit side tracked by a project. But, I'm using orbitdb in it, so I'm going to need to make it happen soon enough.