From 5e9499873d620b810274353f9f8f57656632f760 Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Fri, 30 May 2025 15:20:14 -0400 Subject: [PATCH] serialize/deserialize `Account` --- accounts/src/account_core/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts/src/account_core/mod.rs b/accounts/src/account_core/mod.rs index 32c5359d..0caca154 100644 --- a/accounts/src/account_core/mod.rs +++ b/accounts/src/account_core/mod.rs @@ -4,7 +4,7 @@ use anyhow::Result; use common::{merkle_tree_public::TreeHashType, transaction::Tag}; use k256::AffinePoint; use log::info; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use utxo::utxo_core::{UTXOPayload, UTXO}; use crate::key_management::{ @@ -16,6 +16,7 @@ use crate::key_management::{ pub type PublicKey = AffinePoint; pub type AccountAddress = TreeHashType; +#[derive(Serialize, Deserialize, Clone)] pub struct Account { pub key_holder: AddressKeyHolder, pub address: AccountAddress,