Sigil documentation
ReferenceRust referencesigil-wallet

sigil-wallet · wallet

Source declarations, signatures and documentation for wallet.

Source: sigil/node/sigil-wallet/src/wallet.rs. SHA-256: 418a66e127697bb191ddcaf60ed28d0f503765f78f5e1b6aba6f606629f385e4.

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.

wallet::transfer

Transfer MINT to another account.

#[allow(clippy::too_many_arguments)]
pub async fn transfer(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    to_did: &str,
    amount: u64,
    memo: Option<&str>,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 231.

wallet::register_contract_code

Register WASM bytecode for public deployment.

#[allow(clippy::too_many_arguments)]
pub async fn register_contract_code(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    code: Vec<u8>,
    license_metadata: ContractLicenseMetadata,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<RegisterContractCodeResult>;

Source line: 260.

wallet::deploy_contract

Deploy a contract from a previously registered code hash.

#[allow(clippy::too_many_arguments)]
pub async fn deploy_contract(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    contract_did: &str,
    code_hash: &str,
    zone_id: Option<String>,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 283.

wallet::register_username

Register a username lease.

#[allow(clippy::too_many_arguments)]
pub async fn register_username(
    rpc_url: &str,
    chain_id: &str,
    owner_did: &str,
    name: &str,
    years: u32,
    metadata_cid: Option<SigilHash>,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 309.

wallet::set_reverse_username

Set a username as the DID's primary reverse lookup.

pub async fn set_reverse_username(
    rpc_url: &str,
    chain_id: &str,
    owner_did: &str,
    name: &str,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 328.

wallet::transfer_username

Transfer a username to a new owner.

#[allow(clippy::too_many_arguments)]
pub async fn transfer_username(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    name: &str,
    new_owner_did: &str,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 345.

wallet::release_username

Release a username.

pub async fn release_username(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    name: &str,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 362.

wallet::set_username_metadata

Set or clear username metadata.

#[allow(clippy::too_many_arguments)]
pub async fn set_username_metadata(
    rpc_url: &str,
    chain_id: &str,
    from_did: &str,
    name: &str,
    metadata_cid: Option<SigilHash>,
    passphrase: &str,
    nonce: u64,
) -> WalletResult<String>;

Source line: 379.

wallet::print_transfer

Print a transfer confirmation.

pub fn print_transfer(from: &str, to: &str, amount: u64, tx_hash: &str);

Source line: 396.

wallet::print_register_contract_code

Print contract-code registration confirmation.

pub fn print_register_contract_code(from: &str, result: &RegisterContractCodeResult);

Source line: 415.

wallet::print_deploy_contract

Print contract deployment confirmation.

pub fn print_deploy_contract(from: &str, contract_did: &str, code_hash: &str, tx_hash: &str);

Source line: 452.

wallet::print_username_registered

Print username registration confirmation.

pub fn print_username_registered(owner: &str, name: &str, years: u32, tx_hash: &str);

Source line: 471.

wallet::print_username_primary

Print primary username confirmation.

pub fn print_username_primary(owner: &str, name: &str, tx_hash: &str);

Source line: 490.

wallet::print_username_transfer

Print username transfer confirmation.

pub fn print_username_transfer(from: &str, to: &str, name: &str, tx_hash: &str);

Source line: 504.

wallet::print_username_release

Print username release confirmation.

pub fn print_username_release(from: &str, name: &str, tx_hash: &str);

Source line: 519.

wallet::print_username_metadata

Print username metadata confirmation.

pub fn print_username_metadata(from: &str, name: &str, tx_hash: &str);

Source line: 533.

wallet::print_balance

Print a balance display.

pub fn print_balance(did: &str, balance: u64, chain_id: &str);

Source line: 547.

wallet::resolve_sender

Resolve the sender DID for a wallet operation.

Uses the --did flag if provided, otherwise falls back to the config default.

pub fn resolve_sender(explicit: Option<&str>) -> WalletResult<String>;

Source line: 563.

On this page