use std::collections::BTreeSet;
use commit_verify::lnpbp4;
use crate::{seal, Anchor, ContractId, Disclosure, SealEndpoint, StateTransfer, TransitionBundle};
pub trait Stash {
type Error: std::error::Error;
fn consign(
&self,
contract_id: ContractId,
bundle: TransitionBundle,
anchor: Option<&Anchor<lnpbp4::MerkleProof>>,
endpoints: &BTreeSet<SealEndpoint>,
) -> Result<StateTransfer, Self::Error>;
fn accept(
&mut self,
consignment: &StateTransfer,
known_seals: &[seal::Revealed],
) -> Result<(), Self::Error>;
fn enclose(&mut self, disclosure: &Disclosure) -> Result<(), Self::Error>;
}