charms 13.0.0

Programmable assets on Bitcoin and beyond
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use charms_client::{NormalizedSpell, tx::Tx};
use charms_lib::SPELL_VK;

pub mod bitcoin_tx;
pub mod cardano_tx;

#[tracing::instrument(level = "debug", skip_all)]
pub fn spell(tx: &Tx, mock: bool) -> Option<NormalizedSpell> {
    charms_client::tx::committed_normalized_spell(SPELL_VK, tx, mock)
        .map_err(|e| {
            tracing::debug!("spell verification failed: {:?}", e);
            e
        })
        .ok()
}