Module dock_runtime::did
source · Modules
- The module that hosts all the FRAME types needed to add this pallet to a runtime.
Structs
- Information requested for DID. The default option includes only basic DID details.
- Aggregated details for the given DID.
DID
’s controller.- The type of the Dock
DID
. - Valid did key with correct verification relationships.
DidKey
with its identifier.- This struct is passed as an argument while removing the DID
did
is the DID which is being removed. - Can be used to configure the genesis state of this pallet.
- Stores details of an off-chain DID. Off-chain DID has no need of nonce as the signature is made on the whole transaction by the caller account and Substrate takes care of replay protection. Thus it stores the data about off-chain DID Doc (hash, URI or any other reference) and the account that owns it.
- Stores details of an on-chain DID.
- The pallet implementing the on-chain logic.
DID
’s service endpoint.DID
’s service endpoint id.DID
’s service endpoint origin.ServiceEndpoint
with its identifier.DidKey
without validity constraint requirement.- Different verification relation types specified in the DID spec here https://www.w3.org/TR/did-core/#verification-relationships.
Enums
- Contains one variant per dispatchable that can be called by an extrinsic.
- Either
DidKey
orDidMethodKey
. - The
public_key
indid:key:<public_key>
. - Either
did:dock:*
ordid:key:*
. DID
’s signature along with the usedDID
s key reference orDidMethodKey
’s signature.- Error for the DID module.
- The event emitted by this pallet.
- To describe the off chain DID Doc’s reference. This is just to inform the client, this module does not check if the bytes are indeed valid as per the enum variant.
- Contains underlying DID describing its storage type.
Traits
- The module’s configuration trait.
Type Definitions
- Stores controlled - controller pairs of a DID as (DID, DID) -> zero-sized record. If a record exists, then the controller is bound.
- Stores keys of a DID as (DID, IncId) -> DidKey. Does not check if the same key is being added multiple times to the same DID.
- Stores nonce for
did:key
DIDs. - Stores service endpoints of a DID as (DID, endpoint id) -> ServiceEndpoint.
- Stores details of off-chain and on-chain DIDs
- ModuleDeprecatedType alias to
Pallet
, to be used byconstruct_runtime
. - Raw DID representation.
- Each on-chain DID is associated with a nonce that is incremented each time the DID does a write (through an extrinsic). The nonce starts from the block number when the DID was created to avoid replay attacks where an action of a DID that is removed and recreated by the same owner and same key is replayed by someone else.