Integration
What a wallet, an explorer or another program can read and do. The program id is published after deploy.
Reading the fund
const [fund] = PublicKey.findProgramAddressSync([Buffer.from("fund")], PROGRAM_ID)
const vault = (mint: PublicKey) => PublicKey.findProgramAddressSync([Buffer.from("vault"), mint.toBuffer()], PROGRAM_ID)[0]
const [order] = PublicKey.findProgramAddressSync([Buffer.from("order")], PROGRAM_ID)
const [rules] = PublicKey.findProgramAddressSync([Buffer.from("rules")], PROGRAM_ID)
The Fund account holds the eight assets with their vaults and price accounts (Pyth for the crypto assets, Kamino Scope for the stocks and gold), the two route programs, the parameters, the pause flag, the high-water mark (high_water_pps), and the day's turnover (epoch_start_nav, epoch_traded_value). The value per share is the vaults valued at those prices divided by the share supply.
Reading a holder's balance
Not from the account itself: a confidential share account exposes ElGamal ciphertexts for the pending and available balances and an authenticated-encryption copy only the holder's key opens. Deposits and redemptions are public, so for a holder who never moves shares confidentially the balance follows from those two legs.
Depositing from another program
deposit(amount, min_shares) takes the depositor's USDC account and their configured share account; the program mints and makes the confidential Deposit itself.
Watching the manager
Subscribe to the program's events:
| Event | Fields |
|---|---|
Deposited | depositor, amount, shares, nav_before, supply_before |
Redeemed | redeemer, shares, amounts (eight), supply_before |
FeeAccrued | fee_shares, nav, high_water_pps |
DecisionRequested | values (eight), nav |
OrderDecided | sell, buy, gap_bps, act, decisions |
TradeExecuted | sell, buy, sold, bought, value_in, value_out, route, epoch_traded_value |
RulesScheduled, RulesSealed, RulesActivated | when the rule set changes |
Price relay
GET /api/prices returns the eight assets in USD with a source field (jupiter, coingecko or cached). It never returns an error status: when every source fails and nothing is cached, prices is null. The program does not use it.