Getting Started
From zero to a running app in 5 minutes
Quick path
Install merod, run a node, install the sample kv-store app, create a context, and invoke methods with meroctl.
1
Install merod
cargo install --git https://github.com/calimero-network/core merod
Or download a prebuilt binary from GitHub releases.
2
Initialize a node
merod --home ~/.calimero --node mynode init \
--server-port 2428 --swarm-port 2528
--server-port 2428 --swarm-port 2528
3
Start the node
merod --home ~/.calimero --node mynode run
The node is listening. Admin API: http://localhost:2428/admin-api
4
Build and install an app
cd apps/kv-store && ./build.sh
meroctl --node mynode app install --path res/kv_store.wasm
meroctl --node mynode app install --path res/kv_store.wasm
Note the ApplicationId printed in the output.
5
Create a namespace and context
meroctl --node mynode namespace create --application-id <APP_ID>
meroctl --node mynode context create --application-id <APP_ID> --group-id <NAMESPACE_ID>
meroctl --node mynode context create --application-id <APP_ID> --group-id <NAMESPACE_ID>
A namespace is the root group; context create requires --group-id (pass the NamespaceId). Save the ContextId and MemberPublicKey from the response.
6
Call a method
meroctl --node mynode call set --context <CTX_ID> \
--args '{"key":"hello","value":"world"}'
--args '{"key":"hello","value":"world"}'
meroctl --node mynode call get --context <CTX_ID> \
--args '{"key":"hello"}'
--args '{"key":"hello"}'