- Resource
AuthValidatorWithType
- Resource
ValidatorRegistry
- Constants
- Function
genesis_init
- Function
register
- Function
register_internal
- Function
borrow_validator
- Function
borrow_validator_by_type
use 0x1::string;
use 0x2::account;
use 0x2::features;
use 0x2::table;
use 0x2::type_info;
use 0x2::type_table;
use 0x3::auth_validator;
struct AuthValidatorWithType<ValidatorType: store> has store, key
struct ValidatorRegistry has key
const ErrorValidatorAlreadyRegistered: u64 = 2;
const ErrorValidatorUnregistered: u64 = 1;
Init function called by genesis.
public(friend) fun genesis_init(sender: &signer)
#[private_generics(#[ValidatorType])]
public fun register<ValidatorType: store>(): u64
public(friend) fun register_internal<ValidatorType: store>(): u64
public fun borrow_validator(id: u64): &auth_validator::AuthValidator
public fun borrow_validator_by_type<ValidatorType: store>(): &auth_validator::AuthValidator