Skip to main content

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:

TargetRequired fields
VaultchainId: number, address: Address
OraclechainId: number, oracle: Address
TokenchainId: number, token: Address
Deployment/predictionchainId: 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​

MethodTarget and additional fields
vaults.createchainId, name, symbol, asset, owner, curator, feeRecipient, config, oracle, deployment, fees
vaults.requestDepositVault + amount, controller?, permit2Data?
vaults.requestRedeemVault + shares, controller?, owner?
vaults.decreaseDepositRequestVault + amount, receiver?, minAmountOut
vaults.decreaseRedeemRequestVault + shares, owner?, receiver?
vaults.claimDepositVault + receiver?
vaults.claimRedeemVault + 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​

MethodAdditional vault fields
vaults.settlekind: "both" | "deposits" | "redemptions", feeClaimType?, fullClaim?, unsafe?, permit2Data?
vaults.setNextManagementFeewad, days: number
vaults.setNextPerformanceFeewad
vaults.setNextEntryFeewad
vaults.setNextExitFeewad
vaults.claimFeesshares, unsafe?, minAssetsOut?, permit2Data?
vaults.updateAccruedFeesNone
vaults.pauseNone
vaults.unpauseNone
vaults.enableEndOfFundfeeClaimType?, unsafe?, permit2Data?
vaults.disableEndOfFundunsafe?, 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​

MethodAdditional vault fields
vaults.updateSharesBatchedreceivers: Address[], values: bigint[]
vaults.setDepositEnabledenabled: boolean
vaults.setTransferEnabledenabled: boolean
vaults.setDepositWhitelistEnabledenabled: boolean
vaults.setWithdrawWhitelistEnabledenabled: boolean
vaults.applyDepositWhitelistaddresses: Address[], whitelisted: boolean
vaults.applyWithdrawWhitelistaddresses: Address[], whitelisted: boolean
vaults.setShareNameAndSymbolname: string, symbol: string
vaults.setIpfsHashhash: string
vaults.setCuratorcurator: Address
vaults.setFeeRecipientfeeRecipient: Address
vaults.setOracleoracle: Address
vaults.setT3treasurytreasury: Address
vaults.setSyncSilosilo: Address, unsafeOut?, unsafeIn?
vaults.setDepositSilosilo: Address, unsafeOut?, unsafeIn?
vaults.setRedeemSilosilo: Address, unsafeOut?, unsafeIn?
vaults.claimSilosPnlsync?, deposit?, unsafe?, redeemRequestId?
vaults.sweeptoken: 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.

MethodAdditional fieldsResult
vaults.read.curatorNoneAddress
vaults.read.isOpenNoneBoolean
vaults.read.previewSettleAllfeeClaimType?SettlePreview
vaults.read.previewSettleDepositsfeeClaimType?SettleDepositsPreview
vaults.read.previewSettleRedemptionsfullClaim?SettleRedemptionsPreview
vaults.read.previewEnableEndOfFundfeeClaimType?OpenPreview
vaults.read.previewClaimFeessharesAsset amount bigint
vaults.read.balanceOfowner: AddressShare balance bigint
vaults.read.nextEntryFeeNoneQueuedFee
vaults.read.nextExitFeeNoneQueuedFee
vaults.read.nextPerformanceFeeNoneQueuedFee
vaults.read.nextManagementFeeNoneQueuedManagementFee
vaults.read.previewAddresschainId + deployer: Address, saltPredicted address
vaults.read.assetNoneUnderlying asset address
vaults.read.totalSupplyNoneRaw share supply bigint
vaults.read.previewClaimDepositowner: AddressClaimable 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​

MethodAdditional vault fields
roles.grantrole, account: Address
roles.revokerole, account: Address
roles.renounceRolerole, account: Address
roles.grantAllaccount: Address, roles: Hex[]
roles.grantBatchcalls: { role, account }[]
roles.revokeBatchcalls: { role, account }[]
roles.initGrantAdminRoleaccount: Address, role
roles.acceptAdminRolerole
roles.cancelGrantAdminRolerole
roles.applyAdminBurnrole

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.

MethodAdditional vault fieldsResult
roles.read.hasrole, accountBoolean
roles.read.adminOfroleAdmin role bytes32
roles.read.memberCountroleBigint count
roles.read.membersroleAddress array
roles.read.defaultAdminRoleNoneDefault admin role bytes32
roles.read.nextDefaultAdminRecipientNonePending recipient address
roles.read.nextGovernanceAdminRecipientNonePending 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.

MethodAdditional oracle fields
oracles.setTotalAssetstotalAssets
oracles.setMaxPricePerShareDeviationUpWadwad
oracles.setMaxPricePerShareDeviationDownWadwad
oracles.beginDefaultAdminTransfernewAdmin: Address
oracles.acceptDefaultAdminTransferNone
oracles.cancelDefaultAdminTransferNone
oracles.changeDefaultAdminDelaynewDelay: number (seconds)
oracles.rollbackDefaultAdminDelayNone
oracles.grantrole, account
oracles.revokerole, account
oracles.renouncerole, account
oracles.applyRolescalls: { op: "grant" | "revoke", role, account }[]
MethodAdditional oracle fieldsResult
oracles.read.totalAssetsNoneAsset amount bigint
oracles.read.maxDeviationUpNoneWAD bigint
oracles.read.maxDeviationDownNoneWAD bigint
oracles.read.adminNoneAddress
oracles.read.defaultAdminDelayNoneNumber seconds (uint48)
oracles.read.pendingAdminNone{ pending, delay }
oracles.read.ownerNoneAddress
oracles.read.hasrole, accountBoolean
oracles.read.lastSavedPpsNoneBigint 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​

MethodTarget and additional fieldsResult
tokens.approveToken + spender: Address, amountTransactionResult
tokens.balanceOfToken + owner: AddressBigint balance
tokens.allowanceToken + owner: Address, spender: AddressBigint allowance
permit2.allowancechainId, 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.