Extends an existing registration while it is still active or inside the grace period.
fn renew(
env: soroban_sdk::Env,
name: soroban_sdk::String,
years: u32,
caller: soroban_sdk::Address,
) -> u64
Stores a commit hash used by the commit-reveal registration flow.
fn commit(
env: soroban_sdk::Env,
hash: soroban_sdk::BytesN<32>,
committer: soroban_sdk::Address,
)
Finalizes domain registration after a valid commit has matured.
fn reveal(
env: soroban_sdk::Env,
name: soroban_sdk::String,
salt: soroban_sdk::BytesN<32>,
years: u32,
buyer: soroban_sdk::Address,
referrer: Option,
) -> u64
Upgrades the current contract to a new WASM hash.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Returns the reverse-resolution name for an address, if any.
fn get_name(
env: soroban_sdk::Env,
address: soroban_sdk::Address,
) -> Option
Returns a text record for a domain and key.
fn get_text(
env: soroban_sdk::Env,
name: soroban_sdk::String,
key: soroban_sdk::String,
) -> Option
Returns the effective owner while the registration remains within the grace period.
fn owner_of(
env: soroban_sdk::Env,
name: soroban_sdk::String,
) -> Option
Sets the resolved address for a domain.
fn set_name(
env: soroban_sdk::Env,
name: soroban_sdk::String,
address: soroban_sdk::Address,
caller: soroban_sdk::Address,
)
Stores an arbitrary text record under a domain-owned key.
fn set_text(
env: soroban_sdk::Env,
name: soroban_sdk::String,
key: soroban_sdk::String,
value: soroban_sdk::String,
caller: soroban_sdk::Address,
)
Transfers an owned domain to a new address.
fn transfer(
env: soroban_sdk::Env,
name: soroban_sdk::String,
new_owner: soroban_sdk::Address,
caller: soroban_sdk::Address,
)
Calculates the total registration price for the requested number of years.
fn get_price(env: soroban_sdk::Env, years: u32) -> i128
Clears the resolver target and matching reverse-resolution entry for a domain.
fn clear_name(
env: soroban_sdk::Env,
name: soroban_sdk::String,
caller: soroban_sdk::Address,
)
Initializes the base contract with its TLD configuration and pricing rules.
fn initialize(env: soroban_sdk::Env, args: TldInitArgs)
Returns the address set as the resolver target for a domain.
fn get_address(
env: soroban_sdk::Env,
name: soroban_sdk::String,
) -> Option
Updates the payment token and yearly registration price.
fn set_pricing(
env: soroban_sdk::Env,
payment_token: soroban_sdk::Address,
price_per_year: i128,
)
Checks whether a domain can be registered again, including grace-period rules.
fn is_available(env: soroban_sdk::Env, name: soroban_sdk::String) -> bool
Returns the owner of this domain zone.
fn get_tld_owner(env: soroban_sdk::Env) -> soroban_sdk::Address
Returns the stored expiration timestamp for a domain.
fn get_expiration(env: soroban_sdk::Env, name: soroban_sdk::String) -> u64
Computes the commit hash for a name, salt, and buyer.
fn get_commit_hash(
env: soroban_sdk::Env,
name: soroban_sdk::String,
salt: soroban_sdk::BytesN<32>,
buyer: soroban_sdk::Address,
) -> soroban_sdk::BytesN<32>
Returns the configured grace period in days.
fn get_grace_period(env: soroban_sdk::Env) -> u64
Updates the grace period applied after expiration before a name becomes available again.
fn set_grace_period(env: soroban_sdk::Env, days: u64)
Sets the caller's primary reverse-resolution name.
fn set_primary_name(
env: soroban_sdk::Env,
name: soroban_sdk::String,
caller: soroban_sdk::Address,
)
Clears the caller's primary reverse-resolution name.
fn clear_primary_name(env: soroban_sdk::Env, caller: soroban_sdk::Address)
Returns the temporary-storage TTL applied to commit hashes, in ledgers.
fn get_commit_ttl_ledgers(env: soroban_sdk::Env) -> u32
Updates how long commit hashes are retained in temporary storage.
fn set_commit_ttl_ledgers(env: soroban_sdk::Env, value: u32)
Transfers ownership of this domain zone to a new owner.
fn transfer_tld_ownership(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)