We need a macro that essentially generates a metadata file of the blueprint and export it as json. This would be used by other tools, like the gadget CLI, which then could convert this JSON into an extrinsic to create the blueprint on-chain.
Example Blueprint
/// Generates a key with a specified threshold.
#[job(params(t))]
fn keygen(t: u8, ..) -> Result<Vec<u8>> {
// ...
}
/// Signs a message using the generated key.
#[job(params(keygen_id, message_hash))]
#[verifier(Evm("0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97")]
fn sign(keygen_id: u64, message_hash: [u8; 32], ..) -> Result<Vec<u8>> {
// ...
}
Goal
We need a macro that essentially generates a metadata file of the blueprint and export it as json. This would be used by other tools, like the gadget CLI, which then could convert this JSON into an extrinsic to create the blueprint on-chain.
Example Blueprint
blueprint.json specification