Executes a function call on another contract.
Requires authentication from the account itself.
target - The address of the contract to calltarget_fn - The function name to call on the target contracttarget_args - The arguments to pass to the target functionfn execute(
env: soroban_sdk::Env,
target: soroban_sdk::Address,
target_fn: soroban_sdk::Symbol,
target_args: soroban_sdk::Vec,
)
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Returns Some(Address) if ownership is set, or None if ownership has
been renounced.
e - Access to the Soroban environment.fn get_owner(env: soroban_sdk::Env) -> Option
Adds a policy contract to a context rule.
Requires authentication from the account itself.
fn add_policy(
env: soroban_sdk::Env,
context_rule_id: u32,
policy: soroban_sdk::Address,
install_param: soroban_sdk::Val,
) -> u32
Adds a new signer to a context rule.
Requires authentication from the account itself.
fn add_signer(env: soroban_sdk::Env, context_rule_id: u32, signer: Signer) -> u32
Validates signatures against the account's context rules.
Verifies that the provided signatures match the required signers for the given execution context.
signature_payload - The hash of the transaction data to verifysignatures - The signatures to validateauth_contexts - The execution contexts for which authentication is requiredReturns Ok(()) if authentication succeeds, or an error if validation fails.
fn __check_auth(
env: soroban_sdk::Env,
signature_payload: soroban_sdk::BytesN<32>,
signatures: AuthPayload,
auth_contexts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>
fn __constructor(
env: soroban_sdk::Env,
signers: soroban_sdk::Vec,
policies: soroban_sdk::Map,
)
fn get_signer_id(
env: soroban_sdk::Env,
verifier_address: soroban_sdk::Address,
public_key: soroban_sdk::Bytes,
) -> Option
Removes a policy contract from a context rule.
Requires authentication from the account itself.
fn remove_policy(env: soroban_sdk::Env, context_rule_id: u32, policy_id: u32)
Removes a signer from a context rule.
Requires authentication from the account itself.
fn remove_signer(env: soroban_sdk::Env, context_rule_id: u32, signer_id: u32)
fn recover_wallet(env: soroban_sdk::Env, public_key: soroban_sdk::Bytes)
fn web_auth_verify(
env: soroban_sdk::Env,
args: soroban_sdk::Map,
)
Accepts a pending ownership transfer.
e - Access to the Soroban environment.crate::role_transfer::RoleTransferError::NoPendingTransfer] - If
there is no pending transfer to accept.["ownership_transfer_completed"][new_owner: Address]fn accept_ownership(env: soroban_sdk::Env)
Creates a new context rule with specified signers and policies.
Requires authentication from the account itself.
fn add_context_rule(
env: soroban_sdk::Env,
context_type: ContextRuleType,
name: soroban_sdk::String,
valid_until: Option,
signers: soroban_sdk::Vec,
policies: soroban_sdk::Map,
) -> ContextRule
Retrieves a specific context rule by ID.
fn get_context_rule(env: soroban_sdk::Env, context_rule_id: u32) -> ContextRule
fn get_verifier_key(
env: soroban_sdk::Env,
context_rule_id: u32,
) -> soroban_sdk::Address
Renounces ownership of the contract.
Permanently removes the owner, disabling all functions gated by
#[only_owner].
e - Access to the Soroban environment.OwnableError::TransferInProgress] - If there is a pending ownership
transfer.OwnableError::OwnerNotSet] - If the owner is not set.fn renounce_ownership(env: soroban_sdk::Env)
Initiates a 2-step ownership transfer to a new address.
Requires authorization from the current owner. The new owner must later
call accept_ownership() to complete the transfer.
e - Access to the Soroban environment.new_owner - The proposed new owner.live_until_ledger - Ledger number until which the new owner can
accept. A value of 0 cancels any pending transfer.OwnableError::OwnerNotSet] - If the owner is not set.crate::role_transfer::RoleTransferError::NoPendingTransfer] - If
trying to cancel a transfer that doesn't exist.crate::role_transfer::RoleTransferError::InvalidLiveUntilLedger] -
If the specified ledger is in the past.crate::role_transfer::RoleTransferError::InvalidPendingAccount] -
If the specified pending account is not the same as the provided new
address.fn transfer_ownership(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
live_until_ledger: u32,
)
fn get_recovery_signer(env: soroban_sdk::Env) -> soroban_sdk::Bytes
Removes a context rule from the account.
Requires authentication from the account itself.
fn remove_context_rule(env: soroban_sdk::Env, context_rule_id: u32)
Returns the total number of context rules.
fn get_context_rules_count(env: soroban_sdk::Env) -> u32
Updates the name of an existing context rule.
Requires authentication from the account itself.
fn update_context_rule_name(
env: soroban_sdk::Env,
context_rule_id: u32,
name: soroban_sdk::String,
) -> ContextRule
Updates the expiration time of a context rule.
Requires authentication from the account itself.
fn update_context_rule_valid_until(
env: soroban_sdk::Env,
context_rule_id: u32,
valid_until: Option,
) -> ContextRule