pub fn add_account(&self, declaration: &Declaration) -> Result<Self, LedgerError> {
        // check if declaration is valid here
        declaration.is_valid()?;

        let identifier = declaration.to_identifier();
        let new_decls = self
            .declarations
            .insert(identifier.clone(), declaration.clone())?;
        let new_accts = self.accounts.add_account(&identifier, Value::zero())?;
        Ok(Self {
            accounts: new_accts,
            declarations: new_decls,
        })
    }
/// Add a new multisig declaration into the ledger.
///
/// If the identifier is already present, error out.
Add a new multisig declaration into the ledger.
If the identifier is already present, error out.
Add a new multisig declaration into the ledger . If the identifier is already present error out .
pub fn add_account(&self, declaration: &Declaration) -> Result<Self, LedgerError> {
        // check if declaration is valid here
        declaration.is_valid()?;
        let identifier = declaration.to_identifier();
        let new_decls = self
            .declarations
            .insert(identifier.clone(), declaration.clone())?;
        let new_accts = self.accounts.add_account(&identifier, Value::zero())?;
        Ok(Self {
            accounts: new_accts,
            declarations: new_decls,
        })
    }
pub fn add_account ( & self , declaration : & Declaration ) -> Result < Self , LedgerError > { // check if declaration is valid here declaration . is_valid ( ) ? ; let identifier = declaration . to_identifier ( ) ; let new_decls = self . declarations . insert ( identifier . clone ( ) , declaration . clone ( ) ) ? ; let new_accts = self . accounts . add_account ( & identifier , Value :: zero ( ) ) ? ; Ok ( Self { accounts : new_accts , declarations : new_decls , } ) }
Add a new multisig declaration into the ledger.
Add a new multisig declaration into the ledger .
&self
declaration
&Declaration
&self
declaration
&Declaration