Function did::pallet::dispatchables::create_from_account
source · pub fn create_from_account<T: Config>(
authentication_key: DidVerificationKey<AccountIdOf<T>>
)
Expand description
Store a new DID on chain.
The DID identifier is derived from the account ID that submits this
call. The authentication key must correspond to the account ID that
submitted this call. For accounts that use the ed25519 and sr25519
schema, the authentication key must be of the
DidVerificationKey::Ed25519
or DidVerificationKey::Sr25519
variant and contains the public key. For Ecdsa accounts, the
DidVerificationKey::Ecdsa
variant is calculated by hashing the
Ecdsa public key.
If this call is dispatched by an account id that doesn’t correspond
to a public private key pair, the DidVerificationKey::Account
variant shall be used (Multisig, Pure Proxy, Governance origins).
The resulting DID can NOT be used for signing data and is therefore
limited to onchain activities.
There must be no DID information stored on chain under the same DID identifier. This call will fail if there exists a DID with the same identifier or if a DID with the same identifier existed and was deleted.
The origin for this account must be funded and provide the required deposit and fee.
Emits DidCreated
.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::create_from_account
.