FIrst to make things clear: There will be a DevNet first, that is semi-public. We actually have it running already, but need to still fix some things, so stay tuned. But the DevNet might be restarted at any point, so it’s only for people, who can live with that. I might finish the core-rs client API in a similar time-frame, so that you have an easy interface to play with the DevNet in Rust. It’ll basically look like this:
use nimiq_lib::ClientConfig;
fn main() {
let client = ClientConfig::builder()
.ws("mercury.devnet", None)
.instantiate_client()
.unwrap_or_else(|e| panic!("Something went wrong: {}", e);
let consensus = client.consensus();
println!("We're at: #{}", consensus.blockchain.block_number());
}
The TestNet will come later, once we can be really sure that the network runs stable, in the sense that it won’t stop because of a bug in the validator code.
So you’ll get the Rust client API, which is just a wrapper for the underlying stuff - which you can still access. You can even use only the underlying APIs wihtout this nimiq_lib
crate and build something with it. Our code is split up in many modules, so just pick what you want. But the APIs that are behind the client API, won’t have good documentation (if at all), and won’t be as ergonimic to use.
For JavaScript: We’re not writing Albatross in Javascript. As you might know, we’re also transitioning Nimiq 1.0 to Rust. There is a working Rust node, and we plan on exporting parts of it to WebAssembly, which would then replace parts of core-js.
But for Albatross we will write all of the core in Rust, compile it to WebAssembly and then possibly wrap it into some small JavaScript layer, to make it easy to use. So there will be an Javascript client API for Albatross at some point, but not for the DevNet.
At this stage of Albatross is also doesn’t make sense to run it in a browser, since it only supports full sync. And to sync a node right now is almost impossible, as blocks are created in sub-second intervals. Basically the full-sync can’t keep up. But, we already have a solution to this problem that Pascal is implementing right now. Obviously, we will finish this before opening up the DevNet. But it will still be resource-intensive, so nothing in-browser for now. For much later (probably for the TestNet) we will have another sync mode using zero-knowledge proofs, which would then allow a browser to sync up quickly. Pascal is also looking into that.