rust-hdwallet 0.1.0-beta

Hierarchical deterministic wallet library for deriving cryptocurrency keys, addresses, and mnemonics.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use num_bigint::BigUint;

use super::EccsError;

pub trait IPoint: Sized + Clone {
    fn ecc_name() -> &'static str;
    fn from_bytes(bytes: &[u8]) -> Result<Self, EccsError>;
    fn from_coordinates(x: &BigUint, y: &BigUint) -> Result<Self, EccsError>;
    fn x(&self) -> BigUint;
    fn y(&self) -> BigUint;
    fn raw_encoded(&self) -> Vec<u8>;
    fn raw_decoded(&self) -> Vec<u8>;
    fn add(&self, other: &Self) -> Result<Self, EccsError>;
    fn mul_scalar(&self, scalar: &BigUint) -> Result<Self, EccsError>;
}