use std::type_name;
use sage_admin::admin;

Explore this module further in the Mover Registry: @sage/admin

Structs

ChannelConfig

Holds the Channel type for runtime type checks.

public struct ChannelConfig has key

ChannelWitnessConfig

Holds the ChannelWitness type for runtime type checks.

public struct ChannelWitnessConfig has key

GroupWitnessConfig

Holds the GroupWitness type for runtime type checks.

public struct GroupWitnessConfig has key

UserOwnedConfig

Holds the UserOwned type for runtime type checks.

public struct UserOwnedConfig has key

UserSharedConfig

Holds the UserShared type for runtime type checks.

public struct UserSharedConfig has key

UserWitnessConfig

Holds the UserWitness type for runtime type checks.

public struct UserWitnessConfig has key

Constants

Runtime type checking failed for the struct type.

const ETypeMismatch: u64 = 370;

Runtime type checking failed for the witness.

const EWitnessMismatch: u64 = 371;

Functions

assert_channel

Aborts with ETypeMismatch if the channel is not of the configured ChannelType.

public fun assert_channel<ChannelType: key>(channel_config: &ChannelConfig, channel: &ChannelType)

assert_channel_witness

Aborts with EWitnessMismatch if the channel_witness is not of the configured ChannelWitnessType.

public fun assert_channel_witness<ChannelWitnessType: drop>(channel_witness_config: &ChannelWitnessConfig, channel_witness: &ChannelWitnessType)

assert_group_witness

Aborts with EWitnessMismatch if the group_witness is not of the configured GroupWitnessType.

public fun assert_group_witness<GroupWitnessType: drop>(group_witness_config: &GroupWitnessConfig, group_witness: &GroupWitnessType)

assert_owned_user

Aborts with ETypeMismatch if the owned_user is not of the configured UserOwnedType.

public fun assert_owned_user<UserOwnedType: key>(owned_user_config: &UserOwnedConfig, owned_user: &UserOwnedType)

assert_shared_user

Aborts with ETypeMismatch if the shared_user is not of the configured UserSharedType.

public fun assert_shared_user<UserSharedType: key>(shared_user_config: &UserSharedConfig, shared_user: &UserSharedType)

assert_user_witness

Aborts with with EWitnessMismatch if the user_witness is not of the configured UserWitnessType.

public fun assert_user_witness<UserWitnessType: drop>(user_witness_config: &UserWitnessConfig, user_witness: &UserWitnessType)

verify_channel

Returns true if the channel is the configured ChannelType, and false otherwise.

public fun verify_channel<ChannelType: key>(channel_config: &ChannelConfig, _: &ChannelType): bool

verify_channel_witness

Returns true if the channel_witness is the configured ChannelWitnessType, and false otherwise.

public fun verify_channel_witness<ChannelWitnessType: drop>(channel_witness_config: &ChannelWitnessConfig, _: &ChannelWitnessType): bool

verify_group_witness

Returns true if the group_witness is the configured GroupWitnessType, and false otherwise.

public fun verify_group_witness<GroupWitnessType: drop>(group_witness_config: &GroupWitnessConfig, _: &GroupWitnessType): bool

verify_owned_user

Returns true if the owned_user is the configured UserOwnedType, and false otherwise.

public fun verify_owned_user<UserOwnedType: key>(owned_user_config: &UserOwnedConfig, _: &UserOwnedType): bool

verify_shared_user

Returns true if the shared_user is the configured UserSharedType, and false otherwise.

public fun verify_shared_user<UserSharedType: key>(shared_user_config: &UserSharedConfig, _: &UserSharedType): bool

verify_user_witness

Returns true if the user_witness is the configured UserWitnessType, and false otherwise.

public fun verify_user_witness<UserWitnessType: drop>(user_witness_config: &UserWitnessConfig, _: &UserWitnessType): bool