Sigil documentation
ReferenceRust referencesigil-node

sigil-node · executor_username

Source declarations, signatures and documentation for executor_username.

Source: sigil/node/sigil-node/src/executor_username.rs. SHA-256: 1c21f60120d95d795d92f2021a06856a40fe8beb62339e83c5f40b527f9b72e0.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

executor_username::execute_register_username

Register a new username for data.years years to data.owner_did.

Authority rule: only the owner_did itself can register a name in their own name (no third-party registration). This mirrors how transfers/etc require sender == current owner.

pub fn execute_register_username(
    sender: &str,
    data: &RegisterUsernameData,
    block_height: u64,
    base_fee: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 120.

executor_username::execute_transfer_username

pub fn execute_transfer_username(
    sender: &str,
    data: &TransferUsernameData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 238.

executor_username::execute_release_username

pub fn execute_release_username(
    sender: &str,
    data: &ReleaseUsernameData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 305.

executor_username::execute_set_username_metadata

pub fn execute_set_username_metadata(
    sender: &str,
    data: &SetUsernameMetadataData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 374.

executor_username::execute_set_reverse_username

pub fn execute_set_reverse_username(
    sender: &str,
    data: &SetReverseUsernameData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 440.

executor_username::execute_submit_auction_bid

Submit a bid against an open premium-name auction.

Behaviour per docs/specs/USERNAMES.md §4:

  1. Validate the canonical name and confirm it's eligible for auction (1- to 4-char name, not currently registered, not reserved).
  2. Charge base_fee for the transaction itself.
  3. Open the auction lazily on the first bid (no separate OpenAuction tx).
  4. Verify the bid is at least the minimum next bid.
  5. Refund the previous high bidder's escrow (if any) by crediting their balance back. Lock the new bid into auction escrow by debiting from the new bidder.
  6. If we land within the anti-snipe window, push closes_at_height out.
pub fn execute_submit_auction_bid(
    sender: &str,
    data: &UsernameAuctionBidData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 516.

executor_username::execute_finalize_auction

Finalize an auction whose anti-snipe window has elapsed. Anyone can call finalize — it's a permissionless cleanup transaction. The winning bidder receives the username; the bid amount is forfeited to the treasury-username-fees pool.

pub fn execute_finalize_auction(
    sender: &str,
    data: &UsernameAuctionFinalizeData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 685.

executor_username::execute_raise_dispute

File a UDRP-style dispute against a registered username.

Behaviour:

  1. Validate that the sender == claimant_did.
  2. Verify the username is currently registered and not already disputed.
  3. Charge the per-tx fee + filing fee.
  4. Set is_disputed = true on the username record (locks it from transfer/release/metadata until the multisig resolves).
  5. Insert a UsernameDispute record keyed by deterministic dispute_id.
pub fn execute_raise_dispute(
    sender: &str,
    data: &RaiseUsernameDisputeData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 803.

executor_username::execute_resolve_dispute

Resolve a previously-filed dispute. Permissionless to submit; the executor verifies the threshold-of-N multisig signatures over the canonical resolution payload.

pub fn execute_resolve_dispute(
    sender: &str,
    data: &ResolveUsernameDisputeData,
    base_fee: u64,
    block_height: u64,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 914.

On this page