Function did::pallet::dispatchables::create

source ·
pub fn create<T: Config>(
    details: Box<DidCreationDetails<DidIdentifierOf<T>, AccountIdOf<T>, <T as Config>::MaxNewKeyAgreementKeys, DidEndpoint<T>>>,
    signature: DidSignature
)
Expand description

Store a new DID on chain, after verifying that the creation operation has been signed by the KILT account associated with the identifier of the DID being created and that a DID with the same identifier has not previously existed on (and then deleted from) the chain.

There must be no DID information stored on chain under the same DID identifier.

The new keys added with this operation are stored under the DID identifier along with the block number in which the operation was executed.

The dispatch origin can be any KILT account with enough funds to execute the extrinsic and it does not have to be tied in any way to the KILT account identifying the DID subject.

Emits DidCreated.

  • The transaction’s complexity is mainly dependent on the number of new key agreement keys and the number of new service endpoints included in the operation.

Weight: O(K) + O(N) where K is the number of new key agreement keys bounded by MaxNewKeyAgreementKeys, while N is the number of new service endpoints bounded by MaxNumberOfServicesPerDid.

  • Reads: [Origin Account], Did, DidBlacklist
  • Writes: Did (with K new key agreement keys), ServiceEndpoints (with N new service endpoints), DidEndpointsCount

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::create.