This code was AUTOGENERATED using the codama library.
Please DO NOT EDIT THIS FILE, instead use visitors
to add features, then rerun codama to update it.
This code was AUTOGENERATED using the codama library.
Please DO NOT EDIT THIS FILE, instead use visitors
to add features, then rerun codama to update it.
This code was AUTOGENERATED using the codama library.
Please DO NOT EDIT THIS FILE, instead use visitors
to add features, then rerun codama to update it.
Shares minted for depositing btc_amount BTC into a vault holding
vault_amount BTC with vault_shares shares issued
(SatsVault::btc_amount / SatsVault::btc_shares): 1:1 while no shares
exist, otherwise scaled by the vault’s shares / assets ratio and
floored. Errors when the vault has shares but no BTC, or the result
exceeds u64::MAX.
claim_usd: withdraw amount of the miner authority’s unclaimed USD
winnings from the board’s USD pool to the authority’s USD account. No exit
fee — the full amount transfers.
deploy_public: stake amount USD (base units, gross of fees) on the tiles
in selection_mask for round round_id, as the miner authority. The round
must be the board’s current one and open for deploys; the miner profile and
deployment record PDAs are created by the instruction.
rotate_round: reveal current_round_id’s winning tile and deploy round
current_round_id + 1 as the board’s new active round. Signed by the
config’s round authority; valid once the current round’s window elapsed.
settle_deploy_public: settle the miner authority’s deployment in a
Settled round — credit winnings (USD + sats vault shares) and hashrate
points to the miner profile, then close the deployment account, returning
its rent. Valid for losing deployments too (they still earn hashrate points).
swap_round_stake: relay a pre-built aggregator route that converts part of
the revealed round’s USD into BTC. swap_data and route_accounts are the
route’s opaque instruction data and account list; the on-chain handler
enforces the economics against observed balance deltas. Signed by the
config’s round authority.
update_board_round_duration: overwrite the board’s round_duration (slots).
Applies to future round activations only; the active round keeps its window.
Signed by the config’s admin authority.
BTC value of shares against a vault holding vault_amount BTC with
vault_shares shares issued (SatsVault::btc_amount /
SatsVault::btc_shares). claim_fee_bps is
SatrushConfig::sats_vault_claim_fee_bps; pass 0 when only the gross
value matters. Zero shares value to zero without error; shares
exceeding vault_shares is rejected.