Trait did::pallet::Config

source ·
pub trait Config: Config + Debug {
Show 25 associated items type RuntimeCall: Parameter + Dispatchable<PostInfo = PostDispatchInfo, RuntimeOrigin = <Self as Config>::RuntimeOrigin> + GetDispatchInfo + DeriveDidCallAuthorizationVerificationKeyRelationship; type DidIdentifier: Parameter + DidVerifiableIdentifier<AccountIdOf<Self>> + MaxEncodedLen + From<AccountIdOf<Self>>; type RuntimeOrigin: From<RawOrigin<DidIdentifierOf<Self>>>; type EnsureOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>; type OriginSuccess: CallSources<AccountIdOf<Self>, DidIdentifierOf<Self>>; type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type RuntimeHoldReason: From<HoldReason>; type Currency: Balanced<AccountIdOf<Self>> + MutateHold<AccountIdOf<Self>, Reason = Self::RuntimeHoldReason>; type BaseDeposit: Get<BalanceOf<Self>>; type ServiceEndpointDeposit: Get<BalanceOf<Self>>; type KeyDeposit: Get<BalanceOf<Self>>; type Fee: Get<BalanceOf<Self>>; type FeeCollector: OnUnbalanced<Credit<<Self as Config>::AccountId, <Self as Config>::Currency>>; type MaxPublicKeysPerDid: Get<u32> + Clone; type MaxNewKeyAgreementKeys: Get<u32> + Parameter; type MaxTotalKeyAgreementKeys: Get<u32> + Debug + Clone + PartialEq; type MaxBlocksTxValidity: Get<BlockNumberFor<Self>>; type MaxNumberOfServicesPerDid: Get<u32>; type MaxServiceIdLength: Get<u32>; type MaxServiceTypeLength: Get<u32>; type MaxNumberOfTypesPerService: Get<u32>; type MaxServiceUrlLength: Get<u32>; type MaxNumberOfUrlsPerService: Get<u32>; type WeightInfo: WeightInfo; 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§

source

type RuntimeCall: Parameter + Dispatchable<PostInfo = PostDispatchInfo, RuntimeOrigin = <Self as Config>::RuntimeOrigin> + GetDispatchInfo + DeriveDidCallAuthorizationVerificationKeyRelationship

Type for a dispatchable call that can be proxied through the DID pallet to support DID-based authorisation.

source

type DidIdentifier: Parameter + DidVerifiableIdentifier<AccountIdOf<Self>> + MaxEncodedLen + From<AccountIdOf<Self>>

Type for a DID subject identifier.

source

type RuntimeOrigin: From<RawOrigin<DidIdentifierOf<Self>>>

source

type EnsureOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>

The origin check for all DID calls inside this pallet.

source

type OriginSuccess: CallSources<AccountIdOf<Self>, DidIdentifierOf<Self>>

The return type when the DID origin check was successful.

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

Overarching event type.

source

type RuntimeHoldReason: From<HoldReason>

source

type Currency: Balanced<AccountIdOf<Self>> + MutateHold<AccountIdOf<Self>, Reason = Self::RuntimeHoldReason>

The currency that is used to reserve funds for each did.

source

type BaseDeposit: Get<BalanceOf<Self>>

The amount of balance that will be taken for each DID as a deposit to incentivise fair use of the on chain storage. The deposits increase by the amount of used keys and service endpoints. The deposit can be reclaimed when the DID is deleted.

source

type ServiceEndpointDeposit: Get<BalanceOf<Self>>

The amount of balance that will be taken for each service endpoint as a deposit to incentivise fair use of the on chain storage. The deposit can be reclaimed when the service endpoint is removed or the DID deleted.

source

type KeyDeposit: Get<BalanceOf<Self>>

The amount of balance that will be taken for each added key as a deposit to incentivise fair use of the on chain storage.

source

type Fee: Get<BalanceOf<Self>>

The amount of balance that will be taken for each DID as a fee to incentivise fair use of the on chain storage. The fee will not get refunded when the DID is deleted.

source

type FeeCollector: OnUnbalanced<Credit<<Self as Config>::AccountId, <Self as Config>::Currency>>

The logic for handling the fee.

source

type MaxPublicKeysPerDid: Get<u32> + Clone

Maximum number of total public keys which can be stored per DID key identifier. This includes the ones currently used for authentication, key agreement, attestation, and delegation.

source

type MaxNewKeyAgreementKeys: Get<u32> + Parameter

Maximum number of key agreement keys that can be added in a creation operation.

source

type MaxTotalKeyAgreementKeys: Get<u32> + Debug + Clone + PartialEq

Maximum number of total key agreement keys that can be stored for a DID subject.

Should be greater than MaxNewKeyAgreementKeys.

source

type MaxBlocksTxValidity: Get<BlockNumberFor<Self>>

The maximum number of blocks a DID-authorized operation is considered valid after its creation.

source

type MaxNumberOfServicesPerDid: Get<u32>

The maximum number of services that can be stored under a DID.

source

type MaxServiceIdLength: Get<u32>

The maximum length of a service ID.

source

type MaxServiceTypeLength: Get<u32>

The maximum length of a service type description.

source

type MaxNumberOfTypesPerService: Get<u32>

The maximum number of a types description for a service endpoint.

source

type MaxServiceUrlLength: Get<u32>

The maximum length of a service URL.

source

type MaxNumberOfUrlsPerService: Get<u32>

The maximum number of a URLs for a service endpoint.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type BalanceMigrationManager: BalanceMigrationManager<AccountIdOf<Self>, BalanceOf<Self>>

Migration manager to handle new created entries

Implementors§