Skip to main content

Module account

Module account 

Source
Expand description

What an address holds and who may sign for it.

  • holdings: perp and spot balances, positions, what an order can draw on, worth, outcome sides.
  • history: orders, fills and fees, the ledger, the portfolio.
  • keys: signatures, which key may sign what, agents, builder approvals.
  • settings: the account mode, subaccounts, referrals, rate limits.

Re-exports§

pub use crate::utils::sign::L1Action;
pub use crate::utils::sign::UserAction;
pub use history::DailyVolume;
pub use history::FeeSchedule;
pub use history::FeeTiers;
pub use history::FillLiquidation;
pub use history::FrontendOrder;
pub use history::History;
pub use history::MakerTier;
pub use history::OrderKind;
pub use history::OrderLookup;
pub use history::OrderRecord;
pub use history::OrderState;
pub use history::Portfolio;
pub use history::Span;
pub use history::StakingDiscount;
pub use history::TwapSliceFill;
pub use history::UserFees;
pub use history::VolumeTier;
pub use history::portfolio;
pub use history::portfolio;
pub use history::portfolio_request;
pub use history::summed;
pub use holdings::ActiveAssetData;
pub use holdings::AssetPosition;
pub use holdings::Balance;
pub use holdings::Beside;
pub use holdings::ClearinghouseState;
pub use holdings::Collateral;
pub use holdings::CumFunding;
pub use holdings::DexState;
pub use holdings::Direction;
pub use holdings::Keeping;
pub use holdings::Leverage;
pub use holdings::MarginSummary;
pub use holdings::Pays;
pub use holdings::Position;
pub use holdings::Prices;
pub use holdings::Risk;
pub use holdings::Source;
pub use holdings::SpotBalance;
pub use holdings::SpotState;
pub use holdings::Standing;
pub use holdings::Surface;
pub use holdings::Usable;
pub use holdings::Worth;
pub use holdings::active_asset_data;
pub use holdings::active_asset_data_request;
pub use holdings::clearinghouse_state;
pub use holdings::clearinghouse_state_request;
pub use holdings::combined;
pub use holdings::payer;
pub use holdings::spot_state;
pub use holdings::spot_state_request;
pub use holdings::standing;
pub use holdings::standing;
pub use keys::ActionKind;
pub use keys::Agent;
pub use keys::AgentName;
pub use keys::ApproveAgent;
pub use keys::ApproveBuilderFee;
pub use keys::BUILDER_MINIMUM;
pub use keys::BadAgentName;
pub use keys::BadExpiry;
pub use keys::Key;
pub use keys::MAX_AGENT_VALIDITY_MS;
pub use keys::NotReady;
pub use keys::Readiness;
pub use keys::Refused;
pub use keys::Reused;
pub use keys::Role;
pub use keys::SignError;
pub use keys::Signature;
pub use keys::Signer;
pub use keys::Signers;
pub use keys::Why;
pub use keys::builder_readiness;
pub use keys::extra_agents;
pub use keys::extra_agents_request;
pub use keys::fresh_agent;
pub use keys::max_builder_fee;
pub use keys::max_builder_fee_request;
pub use keys::may_sign;
pub use keys::readiness;
pub use keys::role;
pub use keys::role_request;
pub use keys::split_valid_until;
pub use keys::LocalKey;
pub use keys::recover;
pub use keys::verify;
pub use settings::Abstraction;
pub use settings::AbstractionMode;
pub use settings::AccountRef;
pub use settings::AgentSetAbstraction;
pub use settings::BadCode;
pub use settings::CreateSubAccount;
pub use settings::LONGEST_CODE;
pub use settings::RateLimit;
pub use settings::Referral;
pub use settings::ReferralState;
pub use settings::ReferredBy;
pub use settings::ReferrerData;
pub use settings::ReferrerState;
pub use settings::SetReferrer;
pub use settings::SubAccount;
pub use settings::SubAccountSpotTransfer;
pub use settings::SubAccountTransfer;
pub use settings::SubRefusal;
pub use settings::TokenRewards;
pub use settings::UserSetAbstraction;
pub use settings::abstraction;
pub use settings::abstraction_request;
pub use settings::rate_limit;
pub use settings::rate_limit_request;
pub use settings::referral;
pub use settings::referral;
pub use settings::referral_request;
pub use settings::sub_accounts;
pub use settings::sub_accounts_request;

Modules§

history
What an account did: its orders and what became of them, its fills and what it pays, every movement of its money other than funding, and the venue’s history of what it is worth.
holdings
What an account holds: each perp dex’s clearinghouse, spot balances, what an order on one perp may take, how its mode keeps the balances, what an order can draw on, what it is all worth, and the outcome sides held.
keys
Who may sign for an account: signatures and the Signer trait, which key may sign which action, API wallets (agents), and the builder fee an account approves and whether a builder can be paid.
settings
How an account is set up: its mode and changing it, its subaccounts, its referrer and its own code, and what it may still send.