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: AppIdROFL application identifier.
policy: AppAuthPolicyAuthentication policy.
admin: Option<Address>Application administrator address.
stake: BaseUnitsStaked amount.
metadata: BTreeMap<String, String>Metadata (arbitrary key/value pairs).
secrets: BTreeMap<String, Vec<u8>>Secrets (arbitrary encrypted key/value pairs).
sek: PublicKeySecret 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