1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
//pub enum Payload {
// Pubkey(String),
// PubkeyHash(String),
// ScriptHash(String)
//}
//
// TODO: need to properly deserialize info from daemon
//// TODO: need to read up on deserializing with Serde
//
//#[derive(Deserialize, Serialize, Debug)]
//pub struct Address {
// // the bitcoin library uses a payload type, which determines p2ph, p2pkh, scripthash or segwit address.
// // Komodo doesn't use segwit, so we can skip that one.
//
// // TODO: for now use String
// // pub payload: Payload
// pub payload: String
//}
//
//impl Address {
// // this method should take a reference to a pubkey to calculate the correct base58 KMD address
// pub fn p2pkh() -> Address {
// unimplemented!();
// }
//
// // TODO: support for uncompressed?
//
// // TODO: support for p2pk?
// // seems to be early day addresses
//
// // this method takes a script, and calculates an address based on this script:
// pub fn p2sh() -> Address {
// unimplemented!();
// }
//}
#[derive(Debug, Deserialize)]
pub struct Address {
pub address: String,
pub amount: f64
}