Chromia Skill
by @deconsoleapp
Guides AI agents through Chromia blockchain dApp development using the Rell language, Chromia CLI (chr), and Postchain nodes. Covers chromia.yml configuratio...
chromia.yml Structure
The chromia.yml file is the project root config. Key concepts:
blockchains: key maps blockchain names to Rell modules. A single project can define multiple blockchains, each pointing to a different module entry point.blockchains..module . Cannot be module.rell directly β use the folder name instead.compile.rellVersion: Always respect the version set here. Do not assume or override it.libs section. Never change versions without explicit user instruction.blockchains:
my_dapp:
module: main
compile:
rellVersion: 0.14.5
libs:
ft4:
registry: https://gitlab.com/chromaway/ft4-lib.git
path: rell/src/lib/ft4
tagOrBranch: v1.1.0r
rid: x"FEEB0633698E7650D29DCCFE2996AD57CDC70AA3BDF770365C3D442D9DFC2A5E"
insecure: false
iccf:
registry: https://gitlab.com/chromaway/core/directory-chain
path: src/lib/iccf
tagOrBranch: 1.87.0
rid: x"9C359787B75927733034EA1CEE74EEC8829D2907E4FC94790B5E9ABE4396575D"
insecure: false
database:
schema: schema_my_dapp
test:
modules:
- test
moduleArgs
Module arguments are injected via chromia.yml and accessed in Rell through chain_context.args:
# Production config
blockchains:
my_dapp:
module: main
moduleArgs:
lib.ft4.core.accounts:
rate_limit:
active: true
max_points: 10
recovery_time: 5000
points_at_account_creation: 2
lib.ft4.core.admin:
admin_pubkey: ""
my_module:
admin_pubkey: ""Production pubkey setup β do this before writing the config:
Before writing any pubkey field in production moduleArgs, pause and tell the user:
1. Run chr keygen --key-id to generate a keypair (stored in ~/.chromia/)
2. Provide the public key β readable via cat ~/.chromia/.pubkey or from CLI output
3. Store the private key (~/.chromia/) in .env as e.g. ADMIN_PRIVKEY= β it will be needed for signing admin transactions from the client
4. Add .env to .gitignore
Only after the user provides the pubkey should you write it into the config. Never write PLACEHOLDER_PUBKEY and move on β the config will not work.
Test config β use rell.test.keypairs.alice keypair (deterministic, no real-world value)
pubkey: 02466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f27
privkey: 0101010101010101010101010101010101010101010101010101010101010101
When generating client code that signs with this test admin key, always provide
the private key so the user can store it (e.g. in .env) for later signing.
test:
moduleArgs:
lib.ft4.core.accounts:
rate_limit:
active: true
max_points: 10
recovery_time: 5000
points_at_account_creation: 2
lib.ft4.core.admin:
admin_pubkey: "02466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f27"
my_module:
admin_pubkey: "02466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f27"
In Rell, define a matching module_args struct:
struct module_args {
admin_pubkey: pubkey;
}
Access with chain_context.args.admin_pubkey. Every module can have its own module_args.
gtx.modules
Used to register Java/Kotlin GTX modules for extensions (oracle feeds, sync infrastructure):
blockchains:
my_dapp:
module: main
config:
gtx:
modules:
- "net.postchain.stork.StorkOracleGTXModule"
database.schema
Each blockchain should use a unique schema name to avoid table collisions when running multiple chains locally.
clawhub install chromia-skill