Trait public_credentials::pallet::Config
source · pub trait Config: Config + Config {
Show 16 associated items
type AccessControl: Parameter + PublicCredentialsAccessControl<Self::AttesterId, Self::AuthorizationId, CtypeHashOf<Self>, CredentialIdOf<Self>>;
type RuntimeHoldReason: From<HoldReason>;
type AttesterId: Parameter + MaxEncodedLen;
type AuthorizationId: Parameter + MaxEncodedLen;
type EnsureOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type CredentialHash: Hash<Output = Self::CredentialId>;
type CredentialId: Parameter + MaxEncodedLen;
type Currency: MutateHold<AccountIdOf<Self>, Reason = Self::RuntimeHoldReason>;
type OriginSuccess: CallSources<Self::AccountId, AttesterOf<Self>>;
type SubjectId: Parameter + MaxEncodedLen + TryFrom<Vec<u8>>;
type WeightInfo: WeightInfo;
type Deposit: Get<BalanceOf<Self>>;
type MaxEncodedClaimsLength: Get<u32>;
type MaxSubjectIdLength: Get<u32>;
type BalanceMigrationManager: BalanceMigrationManager<AccountIdOf<Self>, BalanceOf<Self>>;
}
Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
sourcetype AccessControl: Parameter + PublicCredentialsAccessControl<Self::AttesterId, Self::AuthorizationId, CtypeHashOf<Self>, CredentialIdOf<Self>>
type AccessControl: Parameter + PublicCredentialsAccessControl<Self::AttesterId, Self::AuthorizationId, CtypeHashOf<Self>, CredentialIdOf<Self>>
The access control logic.
type RuntimeHoldReason: From<HoldReason>
sourcetype AttesterId: Parameter + MaxEncodedLen
type AttesterId: Parameter + MaxEncodedLen
The identifier of the credential attester.
sourcetype AuthorizationId: Parameter + MaxEncodedLen
type AuthorizationId: Parameter + MaxEncodedLen
The identifier of the authorization info to perform access control for the different operations.
sourcetype EnsureOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>
type EnsureOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>
The origin allowed to issue/revoke/remove public credentials.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The ubiquitous event type.
sourcetype CredentialHash: Hash<Output = Self::CredentialId>
type CredentialHash: Hash<Output = Self::CredentialId>
The hashing algorithm to derive a credential identifier from the credential content.
sourcetype CredentialId: Parameter + MaxEncodedLen
type CredentialId: Parameter + MaxEncodedLen
The type of a credential identifier.
sourcetype Currency: MutateHold<AccountIdOf<Self>, Reason = Self::RuntimeHoldReason>
type Currency: MutateHold<AccountIdOf<Self>, Reason = Self::RuntimeHoldReason>
The currency that is used to reserve funds for each credential.
sourcetype OriginSuccess: CallSources<Self::AccountId, AttesterOf<Self>>
type OriginSuccess: CallSources<Self::AccountId, AttesterOf<Self>>
The type of the origin when successfully converted from the outer origin.
sourcetype SubjectId: Parameter + MaxEncodedLen + TryFrom<Vec<u8>>
type SubjectId: Parameter + MaxEncodedLen + TryFrom<Vec<u8>>
The type of the credential subject ID after being parsed from the raw attester-provided input.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight info.
sourcetype Deposit: Get<BalanceOf<Self>>
type Deposit: Get<BalanceOf<Self>>
The amount of tokens to reserve when attesting a public credential.
sourcetype MaxEncodedClaimsLength: Get<u32>
type MaxEncodedClaimsLength: Get<u32>
The maximum length in bytes of the encoded claims of a credential.
sourcetype MaxSubjectIdLength: Get<u32>
type MaxSubjectIdLength: Get<u32>
The maximum length in bytes of the raw credential subject identifier.
sourcetype BalanceMigrationManager: BalanceMigrationManager<AccountIdOf<Self>, BalanceOf<Self>>
type BalanceMigrationManager: BalanceMigrationManager<AccountIdOf<Self>, BalanceOf<Self>>
Migration manager to handle new created entries