A minimal Docker Compose setup to run a single-node Tapyrus Core chain in dev mode, plus an interactive Ruby REPL connected to the node’s RPC.
Tapyrus is an open-source, federated blockchain platform developed by Chaintope.
- Federated Network: Multiple “signers” produce blocks with a threshold Schnorr signature scheme.
- Custom Tokens: Supports colored-coin style tokens (
OP_COLOR) alongside native TPC. - Dev Mode (“regtest”): Spin up a self-contained, single-node chain for rapid development.
Learn more:
- Docker
- Docker Compose
- A POSIX-compatible shell (bash, zsh, etc.)
- Internet access to pull images and fetch the
tapyrusgem
├── docker-compose.yml
├── tapyrus.conf
├── data/
└── tapyrus-client/
└── Dockerfile.dev
docker-compose.yml•tapyrusd: Tapyrus Core node in dev mode (imports a fixed genesis block viaGENESIS_BLOCK_WITH_SIG). •tapyrus-client: Ruby IRB withtapyrus‐gem, auto-connected to RPC.tapyrus.confDev-mode settings (networkid=1905960821, RPC credentials, keypool, bind, etc.).data/Persists blockchain & wallet data between runs.tapyrus-client/Builds Ruby image withtapyrus‐gem.
Set up a local Tapyrus dev node and start mining TPC.
In one terminal, run:
docker compose up tapyrusdThis launches the Tapyrus daemon in dev mode, initializes the blockchain from a fixed genesis block, and opens the JSON-RPC interface.
In a second terminal, run:
docker compose run --rm tapyrus-clientThis starts an IRB session with the tapyrus gem pre-loaded and connected to
your running node. You should see:
✓ Tapyrus RPC client is ready ▶︎ $client (tapyrusd:2377)
Now you can invoke RPC methods directly from Ruby.
First, create a fresh address to receive your coinbase rewards, then import the default aggregate key so the node can sign blocks.
addr = $client.getnewaddress
agg_wif = "cUJN5RVzYWFoeY8rUztd47jzXCu1p57Ay8V7pqCzsBD3PEXN7Dd4" # default dev Aggregate key
$client.importprivkey(agg_wif, "dev_aggkey", false) # label, skip rescanMining produces new blocks and awards coinbase outputs to your address. You must mine at least 101 blocks for the first coinbase output to mature.
block_hashes = $client.generatetoaddress(101, addr, agg_wif)Here, 101 blocks = 1 block to mature the coinbase + 100 confirmations for additional security.
Once mining is complete, list all unspent transaction outputs in your wallet:
$client.listunspentA typical response looks like:
[
{
"txid" => "abcd1234…",
"vout" => 0,
"address" => addr,
"amount" => 50.0,
"confirmations" => 101
}
]You now have 50 TPC ready to spend. Feel free to send transactions, create colored tokens, or explore other Tapyrus features.
Tips
$client.dumpprivkey(addr)shows the private key for any address.- You may see references to
$client.generate(101, agg_wif), but this method is deprecated.- Always prefer
generatetoaddress + importprivkeyfor compatibility and clarity.
When you’re done developing and want to stop the node:
-
Exit the Ruby IRB session In your IRB terminal, type
exitor pressCtrl-D. This will automatically stop thetapyrus-clientcontainer. -
Stop all running containers & remove volumes From your project root (where
docker-compose.ymllives), run:docker compose down --volumes --remove-orphans
--volumes(or-v) deletes any named volumes (e.g. the contents of./data/).--remove-orphanscleans up any leftover containers not defined in your compose file.
At this point, no Tapyrus containers are running. To restart later (preserving existing chain data), simply run through the Quick Start steps again.