Skip to main content

NfcReceiptAuthority

Trait NfcReceiptAuthority 

Source
pub trait NfcReceiptAuthority {
    // Required methods
    fn signer_authorized(&self, source_id: u64, key: &[u8; 32]) -> bool;
    fn permission_context_valid(&self, record: &NfcEvidenceRecord) -> bool;
    fn chain_position_valid(
        &self,
        sequence: u64,
        previous: Option<&[u8; 32]>,
        timestamp: ReceiptTimestamp,
        current: &[u8; 32],
    ) -> bool;
}
Expand description

Host-owned trust boundary; implementations must check current signer, permission/revocation, and anti-rollback/checkpoint completeness state. The chain callback receives the signed timestamp verbatim and must decide whether ReceiptTimestamp::Unknown is acceptable for the requested use.

Required Methods§

Source

fn signer_authorized(&self, source_id: u64, key: &[u8; 32]) -> bool

Source

fn permission_context_valid(&self, record: &NfcEvidenceRecord) -> bool

Source

fn chain_position_valid( &self, sequence: u64, previous: Option<&[u8; 32]>, timestamp: ReceiptTimestamp, current: &[u8; 32], ) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§