Home
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) -> Self

from_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) -> &T

impl BorrowMut for RuntimeReceiptSignatureConfig

borrow_mut

fn borrow_mut(self: &mut Self) -> &mut T

impl 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl From for RuntimeReceiptSignatureConfig

from

fn from(t: T) -> T

Returns 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) -> TypeId

impl ToOwned for RuntimeReceiptSignatureConfig

Owned

to_owned

fn to_owned(self: &Self) -> T

clone_into

fn clone_into(self: &Self, target: &mut T)

impl Same for RuntimeReceiptSignatureConfig

Output

impl Clone for RuntimeReceiptSignatureConfig

clone

fn clone(self: &Self) -> RuntimeReceiptSignatureConfig

impl Default for RuntimeReceiptSignatureConfig

default

fn default() -> RuntimeReceiptSignatureConfig

impl Debug for RuntimeReceiptSignatureConfig

fmt

fn fmt(self: &Self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result

impl 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) -> &T

impl BorrowMut for ProductionReceiptKey

borrow_mut

fn borrow_mut(self: &mut Self) -> &mut T

impl 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl From for ProductionReceiptKey

from

fn from(t: T) -> T

Returns 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) -> TypeId

impl ToOwned for ProductionReceiptKey

Owned

to_owned

fn to_owned(self: &Self) -> T

clone_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) -> bool

impl Equivalent for ProductionReceiptKey

equivalent

fn equivalent(self: &Self, key: &K) -> bool

impl Clone for ProductionReceiptKey

clone

fn clone(self: &Self) -> ProductionReceiptKey

impl Debug for ProductionReceiptKey

impl PartialEq for ProductionReceiptKey

eq

fn eq(self: &Self, other: &ProductionReceiptKey) -> bool

impl 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) -> &T

impl BorrowMut for Ed25519ReceiptSigner

borrow_mut

fn borrow_mut(self: &mut Self) -> &mut T

impl Into for Ed25519ReceiptSigner

into

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl From for Ed25519ReceiptSigner

from

fn from(t: T) -> T

Returns 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) -> TypeId

impl Same for Ed25519ReceiptSigner

Output

impl RuntimeReceiptSigner for Ed25519ReceiptSigner

issuer

fn issuer(self: &Self) -> ReceiptIssuer

sign_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) -> &T

impl BorrowMut for Ed25519ReceiptVerifier

borrow_mut

fn borrow_mut(self: &mut Self) -> &mut T

impl 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl From for Ed25519ReceiptVerifier

from

fn from(t: T) -> T

Returns 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) -> TypeId

impl ToOwned for Ed25519ReceiptVerifier

Owned

to_owned

fn to_owned(self: &Self) -> T

clone_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) -> bool

impl Equivalent for Ed25519ReceiptVerifier

equivalent

fn equivalent(self: &Self, key: &K) -> bool

impl Clone for Ed25519ReceiptVerifier

clone

fn clone(self: &Self) -> Ed25519ReceiptVerifier

impl Debug for Ed25519ReceiptVerifier

impl Default for Ed25519ReceiptVerifier

default

fn default() -> Ed25519ReceiptVerifier

impl PartialEq for Ed25519ReceiptVerifier

eq

fn eq(self: &Self, other: &Ed25519ReceiptVerifier) -> bool

impl 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) -> &T

impl BorrowMut for RuntimeReceiptSigningError

borrow_mut

fn borrow_mut(self: &mut Self) -> &mut T

impl 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) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl From for RuntimeReceiptSigningError

from

fn from(t: T) -> T

Returns 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) -> TypeId

impl ToOwned for RuntimeReceiptSigningError

Owned

to_owned

fn to_owned(self: &Self) -> T

clone_into

fn clone_into(self: &Self, target: &mut T)

impl ToString for RuntimeReceiptSigningError

to_string

fn to_string(self: &Self) -> String

impl Same for RuntimeReceiptSigningError

Output

impl Equivalent for RuntimeReceiptSigningError

equivalent

fn equivalent(self: &Self, key: &K) -> bool

impl Equivalent for RuntimeReceiptSigningError

equivalent

fn equivalent(self: &Self, key: &K) -> bool

impl Clone for RuntimeReceiptSigningError

clone

fn clone(self: &Self) -> RuntimeReceiptSigningError

impl Debug for RuntimeReceiptSigningError

impl Display for RuntimeReceiptSigningError

fmt

fn fmt(self: &Self, __formatter: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result

impl PartialEq for RuntimeReceiptSigningError

eq

fn eq(self: &Self, other: &RuntimeReceiptSigningError) -> bool

impl 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) -> ReceiptIssuer

sign_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) -> ReceiptIssuer

sign_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";