runx-runtime
runx_runtime::receipts::signing
Structs §
RuntimeReceiptSignatureConfig §
pub struct runx_runtime::receipts::signing::RuntimeReceiptSignatureConfig { /* ... */ }
Implementations §
impl RuntimeReceiptSignatureConfig
local_development
fn local_development() -> Self#[must_use]production_signing
fn production_signing(signer: Ed25519ReceiptSigner, verifier: Ed25519ReceiptVerifier) -> Selffrom_env
fn from_env(env: &BTreeMap<String, String>) -> Result<Self, RuntimeReceiptSigningError>signature_policy
fn signature_policy(self: &Self) -> RuntimeReceiptSignaturePolicy<'_>#[must_use]production_key_for_kid
fn production_key_for_kid(self: &Self, kid: &str) -> Option<ProductionReceiptKey>#[must_use]Trait Implementations §
impl Borrow for RuntimeReceiptSignatureConfig
borrow
fn borrow(self: &Self) -> &Timpl BorrowMut for RuntimeReceiptSignatureConfig
borrow_mut
fn borrow_mut(self: &mut Self) -> &mut Timpl CloneToUninit for RuntimeReceiptSignatureConfig
clone_to_uninit
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)impl Into for RuntimeReceiptSignatureConfig
into
fn into(self: Self) -> UCalls U::from(self).
That is, this conversion is whatever the implementation of
chooses to do.From<T> for U
impl From for RuntimeReceiptSignatureConfig
from
fn from(t: T) -> TReturns the argument unchanged.
impl TryInto for RuntimeReceiptSignatureConfig
Error
try_into
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>impl TryFrom for RuntimeReceiptSignatureConfig
Error
try_from
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl Any for RuntimeReceiptSignatureConfig
type_id
fn type_id(self: &Self) -> TypeIdimpl ToOwned for RuntimeReceiptSignatureConfig
Owned
to_owned
fn to_owned(self: &Self) -> Tclone_into
fn clone_into(self: &Self, target: &mut T)impl Same for RuntimeReceiptSignatureConfig
Output
impl Clone for RuntimeReceiptSignatureConfig
clone
fn clone(self: &Self) -> RuntimeReceiptSignatureConfigimpl Default for RuntimeReceiptSignatureConfig
default
fn default() -> RuntimeReceiptSignatureConfigimpl Debug for RuntimeReceiptSignatureConfig
fmt
fn fmt(self: &Self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Resultimpl Send for RuntimeReceiptSignatureConfig
impl Sync for RuntimeReceiptSignatureConfig
impl Freeze for RuntimeReceiptSignatureConfig
impl UnsafeUnpin for RuntimeReceiptSignatureConfig
impl Unpin for RuntimeReceiptSignatureConfig
impl UnwindSafe for RuntimeReceiptSignatureConfig
impl RefUnwindSafe for RuntimeReceiptSignatureConfig
ProductionReceiptKey §
pub struct runx_runtime::receipts::signing::ProductionReceiptKey { /* ... */ }
Implementations §
impl ProductionReceiptKey
new
fn new(kid: impl Into<String>, public_key: impl Into<Vec<u8>>) -> Self#[must_use]kid
fn kid(self: &Self) -> &str#[must_use]public_key
fn public_key(self: &Self) -> &[u8]#[must_use]public_key_sha256
fn public_key_sha256(self: &Self) -> String#[must_use]Trait Implementations §
impl Borrow for ProductionReceiptKey
borrow
fn borrow(self: &Self) -> &Timpl BorrowMut for ProductionReceiptKey
borrow_mut
fn borrow_mut(self: &mut Self) -> &mut Timpl CloneToUninit for ProductionReceiptKey
clone_to_uninit
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)impl Into for ProductionReceiptKey
into
fn into(self: Self) -> UCalls U::from(self).
That is, this conversion is whatever the implementation of
chooses to do.From<T> for U
impl From for ProductionReceiptKey
from
fn from(t: T) -> TReturns the argument unchanged.
impl TryInto for ProductionReceiptKey
Error
try_into
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>impl TryFrom for ProductionReceiptKey
Error
try_from
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl Any for ProductionReceiptKey
type_id
fn type_id(self: &Self) -> TypeIdimpl ToOwned for ProductionReceiptKey
Owned
to_owned
fn to_owned(self: &Self) -> Tclone_into
fn clone_into(self: &Self, target: &mut T)impl Same for ProductionReceiptKey
Output
impl Equivalent for ProductionReceiptKey
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Equivalent for ProductionReceiptKey
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Clone for ProductionReceiptKey
clone
fn clone(self: &Self) -> ProductionReceiptKeyimpl Debug for ProductionReceiptKey
fmt
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Resultimpl PartialEq for ProductionReceiptKey
eq
fn eq(self: &Self, other: &ProductionReceiptKey) -> boolimpl Send for ProductionReceiptKey
impl Sync for ProductionReceiptKey
impl Freeze for ProductionReceiptKey
impl UnsafeUnpin for ProductionReceiptKey
impl Unpin for ProductionReceiptKey
impl UnwindSafe for ProductionReceiptKey
impl RefUnwindSafe for ProductionReceiptKey
impl StructuralPartialEq for ProductionReceiptKey
impl Eq for ProductionReceiptKey
Ed25519ReceiptSigner §
pub struct runx_runtime::receipts::signing::Ed25519ReceiptSigner { /* ... */ }
Implementations §
impl Ed25519ReceiptSigner
from_seed
fn from_seed( kid: impl Into<String>, issuer_type: ReceiptIssuerType, seed: &[u8] ) -> Result<Self, RuntimeReceiptSigningError>from_seed_base64
fn from_seed_base64( kid: impl Into<String>, issuer_type: ReceiptIssuerType, seed: &str ) -> Result<Self, RuntimeReceiptSigningError>production_key
fn production_key(self: &Self) -> ProductionReceiptKey#[must_use]public_key
fn public_key(self: &Self) -> &[u8]#[must_use]Trait Implementations §
impl Borrow for Ed25519ReceiptSigner
borrow
fn borrow(self: &Self) -> &Timpl BorrowMut for Ed25519ReceiptSigner
borrow_mut
fn borrow_mut(self: &mut Self) -> &mut Timpl Into for Ed25519ReceiptSigner
into
fn into(self: Self) -> UCalls U::from(self).
That is, this conversion is whatever the implementation of
chooses to do.From<T> for U
impl From for Ed25519ReceiptSigner
from
fn from(t: T) -> TReturns the argument unchanged.
impl TryInto for Ed25519ReceiptSigner
Error
try_into
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>impl TryFrom for Ed25519ReceiptSigner
Error
try_from
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl Any for Ed25519ReceiptSigner
type_id
fn type_id(self: &Self) -> TypeIdimpl Same for Ed25519ReceiptSigner
Output
impl RuntimeReceiptSigner for Ed25519ReceiptSigner
issuer
fn issuer(self: &Self) -> ReceiptIssuersign_receipt_body
fn sign_receipt_body( self: &Self, body_digest: &str ) -> Result<ReceiptSignature, RuntimeReceiptSigningError>impl Send for Ed25519ReceiptSigner
impl Sync for Ed25519ReceiptSigner
impl Freeze for Ed25519ReceiptSigner
impl UnsafeUnpin for Ed25519ReceiptSigner
impl Unpin for Ed25519ReceiptSigner
impl UnwindSafe for Ed25519ReceiptSigner
impl RefUnwindSafe for Ed25519ReceiptSigner
Ed25519ReceiptVerifier §
pub struct runx_runtime::receipts::signing::Ed25519ReceiptVerifier { /* ... */ }
Implementations §
impl Ed25519ReceiptVerifier
new
fn new(keys: impl IntoIterator<Item=ProductionReceiptKey>) -> Self#[must_use]from_public_key
fn from_public_key(kid: impl Into<String>, public_key: impl Into<Vec<u8>>) -> Self#[must_use]from_public_key_base64
fn from_public_key_base64( kid: impl Into<String>, public_key: &str ) -> Result<Self, RuntimeReceiptSigningError>keys
fn keys(self: &Self) -> &[ProductionReceiptKey]#[must_use]Trait Implementations §
impl Borrow for Ed25519ReceiptVerifier
borrow
fn borrow(self: &Self) -> &Timpl BorrowMut for Ed25519ReceiptVerifier
borrow_mut
fn borrow_mut(self: &mut Self) -> &mut Timpl CloneToUninit for Ed25519ReceiptVerifier
clone_to_uninit
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)impl Into for Ed25519ReceiptVerifier
into
fn into(self: Self) -> UCalls U::from(self).
That is, this conversion is whatever the implementation of
chooses to do.From<T> for U
impl From for Ed25519ReceiptVerifier
from
fn from(t: T) -> TReturns the argument unchanged.
impl TryInto for Ed25519ReceiptVerifier
Error
try_into
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>impl TryFrom for Ed25519ReceiptVerifier
Error
try_from
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl Any for Ed25519ReceiptVerifier
type_id
fn type_id(self: &Self) -> TypeIdimpl ToOwned for Ed25519ReceiptVerifier
Owned
to_owned
fn to_owned(self: &Self) -> Tclone_into
fn clone_into(self: &Self, target: &mut T)impl Same for Ed25519ReceiptVerifier
Output
impl Equivalent for Ed25519ReceiptVerifier
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Equivalent for Ed25519ReceiptVerifier
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Clone for Ed25519ReceiptVerifier
clone
fn clone(self: &Self) -> Ed25519ReceiptVerifierimpl Debug for Ed25519ReceiptVerifier
fmt
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Resultimpl Default for Ed25519ReceiptVerifier
default
fn default() -> Ed25519ReceiptVerifierimpl PartialEq for Ed25519ReceiptVerifier
eq
fn eq(self: &Self, other: &Ed25519ReceiptVerifier) -> boolimpl SignatureVerifier for Ed25519ReceiptVerifier
verify
fn verify( self: &Self, issuer: &ReceiptIssuer, signature: &ReceiptSignature, body_digest: &str ) -> Result<(), SignatureVerificationFailure>impl Send for Ed25519ReceiptVerifier
impl Sync for Ed25519ReceiptVerifier
impl Freeze for Ed25519ReceiptVerifier
impl UnsafeUnpin for Ed25519ReceiptVerifier
impl Unpin for Ed25519ReceiptVerifier
impl UnwindSafe for Ed25519ReceiptVerifier
impl RefUnwindSafe for Ed25519ReceiptVerifier
impl StructuralPartialEq for Ed25519ReceiptVerifier
impl Eq for Ed25519ReceiptVerifier
Enums §
RuntimeReceiptSigningError §
pub enum runx_runtime::receipts::signing::RuntimeReceiptSigningError { /* ... */ }
Trait Implementations §
impl Borrow for RuntimeReceiptSigningError
borrow
fn borrow(self: &Self) -> &Timpl BorrowMut for RuntimeReceiptSigningError
borrow_mut
fn borrow_mut(self: &mut Self) -> &mut Timpl CloneToUninit for RuntimeReceiptSigningError
clone_to_uninit
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)impl Into for RuntimeReceiptSigningError
into
fn into(self: Self) -> UCalls U::from(self).
That is, this conversion is whatever the implementation of
chooses to do.From<T> for U
impl From for RuntimeReceiptSigningError
from
fn from(t: T) -> TReturns the argument unchanged.
impl TryInto for RuntimeReceiptSigningError
Error
try_into
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>impl TryFrom for RuntimeReceiptSigningError
Error
try_from
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl Any for RuntimeReceiptSigningError
type_id
fn type_id(self: &Self) -> TypeIdimpl ToOwned for RuntimeReceiptSigningError
Owned
to_owned
fn to_owned(self: &Self) -> Tclone_into
fn clone_into(self: &Self, target: &mut T)impl ToString for RuntimeReceiptSigningError
to_string
fn to_string(self: &Self) -> Stringimpl Same for RuntimeReceiptSigningError
Output
impl Equivalent for RuntimeReceiptSigningError
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Equivalent for RuntimeReceiptSigningError
equivalent
fn equivalent(self: &Self, key: &K) -> boolimpl Clone for RuntimeReceiptSigningError
clone
fn clone(self: &Self) -> RuntimeReceiptSigningErrorimpl Debug for RuntimeReceiptSigningError
fmt
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Resultimpl Display for RuntimeReceiptSigningError
fmt
fn fmt(self: &Self, __formatter: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Resultimpl PartialEq for RuntimeReceiptSigningError
eq
fn eq(self: &Self, other: &RuntimeReceiptSigningError) -> boolimpl Send for RuntimeReceiptSigningError
impl Sync for RuntimeReceiptSigningError
impl Freeze for RuntimeReceiptSigningError
impl UnsafeUnpin for RuntimeReceiptSigningError
impl Unpin for RuntimeReceiptSigningError
impl UnwindSafe for RuntimeReceiptSigningError
impl RefUnwindSafe for RuntimeReceiptSigningError
impl Error for RuntimeReceiptSigningError
impl StructuralPartialEq for RuntimeReceiptSigningError
impl Eq for RuntimeReceiptSigningError
Traits §
RuntimeReceiptSigner §
pub trait runx_runtime::receipts::signing::RuntimeReceiptSigner { /* ... */ }
Required Methods §
issuer
fn issuer(self: &Self) -> ReceiptIssuersign_receipt_body
fn sign_receipt_body( self: &Self, body_digest: &str ) -> Result<ReceiptSignature, RuntimeReceiptSigningError>Trait Implementations §
impl RuntimeReceiptSigner for Ed25519ReceiptSigner
issuer
fn issuer(self: &Self) -> ReceiptIssuersign_receipt_body
fn sign_receipt_body( self: &Self, body_digest: &str ) -> Result<ReceiptSignature, RuntimeReceiptSigningError>Constants §
RECEIPT_SIGNATURE_BASE64_PREFIX §
pub const runx_runtime::receipts::signing::RECEIPT_SIGNATURE_BASE64_PREFIX: &str = "base64:";
RUNX_RECEIPT_SIGN_KID_ENV §
pub const runx_runtime::receipts::signing::RUNX_RECEIPT_SIGN_KID_ENV: &str = "RUNX_RECEIPT_SIGN_KID";
RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64_ENV §
pub const runx_runtime::receipts::signing::RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64_ENV: &str = "RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64";
RUNX_RECEIPT_SIGN_ISSUER_TYPE_ENV §
pub const runx_runtime::receipts::signing::RUNX_RECEIPT_SIGN_ISSUER_TYPE_ENV: &str = "RUNX_RECEIPT_SIGN_ISSUER_TYPE";