Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Apr 2, 2024
1 parent 3369703 commit 4e9f0e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use ed25519_dalek::{SigningKey, Signer, VerifyingKey, Verifier, Signature};
use hex::{encode, decode, FromHexError};


/// An ed25519 public key that can be used to verify a signature
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct PublicKey([u8;32]);

Expand All @@ -22,6 +23,7 @@ impl PublicKey {
}
}

/// An ed25519 private key that can be used to sign a hash
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct PrivateKey([u8;64]);

Expand Down Expand Up @@ -64,6 +66,7 @@ impl From<FromHexError> for AddressParseError {
}
}

/// An address that can be used to receive UTXOs
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct Address([u8;32]);

Expand Down Expand Up @@ -170,7 +173,10 @@ impl From<FromHexError> for ParseUnlockKeyError {
}
}

/// A public key that can be used to spend a utxo or revise a file contract
/// A generic public key that can be used to spend a utxo or revise a file
/// contract
///
/// Currently only supports ed25519 keys
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct UnlockKey {
algorithm: Algorithm,
Expand Down

0 comments on commit 4e9f0e3

Please sign in to comment.