Crates.io | hapi-near-connector |
lib.rs | hapi-near-connector |
version | 0.3.0 |
source | src |
created_at | 2022-10-13 13:22:38.423862 |
updated_at | 2023-03-09 11:00:38.241457 |
description | Rust library for using HAPI protocol in cmart contracts on NEAR. |
homepage | https://hapi.one |
repository | https://github.com/HAPIprotocol/hapi-near-connector |
max_upload_size | |
id | 687171 |
size | 11,840 |
This is a crate that helps implement the use of the HAPI protocol in your smart contract on Near blockchain.
The crate has an AML structure that stores:
Note
If the risk level was not set for some categories, then the risk level for the category All is used, which is set during initialization.
get_aml - Returns the aml accountId and vector of added categories with accepted risk levels.
update_account_id - Updates account id of aml service.
update_category - Updates or add a category with accepted risk score to aml conditions.
remove_category - Removes category from aml conditions.
assert_risk - Checks the category according to the set level of risk. If the risk level is not set for this category, it checks the All category.
get_aml_conditions - Returns reference to UnorderedMap of added categories with accepted risk levels.
check_risk - Returns true if the address is risky or false if not.