[−][src]Trait dubp_documents::Document
trait providing commun methods for any documents of any protocol version.
Design choice
Allow only ed25519 for protocol 10 and many differents schemes for protocol 11 through a proxy type.
Associated Types
type PublicKey: PublicKey
Type of the PublicKey
used by the document.
type CurrencyType: ?Sized
Data type of the currency code used by the document.
Required methods
fn version(&self) -> u16
Get document version.
fn currency(&self) -> &Self::CurrencyType
Get document currency.
fn blockstamp(&self) -> Blockstamp
Get document blockstamp
fn issuers(&self) -> &Vec<Self::PublicKey>
Iterate over document issuers.
fn signatures(&self) -> &Vec<<Self::PublicKey as PublicKey>::Signature>
Iterate over document signatures.
fn as_bytes(&self) -> &[u8]
Get document as bytes for signature verification.
Provided methods
fn verify_signatures(&self) -> VerificationResult
Verify signatures of document content (as text format)