use std::string;
use sui::package;
use sui::table;

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

Structs

AppChannelRegistry

Registry that maps all Apps to their respective ChannelRegistry.

public struct AppChannelRegistry has key

ChannelRegistry

Registry that maps all Channels for an App.

public struct ChannelRegistry has key

Constants

The App and ChannelRegistry did not correspond with each other.

const EAppChannelRegistryMismatch: u64 = 370;

Functions

assert_app_channel_registry_match

Aborts with EAppChannelRegistryMismatch if the App and ChannelRegistry do not correspond with each other.

public fun assert_app_channel_registry_match(channel_registry: &ChannelRegistry, app_address: address)

borrow_channel_address

Gets address of the Channel struct with the specified key.

public fun borrow_channel_address(channel_registry: &ChannelRegistry, channel_key: String): address

borrow_channel_registry_address

Gets address of ChannelRegistry struct with the specified App address.

public fun borrow_channel_registry_address(app_channel_registry: &AppChannelRegistry, app_address: address): address

has_record

Returns true or false based on whether the lowercase Channel name currently exists in the registry.

public fun has_record(channel_registry: &ChannelRegistry, channel_key: String): bool

has_channel_registry

Returns true or false based on whether the App has a ChannelRegistry.

public fun has_channel_registry(app_channel_registry: &AppChannelRegistry, app_address: address): bool