Class RevokeTokenKycExtensions
Extension methods for revoking KYC status from token-holding accounts.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class RevokeTokenKycExtensions
Methods
| Edit this page View SourceRevokeTokenKycAsync(ConsensusClient, EntityId, EntityId, Action<IConsensusContext>?)
Revokes KYC status from the holding account relating to the specified token.
Declaration
public static Task<TransactionReceipt> RevokeTokenKycAsync(this ConsensusClient client, EntityId token, EntityId holder, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | The Consensus Node Client orchestrating the revoke. |
| EntityId | token | The identifier of the token to revoke KYC status. |
| EntityId | holder | The holding account to revoke KYC status from. |
| Action<IConsensusContext> | configure | Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network. |
Returns
| Type | Description |
|---|---|
| Task<TransactionReceipt> | A transaction receipt indicating a successful operation. |
Examples
// Clear the KYC-approved flag for a holder. Future transfers by or
// to this holder will be rejected until KYC is re-granted.
var receipt = await client.RevokeTokenKycAsync(token, holder);
Console.WriteLine($"KYC revoke status: {receipt.Status}");
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If required arguments are missing or invalid. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node refused the transaction. Only a code about the transaction itself proves it did not execute; any other code leaves the outcome unknown, so settle it by its transaction id on a mirror node rather than resubmitting it (see PrecheckException). |
| ConsensusException | If the outcome could not be confirmed: the transaction may have executed, so settle it by its transaction id on a mirror node rather than resubmitting it. |
| TransactionException | If the network rejected the request as invalid or had missing data. |
RevokeTokenKycAsync(ConsensusClient, RevokeTokenKycParams, Action<IConsensusContext>?)
Revokes KYC status from the holding account relating to the specified token.
Declaration
public static Task<TransactionReceipt> RevokeTokenKycAsync(this ConsensusClient client, RevokeTokenKycParams revokeKycParams, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | The Consensus Node Client orchestrating the revoke. |
| RevokeTokenKycParams | revokeKycParams | The details identifying the token and account to revoke KYC status from. |
| Action<IConsensusContext> | configure | Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network. |
Returns
| Type | Description |
|---|---|
| Task<TransactionReceipt> | A transaction receipt indicating a successful operation. |
Examples
// Clear the KYC-approved flag for a holder. Future transfers by or
// to this holder will be rejected until KYC is re-granted.
var receipt = await client.RevokeTokenKycAsync(token, holder);
Console.WriteLine($"KYC revoke status: {receipt.Status}");
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If required arguments are missing or invalid. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node refused the transaction. Only a code about the transaction itself proves it did not execute; any other code leaves the outcome unknown, so settle it by its transaction id on a mirror node rather than resubmitting it (see PrecheckException). |
| ConsensusException | If the outcome could not be confirmed: the transaction may have executed, so settle it by its transaction id on a mirror node rather than resubmitting it. |
| TransactionException | If the network rejected the request as invalid or had missing data. |