pub struct AppConfig {
pub id: AppId,
pub policy: AppAuthPolicy,
pub admin: Option<Address>,
pub stake: BaseUnits,
pub metadata: BTreeMap<String, String>,
pub secrets: BTreeMap<String, Vec<u8>>,
pub sek: PublicKey,
}
Expand description
ROFL application configuration.
§Metadata
Metadata contains arbitrary key-value pairs.
§Secrets
In addition to metadata, the configuration can also contain secrets which are encrypted with a shared secret derived from the secret encryption key (SEK). Since the SEK is only available once the application has been registered, the initial create cannot contain secrets.
Fields§
§id: AppId
ROFL application identifier.
policy: AppAuthPolicy
Authentication policy.
admin: Option<Address>
Application administrator address.
stake: BaseUnits
Staked amount.
metadata: BTreeMap<String, String>
Metadata (arbitrary key/value pairs).
secrets: BTreeMap<String, Vec<u8>>
Secrets (arbitrary encrypted key/value pairs).
sek: PublicKey
Secret encryption public key. The key is used to derive a shared secret used for symmetric encryption (e.g. using Deoxys-II or similar).
Trait Implementations§
source§impl Decode for AppConfig
impl Decode for AppConfig
source§fn try_default() -> Result<Self, DecodeError>
fn try_default() -> Result<Self, DecodeError>
Try to decode from a missing/null/undefined value.
source§fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
Try to decode from a given CBOR value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default
in case the value is null or
undefined.source§impl EncodeAsMap for AppConfig
impl EncodeAsMap for AppConfig
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)