mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-25 11:43:06 +00:00
18 lines
373 B
Rust
18 lines
373 B
Rust
|
|
use crate::signature::PublicKey;
|
||
|
|
|
||
|
|
#[derive(Clone, Hash, PartialEq, Eq)]
|
||
|
|
pub(crate) struct Address {
|
||
|
|
pub(crate) value: [u8; 32],
|
||
|
|
}
|
||
|
|
|
||
|
|
impl Address {
|
||
|
|
pub(crate) fn new(value: [u8; 32]) -> Self {
|
||
|
|
Self { value }
|
||
|
|
}
|
||
|
|
|
||
|
|
pub(crate) fn from_public_key(public_key: &PublicKey) -> Self {
|
||
|
|
// TODO: implement
|
||
|
|
Address::new([public_key.0; 32])
|
||
|
|
}
|
||
|
|
}
|