MultiVault actions
API for @0xintuition/sdk@4.1.0. Compatibility · Source.
Import from @0xintuition/sdk/actions.
Signatures show the exact accepted inputs and return types. Named input/output structures and dependency-injection types are listed below; viem and protocol types come from their respective packages. Preparation and quote functions can perform RPC reads. Envelope builders on the action-envelope pages use caller-supplied read context and perform no RPC reads or signing. feeProxyExecutePlan sends transactions; the other SDK actions on these pages prepare transactions or read data.
multivaultResolveDepositFeeBase
Resolves the base MultiVault will charge fees on for a deposit.
On a vault's first deposit MultiVault nets a min-share bootstrap cost out of the gross assets
BEFORE computing any fee (doubled for triples) — see MultiVaultLib._calculateAtomDeposit. A quote
that applies fee rates to the gross amount therefore disagrees with the contract on exactly that
deposit, in every fee component at once. Exported because more than one quote needs it, and
because a consumer reconciling a quote against a receipt needs to know which number was quoted.
function multivaultResolveDepositFeeBase(
config: ReadConfig,
inputs: {
termId: Hex;
curveId: bigint;
assetsIn: bigint;
},
deps?: MultiVaultDepositFeeBaseDeps,
): Promise<MultiVaultDepositFeeBase>;
config: MultiVault address and public client.inputs: The term, curve and gross assets being deposited.- returns: The fee base, whether this is the bootstrapping deposit, and what the bootstrap cost.
Defaults: deps = defaultDepositFeeBaseDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultQuoteTermDepositFee
The term-type-specific deposit fee: the atom-wallet cut on an atom, or the underlying-atom fraction on a triple.
MultiVault charges this alongside its entry and protocol fees, so a quote that reports only those
two can never sum to the shares actually minted. On an atom it is atomWalletDepositFee applied
to the fee base; on a triple it is atomDepositFractionForTriple, waived unless ALL THREE
underlying atoms are individually above the fee threshold.
function multivaultQuoteTermDepositFee(
config: ReadConfig,
inputs: {
termId: Hex;
feeBaseAssets: bigint;
},
deps?: MultiVaultDepositFeeBaseDeps & MultiVaultTermFeeDeps,
): Promise<{
kind: 'atom-wallet' | 'atom-deposit-fraction';
fee: bigint;
waived: boolean;
}>;
config: MultiVault address and public client.inputs: The term and the fee base to charge on.deps: Injectable protocol read primitives.- returns: The fee and which kind it is.
Defaults: deps = { ...defaultDepositFeeBaseDeps, ...defaultTermFeeDeps, }. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultWillChargeEntryFee
Whether MultiVault will charge its entry fee on a deposit into this term.
Waived while the DEFAULT curve's vault holds fewer shares than feeThreshold: fees are routed
into that vault, and donating them into a near-empty share supply would move its price. A quote
that assumes the fee always applies overstates it.
function multivaultWillChargeEntryFee(
config: ReadConfig,
inputs: {
termId: Hex;
},
deps?: MultiVaultFeeContextDeps,
): Promise<boolean>;
config: MultiVault address and public client.inputs: The term being deposited into.- returns: True if the entry fee applies.
Defaults: deps = defaultFeeContextDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultWillChargeExitFee
Whether MultiVault will charge its exit fee on a redemption.
Same threshold as the entry fee, measured on what the default vault would be LEFT with — so whether it applies depends on the size of the redemption, not only on the term.
function multivaultWillChargeExitFee(
config: ReadConfig,
inputs: {
termId: Hex;
curveId: bigint;
sharesIn: bigint;
},
deps?: MultiVaultFeeContextDeps,
): Promise<boolean>;
config: MultiVault address and public client.inputs: The term, curve and share count being redeemed.- returns: True if the exit fee applies.
Defaults: deps = defaultFeeContextDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultQuoteCurveRedeemFee
The curve-level withdrawal fee for a specific account, or zero if the curve charges none.
Curve-agnostic: it asks the curve whether it has a redeem hook and, if so, quotes it for THIS
account. MultiVault's own previewRedeem quotes the same hook with the zero address, which on a
curve whose rate keys on the holder's entry tier is a different — and for a slippage floor,
unusable — number.
function multivaultQuoteCurveRedeemFee(
config: ReadConfig,
inputs: {
termId: Hex;
curveId: bigint;
account: Address;
assetsBeforeFees: bigint;
},
deps?: MultiVaultCurveRedeemFeeDeps,
): Promise<{
curveAddress: Address | null;
curveFee: bigint;
}>;
config: MultiVault address and public client.inputs: The term, curve, redeeming account and gross assets.- returns: The curve's withdrawal fee for that account, and the curve it was quoted from.
Defaults: deps = defaultCurveRedeemFeeDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultQuoteDepositPlan
Read current vault and fee state and return a deposit quote, including expected output and the minimum shares to accept. No transaction is sent.
function multivaultQuoteDepositPlan(
config: ReadConfig,
inputs: {
termId: Hex;
curveId: bigint;
assetsIn: bigint;
slippageBps?: bigint;
},
deps?: MultiVaultQuoteDeps,
): Promise<MultiVaultDepositQuotePlan>;
Defaults: deps = defaultQuoteDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultPrepareDepositTx
Prepares a deposit transaction sized against its own quote.
MultiVault deposits exactly msg.value, so the transaction value IS the deposit: it defaults to
assetsIn, the amount the quote and its slippage floor were computed for. An explicit value
is passed through as given.
function multivaultPrepareDepositTx(
config: WriteConfig,
inputs: {
receiver: Address;
termId: Hex;
curveId: bigint;
assetsIn: bigint;
slippageBps?: bigint;
value?: bigint;
},
deps?: MultiVaultQuoteDeps,
): Promise<MultiVaultPrepareDepositTxResult>;
config: MultiVault address and viem clients.inputs: Receiver, term, curve, gross assets, optional slippage and optional explicit value.deps: Injectable protocol read primitives.- returns: The deposit calldata, args, the value to send with it, and the quote it was built from.
Defaults: deps = defaultQuoteDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultGetUserPositionSnapshot
Read an account balance and vault state for one term/curve pair and return its current position snapshot.
function multivaultGetUserPositionSnapshot(
config: ReadConfig,
inputs: {
account: Address;
termId: Hex;
curveId: bigint;
includeUtilization?: boolean;
},
deps?: MultiVaultPositionDeps,
): Promise<MultiVaultUserPositionSnapshot>;
Defaults: deps = defaultPositionDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultQuoteRedeemPlan
Quotes what a SPECIFIC account receives for redeeming shares, and the floor to send with it.
account is required, and that is the point. MultiVault's previewRedeem quotes any curve redeem
hook with the zero address, so on a curve whose withdrawal rate keys on where the holder entered
it returns a number that belongs to no one — and a minAssets derived from it is wrong in both
directions: too loose when it understates the payout, and unmeetable (the redeem reverts) when it
overstates it. This composes the payout from parts that each know who is asking: MultiVault's
gross conversion, its protocol fee, its exit fee where that fee actually applies, and the curve's
own account-aware quote.
function multivaultQuoteRedeemPlan(
config: ReadConfig,
inputs: {
termId: Hex;
curveId: bigint;
account: Address;
sharesIn: bigint;
slippageBps?: bigint;
},
deps?: MultiVaultRedeemQuoteDeps,
): Promise<MultiVaultRedeemQuotePlan>;
config: MultiVault address and public client.inputs: The term, curve, redeeming account, share count and optional slippage.deps: Injectable protocol read primitives.- returns: The account's payout, its fee breakdown, and a slippage floor derived from it.
Defaults: deps = defaultRedeemQuoteDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultPrepareRedeemTx
Prepares a redeem transaction for a specific account, sized against its own quote.
function multivaultPrepareRedeemTx(
config: WriteConfig,
inputs: {
receiver: Address;
termId: Hex;
curveId: bigint;
account: Address;
sharesIn: bigint;
slippageBps?: bigint;
},
deps?: MultiVaultRedeemQuoteDeps,
): Promise<MultiVaultPrepareRedeemTxResult>;
config: MultiVault address and viem clients.inputs: Receiver, term, curve, redeeming account, share count and optional slippage.deps: Injectable protocol read primitives.- returns: The redeem calldata, args, and the quote it was built from.
Defaults: deps = defaultRedeemQuoteDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultCreateAndSeedTerm
Prepare ordered atom creation, triple creation, and seed-deposit steps with their quotes and total value. Requires WriteConfig, but does not submit the plan.
function multivaultCreateAndSeedTerm(
config: WriteConfig,
inputs: {
receiver: Address;
atomsToCreate?: MultiVaultCreateAtomInput[];
triplesToCreate?: MultiVaultCreateTripleInput[];
seedDeposits?: MultiVaultSeedDepositInput[];
},
deps?: MultiVaultCreateAndSeedDeps,
): Promise<MultiVaultCreateAndSeedTermPlan>;
Defaults: deps = defaultCreateAndSeedDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultGetUtilizationAnalyticsBundle
Read protocol and personal utilization over the requested epochs and return an analytics bundle.
function multivaultGetUtilizationAnalyticsBundle(
config: ReadConfig,
inputs: {
account?: Address;
startEpoch?: bigint;
endEpoch?: bigint;
},
deps?: MultiVaultUtilizationDeps,
): Promise<MultiVaultUtilizationAnalyticsBundle>;
Defaults: deps = defaultUtilizationDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultPrepareOnBehalfOfCreationPlan
Prepares an on-behalf-of creation plan: createAtomsFor / createTriplesFor require
creator to have granted caller CREATION approval first, so this reads that
approval state and — if missing — prepends the approve calldata as its own step.
The approval step and the creation steps have DIFFERENT required signers
(creator vs caller); the caller of this function is responsible for routing each
step to the right signer, in order.
function multivaultPrepareOnBehalfOfCreationPlan(
config: ReadConfig,
inputs: {
creator: Address;
caller: Address;
atoms?: MultiVaultOnBehalfOfAtomInput[];
triples?: MultiVaultOnBehalfOfTripleInput[];
},
deps?: MultiVaultOnBehalfOfCreationDeps,
): Promise<MultiVaultOnBehalfOfCreationPlan>;
config: Read config for MultiVault.inputs: The creator being created for, the caller acting on their behalf, and the atoms/triples to create.deps: Injectable protocol read primitives.- returns: The ordered steps (approval, if needed, then creation) and whether approval was already in place.
Defaults: deps = defaultOnBehalfOfCreationDeps. Dependency arguments are optional test/customization hooks; normal consumers use the built-in dependencies.
multivaultPrepareMulticallTx
Assembles a consolidated payable multicall batch: the bytes[] sub-call array and
the uint256[] per-sub-call value array must stay aligned and their values must sum
to exactly msg.value — the fiddliest part of building this call by hand.
function multivaultPrepareMulticallTx(
subCalls: MultiVaultMulticallSubCall[],
): MultiVaultPrepareMulticallTxResult;
subCalls: The sub-calls to batch, each with its own calldata and value allocation.- returns: The
multicallcalldata, args, and the total value the batch requires.
Imported type provenance
Public import locations and the definitions used by these signatures and helper types. Value imports appear where a dependency hook uses typeof.
| Name in this module | Public import | Definition |
|---|---|---|
baseCurveHasRedeemFeeHook | import { baseCurveHasRedeemFeeHook } from '@0xintuition/protocol' | Source definition |
baseCurveQuoteRedeemFee | import { baseCurveQuoteRedeemFee } from '@0xintuition/protocol' | Source definition |
bondingCurveRegistryCurveAddresses | import { bondingCurveRegistryCurveAddresses } from '@0xintuition/protocol' | Source definition |
bondingCurveRegistryPreviewMint | import { bondingCurveRegistryPreviewMint } from '@0xintuition/protocol' | Source definition |
multiVaultAtomDepositFractionAmount | import { multiVaultAtomDepositFractionAmount } from '@0xintuition/protocol' | Source definition |
multiVaultConvertToAssets | import { multiVaultConvertToAssets } from '@0xintuition/protocol' | Source definition |
multiVaultCurrentEpoch | import { multiVaultCurrentEpoch } from '@0xintuition/protocol' | Source definition |
multiVaultCurrentSharePrice | import { multiVaultCurrentSharePrice } from '@0xintuition/protocol' | Source definition |
multiVaultEntryFeeAmount | import { multiVaultEntryFeeAmount } from '@0xintuition/protocol' | Source definition |
multiVaultExitFeeAmount | import { multiVaultExitFeeAmount } from '@0xintuition/protocol' | Source definition |
multiVaultGetAtomConfig | import { multiVaultGetAtomConfig } from '@0xintuition/protocol' | Source definition |
multiVaultGetBondingCurveConfig | import { multiVaultGetBondingCurveConfig } from '@0xintuition/protocol' | Source definition |
multiVaultGetGeneralConfig | import { multiVaultGetGeneralConfig } from '@0xintuition/protocol' | Source definition |
multiVaultGetShares | import { multiVaultGetShares } from '@0xintuition/protocol' | Source definition |
multiVaultGetTotalUtilizationForEpoch | import { multiVaultGetTotalUtilizationForEpoch } from '@0xintuition/protocol' | Source definition |
multiVaultGetTriple | import { multiVaultGetTriple } from '@0xintuition/protocol' | Source definition |
multiVaultGetUserLastActiveEpoch | import { multiVaultGetUserLastActiveEpoch } from '@0xintuition/protocol' | Source definition |
multiVaultGetUserUtilizationForEpoch | import { multiVaultGetUserUtilizationForEpoch } from '@0xintuition/protocol' | Source definition |
multiVaultGetUserUtilizationInEpoch | import { multiVaultGetUserUtilizationInEpoch } from '@0xintuition/protocol' | Source definition |
multiVaultGetVault | import { multiVaultGetVault } from '@0xintuition/protocol' | Source definition |
multiVaultIsApprovedToCreate | import { multiVaultIsApprovedToCreate } from '@0xintuition/protocol' | Source definition |
multiVaultIsApprovedToDeposit | import { multiVaultIsApprovedToDeposit } from '@0xintuition/protocol' | Source definition |
multiVaultIsApprovedToRedeem | import { multiVaultIsApprovedToRedeem } from '@0xintuition/protocol' | Source definition |
multiVaultIsTriple | import { multiVaultIsTriple } from '@0xintuition/protocol' | Source definition |
multiVaultMaxRedeem | import { multiVaultMaxRedeem } from '@0xintuition/protocol' | Source definition |
multiVaultPreviewAtomCreate | import { multiVaultPreviewAtomCreate } from '@0xintuition/protocol' | Source definition |
multiVaultPreviewDeposit | import { multiVaultPreviewDeposit } from '@0xintuition/protocol' | Source definition |
multiVaultPreviewTripleCreate | import { multiVaultPreviewTripleCreate } from '@0xintuition/protocol' | Source definition |
multiVaultProtocolFeeAmount | import { multiVaultProtocolFeeAmount } from '@0xintuition/protocol' | Source definition |
ReadConfig | import type { ReadConfig } from '@0xintuition/protocol' | Source definition |
WriteConfig | import type { WriteConfig } from '@0xintuition/protocol' | Source definition |
Address | import type { Address } from 'viem' | Owned by the external package. |
Hex | import type { Hex } from 'viem' | Owned by the external package. |
Input and result types
Exported declarations are public imports from the SDK subpath above. Module-local helper aliases describe accepted shapes but are not public exports.
PreviewDepositTuple
Module-local helper; not a public export.
type PreviewDepositTuple = readonly [bigint, bigint] & {
shares?: bigint;
assetsAfterFees?: bigint;
};
PreviewCreateTuple
Module-local helper; not a public export.
type PreviewCreateTuple = readonly [bigint, bigint, bigint] & {
shares?: bigint;
feeBaseAssets?: bigint;
assetsAfterFees?: bigint;
};
MultiVaultDepositQuotePlan
Public export.
export type MultiVaultDepositQuotePlan = {
termId: Hex;
curveId: bigint;
assetsIn: bigint;
/** What every fee was actually charged on — `assetsIn` less any min-share bootstrap cost. */
feeBaseAssets: bigint;
minShareCost: bigint;
isFirstDeposit: boolean;
sharesOut: bigint;
minSharesOut: bigint;
assetsAfterFees: bigint;
/** Zero when MultiVault waives it below `feeThreshold`. */
entryFee: bigint;
entryFeeWaived: boolean;
protocolFee: bigint;
/**
* The term-type-specific fee charged alongside the other two: the atom-wallet cut on an atom,
* the underlying-atom fraction on a triple. Without it the components cannot sum to the whole.
*/
termFee: bigint;
termFeeKind: 'atom-wallet' | 'atom-deposit-fraction';
termFeeWaived: boolean;
totalEstimatedFees: bigint;
currentSharePrice: bigint;
effectivePricePerShare: bigint | null;
slippageBps: bigint;
};
MultiVaultPrepareDepositTxResult
Public export.
export type MultiVaultPrepareDepositTxResult = {
args: readonly [Address, Hex, bigint, bigint];
calldata: Hex;
/** The value to send: the deposit itself, `assetsIn` unless an explicit value was passed. */
value: bigint;
quote: MultiVaultDepositQuotePlan;
};
MultiVaultUserPositionSnapshot
Public export.
export type MultiVaultUserPositionSnapshot = {
account: Address;
termId: Hex;
curveId: bigint;
shares: bigint;
maxRedeemShares: bigint;
estimatedAssetsForCurrentShares: bigint;
estimatedAssetsForMaxRedeem: bigint;
currentSharePrice: bigint;
vaultTotalAssets: bigint;
vaultTotalShares: bigint;
utilization?: {
epoch: bigint;
totalForEpoch: bigint;
userForEpoch: bigint;
userInEpoch: bigint;
};
};
MultiVaultRedeemQuotePlan
Public export.
export type MultiVaultRedeemQuotePlan = {
termId: Hex;
curveId: bigint;
/** The account whose payout this is. A redeem quote is meaningless without one. */
account: Address;
sharesIn: bigint;
sharesUsed: bigint;
assetsBeforeFees: bigint;
assetsOut: bigint;
minAssetsOut: bigint;
/** Zero when MultiVault waives it below `feeThreshold`. */
exitFee: bigint;
exitFeeWaived: boolean;
protocolFee: bigint;
/** The curve's own withdrawal fee for THIS account. Zero on a curve without a redeem hook. */
curveFee: bigint;
curveAddress: Address | null;
totalEstimatedFees: bigint;
currentSharePrice: bigint;
effectivePricePerShare: bigint | null;
slippageBps: bigint;
};
MultiVaultPrepareRedeemTxResult
Public export.
export type MultiVaultPrepareRedeemTxResult = {
args: readonly [Address, Hex, bigint, bigint, bigint];
calldata: Hex;
quote: MultiVaultRedeemQuotePlan;
};
MultiVaultCreateAtomInput
Public export.
export type MultiVaultCreateAtomInput = {
termId: Hex;
data: Hex;
assetsIn: bigint;
};
MultiVaultCreateTripleInput
Public export.
export type MultiVaultCreateTripleInput = {
termId: Hex;
subjectId: Hex;
predicateId: Hex;
objectId: Hex;
assetsIn: bigint;
};
MultiVaultSeedDepositInput
Public export.
export type MultiVaultSeedDepositInput = {
termId: Hex;
curveId: bigint;
assetsIn: bigint;
slippageBps?: bigint;
};
MultiVaultCreateAndSeedStep
Public export.
export type MultiVaultCreateAndSeedStep = {
type: 'create-atoms' | 'create-triples' | 'deposit-batch';
calldata: Hex;
value?: bigint;
};
MultiVaultCreateAndSeedTermPlan
Public export.
export type MultiVaultCreateAndSeedTermPlan = {
receiver: Address;
createAtomPreviews: Array<{
termId: Hex;
assetsIn: bigint;
sharesOut: bigint;
feeBaseAssets: bigint;
assetsAfterFees: bigint;
}>;
createTriplePreviews: Array<{
termId: Hex;
assetsIn: bigint;
sharesOut: bigint;
feeBaseAssets: bigint;
assetsAfterFees: bigint;
}>;
seedDepositQuotes: MultiVaultDepositQuotePlan[];
steps: MultiVaultCreateAndSeedStep[];
totalValue: bigint;
};
MultiVaultUtilizationEpochPoint
Public export.
export type MultiVaultUtilizationEpochPoint = {
epoch: bigint;
totalForEpoch: bigint;
deltaFromPreviousTotal: bigint | null;
userForEpoch?: bigint;
userInEpoch?: bigint | null;
deltaFromPreviousUser?: bigint | null;
};
MultiVaultUtilizationAnalyticsBundle
Public export.
export type MultiVaultUtilizationAnalyticsBundle = {
startEpoch: bigint;
endEpoch: bigint;
currentEpoch: bigint;
account?: Address;
lastActiveEpoch?: bigint;
aggregateTotalUtilization: bigint;
aggregateUserUtilization?: bigint;
points: MultiVaultUtilizationEpochPoint[];
};
MultiVaultFeeContextDeps
Module-local helper; not a public export.
type MultiVaultFeeContextDeps = {
getVault: typeof multiVaultGetVault;
getGeneralConfig: typeof multiVaultGetGeneralConfig;
getBondingCurveConfig: typeof multiVaultGetBondingCurveConfig;
};
MultiVaultDepositFeeBaseDeps
Module-local helper; not a public export.
type MultiVaultDepositFeeBaseDeps = MultiVaultFeeContextDeps & {
isTriple: typeof multiVaultIsTriple;
previewMint: typeof bondingCurveRegistryPreviewMint;
};
MultiVaultTermFeeDeps
Module-local helper; not a public export.
type MultiVaultTermFeeDeps = {
getAtomConfig: typeof multiVaultGetAtomConfig;
getTriple: typeof multiVaultGetTriple;
atomDepositFractionAmount: typeof multiVaultAtomDepositFractionAmount;
};
MultiVaultCurveRedeemFeeDeps
Module-local helper; not a public export.
type MultiVaultCurveRedeemFeeDeps = {
getBondingCurveConfig: typeof multiVaultGetBondingCurveConfig;
curveAddresses: typeof bondingCurveRegistryCurveAddresses;
hasRedeemFeeHook: typeof baseCurveHasRedeemFeeHook;
quoteRedeemFee: typeof baseCurveQuoteRedeemFee;
};
MultiVaultQuoteDeps
Module-local helper; not a public export.
type MultiVaultQuoteDeps = MultiVaultDepositFeeBaseDeps &
MultiVaultTermFeeDeps & {
previewDeposit: typeof multiVaultPreviewDeposit;
entryFeeAmount: typeof multiVaultEntryFeeAmount;
protocolFeeAmount: typeof multiVaultProtocolFeeAmount;
currentSharePrice: typeof multiVaultCurrentSharePrice;
};
MultiVaultRedeemQuoteDeps
Module-local helper; not a public export.
type MultiVaultRedeemQuoteDeps = MultiVaultFeeContextDeps &
MultiVaultCurveRedeemFeeDeps & {
convertToAssets: typeof multiVaultConvertToAssets;
exitFeeAmount: typeof multiVaultExitFeeAmount;
protocolFeeAmount: typeof multiVaultProtocolFeeAmount;
currentSharePrice: typeof multiVaultCurrentSharePrice;
};
MultiVaultPositionDeps
Module-local helper; not a public export.
type MultiVaultPositionDeps = {
getShares: typeof multiVaultGetShares;
maxRedeem: typeof multiVaultMaxRedeem;
convertToAssets: typeof multiVaultConvertToAssets;
currentSharePrice: typeof multiVaultCurrentSharePrice;
getVault: typeof multiVaultGetVault;
currentEpoch: typeof multiVaultCurrentEpoch;
getTotalUtilizationForEpoch: typeof multiVaultGetTotalUtilizationForEpoch;
getUserUtilizationForEpoch: typeof multiVaultGetUserUtilizationForEpoch;
getUserUtilizationInEpoch: typeof multiVaultGetUserUtilizationInEpoch;
};
MultiVaultCreateAndSeedDeps
Module-local helper; not a public export.
type MultiVaultCreateAndSeedDeps = MultiVaultQuoteDeps & {
previewAtomCreate: typeof multiVaultPreviewAtomCreate;
previewTripleCreate: typeof multiVaultPreviewTripleCreate;
};
MultiVaultUtilizationDeps
Module-local helper; not a public export.
type MultiVaultUtilizationDeps = {
currentEpoch: typeof multiVaultCurrentEpoch;
getTotalUtilizationForEpoch: typeof multiVaultGetTotalUtilizationForEpoch;
getUserUtilizationForEpoch: typeof multiVaultGetUserUtilizationForEpoch;
getUserUtilizationInEpoch: typeof multiVaultGetUserUtilizationInEpoch;
getUserLastActiveEpoch: typeof multiVaultGetUserLastActiveEpoch;
};
MultiVaultDepositFeeBase
Public export.
export type MultiVaultDepositFeeBase = {
/** The amount every fee — MultiVault's and the curve's — is actually charged on. */
feeBaseAssets: bigint;
/** True when this deposit is the one that bootstraps the vault's minimum share supply. */
isFirstDeposit: boolean;
/** What the bootstrap costs, netted out before any fee. Zero on an established vault. */
minShareCost: bigint;
};
MultiVaultOnBehalfOfAtomInput
Public export.
export type MultiVaultOnBehalfOfAtomInput = { data: Hex; assets: bigint };
MultiVaultOnBehalfOfTripleInput
Public export.
export type MultiVaultOnBehalfOfTripleInput = {
subjectId: Hex;
predicateId: Hex;
objectId: Hex;
assets: bigint;
};
MultiVaultOnBehalfOfCreationStep
Public export.
export type MultiVaultOnBehalfOfCreationStep = {
type: 'approve' | 'create-atoms-for' | 'create-triples-for';
// The account that must sign this step. The approval leg is signed by `creator`
// (granting `caller` CREATION approval); the creation legs are signed by `caller`.
signer: 'creator' | 'caller';
calldata: Hex;
value?: bigint;
};
MultiVaultOnBehalfOfCreationPlan
Public export.
export type MultiVaultOnBehalfOfCreationPlan = {
creator: Address;
caller: Address;
approvalAlreadyGranted: boolean;
steps: MultiVaultOnBehalfOfCreationStep[];
};
MultiVaultOnBehalfOfCreationDeps
Module-local helper; not a public export.
type MultiVaultOnBehalfOfCreationDeps = {
isApprovedToCreate: typeof multiVaultIsApprovedToCreate;
isApprovedToDeposit: typeof multiVaultIsApprovedToDeposit;
isApprovedToRedeem: typeof multiVaultIsApprovedToRedeem;
};
MultiVaultMulticallSubCall
Public export.
export type MultiVaultMulticallSubCall = {
calldata: Hex;
value: bigint;
};
MultiVaultPrepareMulticallTxResult
Public export.
export type MultiVaultPrepareMulticallTxResult = {
args: readonly [readonly Hex[], readonly bigint[]];
calldata: Hex;
value: bigint;
};
Applies to V2 · @0xintuition/sdk 4.1.0