From 40cec7d07cc7e0d3587b393e8fd26a002baf4487 Mon Sep 17 00:00:00 2001
From: tuxmain <tuxmain@zettascript.org>
Date: Sun, 5 Jun 2022 18:08:34 +0200
Subject: [PATCH] doc: Add doc comments to some calls

---
 pallets/certification/src/lib.rs |  5 +++++
 pallets/identity/src/lib.rs      | 18 ++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs
index 4d91e8dca..cc577701f 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 4e2c20fa5..833037d8c 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>,
-- 
GitLab