domain_test_primitives/
lib.rs#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode};
use sp_messenger::messages::{ChainId, ChannelId};
use subspace_runtime_primitives::Moment;
sp_api::decl_runtime_apis! {
pub trait TimestampApi {
fn timestamp() -> Moment;
}
}
sp_api::decl_runtime_apis! {
pub trait OnchainStateApi<AccountId, Balance>
where
AccountId: Encode + Decode,
Balance: Encode + Decode
{
fn free_balance(account_id: AccountId) -> Balance;
fn get_open_channel_for_chain(dst_chain_id: ChainId) -> Option<ChannelId>;
fn consensus_chain_byte_fee() -> Balance;
}
}