On-chain reference
Wallet mode exposes 94 methods in the documented SDK revision. Create the client with createT3trisClient({ walletClient, publicClient }) or { provider, account }. No API credential or user session is involved.
Every method takes one input object containing chainId. All writes return Promise<TransactionResult> with { status: "submitted" | "proposed", hash }. Reads return a Promise of the decoded result. See wallet integration for connection, units, receipt handling and explicit approvals.
Input conventions
The tables show additional fields after the common target:
| Target | Required fields |
|---|---|
| Vault | chainId: number, address: Address |
| Oracle | chainId: number, oracle: Address |
| Token | chainId: number, token: Address |
| Deployment/prediction | chainId: number (canonical factory is selected by the SDK) |
? marks an optional field. Amounts, share quantities and WAD rates are bigint. Roles and salts are bytes32 hex values. permit2Data is encoded hex prepared by your application, defaulting to 0x when omitted. unsafe defaults to false.
The standalone playground and Curate playground provide editable examples. Exact inferred parameter/output types ship with the package. The pinned SDK sources are the type source of truth.
Deployment and depositor actions
| Method | Target and additional fields |
|---|---|
vaults.create | chainId, name, symbol, asset, owner, curator, feeRecipient, config, oracle, deployment, fees |
vaults.requestDeposit | Vault + amount, controller?, permit2Data? |
vaults.requestRedeem | Vault + shares, controller?, owner? |
vaults.decreaseDepositRequest | Vault + amount, receiver?, minAmountOut |
vaults.decreaseRedeemRequest | Vault + shares, owner?, receiver? |
vaults.claimDeposit | Vault + receiver? |
vaults.claimRedeem | Vault + owner?, receiver? |
Receiver, owner and controller default to the connected account where optional. They remain subject to the contract's authorization rules. minAmountOut is mandatory for deposit-request reduction. Follow the deposit/redemption guide and deployment guide before using these writes.
Vault settlement, fees and lifecycle
| Method | Additional vault fields |
|---|---|
vaults.settle | kind: "both" | "deposits" | "redemptions", feeClaimType?, fullClaim?, unsafe?, permit2Data? |
vaults.setNextManagementFee | wad, days: number |
vaults.setNextPerformanceFee | wad |
vaults.setNextEntryFee | wad |
vaults.setNextExitFee | wad |
vaults.claimFees | shares, unsafe?, minAssetsOut?, permit2Data? |
vaults.updateAccruedFees | None |
vaults.pause | None |
vaults.unpause | None |
vaults.enableEndOfFund | feeClaimType?, unsafe?, permit2Data? |
vaults.disableEndOfFund | unsafe?, closeVault?, minAssetsOut? |
FeeClaimType.None is 0, Soft is 1 (shares only), and Full is 2 (shares and assets). settle uses that enum for both/deposits; its redemptions path uses fullClaim instead. Enum defaults are None; fullClaim and closeVault default to false. Optional minAssetsOut defaults to zero, which supplies no minimum-output protection. Choose a bound when your policy requires it.
Vault configuration and privileged writes
| Method | Additional vault fields |
|---|---|
vaults.updateSharesBatched | receivers: Address[], values: bigint[] |
vaults.setDepositEnabled | enabled: boolean |
vaults.setTransferEnabled | enabled: boolean |
vaults.setDepositWhitelistEnabled | enabled: boolean |
vaults.setWithdrawWhitelistEnabled | enabled: boolean |
vaults.applyDepositWhitelist | addresses: Address[], whitelisted: boolean |
vaults.applyWithdrawWhitelist | addresses: Address[], whitelisted: boolean |
vaults.setShareNameAndSymbol | name: string, symbol: string |
vaults.setIpfsHash | hash: string |
vaults.setCurator | curator: Address |
vaults.setFeeRecipient | feeRecipient: Address |
vaults.setOracle | oracle: Address |
vaults.setT3treasury | treasury: Address |
vaults.setSyncSilo | silo: Address, unsafeOut?, unsafeIn? |
vaults.setDepositSilo | silo: Address, unsafeOut?, unsafeIn? |
vaults.setRedeemSilo | silo: Address, unsafeOut?, unsafeIn? |
vaults.claimSilosPnl | sync?, deposit?, unsafe?, redeemRequestId? |
vaults.sweep | token: Address |
These actions require their respective on-chain roles. updateSharesBatched sets each receiver's balance to its target, potentially minting or burning shares. Its arrays must have equal, non-zero length. Whitelist batches also require at least one address. Silo changes, sweep and treasury changes can have governance restrictions. Review them as privileged actions rather than ordinary profile edits.
Vault reads
All rows below target a vault except previewAddress, which uses the canonical factory.
| Method | Additional fields | Result |
|---|---|---|
vaults.read.curator | None | Address |
vaults.read.isOpen | None | Boolean |
vaults.read.previewSettleAll | feeClaimType? | SettlePreview |
vaults.read.previewSettleDeposits | feeClaimType? | SettleDepositsPreview |
vaults.read.previewSettleRedemptions | fullClaim? | SettleRedemptionsPreview |
vaults.read.previewEnableEndOfFund | feeClaimType? | OpenPreview |
vaults.read.previewClaimFees | shares | Asset amount bigint |
vaults.read.balanceOf | owner: Address | Share balance bigint |
vaults.read.nextEntryFee | None | QueuedFee |
vaults.read.nextExitFee | None | QueuedFee |
vaults.read.nextPerformanceFee | None | QueuedFee |
vaults.read.nextManagementFee | None | QueuedManagementFee |
vaults.read.previewAddress | chainId + deployer: Address, salt | Predicted address |
vaults.read.asset | None | Underlying asset address |
vaults.read.totalSupply | None | Raw share supply bigint |
vaults.read.previewClaimDeposit | owner: Address | Claimable shares bigint |
QueuedFee contains pending and wad. QueuedManagementFee also has daysPending and days. Settlement and lifecycle previews return named models. All include lastPeriodData, grossTvlData, netTvlData, unclaimedFeesData, assetsFromCurator and assetsToFeeRecipient. Combined/deposit previews expose assetsToCurator and assetsToT3treasury; open previews expose assetsToSilo instead of assetsToCurator. Amounts are bigint values in raw units. See the settlement examples for funding checks. Fee-claim previews return a single asset amount. Previews perform no action and reserve no liquidity.
A positive vaults.read.previewClaimFees input must not exceed the vault's
currently unclaimed fee shares. A vault with no unclaimed fee shares cannot
preview a positive claim; a revert in that state is a contract precondition,
not evidence of an SDK transport failure.
Vault roles
| Method | Additional vault fields |
|---|---|
roles.grant | role, account: Address |
roles.revoke | role, account: Address |
roles.renounceRole | role, account: Address |
roles.grantAll | account: Address, roles: Hex[] |
roles.grantBatch | calls: { role, account }[] |
roles.revokeBatch | calls: { role, account }[] |
roles.initGrantAdminRole | account: Address, role |
roles.acceptAdminRole | role |
roles.cancelGrantAdminRole | role |
roles.applyAdminBurn | role |
Batches are ordered atomic multicalls. Arrays must not be empty. Admin handover is a separate initiation/acceptance process; a successful initiation does not transfer control by itself.
| Method | Additional vault fields | Result |
|---|---|---|
roles.read.has | role, account | Boolean |
roles.read.adminOf | role | Admin role bytes32 |
roles.read.memberCount | role | Bigint count |
roles.read.members | role | Address array |
roles.read.defaultAdminRole | None | Default admin role bytes32 |
roles.read.nextDefaultAdminRecipient | None | Pending recipient address |
roles.read.nextGovernanceAdminRecipient | None | Pending recipient address |
SafeOracle actions and reads
These methods target an oracle address. Verify that it is a compatible SafeOracle. Its roles are independent from vault roles.
| Method | Additional oracle fields |
|---|---|
oracles.setTotalAssets | totalAssets |
oracles.setMaxPricePerShareDeviationUpWad | wad |
oracles.setMaxPricePerShareDeviationDownWad | wad |
oracles.beginDefaultAdminTransfer | newAdmin: Address |
oracles.acceptDefaultAdminTransfer | None |
oracles.cancelDefaultAdminTransfer | None |
oracles.changeDefaultAdminDelay | newDelay: number (seconds) |
oracles.rollbackDefaultAdminDelay | None |
oracles.grant | role, account |
oracles.revoke | role, account |
oracles.renounce | role, account |
oracles.applyRoles | calls: { op: "grant" | "revoke", role, account }[] |
| Method | Additional oracle fields | Result |
|---|---|---|
oracles.read.totalAssets | None | Asset amount bigint |
oracles.read.maxDeviationUp | None | WAD bigint |
oracles.read.maxDeviationDown | None | WAD bigint |
oracles.read.admin | None | Address |
oracles.read.defaultAdminDelay | None | Number seconds (uint48) |
oracles.read.pendingAdmin | None | { pending, delay } |
oracles.read.owner | None | Address |
oracles.read.has | role, account | Boolean |
oracles.read.lastSavedPps | None | Bigint PPS anchor |
defaultAdminDelay returns number seconds, consistent with viem's exact uint48 decoding and the newDelay: number write input. SDK 0.8.1 corrects the incorrect Promise<bigint> declaration in 0.8.0 to Promise<number>, without converting the decoded runtime value. pendingAdmin.delay is also a number (the pending acceptance schedule).
Tokens and Permit2
| Method | Target and additional fields | Result |
|---|---|---|
tokens.approve | Token + spender: Address, amount | TransactionResult |
tokens.balanceOf | Token + owner: Address | Bigint balance |
tokens.allowance | Token + owner: Address, spender: Address | Bigint allowance |
permit2.allowance | chainId, token, owner, spender | { amount: bigint, expiration: number, nonce: number } |
Permit2 signing is explicit and separate from permit2.allowance. @t3tris-labs/sdk/onchain exports PERMIT2_ADDRESS, PermitSingle, permitDeadlines, buildPermitSingleTypedData and encodePermit2Data to help prepare the payload. See approvals and Permit2.
Other deployment helpers exported from @t3tris-labs/sdk/onchain include defaultSafeOracle, T3TRIS_FACTORY_ADDRESS, DeployVaultArgs, VaultConfig, VaultFees and VaultOracleConfig. Error types are documented under errors and production checks.