A library to submit tifi extrinsics to a tidechain node via RPC.
This project is currently under active development.
Take a look in the examples folder for various tidext
usage examples.
cargo run --example local
let client = ClientBuilder::new()
.set_signer(signer)
.build()
.await?;
client.total_supply_for(CurrencyId::Tdfy).await?;
Submit an extrinsic, returning success once the transaction is accepted into the pool:
client.swap(
CurrencyId::Tdfy,
1_000_000_000_000,
CurrencyId::Wrapped(4),
1_000_000,
SwapType::Limit,
None,
).await?;
The package is not published to crates.io yet, but you can find the documentation here.
cargo install --git https://github.com/tidelabs/subxt --branch=tidechain --force
subxt metadata > tidext/res/tidechain_metadata.scale --format bytes
Most tests require a running tidechain node to communicate with. This is done by spawning an instance of the substrate node per test.
TIDECHAIN_NODE_PATH=~/.bin/tidechain cargo test