Registry

Defines:

public struct UserRegistry has key, store {
        id: UID,
        address_registry: Table<address, String>,
        address_reverse_registry: Table<String, address>,
        user_registry: Table<String, address>,
        user_reverse_registry: Table<address, String>
}

Add

The add functions have these effects:

  1. Adds the user name, user address, and wallet addresses to the registry

Assert User Address

The assert_user_address_exists functions have these effects:

  1. Throws error (370 - EAddressRecordDoesNotExist) if the wallet address does not exist in the registry

Assert User Address

The assert_user_address_exists functions have these effects:

  1. Throws error (371 - EUsernameRecordDoesNotExist) if the user name does not exist in the registry

Get Owner Address From Key

The get_owner_address_from_key functions have these effects:

  1. Returns wallet address associated with the user name

Get User Address From Key

The get_user_address_from_key functions have these effects:

  1. Returns user address associated with the user name

Get User Key from Owner Address

The get_key_from_owner_address functions have these effects:

  1. Returns String user name associated with wallet address

Get User Key from User Address

The get_key_from_user_address functions have these effects:

  1. Returns String user name associated with user address

Has Address Record

The has_address_record function has these effects:

  1. Returns boolean if the wallet address is in the registry

Has Username Record

The has_username_record function has these effects:

  1. Returns boolean if the user name is in the registry

Last updated