diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index 4d91e8dca807c90dc88b7b3e217b45d5af3399c8..cc577701fe7bda364934bf578ea1d8aa4dd48e1b 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -335,6 +335,11 @@ pub mod pallet { Self::do_add_cert(block_number, create, issuer, receiver) } + /// Add a new certification or renew an existing one + /// + /// - `receiver`: the account receiving the certification from the origin + /// + /// The origin must be allow to certify. #[pallet::weight(1_000_000_000)] pub fn add_cert( origin: OriginFor<T>, diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 4e2c20fa5aaaa857d99940ece1c561b447c631ee..833037d8c48ad457fc0424843d9722e19f27994a 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -229,6 +229,11 @@ pub mod pallet { // Dispatchable functions must be annotated with a weight and must return a DispatchResult. #[pallet::call] impl<T: Config> Pallet<T> { + /// Create an identity for an existing account + /// + /// - `owner_key`: the public key corresponding to the identity to be created + /// + /// The origin must be allowed to create an identity. #[pallet::weight(1_000_000_000)] pub fn create_identity( origin: OriginFor<T>, @@ -291,6 +296,11 @@ pub mod pallet { T::OnIdtyChange::on_idty_change(idty_index, IdtyEvent::Created { creator }); Ok(().into()) } + /// Confirm the creation of an identity and give it a name + /// + /// - `idty_name`: the name uniquely associated to this identity. Must match the validation rules defined by the runtime. + /// + /// The identity must have been created using `create_identity` before it can be confirmed. #[pallet::weight(1_000_000_000)] pub fn confirm_identity( origin: OriginFor<T>, @@ -362,6 +372,14 @@ pub mod pallet { Ok(().into()) } + /// Revoke an identity using a signed revocation payload + /// + /// - `payload`: the revocation payload + /// - `owner_key`: the public key corresponding to the identity to be revoked + /// - `genesis_hash`: the genesis block hash + /// - `payload_sig`: the signature of the encoded form of `payload`. Must be signed by `owner_key`. + /// + /// Any origin can emit this extrinsic, not only `owner_key`. #[pallet::weight(1_000_000_000)] pub fn revoke_identity( origin: OriginFor<T>,