Skip to content

Serialize e-cash tokens using our own encoding traits instead of bincode #994

Closed
@elsirion

Description

pub fn parse_coins(s: &str) -> anyhow::Result<TieredMulti<SpendableNote>> {
let bytes = base64::decode(s)?;
Ok(bincode::deserialize(&bytes)?)
}
pub fn serialize_coins(c: &TieredMulti<SpendableNote>) -> String {
let bytes = bincode::serialize(&c).unwrap();
base64::encode(&bytes)
}

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions