use std::collections::BTreeSet;
pub struct ContractId;
pub struct TxPrefab {
pub layer1: L1Prefab,
pub sonic: OpPrefab,
}
pub trait ContractReader {}
pub trait ContractIface {}
pub trait Stockpile {
fn contracts_list(&self) -> impl Iterator<Item = ContractInfo>;
fn has_contract(&self, contract_id: ContractId) -> bool;
fn contract(&self, contract_id: ContractId) -> Option<impl ContractReader>;
fn import(&mut self, prefab: VerifiedKit);
fn consume(&mut self, consignment: Consignment);
}
pub trait Possessor {
}
pub struct Portfolio<S: Stockpile, P: Possessor> {
pub possessor: P,
pub stockpile: S,
}
impl<Stock: Stockpile, Owner: OwnerAccount> Portfolio<Stock, Owner> {
pub fn owned_assets(&self, iface: impl Into<IfaceName>) -> BTreeSet<ContractId, ContractAssets> {}
pub fn prepare(&mut self, invoice: Invoice) -> Result<TxPrefab, FullfilmentError> {}
pub fn consign(&mut self, op: Operation) -> Result<Consignment, ConsignError> {}
pub fn store(&mut self, witness: Witness) -> Result<(), CompletionError> {}
}