rosetta_types/
public_key.rs

1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PublicKey : PublicKey contains a public key byte array for a particular CurveType encoded in hex.  Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct PublicKey {
15    /// Hex-encoded public key bytes in the format specified by the CurveType.
16    #[serde(rename = "hex_bytes")]
17    pub hex_bytes: String,
18    #[serde(rename = "curve_type")]
19    pub curve_type: crate::CurveType,
20}
21
22impl PublicKey {
23    /// PublicKey contains a public key byte array for a particular CurveType encoded in hex.  Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.
24    pub fn new(hex_bytes: String, curve_type: crate::CurveType) -> PublicKey {
25        PublicKey {
26            hex_bytes,
27            curve_type,
28        }
29    }
30}