Skip to main content

ComplianceController Actions

4 actions registered.

NameDeprecated
checkWalletCompliance
checkWalletsCompliance
clearComplianceState
getState

ComplianceController:checkWalletCompliance​

Package: @metamask/compliance-controller

Checks compliance status for a single wallet address via the API and persists the result to state. If the API call fails and a previously cached result exists for the address, the cached result is returned as a fallback. If no cached result exists, the error is re-thrown.

Parameters:

NameDescription
addressThe wallet address to check.

Returns: The compliance status of the wallet.

Handler signature:

(address: string) => Promise<WalletComplianceStatus>

ComplianceController:checkWalletsCompliance​

Package: @metamask/compliance-controller

Checks compliance status for multiple wallet addresses via the API and persists the results to state. If the API call fails and every requested address has a previously cached result, those cached results are returned as a fallback. If any address lacks a cached result, the error is re-thrown.

Parameters:

NameDescription
addressesThe wallet addresses to check.

Returns: The compliance statuses of the wallets.

Handler signature:

(addresses: string[]) => Promise<WalletComplianceStatus[]>

ComplianceController:clearComplianceState​

Package: @metamask/compliance-controller

Clears all compliance data from state.

Handler signature:

() => void

ComplianceController:getState​

Package: @metamask/compliance-controller

Retrieves the state of the ComplianceController.

Handler signature:

() => ComplianceControllerState