#warp #interact #node #dre

warp_dre

Rust package to interact with Warp DRE nodes

2 stable releases

1.0.1 May 9, 2023
1.0.0 Mar 15, 2023

#48 in #warp

Custom license

17KB
411 lines

Warp DRE

crates.io

Rust package to interact with Warp's DRE nodes.

Example

    let client = warp_dre::WarpDRE::new(WarpDREOptionsBuilder::default().build()?);
    let contract_tx_id = "_z0ch80z_daDUFqC9jHjfOL8nekJcok4ZRkE_UesYsk";

    let mut query: HashMap<String, String> = HashMap::new();
    query.insert("query".into(), "$.name".into());

    let res = client.get_contract_with_query(contract_tx_id, query).await?;
    let r = res.result.unwrap();
    let result = r[0].as_str();
    assert!(result == Some("VouchDAO"));

Dependencies

~37–54MB
~1M SLoC