@@ -1662,6 +1662,11 @@ pub mod propchain_identity {
16621662 Ok ( ( ) )
16631663 }
16641664
1665+ /// Revokes an account's verifier authorization.
1666+ ///
1667+ /// Admin only (`IdentityError::Unauthorized` otherwise). Marks the
1668+ /// verifier as unauthorized in the mapping; revoking an address that
1669+ /// was never authorized succeeds silently.
16651670 #[ ink( message) ]
16661671 pub fn remove_authorized_verifier (
16671672 & mut self ,
@@ -1674,6 +1679,11 @@ pub mod propchain_identity {
16741679 Ok ( ( ) )
16751680 }
16761681
1682+ /// Adds a cross-chain id to the supported-chains list.
1683+ ///
1684+ /// Admin only (`IdentityError::Unauthorized` otherwise). Adding a
1685+ /// chain that is already listed is a no-op; the registry is seeded
1686+ /// with chains 1–5 at construction.
16771687 #[ ink( message) ]
16781688 pub fn add_supported_chain ( & mut self , chain_id : ChainId ) -> Result < ( ) , IdentityError > {
16791689 if self . env ( ) . caller ( ) != self . admin {
@@ -1685,6 +1695,8 @@ pub mod propchain_identity {
16851695 Ok ( ( ) )
16861696 }
16871697
1698+ /// Returns every chain id currently accepted for cross-chain
1699+ /// identity verification.
16881700 #[ ink( message) ]
16891701 pub fn get_supported_chains ( & self ) -> Vec < ChainId > {
16901702 self . supported_chains . clone ( )
@@ -1756,6 +1768,12 @@ pub mod propchain_identity {
17561768
17571769 // ===== Verification Provider Methods - Issue #283 =====
17581770
1771+ /// Registers an external KYC verification provider.
1772+ ///
1773+ /// Admin only (`IdentityError::Unauthorized` otherwise). The provider
1774+ /// starts active with the given name (fixed 64-byte field),
1775+ /// `ProviderType`, and the tiers it may verify; a `provider_registered`
1776+ /// audit entry is recorded.
17591777 #[ ink( message) ]
17601778 pub fn register_verification_provider (
17611779 & mut self ,
@@ -1791,6 +1809,11 @@ pub mod propchain_identity {
17911809 Ok ( ( ) )
17921810 }
17931811
1812+ /// Deactivates a verification provider so it can no longer receive
1813+ /// or complete KYC requests.
1814+ ///
1815+ /// Admin only (`IdentityError::Unauthorized` for non-admins);
1816+ /// unknown providers fail with `IdentityError::IdentityNotFound`.
17941817 #[ ink( message) ]
17951818 pub fn deactivate_provider ( & mut self , provider_id : AccountId ) -> Result < ( ) , IdentityError > {
17961819 if self . env ( ) . caller ( ) != self . admin {
@@ -1808,6 +1831,8 @@ pub mod propchain_identity {
18081831 Ok ( ( ) )
18091832 }
18101833
1834+ /// Returns the registration record for a verification provider,
1835+ /// or `None` if the id was never registered.
18111836 #[ ink( message) ]
18121837 pub fn get_verification_provider (
18131838 & self ,
@@ -1818,6 +1843,13 @@ pub mod propchain_identity {
18181843
18191844 // ===== KYC Tier Verification - Issue #282 & #283 =====
18201845
1846+ /// Opens a KYC verification request with a provider for the caller.
1847+ ///
1848+ /// The provider must exist (`IdentityError::IdentityNotFound`) and be
1849+ /// active, and must support `requested_tier` (both failures return
1850+ /// `IdentityError::VerificationFailed`). Returns a sequential request
1851+ /// id starting at 1; the request starts in `Pending` status and an
1852+ /// audit entry is recorded.
18211853 #[ ink( message) ]
18221854 pub fn request_kyc_verification (
18231855 & mut self ,
@@ -1871,6 +1903,14 @@ pub mod propchain_identity {
18711903 Ok ( request_id)
18721904 }
18731905
1906+ /// Completes a KYC verification request (approve or reject).
1907+ ///
1908+ /// Callable only by the provider the request was filed with
1909+ /// (`IdentityError::Unauthorized` otherwise); unknown request ids fail
1910+ /// with `IdentityError::IdentityNotFound` and non-pending requests
1911+ /// with `IdentityError::VerificationFailed`. On approval the
1912+ /// applicant's KYC tier is set to the requested tier; `result_metadata`
1913+ /// is stored verbatim on the request.
18741914 #[ ink( message) ]
18751915 pub fn complete_kyc_verification (
18761916 & mut self ,
@@ -1965,16 +2005,23 @@ pub mod propchain_identity {
19652005 Ok ( ( ) )
19662006 }
19672007
2008+ /// Returns the KYC tier granted to `account`, or `None` if the
2009+ /// account has never been verified.
19682010 #[ ink( message) ]
19692011 pub fn get_user_kyc_tier ( & self , account : AccountId ) -> Option < KycTier > {
19702012 self . user_kyc_tiers . get ( & account)
19712013 }
19722014
2015+ /// Returns the privilege limits configured for `tier` (max
2016+ /// transaction value, daily transaction count, trading permission),
2017+ /// or `None` if the tier is not configured.
19732018 #[ ink( message) ]
19742019 pub fn get_kyc_tier_privileges ( & self , tier : KycTier ) -> Option < KycTierPrivileges > {
19752020 self . kyc_tier_privileges . get ( & tier)
19762021 }
19772022
2023+ /// Returns the full KYC verification request with the given id,
2024+ /// or `None` if it does not exist.
19782025 #[ ink( message) ]
19792026 pub fn get_provider_verification_request (
19802027 & self ,
@@ -1983,6 +2030,14 @@ pub mod propchain_identity {
19832030 self . provider_verification_requests . get ( & request_id)
19842031 }
19852032
2033+ /// Checks whether `account`'s KYC tier permits a transaction of
2034+ /// `transaction_value`.
2035+ ///
2036+ /// Accounts without a tier are treated as `Tier0Unverified`. Returns
2037+ /// `Ok(true)` when the value is within the tier's max transaction
2038+ /// value and the daily limit is not exhausted, `Ok(false)` when a
2039+ /// limit is exceeded, and `IdentityError::IdentityNotFound` if the
2040+ /// tier has no configured privileges.
19862041 #[ ink( message) ]
19872042 pub fn check_tier_privileges (
19882043 & self ,
0 commit comments