# Upshift Docs — full corpus
---
---
> Documentation for Upshift — products, vault architecture, curators, and developer tooling.
---
> Index: https://docs.upshift.finance/llms.txt · API schemas: https://docs.upshift.finance/openapi.json, https://docs.upshift.finance/openapi-institutional.json
---
---
# Overview
# About Upshift
> Upshift is the operating system for institutional onchain asset management.
Upshift lets teams design and launch vaults on 30+ chains with any DeFi and CeFi strategy, underpinned by a robust policy engine. Upshift vaults integrate with Upshift's institutional infrastructure layer — an onchain prime brokerage handling $7bn in monthly volume for institutions — unlocking a $500M+ distribution network of institutional LPs, as well as ancillary services such as margin lending against vault positions.
Broadly, Upshift enables:
- **Custom Earn vault design** — Teams ranging from crypto neobanks to institutional credit issuers can use Upshift to design yield strategies on and off chain, e.g. lending, basis trade, RWAs. Upshift vaults can deploy simultaneously to multiple protocols, meaning developers can build vaults customised to their users' risk profile.
- **Seamless SDK integration** — The Upshift SDK makes it simple to white-label any existing Upshift vault on third-party frontends. Functionality includes deposit/withdrawal, alongside metadata such as historical performance and total assets deposited.
- **Institutional ancillary services** — Through Upshift's institutional infrastructure layer, vault depositors under KYC can take out loans against vault receipt token collateral. Teams can also leverage its unique cross-margining architecture to design strategies combining DeFi and CeFi, e.g. a basis trade with legs simultaneously on Hyperliquid and Binance.
### Supported chains today
Upshift supports the following chains, and we are looking to add more over time: Arbitrum, Avalanche, Base, BNB Chain, Citrea, Ethereum, Flare, Fluent, HyperEVM, Monad, Solana, and Stellar.
## Upshift's institutional infrastructure layer
Underneath the vault surface, Upshift operates institutional-grade web3 infrastructure (previously built under the Fractal name) that allows onchain financial assets to interact with and collateralize against each other via a universal margin account — starting with existing crypto assets and expanding to real world assets. The goal: make onchain finance as capital efficient as CeFi.
This is an institutional-grade platform — all borrowers go through KYC/KYB. It enables capital efficiency for institutions already deployed onchain, while giving institutions that cannot interact with DeFi directly a way to do so by bringing bilateral agreements onchain. Institutional clients benefit from:
1. **Cost of capital** — Onchain finance today is primarily fully collateralized. Cross-margin collateralization tooling brings down the cost of capital, whether for an early stage fintech startup, a traditional or crypto native fund, or a DAO treasury.
2. **Access to credit** — The account structure and risk engine unlock the collateral value of users' assets in a segregated and controlled environment.
3. **Transparency of risk and reserves** — A fully transparent and programmable chain of credit provides better credit monitoring and trust between borrowers and lenders.
Supported today: DeFi protocols (via Account Abstraction and WalletConnect, restricted to whitelisted smart contract permissions), OTC bilateral agreements (tokenized options, forwards, total return and interest rate swaps with automated margining), and spot execution (onchain order algorithms such as TWAP and VWAP with verifiable proof of reserves), plus 24/7 client support for institutional clients.
### How vaults connect to it
Upshift vaults move deposits into subaccounts on the institutional layer for deployment. Subaccounts are smart contract wallets offering multiple benefits:
- Vault curators execute strategies over a platform offering sophisticated trading algorithms, risk management and capital efficient cross-margining
- Policies are enforced on each subaccount, meaning vault curators must remain within the mandate of the vault strategy, e.g. only supply to the WETH market on Aave
- Teams launching vaults benefit from distribution to a network of institutional LPs, including asset managers, family offices and hedge funds
- Vault depositors can verify onchain positions in any subaccount
- Vault depositors may be able to borrow against their positions (requires KYC)
### Protocol architecture
The institutional layer is composed of:
- **On-chain loans** — Segregated OTC loans where the lender whitelists the borrower's address, chain, collateral type, LTV, rate and term, as well as the contract calls the loaned assets can engage with and whether the loan faces a market maker and is delta-neutral.
- **Lending pools** — Segregated credit pools (permissioned, lender-specific credit facilities with specific risk constraints), integrations on DeFi-native lending protocols such as Clearpool, Maple, Morpho, Term or Aave, and public pools (USDC, ETH, WBTC) that are permissionless and composable.
- **Subaccounts** — The core smart contract wallet, owned by the customer with select functions exposed to the risk engine such as liquidation or emergency unwind.
- **Strategy contracts** — Adapters on top of existing DeFi protocols (Aave, Compound, Curve, Convex, Uniswap, GMX, Paraswap, 1inch and their forks across EVM chains), plus structured product contracts (total return swaps, interest rate swaps, forwards, options) with off-chain pricing feeds and automated margining.
- **Risk engine** — An off-chain module that monitors wallet health, triggers margin calls and liquidates positions when required. Underwriting is based on an adaptation of CME's SPAN methodology, using parameters such as volatility and price ranges, cross-asset correlation, holder distribution, and order book depth.
- **Insurance pool** — Initially capitalized by lenders/LPs in exchange for yield; as the network gains traction, part of network fees funds the pool until it becomes self-sustaining.
## Where to next
- [How Upshift works](/introduction/how-it-works)
- [FAQ](/introduction/faq)
- [Products](/products)
- [Vault architecture overview](/vault-architecture/overview)
- [Curators overview](/curators/overview)
- [SDK quick start](/sdk/quick-start)
# FAQ
> Frequently asked questions about Upshift, its vaults, curators and yield.
### What is Upshift?
**Upshift** is the operating system for institutional onchain asset management.
We enable teams to design, build and integrate vaults for any DeFi and CeFi yield strategy. Our core focus is on giving teams full control over every step of the deployment process: from strategy design to integration.
### Why now?
We are at a critical inflection point for the crypto industry:
- Stablecoins and tokenized assets have crossed $300B in market cap, widely adopted for payments
- Regulatory clarity has unlocked a wave of innovation across consumer finance, growing overall demand for yield
- Institutional giants like JP Morgan are coming onchain by launching tokenized money market funds and RWAs
As tokenized asset issuance and onchain participation grows, the demand for custom, transparent and risk-managed yield opportunities will scale significantly.
We believe vaults are the primary way to bring the next era of non-custodial asset management to DeFi.
### What's the long term vision?
Every wallet, neobank and fintech will offer Earn opportunities to users.
In TradFi, yield products like bonds and savings accounts represent a $100 trillion market. Vaults bring this to DeFi.
### How does Upshift differ from other vault providers?
While other vault providers offer a limited canvas for vault design, Upshift provides a full-stack toolkit to build institutional-grade vaults:
- **Broad strategy coverage:** Deploy your vault on 30+ chains and 70+ protocols, combining DeFi and CeFi strategies in a single vault
- **Compliant control:** Vault mandates are restricted to the scope of onchain policies, e.g. supplying to the WETH market on Aave. Partners can also set KYC requirements and wallet screening to ensure compliance with local regulations
- **Onchain transparency:** Vault deployment is traceable onchain and depositors can view new strategy allocations in real-time
- **Prime capabilities:** Through Upshift's institutional infrastructure layer, KYC'd participants can borrow against vault positions, while vault curators execute strategies using its sophisticated trading platform
Upshift lets teams integrate existing vaults for stablecoins, ETH and BTC, as well as design completely custom vaults with transparent strategies and controls tailored to your users' risk profiles.
### Where does the yield come from?
Yield on Upshift comes from:
- **Real yield:** APY from the underlying protocols (e.g. lending, LPing, staking).
- **Protocol rewards:** Points or token incentives from the DeFi protocols used in the strategy.
- **Yield tokenization:** Users can use their tokenized yield-bearing positions to find additional yield opportunities across DeFi.
Each vault on Upshift is actively managed by a Curator. Curators are institutions such as hedge funds and asset managers who curate and execute DeFi yield strategies on your behalf.
Yield may also include rewards and points from protocols included in the vault strategy. For example Ethena may offer points to those who hold PT-USDe.
### Who are the Vault Curators on Upshift?
Each vault on Upshift is actively managed by a Curator.
Curators are institutions such as crypto-native yield funds and asset managers who curate and execute DeFi yield strategies.
Existing vaults are curated by teams such as Sentora, Gamma Research and Gami Labs.
### How does Upshift mitigate risk in vaults?
Built on institutional-grade infrastructure, transparency and risk management are non-negotiable for Upshift. The platform mitigates risk across several axes:
- **Institutional-grade smart contract infrastructure:** Vaults use the smart contract infrastructure of Upshift's institutional layer, trusted by institutions for over $7bn in monthly transaction volume
- **Self-custodial by default:** Your funds stay in your wallet; vaults are non-custodial by design
- **Whitelisted protocols only:** Curators can only deploy capital to vetted DeFi protocols and approved chains. Vaults can be customised to whitelist specific protocols, depending on risk profile
- **Curator transparency:** Every vault displays exposure by protocol, token, and strategy. All curators are KYC'd institutions with verifiable track records
### Key terms
**Vaults**
- ERC-4626 standard vaults which accept stablecoins and crypto assets. Vaults deposit into subaccounts on Upshift's institutional infrastructure layer, from where hedge funds can execute DeFi yield strategies using funds.
**Curators**
- Curators are institutions such as hedge funds who manage vaults and run DeFi yield strategies on your behalf. Curators on Upshift include Sentora, Gamma Research, Gami Labs and NEMO.
**Receipt tokens**
- After you deposit into a vault, your position is tokenized into a receipt token, e.g. "This token represents my deposited $100 USDC and the yield it is accruing via the vault"
**Institutional infrastructure layer**
- Upshift's institutional infrastructure layer is the leading onchain prime brokerage, managing $7bn in monthly transaction volume for institutional clients. Its battletested smart contracts are the underlying infrastructure for Upshift vaults.
# How Upshift Works
> The full lifecycle of a deposit — from receiving vault shares to curator-managed strategies, NAV accrual, and withdrawal.
## The vault lifecycle
Upshift is built around vaults: non-custodial, on-chain products that turn a single deposit into a professionally managed yield position. Every vault follows the same loop.

### 1. Deposit
You deposit an asset — stablecoins, ETH, BTC, or other supported crypto assets — into a vault. Upshift offers both single-asset ERC-4626 vaults and multi-asset deposit vaults, supporting everything from simple lending to complex, multi-asset and multi-chain strategies.
### 2. Receive shares
Your position is tokenized into a receipt token: vault shares that represent your deposit and the yield it accrues. Because the vaults follow the ERC-4626 standard, these shares are composable — a token in your wallet, not an account balance held by someone else.
### 3. Curators run the strategy
Each vault is actively managed by a Curator — institutions such as hedge funds and asset managers who design and execute the vault's yield strategy. Deposits flow into subaccounts on Upshift's institutional infrastructure layer, from where curators deploy capital across whitelisted DeFi protocols and approved chains.
The setup is self-custodial by design: curators can allocate capital within the vault's mandate, but they cannot withdraw or access your funds. Yield comes from real sources — lending, LPing, and staking APY from the underlying protocols — plus any protocol rewards or points earned by the strategy.
### 4. NAV accrues to your shares
As the strategy earns, the vault's net asset value grows, and that growth is reflected in the value of your shares. Every allocation is traceable on-chain: each vault displays its exposure by protocol, token, and strategy, so you can see in real time where your capital sits and how the yield is generated.
### 5. Withdraw
When you want to exit, you redeem your shares back through the vault and receive your underlying assets plus the yield they have accrued. Your position was a token the entire time — no custodian to petition, no off-chain queue to trust.
## Why this design
Transparency and risk management are the non-negotiables. Vaults run on smart contract infrastructure trusted by institutions for over $7bn in monthly transaction volume, curators are KYC'd institutions with verifiable track records, and capital can only touch vetted, whitelisted protocols.
## Next steps
- See the vault products in practice: [Products](/products)
- Go deeper on the vault design: [Vault architecture overview](/vault-architecture/overview)
# Introduction
> Start here — what Upshift is, how a deposit moves through a vault, and the questions integrators ask first.
import { Card, Cards } from 'fumadocs-ui/components/card';
Upshift is the operating system for institutional onchain asset management.
Teams launch vaults, curators run strategies against an onchain policy engine,
and depositors hold receipt tokens that accrue the strategy's yield.
## Then go deeper
# Integrating Upshift Vaults Into Your Product
> The integration paths, the steps from vault selection to launch, compliance gating, redemption UX, reporting and fee share.
You can add Upshift vaults to your product through the TypeScript SDK, the REST API, a branded vault page in the Upshift app, or a custodian's Earn product that already lists Upshift vaults. Each path uses the same vault contracts and the same risk controls, so you can start on one path and move to another later.
This guide is for product, engineering, compliance and risk teams at fintechs, wallets, exchanges, custodians and asset managers.
## Integration paths
| Path | What you build | Who signs transactions | Best for |
| --- | --- | --- | --- |
| [SDK](/sdk) (`@upshiftfinance/sdk`) | Your own earn screens, in your app | Your user's wallet, or your platform wallet | Wallets, neobanks and exchanges that want the experience inside their app |
| [REST API](/rest-api) | Data feeds: vault listings, APY, NAV history, positions, redemption queues, governance | Not applicable (read-only data) | Reporting, dashboards, backend reconciliation, risk monitoring |
| Branded vault page (white-label) | Nothing. Upshift hosts a page under your brand in the Upshift app | Your user's wallet | Teams that want to launch before they build screens |
| Custodian Earn | Nothing on the vault side. You switch on Earn in your custodian | The custodian's signing flow | Institutions that already hold assets with a custodian that lists Upshift vaults, such as Fordefi Earn |
The SDK covers EVM chains, Solana and Stellar. The REST API has a public surface (no key) and an institutional surface (`x-api-key`). To call either from a browser on your domain, ask Upshift to add your origin to the allow-list.
Any vault can run under your own brand and front end through [Vault-as-a-Service](/products/vaas).
## From vault selection to launch
1. **Pick the vaults.** Choose from the catalogue or have a vault built for your mandate. Vaults sit in three bands: **Conservative** (tokenized Treasury bills and money market funds), **Core** (overcollateralized lending and private credit, run by a curator) and **Enhanced** (DeFi strategies, in a separate vault with its own mandate). Many partners start with one Conservative vault and add others on the same integration.
2. **Run due diligence.** Review the [risk controls](/vault-architecture/risk-controls), the [audits](/resources/audits), and each vault's owner, operator and ProxyAdmin addresses onchain. Upshift shares a data room and DDQ answers on request. <!-- CONFIRM: final URL slug for risk-controls -->
3. **Choose who can deposit.** Set the vault to open, allow-list or single depositor. See [Compliance gating](#compliance-gating).
4. **Agree commercial terms.** Fees, fee share and any origin code. See [Fee share](#fee-share).
5. **Deploy or configure.** For a new vault, Upshift deploys the contract with an owner multisig and the parameters you agreed: fees, deposit cap, whitelisted protocols and assets, withdrawal period and timelock delay.
6. **Integrate.** Build on the SDK or API, or set up the branded page. Test deposits, queued and instant redemptions, and claims with small amounts on mainnet.
7. **Launch.** Your customers deposit stablecoins and receive a vault share token. Its value changes with the vault's NAV.
Tria, a crypto neobank, went live two weeks after starting its SDK integration. Most of a launch timeline is your own compliance review and vault selection.
## Compliance gating
Each vault is configured as one of three types:
| Type | Who can deposit | How it is enforced |
| --- | --- | --- |
| Open | Anyone with a compatible wallet | No senders whitelist set |
| Allow-list | Only wallets you approve, for example customers who passed your own KYC | Onchain senders whitelist, checked on deposit and withdrawal |
| Single depositor | Only your platform wallet. You track each customer's balance in your own ledger | Onchain senders whitelist with one address |
You run your own customer onboarding and screening. The vault enforces the result onchain: a wallet that is not on the allow-list cannot deposit or withdraw. If you cannot pool all customers together, use a separate vault per customer group so each group's assets and records stay apart.
## Redemption UX
Show customers which redemption path a vault offers before they deposit.
| Path | What the customer sees | Notes |
| --- | --- | --- |
| Queued redemption | A request, then funds after the vault's withdrawal period | The withdrawal period is set per vault (at least one day when set). Upshift processes claimable redemptions daily. A withdrawal fee can apply |
| Instant redemption | Funds in the same transaction | On vaults that support it. An instant redemption fee applies, and it depends on available liquidity in the vault |
| Atomic redemption | Funds at the point of payment, in one transaction | For card and payment programs. See [Atomic Redemption Vault](/vault-architecture/atomic-redemption) |
Notes for your screens:
- **Multi-asset vaults** accept several deposit assets but pay every redemption in the vault's one reference asset. A customer who deposits USDT into a USDC-reference vault receives USDC during redemption.
- **Pending requests.** Use `getVaultAvailableRedemptions` (SDK) or the [Pending Redemptions](/rest-api/institutional/pending-redemptions) endpoint to show request status.
- **Pauses.** The owner can pause deposits and withdrawals on an EVM vault independently. Read `isDepositPaused` and `isWithdrawalPaused` before you show a button.
- **Fees.** Preview the net amount with `previewDeposit` and `previewRedeem` before the customer signs.
## Reporting
| Need | Source |
| --- | --- |
| Vault list, APY, TVL | SDK `getVaults`, `getVaultApy`, `getVaultTvl`; public API `tokenized_vaults` |
| NAV history | Institutional API [Historical Asset Share Ratio](/rest-api/institutional/historical-asset-share-ratio) |
| Allocations | SDK `getVaultAllocations`; Institutional API [Historical Allocations](/rest-api/institutional/historical-allocations) |
| Customer positions and PnL | SDK `getVaultPositions`, `getVaultUserLifetimePnl` |
| Mark-to-market PnL | Institutional API [Unrealized PnL](/rest-api/institutional/unrealized-pnl) |
| Roles, timelocks, audit log | Institutional API [Governance](/rest-api/institutional/governance) |
| Fee schedule | Institutional API [Vault Fees](/rest-api/institutional/vault-fees) |
| Deposit and withdrawal history | Institutional API [Vault History](/rest-api/institutional/vault-history) |
Positions and NAV are also readable onchain at any time. Treat API APY and performance figures as informational and check them against onchain state for anything you act on financially.
## Fee share
Three mechanisms are available. Terms are agreed per partner.
- **Origin fee.** Upshift registers an origin code for you on the [Universal Adapter](/contracts/universal-adapter). Each deposit that carries your code pays an agreed number of basis points to your wallet in the same transaction. See [Fee Sharing](/contracts/fee-sharing).
- **Fee wrapper vault.** Your users get their own share class, with your fee charged on their balance and a separate record of their holdings.
- **Share of vault fees.** A share of the vault's management or performance fees, set in the commercial terms.
Rates shown to customers vary with markets and are never guaranteed.
## FAQ
### Which vault providers offer SDK integration and institutional risk controls?
Upshift offers a TypeScript SDK (`@upshiftfinance/sdk`) for EVM chains, Solana and Stellar, a REST API and white-label vault pages. The vaults carry onchain controls: an owner multisig, a 4 of 6 ProxyAdmin multisig for code upgrades, a timelock configured per vault for key parameter changes, NAV volatility limits, depositor allow-lists and whitelisted strategy perimeters. Operators sign through Fireblocks or Fordefi MPC with maker-checker approval and pre-transaction simulation. See [Risk controls](/vault-architecture/risk-controls).
### How can a fintech add stablecoin yield without taking custody of customer funds?
Customer stablecoins go into a non-custodial Upshift vault, and the customer or your platform holds the vault share token. The curator can move capital only between the vault, its subaccounts and whitelisted strategy contracts. You can integrate through the SDK, the API, a branded page or a custodian's Earn product.
### Can we restrict a yield vault to KYC'd customers only?
Yes. Set the vault to allow-list or single depositor. You run your own KYC, then add approved wallets to the vault's onchain senders whitelist. Wallets that are not on the list cannot deposit or withdraw.
### How fast can customers withdraw from an Upshift vault?
It depends on the vault. Queued redemptions are claimable after the vault's withdrawal period, and Upshift processes claimable redemptions daily. Vaults with instant redemption pay out in the same transaction for a fee, subject to available liquidity. Atomic redemption vaults settle at the point of payment for card programs.
### How do partners earn revenue from integrating Upshift vaults?
Through an origin fee paid onchain on each deposit you route, a fee wrapper vault with your own share class, or a share of the vault's fees. Terms are agreed per partner.
## Next steps
- [SDK quickstart](/sdk/quick-start)
- [For neobanks and fintechs](https://docs.upshift.finance/introduction/neobanks-and-fintechs)
- [Book a 30-minute call](https://calendar.app.google/JmLJE2E4QCCM29nS7)
# How neobanks and fintech apps add stablecoin yield with Upshift
> Launch stablecoin vaults under your own brand, from tokenized money market funds to DeFi strategies, on one integration.
Upshift lets a neobank, wallet or fintech app pay customers a return on their USDC and USDT balances. The yield comes from vaults that deploy across strategies ranging from tokenized money market funds to DeFi lending. Your customers see the product under your brand, inside your app.
This page answers the questions product, compliance and risk teams ask before they integrate.
## How can a banking app offer yield on customers' stablecoin balances?
Customer balances are deposited into an Upshift vault. The vault holds the yield-earning assets and issues a receipt token (an ERC-4626 share) that represents each customer's position. The value of that token rises as the vault earns, and customers redeem it for USDC or USDT when they withdraw.
You choose the vaults from three yield bands:
- **Conservative - 24/7 T-bill rate:** a vault that holds only tokenized Treasury bill and money market funds. The return tracks short-dated government rates, less fees.
- **Core - Diversified lending and credit:** overcollateralized lending and private credit, run by a professional curator such as Sentora.
- **Enhanced - Higher-yield strategies:** for customers who opt into more risk, in a separate vault with its own mandate.
Balances stay in stablecoins the whole time. Nothing needs to be converted back to fiat for the customer to earn.
## Can we offer yield without holding customer funds ourselves?
Yes. Upshift vaults are non-custodial: the vault contract holds the assets, and each customer's receipt token sits in a wallet they or your platform control. Curators can only move funds between protocols on the vault's whitelist. The vault owner, a multisig, can trigger an emergency withdrawal, and that covers only assets held in the vault contract itself.
Withdrawals are paid at NAV under each vault's published terms. A liquid stablecoin buffer pays normal withdrawals straight away.
## Can the product carry our own brand?
Yes. Any Upshift vault can run under your name through [Vault-as-a-Service](https://docs.upshift.finance/products/vaas), in one of two ways:
- **In your app, through the SDK.** The TypeScript SDK (`@upshiftfinance/sdk`) covers deposits, redemptions, balances and APY reads on EVM chains, Solana and Stellar. See [SDK quick start](/sdk/quick-start).
- **On a branded page Upshift hosts**, if you'd rather not build the screens yourself.
Tria, a crypto neobank, built on the SDK and launched BTC and stablecoin Earn for users in 150+ countries two weeks after starting the integration. It has routed $25M+ in deposits across 3 vaults on 2 chains.
## Can we pay different rates to different customers?
Yes, in two ways. You can run separate vaults per risk band or customer group, each with its own mandate and records. Or you can use one vault and set the rate customers see with a tiered platform fee, or fund a top-up for a promotional tier.
If you can't pool every customer together, separate vaults per customer group keep each group's assets and records apart.
## How does revenue share work for the fintech?
Three mechanisms are available:
- **Origin fee:** an agreed number of basis points on each deposit routed with your code, paid to your wallet in the same transaction.
- **Fee wrapper vault:** your users get their own share class, with your fee charged on their balance and a separate record of their holdings.
- **Share of the vault's fees**, set as part of the commercial terms with a distribution partner.
Terms are scoped per partner. [Book a call](https://calendar.app.google/JmLJE2E4QCCM29nS7) to discuss them.
## Who can deposit?
Each vault is configured as one of three types:
- **Open to anyone** with a compatible wallet.
- **Allow list:** only wallets you've approved, for example customers who passed your KYC.
- **Single depositor:** only your own platform wallet, which then tracks customer balances in your ledger.
## What due diligence should we run on a stablecoin yield provider?
The evidence a bank or fintech risk team usually asks for, and where to find it for Upshift:
| What to check | Where it is |
| --- | --- |
| Smart contract audits | 11 audits by 6 independent firms, on the [audits page](/resources/audits) |
| Who controls the vault | Owner multisig, operator and ProxyAdmin multisig addresses, readable on each vault contract |
| What can change, and how fast | Parameter changes such as the management fee go through a timelock configured per vault. Code upgrades are approved by a separate multisig |
| What the vault holds | Positions and NAV are readable onchain at any time |
| Where funds can go | The vault's protocol and asset whitelist, enforced onchain by the policy engine |
| Withdrawal terms | Published per vault, with a liquid buffer for normal withdrawals |
| Written DD answers | Data room and DDQ answers, shared on request |
## Does the GENIUS Act stop us offering yield?
The GENIUS Act stops a permitted stablecoin issuer from paying holders interest or yield just for holding its coin. Vault yield comes from the assets the vault holds (Treasury bills, lending, credit), and your customers hold a vault share rather than the stablecoin. How that applies to your product depends on your licences and jurisdiction. Confirm the structure with your counsel.
## Is the yield guaranteed?
No. Vault rates float with market conditions and are shown on each vault page.
## How long does a launch take?
Tria went live two weeks after starting its SDK integration. The rest of the timeline is your own compliance review and the vaults you pick.
## Next steps
- See the [vaults and their current rates](https://app.upshift.finance/)
- Read the [SDK quick start](/sdk/quick-start)
- [Book a 30-minute call](https://calendar.app.google/JmLJE2E4QCCM29nS7)
---
# Products
# DeFi Yield
> Curated vaults on stablecoins, BTC, ETH and XRP, from overcollateralized lending to DeFi strategies, on non-custodial infrastructure.
## Overview
Users deposit assets into Upshift DeFi Yield vaults, where capital is allocated to curated DeFi strategies through secure, non-custodial infrastructure. By focusing on simplicity and reducing liquidity fragmentation, Upshift provides a seamless user experience while delivering transparent and consistent yields.
Upshift's vision is to democratize institutional DeFi yield opportunities, without the need for complex strategy management.
## Benefits for users
### Simplified access to yield
Upshift's vaults eliminate the need for users to navigate or manually execute complex DeFi strategies. Users can effortlessly earn yield, beyond simple looping APY, without managing multiple positions or protocols.
### Secure, non-custodial management
Users retain control over their assets at all times, as funds are deployed through Upshift's secure, non-custodial infrastructure. Curators can manage yield strategies but cannot withdraw or access user funds, ensuring robust security through smart contract enforcement.
### Transparent yield generation
Every interaction, from capital deployment to yield realization, happens transparently on-chain. Users can track where their funds are allocated and how their yield is generated, fostering trust and clarity throughout the process.
### Cross-chain flexibility
With Upshift's native multi-chain support, users can benefit from yield opportunities across different blockchain ecosystems without the need for manual bridging or reallocation of funds. This flexibility helps users tap into better yields on various chains seamlessly.
# Products
> The vaults Upshift runs today: stablecoin yield from tokenized money market funds to DeFi strategies, white-label vaults under your brand, and instant liquidity for tokenized assets.
import { Card, Cards } from 'fumadocs-ui/components/card';
Every product below is a vault, or a family of vaults, on the same infrastructure: deposits mint receipt tokens, a curator deploys the assets under an onchain policy, and NAV accrues back to the shares.
# Vault-as-a-Service
> White-label vault infrastructure that lets partner protocols offer curated DeFi yield strategies to their users.
Vault-as-a-Service lets a fintech, exchange, wallet or asset manager offer yield on stablecoin balances under its own brand. You choose the strategy and the curator, set the rules, and put the vault in front of your customers through the SDK, the REST API or a branded page in the Upshift app.
The range of strategies runs from 24/7 tokenized money market funds to DeFi lending. You can start with one conservative vault and add others later on the same integration.
## Who uses it
| Partner | What they launch | Example |
| --- | --- | --- |
| Neobanks, wallets and exchanges | An earn tab on customer USDC and USDT balances | Tria runs Upshift vaults inside its self-custodial app |
| Card and payment programs | Yield on card float or settlement balances, with atomic redemptions at the point of transaction | See [Atomic Redemption](/vault-architecture/atomic-redemption) |
| Asset managers and funds | A vault as the wrapper for a mandate, run by their own team or a curator | Curated by the manager, priced and settled by Upshift |
| Chains and protocols | An anchor stablecoin vault for their ecosystem | earnAUSD on Monad, offered in [app.monad.xyz](http://app.monad.xyz) |
## What you can launch
Each vault sits in one of three bands. Customers can be offered one band or all three.
| Band | What the vault holds | Typical liquidity |
| --- | --- | --- |
| Conservative | Tokenized Treasury bills and money market funds | Instant, 24/7 |
| Core | Overcollateralized lending and private credit, run by a curator such as Sentora | Daily |
| Enhanced | DeFi strategies for customers who opt into more risk, in a separate vault with its own mandate | Set per vault |
Yields vary with markets and are never guaranteed. Current rates for live vaults are in the [Upshift app](https://app.upshift.finance/).
## How a launch works
1. **Pick the strategy and curator.** Use an existing vault from the catalogue or have a custom one built for your mandate.
2. **Set the parameters.** Fees, deposit caps, which protocols and assets the vault can use, and whether deposits are open or limited to a whitelist of wallets.
3. **Deploy.** Upshift deploys the vault contract. The owner is a multisig, and parameter changes can sit behind a timelock.
4. **Integrate.** Connect through the [SDK](/sdk) (EVM chains, Solana and Stellar) or the [REST API](/rest-api), or send customers to a branded vault page in the app.
5. **Go live.** Customers deposit stablecoins and receive a vault share token. Its value rises as the vault earns.
## What you control
- **Fees.** Management, performance, deposit and withdrawal fees are set per vault. Terms are scoped per partner.
- **Access.** Deposits can be open or restricted to approved wallets.
- **Limits.** Deposit caps and the list of protocols and assets the curator can use.
- **Branding.** The vault name, share token and the page your customers see.
## Custody and risk controls
- **Non-custodial.** Assets sit in the vault contract or its subaccounts. Customers or your platform hold the share tokens.
- **Mandate enforced onchain.** Curators can only move funds into the protocols and assets on the vault's whitelist, enforced by the policy engine.
- **Independent pricing.** Upshift validates each vault's net asset value before it reaches depositors, processes withdrawals daily and charges fees onchain.
- **Audited.** The vault contracts have been through 11 smart contract audits by 6 independent firms. See [Audits](/resources/audits).
## Next steps
- Read [For neobanks and fintechs](/introduction/neobanks-and-fintechs) for the questions product, compliance and risk teams ask
- Start with the [SDK quick start](/sdk/quick-start)
- [Book a 30-minute call](https://calendar.app.google/JmLJE2E4QCCM29nS7)
# Architecture
> The two smart contract components of RWA Clear — the LP-facing vault and the Instant Redeem Subaccount — and how they connect.
RWA Clear consists of two smart contract components that work together:

## The Vault (Atomic Vault)
The vault is the LP-facing component. It accepts USDC deposits, mints vault shares, and manages the overall asset pool. When LPs want to withdraw, the vault handles instant redemptions of shares back to USDC.
The vault automatically routes deposited USDC to the Instant Redeem Subaccount for liquidity provisioning and yield generation. If the vault needs USDC for an LP withdrawal and its own balance is insufficient, it pulls the deficit from the subaccount automatically.
Key properties:
- Standard Upshift tokenized vault with ERC-4626-compatible share mechanics
- Instant atomic redemptions (no T+32 hour waiting period)
- Auto-routes capital to the subaccount for yield optimization
- Share price reflects total vault assets, including subaccount holdings and accrued fees
## The Instant Redeem Subaccount
The subaccount is the RWA-holder-facing component. It is a standalone contract that holds USDC liquidity and processes instant swaps of RWA tokens to USDC using oracle pricing.
Key properties:
- Holds idle USDC and auto-deploys it to a yield vault (e.g., Morpho) for passive lending returns
- Accepts RWA tokens and swaps them for USDC at oracle-derived prices minus a configurable spread
- Fees remain in the subaccount, increasing the net asset value for all vault depositors
- Non-upgradeable — the contract cannot be modified after deployment
- Bound to a single vault — permissions and governance are inherited from the parent vault
## How They Connect
The subaccount has no independent admin keys. All access control — owner, operator, whitelist — is read from the parent vault at call time. If the vault's owner changes, the subaccount's permissions change immediately.
# How It Works
> The two-sided RWA Clear marketplace — LPs fund a USDC pool while RWA holders redeem instantly against it.
## A two-sided marketplace
RWA Clear is a two-sided marketplace built on top of Upshift's vault infrastructure.
**Liquidity Providers** deposit USDC into an Upshift vault. Their capital funds instant redemptions and earns yield in return.
**RWA Holders** submit their tokenized assets (e.g., USCC) and receive USDC instantly, minus a small transparent fee.
## Redemption steps
1. The holder approves their RWA tokens to the redemption contract
2. The holder submits the tokens and specifies a minimum USDC output (slippage protection)
3. The contract fetches a live Chainlink oracle price
4. It computes the USDC equivalent and deducts the spread fee
5. USDC is delivered to the holder — all in one transaction
## Liquidity management
USDC deposited by LPs does not sit idle between redemptions. It is automatically deployed to an ERC-4626 yield vault (e.g., Morpho) to earn lending yield. When a redemption occurs and more USDC is needed than the contract holds in reserve, it automatically pulls the deficit from the yield layer within the same transaction.
# RWA Clear
> Instant liquidity for tokenized real-world assets, funded by an LP pool that earns spread fees and lending yield.
## The problem
To view available instant liquidity for each supported RWA, visit the
[RWA redemption page](https://app.upshift.finance/rwa-redeem).
Tokenized RWA redemptions have historically been a blocker for full adoption onchain. A holder can burn their token onchain in seconds, but the actual capital return takes 1 to 3 business days: the issuer calculates NAV, instructs the custodian, liquidates the underlying position, and wires settlement through banking rails. Weekends and holidays add more delay.
This creates problems for anything that depends on fast, predictable liquidity: lending protocols that need to liquidate collateral in one block, structured products with tight settlement windows, or treasuries that can't afford capital locked in a redemption queue.
## How Clear solves this
Upshift Clear sits between the RWA holder and the issuer's redemption process. A pool of USDC (funded by LPs) is available for instant payouts. When a holder wants to exit, the contract prices their RWA tokens using a live Chainlink oracle, applies a spread fee, and sends USDC in the same transaction. The RWA tokens then go through the issuer's normal redemption process in the background, and the returned capital refills the pool.
Between redemptions, USDC in the pool doesn't sit idle. It's automatically routed to an ERC-4626 yield vault (e.g., Morpho) for lending yield. If a redemption needs more USDC than the contract holds in reserve, it pulls from the yield layer within the same transaction.
## The LP side: `clrRWA`
LPs deposit USDC and receive `clrRWA`, a composable ERC-20 receipt token. Their capital earns from two sources: a spread fee on every instant redemption, and lending yield on idle USDC. LPs don't take on the RWA's strategy risk because the vault holds the underlying tokens only during the brief settlement window before the issuer processes the standard redemption.
Fees stay in the vault and accrue to the share price automatically, with no separate extraction or distribution step. The share price reflects total vault assets, including what's deployed in the yield layer and any fees earned.
## Learn more
- [How it works](/products/rwa-clear/how-it-works)
- [Architecture](/products/rwa-clear/architecture)
- [Pricing and fees](/products/rwa-clear/pricing-and-fees)
- [Using RWA Clear](/products/rwa-clear/using-rwa-clear)
- [Risk controls](/products/rwa-clear/risk-controls)
- [Issuer integration](/products/rwa-clear/issuer-integration)
# Issuer Integration
> How RWA issuers can enable instant redemptions for their tokenized assets on Upshift.
RWA issuers interested in enabling instant redemptions for their tokenized assets on Upshift can reach out at [**rwa@upshift.finance**](mailto:rwa@upshift.finance).
Integration involves:
1. Confirming the asset meets the [compatibility requirements](/products/rwa-clear/risk-controls)
2. Establishing a Chainlink oracle price feed for the asset
3. Configuring the spread fee and safety parameters
4. Funding initial USDC liquidity
5. Activation by the vault owner
# Pricing and Fees
> How RWA Clear prices redemptions with oracle feeds, applies spread fees, and generates yield for liquidity providers.
## Oracle Pricing
Each supported RWA token has a dedicated oracle price feed that provides a live market rate. The contract converts the input asset to USDC using this oracle price, with multiple safety checks:
| Check | Purpose |
| --- | --- |
| Staleness threshold | Rejects prices older than a configurable window (minimum 5 minutes) |
| Price deviation bounds | Optional per-asset circuit breaker that rejects conversions if the oracle price deviates too far from the expected peg |
| Round completeness | Ensures the oracle has fully reported the current price round |
## Fee Structure
A spread fee is applied to every redemption, denominated in USDC:
| Parameter | Range |
| --- | --- |
| Spread (per asset) | 0.05% to 5.00%, configurable |
| Rate limit | Optional per-transaction cap on USDC output |
Fees are not extracted or distributed separately. They remain in the subaccount, increasing the net asset value for all vault depositors automatically.
## LP Yield Sources
Liquidity providers earn from two sources:
1. **Spread fees** — every instant redemption generates fee revenue that accrues to the vault's NAV
2. **Idle lending yield** — USDC not immediately needed for redemptions earns lending yield via the yield layer (e.g., Morpho)
## Worked Example
An RWA holder redeems 10,000 USCC. The Chainlink oracle reports a rate of 1.02 USCC per USDC. The configured spread is 10 basis points (0.10%).
- USDC equivalent: 10,000 / 1.02 = **9,803.92 USDC**
- Fee: 9,803.92 x 0.10% = **9.80 USDC**
- Holder receives: **9,794.12 USDC** (instantly, vs. ~32 hours via traditional redemption)
- The 9.80 USDC fee stays in the vault, accruing to all LPs
# Risk Controls
> The safety mechanisms protecting RWA Clear redemptions, plus the requirements an asset must meet to be supported.
| Control | Detail |
| --- | --- |
| Oracle safety | Staleness, round completeness, and optional deviation checks on every redemption |
| Slippage protection | Users specify a minimum output amount; the transaction reverts if not met |
| Rate limiting | Configurable per-transaction cap prevents large single-transaction drains |
| Global pause | Redemptions can be frozen instantly by the vault owner or operator |
| Emergency withdrawal | All yield-layer funds can be pulled in one call |
| Non-upgradeable | The subaccount contract cannot be modified after deployment |
| Reentrancy guard | Industry-standard protection on all state-changing functions |
## Pause Controls
An operator can pause redemptions in an emergency, but only the vault owner can unpause. This ensures fast incident response without giving operators unilateral control to resume operations after an issue.
---
## Supported Asset Requirements
| Requirement | Detail |
| --- | --- |
| Standard ERC-20 | Must follow standard transfer semantics |
| No fee-on-transfer | Tokens that apply a tax on transfer are not supported |
| No rebasing | Tokens that change balance automatically (e.g., stETH) are not supported |
| Oracle Feed | A reliable price feed must exist for the asset |
# Using RWA Clear
> Step-by-step guides for RWA holders redeeming tokens instantly and liquidity providers earning yield on Upshift.
## For RWA Holders
1. Navigate to the **Redeem** page on Upshift
2. Connect your wallet
3. Enter the amount of RWA tokens you want to redeem
4. Review the expected USDC output, redemption fee, and available liquidity
5. Approve the token transfer and confirm the redemption
6. USDC is delivered to your wallet in the same transaction
The interface displays real-time pricing from the oracle, the current fee rate, and available instant liquidity so you can see exactly what you will receive before confirming.

## For Liquidity Providers
1. Navigate to the vault page on Upshift
2. Deposit USDC into the vault
3. Receive vault shares representing your proportional ownership
4. Earn yield from spread fees and idle lending — reflected in your share price over time
5. Redeem your shares for USDC at any time
---
# Vault Architecture
# Multi Asset Vault
> V2 multi-asset vaults with basket deposits, a single reference asset, and the two institutional custody and execution models.
Unlike V1 vaults, V2 allows for multi-deposit assets, providing Curators with greater flexibility.
- **Asset Model:** Users deposit multiple ERC-20 assets and mint an ERC-20 receipt token. Withdrawals from the vault are processed to the single reference asset of the vault. (e.g. A vault accepts both USDC and USDT deposits but the reference asset is set to USDC. All redemptions are processed in USDC.)
- **Baskets:** Curators can define a basket of accepted assets (e.g., USDC, USDT, DAI) that mint a single, unified share token.

When architecting a V2 vault, the most critical design decision for partners and strategists is the Custody & Execution Model. This choice determines how assets are secured, how strategies are executed, and how the vault's Net Asset Value (NAV) is reported.
Upshift provides two primary institutional paths: the Upshift Subaccount (Smart Contract Wallet) and the Fordefi (MPC) Solution.
## Upshift Vault Custody Models
1. **Upshift Subaccount:**
1. Deployed by Upshift's institutional infrastructure layer
2. Owned by the Vault
3. Strategist given trader role
4. Trader role allows Strategist to execute strategy; interact with DeFi protocols.
5. Subject to permissioned security scheme controlling whitelisting of integrations
1. Protocol and token integrations include price feeds to capture value of positions (spot), or value of positions on DeFi protocols.
2. Integrations mean Upshift can calculate NAV of positions.
6. Assets cannot be sent to external addresses.
7. Partners control whitelisting of protocols and tokens (via Upshift).
8. Execution of trades via swap module
1. Swap module only allows trades between whitelisted tokens.
2. Tokens cannot be sent to an external address.
9. Bridge module to allow cross-chain strategies, which allows the strategist to bridge assets to subaccounts if the subaccount is deployed on other chains.
1. Supports LayerZero (Stargate), and Chainlink CCIP bridging standard. Bridge module prevents funds being sent to external addresses.
10. Upshift can calculate the mark to market for options (OTC or Deribit).
11. Upshift can capture CeFi perp position value via APIs.
2. **Fordefi (MPC):**
1. Upshift can provide access to Fordefi through a shared workspace.
2. Transaction policy to control the contract, and token approvals.
3. Strategist submits transaction policy requests; the Upshift team, and third-party (protocol or chain partner) if applicable are required to approve changes to the transaction policy.
4. Strategist calculates NAV. An operator address is set up within the shared workspace. The Strategist is responsible to propose NAV updates, which is then validated by the Upshift pricing engine.
The on-chain implementation contract on Ethereum is deployed at [`0x4eac314be8fec32bfe8f7189040b64e050e801ab`](https://etherscan.io/address/0x4eac314be8fec32bfe8f7189040b64e050e801ab#code).
# Vault Offering
> The tiered Upshift vault architecture and the two vault types it supports.
Upshift gives partner protocols the ability to offer curated DeFi yield strategies and tokenized earn products. Vaults may offer yield ranging from liquid APY strategies such as LPing, to one-click rewards farming opportunities allocating deposits across various protocols.
Upshift utilizes a tiered vault architecture to support everything from simple lending to complex, multi-asset and multi-chain strategies.
Upshift offers two types of vaults: **Single-asset deposit ERC-4626 vaults** and **Multi-asset deposit vaults**.

# Portfolio P&L
> How Upshift calculates lifetime portfolio P&L, what activity it tracks, and the safeguards against showing a fabricated number.
## Summary
**P&L measures the difference between assets deposited into and withdrawn from Upshift.** Transfers and collateral pledges on third-party protocols are not tracked. These actions can make P&L incorrect for that position.
## Formula
```
Lifetime P&L = Current Position Value + Total Withdrawn - Total Deposited
```
| Term | Definition |
| --- | --- |
| **Total deposited** | Sum of every vault deposit at face value. One deposited unit counts as one unit, with no live re-quote. Any entry fee reduces the shares a deposit receives. The fee is therefore counted as a P&L cost automatically. |
| **Total withdrawn** | Sum of every completed withdrawal, converted from shares to assets at the share price when the withdrawal is read. |
| **Current position value** | The wallet's live on-chain balance: shares times the current share price. This is what the position is worth if closed at that time. |
Upshift shows P&L in the vault's native asset. It also shows a USD value and percentage, using the underlying asset's live USD price.
## What counts as a deposit or withdrawal
Only activity Upshift can see and index counts toward the calculation:
- On-chain deposits and withdrawals, including instant and request/claim flows, against the vault contract.
- Cross-chain LayerZero deposits and redeems for vaults that support them.
- Multi-asset deposits, tracked using each asset's own decimals, then rescaled to the vault's reporting decimals.
For example, a vault accepting USDC with 6 decimals and RLUSD with 18 decimals sums both correctly.
## What P&L does not track
> **Out of scope**
>
> Receipt tokens are transferable ERC-20 tokens. A wallet can receive shares through direct transfer. It then has no Upshift deposit record or cost basis. Upshift cannot compute P&L correctly for that position.
>
> If a wallet moves receipt tokens to another protocol as collateral, Upshift cannot see that activity. The position value can change for reasons the calculation cannot see or attribute.
>
> P&L reflects Upshift-native deposit and withdrawal history plus the current on-chain balance. It excludes off-platform activity.
## Safeguard: refusing to show a fabricated number
> A wallet with a non-zero position can have empty deposit and withdrawal history. This can occur during an indexing failure. The formula would then report the entire position as 100% profit: a plausible-looking but wrong result.
>
> Upshift detects this case and returns **History unavailable** instead of a number. It does not silently show inflated P&L.
>
> This safeguard does not fully cover transferred shares. A wallet that received shares directly also has no history. It shows **History unavailable** until Upshift can distinguish that flow from an indexing gap.
## Edge cases
| Case | Behavior |
| --- | --- |
| Fully exited, then re-entered | Computable. Withdrawal records confirm that the history loaded, even with a zero current balance. |
| Zero position, no history | Reports zero P&L. |
| Cross-chain vaults | Includes remote-chain deposits, redeems, and receipt-token balances in current position value and total withdrawals. |
| Closed vaults | Appears only when the position remains in the portfolio list. The position must surface there before Upshift can show P&L. |
## Data sources
Current balances and share prices come from live on-chain reads.
Deposit and withdrawal history comes from indexed events. Sources include subgraph-indexed events and the newer history API for closed-vault records.
When indexing is incomplete or stale, a live position without indexed history shows as **History unavailable**. This safeguard cannot detect every indexing gap. A position with some indexed deposits can still be affected by unrelated missing history.
# Risk Controls for Institutional Vaults
> How control of an Upshift vault is split between the owner multisig, the operator, the ProxyAdmin multisig and the curator, and which limits the contract enforces onchain.
Upshift vaults separate control across an owner multisig, an operator, a ProxyAdmin multisig and the curator, and the vault contract enforces most of these limits onchain. Operational controls, such as MPC signing, maker-checker approval and pre-transaction simulation, cover the steps the contract cannot enforce.
This page is written for risk, compliance and due diligence teams. It describes the EVM vault (`TokenizedVault`). Solana and Stellar vaults differ in places, listed under [Solana and Stellar vaults](#solana-and-stellar-vaults).
## Summary table
| Control | Who holds it | Enforced where | Timelocked? |
| --- | --- | --- | --- |
| Vault configuration (fees, caps, limits, whitelists) | Owner (Gnosis Safe multisig) | Onchain | Some changes. See [What the timelock covers](#what-the-timelock-covers) |
| Ownership transfer | Owner | Onchain, two-step | Yes |
| Proxy upgrade (vault code) | ProxyAdmin multisig, 4 of 6 | Onchain | No |
| Pause deposits / pause withdrawals | Owner on most vaults. Owner or operator on a few | Onchain | No |
| Emergency withdraw | Owner | Onchain | No |
| NAV update (`updateTotalAssets`) | Operator | Onchain, bounded by max percentage change | No |
| Max percentage change on NAV | Owner | Onchain | Yes |
| Withdrawal period (`lagDuration`) | Owner | Onchain | Yes |
| Management fee | Owner | Onchain | Yes, on most vaults. Not on lending-pool vaults |
| Performance fee | Owner sets, operator charges | Onchain, high watermark | No |
| Withdrawal fee and instant redemption fee | Owner | Onchain | No |
| Fee collector addresses | Owner | Onchain | No |
| Depositor allow-list (senders whitelist) | Owner or operator | Onchain | No |
| Deposit asset whitelist (multi-asset vaults) | Owner | Onchain | No |
| Subaccount whitelist (where capital can go) | Owner or operator | Onchain | No |
| Strategy policy (protocols, tokens, functions) | Upshift, with the partner | Onchain for Upshift Subaccounts. Offchain for Fordefi workspaces | No |
| Operator signing | Upshift | Operational: Fireblocks or Fordefi MPC | Not applicable |
| Maker-checker approval with simulation | Upshift | Operational: Upshift admin portal | Not applicable |
| Daily redemption processing | Upshift operator | Operational, onchain settlement | Not applicable |
## Roles
### Owner
The owner is a Gnosis Safe multisig. You can read its address on each vault contract (on a block explorer, **Read as Proxy**, then `owner`).
The owner configures the vault: fees, deposit caps, per-transaction limits, the deposit asset whitelist, fee collectors and performance fee recipients. The owner is the only role that can call `emergencyWithdraw` and transfer ownership. The owner can also call every function the operator can call.
Ownership transfer is two-step: the current owner nominates, the new owner accepts, and the transfer goes through the timelock.
### Operator
The operator runs the vault day to day. It reports NAV with `updateTotalAssets`, moves capital between the vault and its whitelisted subaccounts, charges performance fees and processes redemptions.
The operator cannot change fees, caps or whitelists of assets, and cannot call `emergencyWithdraw`. The owner sets the operator address, so operator independence is a configuration choice by the owner. The contract does not enforce it.
Operator keys are MPC wallets:
- **Fireblocks** signs the automated backend jobs on supported chains: charging the management fee, collecting fees, NAV updates and yield distribution.
- **Fordefi** is used where an external party co-signs (a per-partner workspace that holds the operator wallet, subaccount and fee collectors), and on chains that Fireblocks does not support.
Neither MPC provider signs owner functions. Owner functions go through the Gnosis Safe.
### ProxyAdmin multisig
Each EVM vault is a transparent upgradeable proxy (EIP-1967). Upgrades to the vault's code are approved by the ProxyAdmin multisig. It is generally a 4 of 6 Gnosis Safe with two signers each from the asset issuer, Upshift and the curator, so no single party can upgrade a vault alone.
A proxy upgrade changes the vault's code, for example to add instant redemption, multi-asset deposits, a bridge or swap module, or an audit fix. Fee levels, the protocol whitelist and the depositor list are parameters. They change through owner functions and do not need an upgrade.
### Curator
The curator decides the strategy. The curator is an offchain role: it acts through the operator role and the subaccount, inside the limits the owner and the policy set. The curator cannot move funds outside the vault, its subaccounts and the whitelisted strategy contracts.
### LoansOperator
Vaults that lend to institutional borrowers use a LoansOperator. This role is operational and does not exist in the vault contract. It uses an Upshift-managed MPC wallet with a two-signer approval flow, pre-transaction simulation and state checks. It cannot move funds outside the vault and its subaccounts.
## Onchain controls
### Non-custodial perimeter
Capital moves only between the vault contract, its whitelisted subaccounts and whitelisted strategy contracts. Neither Upshift nor the curator can send depositor funds to an outside wallet through the operator or subaccount paths.
The owner's `emergencyWithdraw` is the exception. See [Emergency withdraw](#emergency-withdraw).
### NAV volatility limit
`maxChangePercent` caps how far the vault's reported external assets can move in one update. The cap scales with the time since the last update (`maxChangePercent * secondsSinceLastUpdate / 86400`). A faulty oracle, an operator error or an attempted manipulation cannot move the share price past this bound in one step. Changes to `maxChangePercent` go through the timelock.
### Pause
The pause stops deposits and withdrawals independently (`pauseDepositsAndWithdrawals(bPauseDeposits, bPauseWithdrawals)`). On most live vaults only the owner can pause. On a few vaults the owner or the operator can pause. A pause is not timelocked, so it takes effect in the same block.
### Emergency withdraw
`emergencyWithdraw(receiverAddr)` is owner-only. It:
1. Pauses deposits and withdrawals.
2. Transfers all assets held by the vault contract to `receiverAddr`.
`receiverAddr` is any address the owner specifies. The contract does not restrict it to depositors.
`emergencyWithdraw` moves only assets held in the vault contract. It does not pull capital from subaccounts. To recall deployed capital, the operator or owner first calls `withdrawFromSubaccount`.
### Depositor allow-list
A vault can restrict who deposits and withdraws with a senders whitelist. When the whitelist address is zero, the vault is open. Partners use this for allow-listed or single-depositor vaults, for example to limit a vault to wallets that passed the partner's own onboarding checks.
### Deposit and withdrawal limits
The owner sets a deposit cap (in reference asset terms) and per-transaction maximums for deposits and withdrawals.
### Strategy policy
Where a curator runs on an Upshift Subaccount (a smart-contract wallet owned by the vault, on an Upshift prime account), the policy engine whitelists the protocols, contracts, tokens and functions the curator can call. These policies are onchain and verifiable. The swap module trades only between whitelisted tokens. The bridge module (LayerZero / Stargate, Chainlink CCIP) sends funds only to the vault's own subaccounts on other chains.
Where a curator runs on a Fordefi MPC workspace, the transaction policy is enforced offchain by Fordefi. Changes to it need approval from Upshift and, where applicable, the partner. See [Key Management & Execution](/curators/key-management).
## What the timelock covers
Timelocked changes go through an external timelock contract with a schedule, wait, consume pattern. The delay is configured per vault. It is not a fixed value.
**Timelocked**
- Ownership transfer
- Management fee (most vaults. Lending-pool vaults do not timelock the management fee)
- `maxChangePercent` (NAV volatility limit)
- Withdrawal period (`lagDuration`, set with `updateTimelockDuration`)
**Not timelocked**
- Proxy upgrades (vault code). These need the ProxyAdmin multisig instead
- Performance fee
- Withdrawal fee and instant redemption fee
- Fee collector and performance fee recipient addresses
- Deposit caps and per-transaction limits
- Depositor allow-list, deposit asset whitelist and subaccount whitelist
- Pause and emergency withdraw
To see the timelock delay and pending changes for a vault, use the [Governance endpoint](/rest-api/institutional/governance) of the Institutional API.
## Operational controls
These controls run outside the vault contract. They reduce operational risk, but a depositor cannot verify them onchain.
- **MPC signing.** Operator transactions are signed through Fireblocks or Fordefi MPC. No single person holds an operator key.
- **Maker-checker approval.** The Upshift admin portal simulates each operator transaction before it is signed. An approver reviews the simulated state change and approves or rejects it.
- **Independent NAV validation.** Upshift calculates NAV for Upshift Subaccounts across spot, DeFi, perps and options. On Fordefi workspaces the curator proposes the NAV and the Upshift pricing engine validates it before it reaches the vault.
- **Monitoring.** Hypernative monitors whitelisted venues and can trigger automated unwinds on critical alerts.
## Redemptions
- **Queued redemption.** A depositor calls `requestRedeem`. After the vault's withdrawal period (`lagDuration`, at least one day when set) the request becomes claimable. Upshift processes all claimable redemptions daily. The withdrawal period is set per vault and can carry a withdrawal fee.
- **Instant redemption.** Vaults that support it let a depositor redeem at once with `instantRedeem`, for an instant redemption fee. Instant redemption depends on available liquidity in the vault.
- **Multi-asset vaults.** A multi-asset vault accepts several deposit assets but has one reference asset. Every redemption pays out in the reference asset. For example, a vault that accepts USDC and USDT with USDC as the reference asset pays all redemptions in USDC.
## Solana and Stellar vaults
Solana and Stellar vaults are separate programs with their own controls:
- **No timelock.** No parameter change on Solana or Stellar vaults is timelocked.
- **Pause stops both directions.** The admin's `pause()` stops deposits and redemptions together. The operator can still manage deployed capital while paused.
- **AUM change limits.** The admin sets limits on how far deployed assets can rise or fall per update. Stellar vaults also apply cumulative window limits.
- **Two-step admin transfer** with an expiry on the nomination.
- **Instant redemption.** Stellar vaults are instant-redeem only.
See [Solana risk and security model](/vault-architecture/solana/risk-and-security-model) and [Stellar risk and security model](/vault-architecture/stellar/risk-and-security-model).
## What these controls do not cover
- **Strategy losses.** The controls limit where capital can go and how fast NAV can move. They do not stop a whitelisted protocol from losing money or being exploited.
- **Subaccount funds in an emergency.** `emergencyWithdraw` covers only assets held in the vault contract. Capital in subaccounts must be recalled first.
- **Code upgrades.** Proxy upgrades are not timelocked. Depositors rely on the ProxyAdmin multisig quorum, not on an exit window.
- **Offchain policy.** Fordefi transaction policies are enforced by Fordefi, not by the vault contract.
- **Audits.** The contracts have had 11 smart contract audits by 6 independent firms. Audits reduce risk but do not remove it. See [Audits & Risk](/resources/audits).
Yields are variable and are not guaranteed.
## Related pages
- [Risk Management Framework](/vault-architecture/risk-management-framework)
- [Risk Framework & Emergency](/curators/risk-and-emergency)
- [Smart Contract Interface](/curators/contract-interface)
- [Multi Asset Vault](/vault-architecture/multi-asset-vault)
# Risk Management Framework
> The multi-layered, defense-in-depth safeguards protecting Upshift vaults, from protocol-level constraints to emergency procedures.
Upshift's "Institutional Grade" claim is backed by a multi-layered defense-in-depth strategy. We treat risk as a dynamic variable rather than a static setting.
## Protocol-Level Safeguards
**Non-Custodial Architecture:** Neither Upshift nor the Curator can ever withdraw user funds to an external EOA. Funds can only move between whitelisted "Strategy" contracts (DeFi Protocols) and the vault smart contract.
**Withdrawal Liquidity Buffer:** A configurable percentage of assets is always held in the "Buffer" to ensure immediate redemptions without forcing a strategy unwind.
**NAV Volatility Protection:** To protect against price manipulation and oracle latency, Upshift vaults implement a Max Percentage Change constraint. This parameter enforces a strict ceiling and floor on the fluctuation of the share-to-asset ratio within a single update cycle. By capping the rate of change for the vault's NAV, the protocol effectively mitigates risks associated with faulty oracle feeds or erroneous NAV reporting. Furthermore, this mechanism eliminates "latency arbitrage" by preventing MEV snipers from exploiting temporary price discrepancies between the vault and external markets.
## Curator-Managed Guardrails
**Timelocks:** Key parameter changes go through a timelock before they take effect, so depositors have time to exit if they disagree with a change. The delay is configured per vault.
- **Timelocked:** ownership transfer, the management fee (most vaults; lending-pool vaults do not timelock it), the NAV volatility limit (`maxChangePercent`) and the withdrawal period (`lagDuration`).
To see a vault's timelock delay and any pending changes, use the [Governance endpoint](http://localhost:8765/rest-api/institutional/governance).
## Emergency Procedures
**Emergency functions:** The owner multisig can pause deposits and withdrawals at once, independently of each other. The owner can also call `emergencyWithdraw`, which pauses the vault and sends all assets held in the vault contract to an address the owner specifies. Capital deployed in subaccounts is recalled first with `withdrawFromSubaccount`. Neither action is timelocked.
# Single Asset Vault
> The ERC-4626 single-asset vault design, its subaccount custody model, key features, and roles.
Upshift V1 vaults are built on the
[ERC-4626 Tokenized Vault Standard](https://docs.openzeppelin.com/contracts/5.x/erc4626). This ensures seamless integration with the broader DeFi ecosystem. Yield is generated by capital being deployed from the ERC-4626 vault to subaccounts on Upshift's institutional infrastructure layer, where yield is realized to users in the form of increasing vault share price.
- **Asset Model:** Users deposit a single ERC-20 asset and mint an ERC-20 vault receipt token.
- **Mechanism:** Yield is reflected through the appreciation of the share price relative to the underlying asset.

## Subaccounts
Smart contract wallets with specific permissions, enabling secure strategy management. They feature Account Abstraction and are Multi-Chain across EVMs. Curators deploy funds within whitelisted contracts but cannot withdraw directly. Curators interact with multiple DeFi protocols securely, using WalletConnect. Subaccounts are deployed on multiple chains with the same address, enabling cross-chain strategies.
## Key Features & Benefits
1. Simplified User Experience: A single reference token per vault reduces complexity for users.
2. Composability for capital growth: The receipt token allows for use cases on secondary markets, such as Pendle markets where PT and YT tokens are available, or to LP the receipt token on chain, to build up secondary liquidity via Decentralized Exchanges (DEXs). Once secondary liquidity has been established the receipt token can be onboarded on DeFi lending and borrowing protocols.
3. Multi-Chain Yield Opportunities: Vaults natively support multiple chains, allowing users to benefit from diverse DeFi yield programs without the need for manual bridging.
4. Security & Permissions: Curators manage vaults but are limited by strict permissions and whitelisting controls.
5. Automated Unwinds: DeFi positions can be automatically unwound upon critical alerts detected by Hypernative, reducing risk.
## Roles
1. Vault Owner: Multisig wallet with Upshift, partner protocol and strategist that controls key vault parameters and emergency functions of the vault smart contract.
2. Vault Operator: Responsible for processing withdrawals, updating the net asset value (NAV) of the vault and moving liquidity between the vault contract and strategist subaccount.
3. Subaccount Manager (Strategist): Deploys capital and manages strategies within whitelisted contracts.
The on-chain implementation contract on Ethereum is deployed at [`0x8e91d0c719d7d1c0e6cef764c2437744763f7283`](https://etherscan.io/address/0x8e91d0c719d7d1c0e6cef764c2437744763f7283#code).
# Vault Accounting Mechanics
> How share-based accounting, the asset-to-share ratio, and yield compounding work in Upshift vaults.
Upshift vaults employ a "share-based" accounting model. The value of these shares is determined by the vault's asset-to-share ratio, also known as the "price per share" or "exchange rate".
The asset-to-share ratio (V_p) is defined as:
```
V_p = Total Underlying Assets / Total Vault Shares in Circulation
```
1. **Initial State:** When a vault is initialized, the first deposit typically sets the initial asset-to-share ratio to a simple value, often 1:1 (e.g., 1 ETH deposited receives 1 vault share).
2. **Deposit Mechanism:** When a user deposits assets:
1. The vault calculates the equivalent amount of vault shares to mint based on the current asset-to-share ratio.
2. The deposited assets are added to the vault's total underlying assets.
3. The corresponding shares are minted and transferred to the depositor. Crucially, **deposits themselves do not change the asset-to-share ratio.** They simply increase both the numerator (Total Underlying Assets) and the denominator (Total Vault Shares) proportionally.
3. **Withdrawal Mechanism:** When a user withdraws assets:
1. The vault calculates the amount of underlying assets to return based on the current asset-to-share ratio and the number of shares the user wishes to burn.
2. The shares are burned from the user's balance.
3. The underlying assets are transferred from the vault to the user. Similar to deposits, **withdrawals do not change the asset-to-share ratio**.
## Asset-to-Share Ratio Calculation
The exchange rate determines the price of shares:
- When yield accrues, Total Assets increases.
- New deposits and withdrawals update Total Shares.
- High Watermark logic prevents performance fees on previous gains.
The critical effect of yield compounding is the increase in the Total Underlying Assets in Vault while the Total Vault Shares in Circulation remains constant (excluding new deposits or withdrawals).
- **Before Yield Compounding:** Total Assets = X, Total Shares = Y, Ratio = X/Y.
- **After Yield Compounding:** Yield Earned = Z. Total Assets becomes X+Z. Total Shares remain Y.
- **New Ratio:** (X+Z)/Y > X/Y.
This increasing asset-to-share ratio means that each vault share held by a user accrues more underlying assets over time. When a user redeems their shares, they receive a larger quantity of the underlying asset than they initially deposited, reflecting the accumulated yield.
Example of user flow:
- A user deposits 1,000 USDC into a USDC-denominated vault.
- Initial state: Vault has 100,000 USDC, 100,000 shares. Ratio = 1 USDC/share.
- User receives 1,000 vault shares. Total vault: 101,000 USDC, 101,000 shares. Ratio remains 1 USDC/share.
- Over a week, the vault's strategies generate 500 USDC in yield.
- This 500 USDC is compounded back into the vault.
- New state: Vault has 101,500 USDC, 101,000 shares. New Ratio ≈ 1.00495 USDC/share.
- If the user withdraws their 1000 shares, they now receive 1000 × 1.00495 = 1004.95 USDC, demonstrating the yield earned.
# High-Level Architecture
> The relayer is a pipeline of four asyncio components connected by three bounded queues.
The service is a pipeline of four asyncio components connected by three bounded queues. A single user deposit flows left to right through them:
1. **Reader**: keeps a websocket open to Hyperliquid, subscribes to the relayer's non-funding ledger updates, and pushes raw matching messages onto `message_queue`. It never does heavy work itself, so the receive loop never blocks.
2. **Message dispatcher**: pulls messages off `message_queue` and spawns a processing task per message, bounded by a semaphore. Detected deposits are enqueued onto `bridge_queue`.
3. **Bridge worker**: pulls a batch off `bridge_queue`, bridges the aggregate amount from HyperCore to HyperEVM, marks the transfers as bridged, and forwards each transfer to `deposit_queue`.
4. **Deposit worker**: pulls a batch off `deposit_queue` and submits a single on-chain `batchDeposit` call to the vault via the Fordefi-signed `BatchDepositor`.
# End-to-End Flow
> How a single deposit travels from arrival on HyperCore through bridging and batching to final vault settlement on HyperEVM.
A single deposit travels through the system as follows:
1. **Funds arrive on HyperCore:** A user sends supported tokens to the relayer address. Hyperliquid emits a `userNonFundingLedgerUpdates` event.
2. **Reader receives and filters:** Matching messages are placed on `message_queue`.
3. **Dispatcher fans out:** Spawns a task that calls `handle_message` then `handle_non_funding_ledger_updates_data`.
4. **Address guard + per-update parsing:** The handler confirms the update is for the configured relayer address, then concurrently runs `handle_non_funding_ledger_update` for every update. That helper parses each deposit, persists a `HyperliquidRelayerDeposit` record keyed by transfer hash, and enqueues the `(transfer_hash, amount, recipient)` tuple onto `bridge_queue`.
5. **Bridge batching:** It then checks gas balances, checks the HyperCore balance covers the total, bridges the aggregate amount to HyperEVM via Fordefi, marks all transfers as `is_bridged`, and forwards each onto `deposit_queue`.
6. **Deposit batching:** Process batched transfers, checks the HyperEVM token balance covers the total, submits one `batch_deposit` transaction through `BatchDepositor` and stamps the returned `fordefi_id` onto every matching deposit row.
7. **Settlement:** The vault credits each recipient with shares. Because the deposit call does not wait for confirmation, final on-chain settlement is tracked out of band via the `fordefi_id`.
## Balance prerequisites
The relayer wallet must hold:
- enough gas on HyperEVM
- enough of the token on HyperCore to cover pending bridges
- enough of the token on HyperEVM to cover pending deposits
A failure in any of these checks will surface as a bridge or deposit batch failure.
## Recovering failed transfers
Deposits marked `is_failed = True` in the `HyperliquidRelayerDeposit` table are the authoritative list of items needing attention. After fixing the root cause, re-enqueue or replay those transfer hashes through the appropriate stage.
# HyperCore Relayer
> A long-running service that detects deposits arriving on HyperCore, bridges them to HyperEVM, and deposits them into a tokenized vault on the user's behalf.
The HyperCore Relayer is a long-running service that lets users deposit into a HyperEVM tokenized vault directly from HyperCore. A user's funds first arrive in the relayer's account on HyperCore (Hyperliquid's L1 ledger). The relayer detects that arrival in real time, bridges the funds from HyperCore to HyperEVM, and then deposits them into the destination tokenized vault on the user's behalf.
The service runs as one process per vault. HyENA Liquidity Provider Vault (HLPe) is supported by the Upshift HyperCore Relayer service. You can use it at
[app.hyena.trade/hyena/vault](https://app.hyena.trade/hyena/vault).
## Terminology
| Term | Meaning |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| HyperCore | Hyperliquid's native ledger where token balances and transfers live. Incoming user funds land here first, in the relayer's account. |
| HyperEVM | The EVM-compatible chain where the tokenized vault lives. Deposits are ultimately made here. |
| Bridge | The HyperCore to HyperEVM transfer of the relayer's own balance. This moves value across the two environments before the vault deposit can happen. |
| Tokenized vault | The destination on HyperEVM. Users receive vault shares for their deposit. |
| Relayer address / vault | The address the service watches and acts on behalf of. Signing is done through a MPC EOA wallet (Fordefi), so the service never holds raw private keys. |
| Transfer hash | The unique identifier for a single user deposit, used as the primary key throughout the pipeline and in the database. |
| Non-funding ledger update | A Hyperliquid websocket event type representing balance changes other than funding payments. Incoming deposits surface here. |
# Architecture
> The components of the Atomic Redemption Vault and how the vault contract, yield strategies, instant settlement module, and risk controls fit together.
The vault sits between the party requesting redemption and the yield strategies that hold the bulk of the capital. An instant-settlement module maintains an immediately accessible reserve, and risk controls bound every settlement.

## Requestor / Integrator
The holder or application that submits an atomic redemption request and receives the reference asset in the same transaction.
This is deliberately generic: it can be an end user redeeming directly, a payments integrator settling a transaction, or any contract that needs instant liquidity on demand.
## Atomic Vault Contract
The tokenized cash account. It holds the share-pricing logic, converts shares to reference assets against current NAV, and orchestrates the liquidity recall and payout atomically.
## Yield Strategies
Curator-managed allocations that hold the majority of vault capital in capital-efficient positions. Capital is deployed automatically when idle and recalled automatically when a redemption needs it.
## Instant Settlement Module
A liquidity layer that keeps reserves in highly liquid lending markets (Aave and Morpho) where they can be withdrawn synchronously within the settlement transaction. The module is drawn down to fund settlement and topped back up when surplus liquidity returns.
## Oracle / Risk Controls
Price feeds and guardrails (oracle price guards, per-transaction rate limits, redemption fee caps, and spread bounds) that bound every settlement and protect the vault under high-velocity redemption flow.
The on-chain implementation contract on Ethereum is at [`0x4eac314be8fec32bfe8f7189040b64e050e801ab`](https://etherscan.io/address/0x4eac314be8fec32bfe8f7189040b64e050e801ab#code).
# How It Works
> The deposit flow, the single-transaction atomic redemption flow, and the automated liquidity management that keeps the working reserve funded.
## Deposit Flow
1. The depositor sends `$Deposit` to the vault and receives share tokens minted against current NAV using ERC-4626 share math.
2. Newly deposited capital is **auto-deployed**: the vault routes idle balance into the instant-settlement module (which places it into Aave / Morpho) and into the curator's yield strategies, keeping only the working reserve liquid.
3. From this point the holder's balance earns yield continuously, with no trade-off between earning and being able to redeem.
## Atomic Redemption Flow
This is the core flow the vault is built around. Every step below executes inside a single transaction and if any step fails (insufficient liquidity, a stale oracle, a breached limit), the whole transaction reverts and no partial state is committed.
### 1. Request
The requestor calls redeem for a quantity of shares (or a target amount of `$Deposit`). No queue entry is created; the call settles or reverts in place.
### 2. Price
The vault reads the oracle and computes the `$Deposit` owed against current NAV using ERC-4626 conversion math. Oracle price guards reject the settlement if the price is stale or outside configured bounds.
### 3. Liquidity check & recall
The vault checks its working reserve against the amount owed. If the reserve is short, it recalls the shortfall on demand: it draws down from the instant-settlement module, which withdraws synchronously from the Aave / Morpho positions, and, where configured, recalls from the curator's yield strategies. Because these venues support same-transaction withdrawal, the recall completes inside the settlement call.
### 4. Risk gates
Per-transaction rate limits, redemption fee caps, and spread bounds are evaluated. A request that would exceed the configured velocity or move beyond the allowed spread is rejected rather than settled on unfavorable terms.
### 5. Settle
The shares are burned and `$Deposit` is transferred to the requestor, all atomically. A single transaction takes the holder from shares to settled `$Deposit`.
## Liquidity Management
The vault keeps a working reserve sized to absorb expected redemption velocity. Two automated processes maintain it:
- **Top-up / re-deploy:** when redemptions slow or new deposits arrive, surplus liquidity above the working reserve is redeployed into the settlement module and yield strategies so it does not sit idle.
- **Recall:** when redemptions accelerate and the reserve is drawn down, the vault pulls capital back from the settlement module (and yield strategies) automatically, with no operator action.
Both directions are driven by the vault's own logic against the reserve target. There is no manual top-up and no manual rebalancing.
# Atomic Redemption Vault
> An ERC-4626 vault with an instant-settlement module that settles redemptions atomically in a single transaction, with no withdrawal queue or pre-funded buffer.
The Atomic Redemption Vault turns a tokenized-asset vault into a real-time settlement account. Redemptions are settled instantly at the moment they are requested with no withdrawal queue, no pre-funded buffer, and no manual operator intervention. Idle capital continues to earn yield right up until the instant it is needed for settlement.
| | |
| -------------------- | ------------------------------------------------------------------------ |
| **Pattern** | ERC-4626 tokenized vault with an attached instant-settlement module |
| **Deposit Asset** | Any ERC-20 token (e.g. USDC, USDT, WETH, WBTC) |
| **Share Token** | Fungible share token issued by the vault |
| **Redemptions** | Atomic; shares converted to the reference asset and settled in one transaction |
| **Liquidity Source** | Built-in settlement module backed by Aave / Morpho lending markets |
| **Yield** | Earned on idle balances until the moment of redemption |
## The Problem
Tokenized-asset vaults conventionally impose a multi-day withdrawal queue on every redemption. A holder requests a redemption, the request enters a queue, the curator unwinds positions to raise the underlying, and the holder claims their funds days later in a separate transaction.
Any application that needs predictable, on-demand liquidity from such a vault such as payments rail, a settlement layer, a treasury sweep, or any integrator that must pay out the moment a user acts is not suited to tolerate that latency. The standard workaround is to pre-fund a separate cash buffer or credit line that fronts redemptions while the queue clears. That buffer sits idle, earns nothing, introduces counterparty risk, and has to be topped up and rebalanced by hand.
## The Solution
The Atomic Redemption Vault settles a redemption in a single transaction. When a redemption is requested, the vault converts the holder's shares to the reference asset of the vault and pays out atomically. A built-in liquidity layer guarantees that settlement capital is always available, while the remaining balance stays deployed in yield strategies. There is no request-and-wait cycle and no separate claim step: the conversion, the liquidity recall, and the payout all happen inside one atomic operation.
## Why an Atomic Redemption Vault
| | Pre-Funded Cash Buffer | Classic Vault + Queue | Atomic Redemption Vault |
| ------------------------ | ------------------------ | --------------------- | ----------------------------------- |
| **Settlement speed** | Instant (from buffer) | 1–7 day queue | ✓ Instant (from vault) |
| **Capital efficiency** | Low (cash sits idle) | High (illiquid) | ✓ High and liquid |
| **Yield on balance** | None | Yes, but locked | ✓ Yes, until moment of redemption |
| **Liquidity management** | Requires manual top-ups | Manual rebalancing | ✓ Fully automated |
| **Asset conversion** | External DEX / OTC | External DEX / OTC | ✓ Native, oracle-priced |
| **Integration** | Custom build | Custom build | ✓ Standard vault interface |
## Key Capabilities
### Instant settlement
Converts shares to reference asset and settles atomically in a single transaction. No request-and-wait cycle and no separate claim step.
### Yield until the moment of redemption
Balances earn yield in the settlement module and curator strategies until the instant they are needed. There is no trade-off between earning and liquidity.
### Always-on liquidity
The vault auto-pulls funds from the yield layer the moment settlement requires it. No operator intervention and no manual rebalancing.
### Configurable risk controls
Oracle price guards, per-transaction rate limits, redemption fee caps, and spread bounds protect the vault under high-velocity redemption flow. Each parameter is configurable per vault.
### Native, oracle-priced conversion
Shares are converted to the reference asset natively at oracle-referenced NAV, with no dependency on an external DEX or OTC desk to source the settlement asset.
### Standard vault interface
The vault exposes a standard ERC-4626 interface, so integrators connect through the same deposit / redeem surface they already use for any other vault.
# Curator Model
> How an appointed curator manages a Solana vault's yield strategy within admin-set bounds.
An appointed curator (the **operator**) manages the vault's yield strategy through three operations:
| Operation | What It Does |
| ---------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Deploy Capital** | Withdraws tokens from the vault to a shared MPC workspace. Decreases `local_aum`, increases `deployed_aum`. |
| **Return Capital** | Deposits tokens back into the vault from external strategies. Increases `local_aum`, decreases `deployed_aum`. |
| **Report Performance** | Updates `deployed_aum` to reflect the current value of externally deployed capital (gains or losses). |
The curator operates within strict bounds set by the Upshift team. A policy engine governs which protocols, contracts, and functions the curator is authorized to interact with as part of the vault's strategy. As an additional safety measure the admin sets AUM change limits, capping how much `deployed_aum` can move per update, preventing sudden NAV manipulation.
# Solana Vaults
> Native Anchor-based Upshift vaults on Solana with on-chain share pricing and instant redemptions.
Upshift Solana Vaults bring the same institutional-grade vault infrastructure to the Solana ecosystem. Built as a native Anchor program, Solana vaults offer fast, non-custodial yield generation transparently on-chain, with actively managed strategies.
| Property | Value |
| ----------------- | ----------------------------------------------- |
| **Program** | `up12bytoZBmwofqsySf2uqKQ7zpfeKiAWwfvqzJjtRt` |
| **Framework** | Anchor (v0.1.0) |
| **Deposit Asset** | Any SPL Token |
| **Share Token** | PDA-minted receipt token with on-chain metadata |
| **Redemptions** | Instant, no lock-ups |
## Vault Architecture
Each Upshift Solana vault is deployed as an instance of the `august_vault` program. A vault is initialized with three roles (**admin**, **operator**, and **fee recipient**), and is bound to a single SPL deposit token (e.g. USDC). On initialization, the program creates:
* A **VaultState** PDA that stores all vault configuration and accounting
* A **share mint** PDA used to mint receipt tokens to depositors
* A **vault token ATA** PDA that holds the vault's deposit token balance
## Deposit Flow
1. User calls `deposit(amount)` with their SPL tokens
2. The vault transfers tokens from the user's account to the vault token ATA
3. Share tokens are minted to the user proportional to the current NAV:
```text
shares_minted = deposit_amount * total_share_supply / total_AUM
```
4. `local_aum` increases by the deposit amount
5. A `DepositEvt` is emitted with `caller`, `receiver`, `amount`, and `shares`
## Redemption Flow
1. User calls `redeem(shares)` with the number of share tokens to burn
2. The vault calculates the underlying token amount based on current NAV:
```text
tokens_returned = shares * total_AUM / total_share_supply
```
3. If a withdrawal fee is configured, the fee portion (in bps) is routed to the `fee_recipient`
4. Share tokens are burned and underlying tokens are transferred to the user
5. `local_aum` decreases by the redeemed amount
6. A `WithdrawEvt` is emitted with `caller`, `receiver`, `owner`, `assets`, and `shares`
## Share Price Derivation
The share token price is fully derivable on-chain:
```text
share_price = (local_aum + deployed_aum) / total_share_supply
```
* **`local_aum`** — tokens held directly in the vault's token ATA. Fully verifiable on-chain.
* **`deployed_aum`** — value of tokens deployed in external strategies, reported by the operator via `operator_update_aum`.
* **`total_share_supply`** — readable from the share mint account.
Any Solana program can compute the share price by reading the VaultState account and the share mint. No external oracle is required.
The Upshift Solana program is open source at the `fractal-protocol/solana-upshift-vault-programs` repository on GitHub.
# Risk and Security Model
> The safety mechanisms built into Upshift Solana vaults, from AUM change limits to pause controls and admin transfer safety.
## AUM Change Limits
The vault enforces asymmetric increase and decrease limits on `deployed_aum` updates. These are set by the admin in basis points via `set_aum_limits(increase_limit, decrease_limit)`.
* **Increase limit** — caps how much `deployed_aum` can grow in a single `operator_update_aum` call
* **Decrease limit** — caps how much `deployed_aum` can fall in a single update (typically set tighter than the increase limit)
This prevents sudden, large NAV swings, whether from operator error or attempted manipulation. The IDL enforces a maximum value via the `AumLimitTooHigh` error.
## Pause Mechanism
The admin can instantly pause all vault operations via `pause()`. When paused:
* `deposit` and `redeem` calls revert with `VaultPaused`
* Operator functions continue to work (the curator can still manage deployed capital)
* The admin can unpause at any time via `unpause()`
This provides a circuit breaker in case of an exploit, market event, or strategy issue.
## Admin Transfer Safety
Admin role transfers use a two-step nomination process:
1. Current admin calls `nominate_admin(new_admin)`. This creates a `NominatedAdmin` PDA with the nominee and an expiry timestamp
2. Nominated admin calls `accept_admin_nomination()`. Must be called before expiry
This prevents accidental or malicious ownership changes. If the nomination expires, it must be re-issued. The `NominatedAdmin` PDA is closed upon acceptance.
## Audit History
Built on the same architecture as Upshift's EVM vaults that secure $400M+ in TVL. Audited 3x in the past 12 months. A separate audit has been conducted for the Solana contracts and can be found [here](/resources/audits).
# Curator Model
> How an appointed curator moves Stellar vault capital across whitelisted Strategy and EOA subaccounts within admin-set bounds.
An appointed curator (the **operator**) manages the vault's yield strategy by moving capital into and out of a whitelisted set of subaccounts. Each subaccount has one of two types, registered at the time it is added:
| Subaccount Type | Custody Model | NAV Accounting |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Strategy** | Another Soroban contract that implements the vault's `IStrategy` interface (`deposit`, `withdraw`, `get_balance`, `get_local_balance`, `get_asset`) | Self-reports the full position (idle + deployed) on every NAV calculation via `get_balance()` |
| **EOA** | An MPC-controlled address (via Fordefi) | Vault-controlled tracker (`WalletNetDeployed`) maintained per-wallet and aggregated as `deployed_assets` |
The operator interacts with subaccounts through the following entrypoints:
| Operation | What It Does |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `deposit_to_subaccount` | Transfers tokens from the vault to a subaccount. For Strategy targets, also calls `IStrategy::deposit` so the strategy knows tokens have arrived. For EOA targets, increments `WalletNetDeployed` and the aggregate `deployed_assets`. |
| `withdraw_from_subaccount` | Pulls tokens back. For Strategy targets, calls `IStrategy::withdraw` (push model). For EOA targets, pulls via SEP-41 `transfer_from` (the wallet owner must have pre-approved the vault as spender), then decrements the tracker and the aggregate. |
| `update_wallet_deployed` | Reconciles a single Wallet subaccount's attributed value, used to recognize gains, losses, or external dust. Moves the per-wallet tracker and the aggregate `deployed_assets` in lockstep. |
| `update_wallet_deployed_batch` | Reconciles multiple Wallet subaccounts atomically. The per-call AUM rate limit is applied to the net delta, so a batch with offsetting moves (+100k on A, −100k on B) passes the limiter. |
| `update_deployed_assets` | Aggregate-only emergency reconciliation. Documented as deprecated for routine use after the introduction of per-wallet attribution. |
Subaccount membership is controlled by the admin via `add_subaccount` and `remove_subaccount`. The admin is a multi-sig address with a signer quorum involving all parties of the Upshift vault. The whitelist is capped at 10 entries.
The curator operates within strict bounds set by the Upshift team. A policy engine governs which protocols, contracts, and functions the curator is authorized to interact with as part of the vault's strategy. As an additional safety measure the admin sets AUM change limits, capping how much `deployed_assets` can move per update and per rolling window, preventing sudden NAV manipulation.
# Stellar Vaults
> Native Soroban Upshift vaults on Stellar built on OpenZeppelin's stellar-tokens library with ERC-4626 share pricing.
Upshift Stellar Vaults bring the same institutional-grade vault infrastructure to the Stellar ecosystem. Built as a native Soroban smart contract on top of OpenZeppelin's stellar-tokens library, Stellar vaults offer fast, non-custodial yield generation transparently on-chain, with actively managed strategies.
| Property | Value |
| ----------------- | ------------------------------------------------------------ |
| **Contract** | `AugustVault` (upgradeable Soroban contract) |
| **Framework** | Soroban + OpenZeppelin stellar-tokens (ERC-4626 pattern) |
| **Deposit Asset** | Any SEP-41 token (native SAC or custom contract) |
| **Share Token** | Fungible share token issued by the vault contract itself |
| **Redemptions** | Instant, no lock-ups (bounded by the vault's local balance) |
## Vault Architecture
Each Upshift Stellar vault is a deployment of the `AugustVault` Soroban contract. The constructor binds the vault to a single underlying token, sets the share token's name and symbol, and fixes a virtual decimals offset (used for inflation-attack protection).
The contract follows the ERC-4626 Tokenized Vault Standard. Share-pricing logic is reimplemented on top of OpenZeppelin's primitives so that NAV reflects not only the tokens physically held by the vault but also capital that has been deployed off-vault: `total_assets`, `convert_to_shares`, `convert_to_assets`, all four `preview_*` functions, and `max_deposit` / `max_mint` / `max_withdraw` / `max_redeem`.
On deployment the contract initializes:
* Vault instance storage holding the asset address, share-token metadata, decimals offset, admin, operator, paused flag, deployed-assets aggregate, AUM limits, and the subaccount whitelist
* The share token issued by the vault itself (the same contract that custodies the underlying asset is also the share issuer)
* An on-chain TTL bump on every state-changing entrypoint so the instance never expires under normal traffic; a permissionless `extend_ttl()` is provided as a fallback for quiet periods
## Deposit Flow
1. User calls `deposit(assets, receiver, from, operator)` with their underlying tokens
2. The operator (the address authorizing the deposit) is `require_auth`'d and the vault verifies it is not paused
3. The vault converts the asset amount to shares against current NAV using ERC-4626 math with the configured decimals offset:
```text
shares_minted = assets * (total_supply + 10^offset) / (total_assets + 1)
```
4. The underlying tokens are pulled from `from` into the vault's contract balance, share tokens are minted to `receiver`, and the contract's instance TTL is extended
5. A standard ERC-4626 `Deposit` event is emitted
`mint(shares, receiver, from, operator)` is the symmetric entrypoint: callers specify exact shares to mint and the vault computes the assets required (rounding up).
## Redemption Flow
1. User calls `redeem(shares, receiver, owner, operator)` or `withdraw(assets, receiver, owner, operator)`
2. The operator is authorized and the vault verifies it is not paused
3. The vault computes the asset payout against current NAV:
```text
assets_out = shares * (total_assets + 1) / (total_supply + 10^offset)
```
4. The redemption is capped at the vault's local token balance — `max_withdraw` and `max_redeem` are the minimum of the user's entitlement and the assets physically present in the vault. If the user's pro-rata share exceeds what's currently liquid, they must wait for the operator to return capital
5. Share tokens are burned from `owner` and the underlying is transferred to `receiver`
A standard ERC-4626 `Withdraw` event is emitted.
## Vault Share Price Mechanics
The share token price is fully derivable on-chain:
```text
share_price = total_assets / total_supply
total_assets = local_balance
+ Σ IStrategy::get_balance() over all Strategy subaccounts
+ deployed_assets
```
* **`local_balance`** — the vault contract's own balance of the underlying token. Fully verifiable on-chain via a direct `token.balance(vault)` read
* **`Σ get_balance()`** — each Strategy subaccount self-reports its full position (idle + deployed) on every NAV query. A strategy that traps, returns a non-i128, or returns a negative value causes the vault to halt the calculation with a `StrategyUnreachable` (or `NegativeStrategyBalance`) error rather than silently zero out — under-reporting NAV would let a buggy strategy crash the share price
* **`deployed_assets`** — the aggregate of capital attributed to Wallet subaccounts (the value the operator has moved off-vault to addresses whose balances the vault cannot trustlessly read). The invariant `Σ WalletNetDeployed == deployed_assets` is maintained by every routine path; `get_wallet_deployed_assets()` exposes the Σ side for monitoring
* **`total_supply`** — the share token's supply, readable directly from the vault contract
Any Soroban contract can compute the share price by calling `total_assets()` and `total_supply()` on the vault. No external oracle is required.
The vault uses ERC-4626's virtual-shares-and-virtual-assets formula with a configurable decimals offset (minimum 3, maximum 10, default 6).
The Upshift Stellar contracts are open source at the `upshift-protocol/stellar-upshift-vault-contracts` repository on GitHub.
# Risk and Security Model
> The safety mechanisms built into Upshift Stellar vaults, from layered AUM rate limits to pause controls, admin transfer safety, and the wallet-attribution invariant.
## AUM Change Limits
The vault enforces both per-call and cumulative-window rate limits on every move of `deployed_assets`. Limits are asymmetric (increases and decreases are configured separately), denominated in basis points of the pre-move `deployed_assets`, and applied by the same shared helper used by every aggregate-mutating function (`update_deployed_assets`, `update_wallet_deployed`, `update_wallet_deployed_batch`, and `remove_wallet_and_reconcile`).
* **Per-call limits**: `set_aum_limits(increase_bps, decrease_bps)` caps how much `deployed_assets` can change in a single call. Decreases are typically configured tighter than increases
* **Cumulative window limits**: `set_aum_window_limits(window_duration, cumulative_increase_bps, cumulative_decrease_bps)` caps the sum of changes within a fixed tumbling window (minimum 1 hour, maximum 7 days; default 24 hours). The window resets entirely on expiry, and changing limits resets it immediately so stale counters never interact with new configuration. Cumulative limits are measured against a `base_deployed` snapshot captured at window start, not the live value
* **Zero-boundary behavior**: when `deployed_assets == 0`, percentage-based limits are undefined and skipped. The admin controls risk at this boundary through operator key management and the subaccount whitelist
Calls that exceed the per-call limit revert with `AumChangeExceedsLimit`; calls that exceed the cumulative limit revert with `AumCumulativeChangeExceedsLimit`.
## Pause Mechanism
The admin can instantly halt user-facing operations via `pause()`. While paused:
* `deposit`, `mint`, `withdraw`, and `redeem` all revert; `max_deposit`, `max_mint`, `max_withdraw`, and `max_redeem` all return 0
* `add_subaccount` reverts (no new strategies or wallets can be onboarded mid-incident)
* Operator increases to `deployed_assets` (and any per-wallet tracker increase, including a single positive entry inside an otherwise net-negative `update_wallet_deployed_batch`) revert with `VaultPaused`. Decreases remain permitted so the operator can recognize losses and pull capital back
* `withdraw_from_subaccount` continues to operate so the curator can return capital
* The admin can unpause at any time via `unpause()`
The asymmetry is deliberate: a pause must not let a compromised operator inflate share prices by booking phantom gains, but it must still allow loss recognition and capital recovery during an emergency.
## Admin Transfer Safety
Admin role transfers use a two-step nomination process with an explicit deadline:
1. Current admin calls `propose_admin(new_admin, deadline)`. This records a pending nominee and an absolute ledger-timestamp expiry
2. Nominated admin calls `accept_admin()`. The pending nominee must `require_auth` and the call must arrive before the deadline
If the nomination expires (`AdminProposalExpired`) it must be re-issued. The current admin can cancel a pending proposal at any time via `cancel_admin_proposal`. Self-nominations (`new_admin == admin`) and zero/past deadlines are rejected at proposal time. This prevents accidental or malicious ownership changes; the deadline also prevents a long-lived pending nomination from being exploited later.
Operator changes are a single-step admin action via `set_operator`.
## Wallet-Attribution Invariant
For Wallet subaccounts the vault maintains a per-wallet `WalletNetDeployed` tracker that is moved in lockstep with the aggregate `deployed_assets` on every routine operator action.
```text
Σ WalletNetDeployed[w] == deployed_assets
```
The invariant is enforced by `deposit_to_subaccount`, `withdraw_from_subaccount`, `update_wallet_deployed`, `update_wallet_deployed_batch`, and `remove_wallet_and_reconcile`. The vault also enforces a per-wallet over-pull guard: `withdraw_from_subaccount` rejects pulls that exceed the wallet's tracker (`WalletOverWithdraw`), so an operator cannot silently consume another wallet's share of `deployed_assets` while informally recognizing a gain or recovering dust.
Two escape hatches can break the invariant by design — `update_deployed_assets` (aggregate-only) and `seed_wallet_net_deployed` (per-wallet, admin-only, with a `WalletSeedBelowTracker` guard that prevents zeroing a tracker without a matching aggregate write-down). Both are reserved for emergency storage corrections; off-chain monitoring compares `get_deployed_assets()` against `get_wallet_deployed_assets()` and alerts on divergence.
## Contract Upgradeability
The vault implements OpenZeppelin's `UpgradeableInternal` trait, gated on `require_admin`.
## Audit History
A separate audit has been conducted for the Stellar contracts and is available [here](/resources/audits).
---
# Curators
# Smart Contract Interface
> Every vault contract function that touches curator workflows, grouped by job, with the role that calls it.
Every function on the vault contract that touches curator workflows, grouped by job, with the role that calls it.
Admin functions are gated to the owner multisig or operator; attempting them from a curator-managed address reverts.
## Capital Movement (Vault ↔ Subaccount)
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `depositToSubaccount(uint256 amount, address subAccountAddr)` | Operator | Transfers vault assets to a whitelisted subaccount. This is the only road capital takes toward the curator's strategy. |
| `withdrawFromSubaccount(uint256 amount, address subAccountAddr)` | Operator | Pulls assets from the subaccount back into the vault — used to refill the buffer and fund epoch settlements. |
## NAV and Accounting
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `updateTotalAssets(uint256 externalAssetsAmount)` | Operator | Syncs the vault's internal accounting with the externally calculated value of deployed positions. This is what moves the share price. Bounded by the max-percentage-change guardrail (see [Risk Framework & Emergency](/curators/risk-and-emergency)). |
| `updateMaxChangePercent(uint256 newValue)` | Owner | Sets the ceiling/floor on share-price movement per update cycle (NAV volatility protection). |
| `totalAssets()`, `totalSupply()` | Anyone (view) | Current accounting state; share price = `totalAssets / totalSupply`. |
## Redemption Processing
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `processAllClaimsByDate(uint256 year, uint256 month, uint256 day, uint256 maxLimit)` | Anyone | Batch-settles all scheduled redemptions for a given epoch date. |
| `updateTimelockDuration(uint256 newDuration)` | Owner | Changes the lag between `requestRedeem` and `claim`. Goes through the vault's timelock. |
| `getWithdrawalEpoch()` | Anyone (view) | Current epoch boundaries — poll this to plan unwinds. |
## Fee Management
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `chargeManagementFee()` | Operator | Triggers fee accrual against TVL. Emits `ManagementFeeCharged(uint256)`. |
| `collectFees()` | Operator | Sweeps accrued fees to the fee collector address. |
| `updateManagementFee(uint256 newManagementFeePercent)` | Owner | Set per vault; changes go through the vault's timelock. |
| `updateWithdrawalFee(uint256 newWithdrawalFee)` | Owner | Standard withdrawal fee percentage. |
| `updateInstantRedemptionFee(uint256 newFee)` | Owner | Fee charged on the `instantRedeem` path. |
| `updateFeeCollector(address newFeeCollectorAddr)` | Owner | Where collected fees land. |
## Limits, Pausing, and Emergency
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `updateIssuanceLimits(uint256 maxDeposit, uint256 maxWithdrawal, uint256 maxSupply)` | Owner | Caps on deposits, withdrawals, and total share supply — the lever for capacity management. |
| `pauseDepositsAndWithdrawals(bool bPauseDeposits, bool bPauseWithdrawals)` | Owner | Pause/resume either side independently. Emits `DepositWithdrawalStatusChanged`. |
| `emergencyWithdraw(IERC20 token, address destinationAddr)` | Owner | Emergency sweep of tokens to a safe destination. |
## User-facing Functions
Curators rarely call these, but depositor behavior drives liquidity planning, so the flows must be understood:
| Function | Caller | Purpose and notes |
| --- | --- | --- |
| `deposit(uint256 assets, address receiver)` | User/custodian | Deposit underlying assets; returns shares minted. |
| `requestRedeem(uint256 shares, address receiverAddr, address holderAddr)` | User/custodian | Starts the epoch redemption flow; returns assets owed and the claimable epoch. |
| `claim(uint256 year, uint256 month, uint256 day, address receiverAddr)` | Anyone (for the registered receiver) | Completes a matured redemption; returns `assetsClaimed` and `sharesBurned`. |
| `instantRedeem(uint256 shares, address receiverAddr, address holderAddr)` | User/custodian | Immediate exit, fee applies, served from the buffer. |
| `previewDeposit`, `previewRedeem`, `previewInstantRedemption` | Anyone (view) | Simulation surfaces for frontends and reconciliation. |
# Accounting, Fees & Fund Flows
> How share-based accounting and NAV reporting work, the vault fee schedule, and how capital flows from deposit to strategy and back through redemptions.
## Share Accounting and NAV Reporting
Upshift vaults use share-based accounting: `price per share = total underlying assets ÷ total shares in circulation`. Deposits mint shares at the current ratio and withdrawals burn at the current ratio, so neither impacts the vault share price.
Example:
1. A vault holds 100,000 USDC against 100,000 shares (ratio 1.0)
2. A user deposits 1,000 USDC and receives 1,000 shares — ratio unchanged.
3. The strategy then earns 500 USDC over a week; assets become 101,500 against 101,000 shares, so the ratio rises to ≈1.00495.
4. Redeeming 1,000 shares now returns ≈1,004.95 USDC.
### What curators must respect when reporting NAV
- **Max percentage change:** each NAV update is bounded by a strict ceiling and floor on the share-price move per cycle. This caps damage from faulty oracles or erroneous reports and kills latency arbitrage by MEV snipers. Plan large markups/markdowns across multiple cycles.
- **High watermark:** performance fees only accrue above the previous peak share price.
- **Validation:** in the Fordefi model the strategist proposes NAV and Upshift's pricing engine validates it; in the subaccount model Upshift computes NAV directly from whitelisted integrations, options mark-to-market, and CeFi APIs.
## Fees
| Fee | Mechanics |
| --- | --- |
| Management fee | Accrued against TVL via `chargeManagementFee()`. Set per vault; changes behind 24h timelock. |
| Performance fee | Taken on yield above the high watermark. |
| Instant redemption fee | Premium for bypassing the epoch queue. |
## Fund Flows
### Fund Flow: From Deposit to Strategy
A deposit travels end-to-end from the depositor through the vault contract to the curator's strategy: the deposit and share mint (and the liquidity buffer hold-back) happen on the vault contract, then the deployed capital sits on the subaccount and feeds back through NAV reporting. Two properties matter to curators: deposits and withdrawals never change the share price (only yield does), and capital reaches the curator only after the operator pushes it with `depositToSubaccount()`.

The liquidity buffer is a configurable percentage held back in the vault so instant redemptions never force a strategy unwind. Curators should treat deployable capital as TVL minus buffer minus pending redemptions, not raw TVL.
### Fund Flow: Redemptions
Redemptions follow one of two paths. The standard path is epoch-based: `requestRedeem()` queues the request and returns a claimable epoch; the operator settles the epoch in batch; the holder (or anyone, on their behalf) calls `claim()`. The instant path (`instantRedeem()`) bypasses the queue for a fee and is served from the liquidity buffer.

#### Curator obligations around redemptions
1. Monitor the pending-redemption book for each upcoming epoch. Upshift offers API endpoints and a curator-specific dashboard for easier management of vault liquidity.
2. Return capital with enough lead time for the operator to call `withdrawFromSubaccount()`.
3. Size the buffer to absorb expected instant-redemption volume.
# Key Management & Execution
> The two custody and execution models curators can run a vault on — the Upshift Subaccount smart-contract wallet and Fordefi MPC.
When curators launch a vault, they choose how capital is held and how it is executed. Upshift supports two models. Both key management and execution engines follow the same safety model: non-custodial by construction, policy-gated execution, and independent NAV validation.
The difference is the operational style that fits the curator's needs.

## Upshift Subaccount (smart-contract wallet)
A smart-contract wallet deployed by Upshift and owned by the vault. The curator receives a trader role and executes against a whitelisted set of protocols and tokens. The same address works across EVM chains, with built-in swap and bridging modules. Upshift calculates NAV across spot, DeFi, perps, and options. Whitelist policies are on-chain, cryptographically enforced and verifiable.
## Fordefi (MPC)
A shared MPC workspace operated jointly with Upshift, governed by transaction-level policy controls. Curators propose NAV updates that Upshift's pricing engine validates. This suits curators who prefer an MPC key-management and signing workflow. Fordefi policies are maintained off-chain.
## Comparison
| Dimension | Upshift Subaccount | Fordefi (MPC) |
| --- | --- | --- |
| What it is | A smart-contract wallet deployed by Upshift, owned by the vault. You receive a trader/strategist role. | A shared MPC workspace operated jointly with Upshift, governed by transaction policies. You propose and execute through it. |
| Best for | Strategies that live on and off-chain and benefit from native cross-chain execution and the full prime-brokerage surface of Upshift's institutional infrastructure layer. Integrations with CeFi. | Curators who want MPC key management and a familiar institutional signing workflow. |
| Execution surface | Whitelisted protocols and tokens; swap module and bridge module (LayerZero / Stargate, Chainlink CCIP); same address across EVM chains. | Policy-gated transactions across approved venues. |
| Custody control | Non-custodial by design; funds can only move between whitelisted strategy contracts and the vault, never to an external wallet. | MPC threshold signing with off-chain policy controls. |
| NAV | Upshift calculates NAV across spot, DeFi, perps, and options. | Curator proposes NAV updates; Upshift's pricing engine validates them. |
# Upshift for Curators
> What curators do on Upshift, how roles and permissions are separated, and why to curate a vault here.
A curator (also called a strategist) is a KYC'd institutional yield manager appointed to run a vault's strategy, deploying vault capital into DeFi and CeFi venues. They operate inside hard, smart-contract-enforced boundaries: a curator can never withdraw user funds to an external address, while capital only moves between the vault contract, its dedicated subaccount, and whitelisted strategy contracts.
In practice, the curator's job has four recurring components:
- **Strategy execution:** deploying and rebalancing capital across whitelisted protocols, within the mandate defined by the vault's policy engine.
- **Performance reporting:** NAV reporting.
- **Liquidity management:** keeping the withdrawal buffer funded and unwinding positions ahead of redemption epochs.
- **Risk ownership:** monitoring venue, oracle, and counterparty risk for every position; reacting to Hypernative alerts and emergency procedures.
## Curator Responsibilities
**The curator owns:**
- Strategy design and capital allocation within the approved whitelist.
- Risk and exposure management for the strategy.
- Executing trades and deployments through the chosen custody model.
- Maintaining the withdrawal liquidity buffer to always process redemptions in a timely manner.
- Reporting NAV.
**Upshift owns:**
- Vault smart contracts, share accounting, and audits.
- The policy engine and whitelisting enforcement.
- NAV validation and pricing.
- Deposits, redemptions, and fee mechanics.
- Institutional LP distribution and prime-brokerage rails.
## Roles and Permissions
Every Upshift vault separates governance, operations, and strategy execution into distinct roles. The separation is the core security claim: no single party can both move user funds and change the rules.
### Vault Owner
A secure multisig shared between Upshift, the curator and the partner protocol (e.g. 4-of-6). It governs the parameters that define the vault itself, so no individual party can quietly alter the vault's economics or risk settings.
- Sets management and performance fees, issuance limits, and the timelock duration
- Controls emergency functions: pausing deposits/withdrawals and sweeping funds to safety
- Management fee and withdrawal-period changes sit behind a timelock, with the delay configured per vault, so depositors can exit before they take effect
### Vault Operator
An institutional-grade MPC wallet handles the day-to-day mechanics of keeping a vault running. The operator can move capital between the vault and the subaccount, but never outside that perimeter.
- Processes withdrawal requests as redemption epochs mature
- Updates the vault's NAV by syncing total assets with the externally calculated value of deployed positions
- Moves liquidity between the vault contract and the strategist's subaccount
- Charges and collects fees
### Curator
A KYC'd institutional yield manager holding the trader role on the vault's dedicated subaccount.
- Deploys capital and manages the strategy, only within contracts, tokens, and functions whitelisted by the policy engine
- Has no access to vault admin functions
## The flexibility you get with Upshift
- **Curator picks the custody model.** Run on a subaccount in Upshift's institutional infrastructure layer or via Fordefi MPC, whichever matches how your strategy and team operate.
- **Single or multi-asset EVM vaults.**
- [V1 vaults](/vault-architecture/single-asset-vault) accept a single asset.
- [V2 vaults](/vault-architecture/multi-asset-vault) accept a basket of deposit assets (e.g. USDC, USDT, PYUSD) with a single reference asset for redemptions.
- **Curators can build vaults on** [**Solana**](/vault-architecture/solana) **and** [**Stellar**](/vault-architecture/stellar)**.**
- **Curators define the strategy and the structure of the vault.**
- **On-chain fees.** Management and performance fees are set per vault, configured on the smart contract and charged all on-chain.
- **Fully configurable risk controls.** Withdrawal liquidity buffer, NAV volatility limits, and timelocks are set per vault to match the strategy's liquidity and risk profile.
- **Multi-chain reach.** Deploy the same strategy across EVM chains, Solana and Stellar without standing up new infrastructure each time.
## Why curate on Upshift
The reason to curate a vault on Upshift is that the curator inherits a deep stack consisting of:
- **Institutional distribution from day one.** Upshift vaults get access to the $500M+ institutional LP network (asset managers, family offices, trading desks, and treasuries) of Upshift's institutional infrastructure layer.
- **Prime-brokerage access.** Through the prime brokerage of Upshift's institutional infrastructure layer (\~$7bn monthly volume), curators can tap credit lines, cross-margin across DeFi and CeFi, OTC options and lending, and recognition of vault receipt tokens as collateral.
- **Trust and safety.** Contracts audited multiple times, a policy engine that prevents misappropriation, independent NAV validation, and automated risk monitoring. See [Audits & Risk](/resources/audits).
- **Faster time to launch.** No contract development, no security program, no distribution build-out. Configure a vault, pick a custody model, and start deploying.
## Get Started
For new curators, it is highly recommended to review the concepts outlined next — starting with the [vault offering](/vault-architecture/overview) and [vault accounting mechanics](/vault-architecture/vault-accounting-mechanics) — for building an in-depth understanding of Upshift vault mechanics and capabilities.
The [smart contract interface reference](/curators/contract-interface) lists all smart contract functions.
# Risk Framework & Emergency
> The layered guardrails that constrain curator activity and the emergency unwind sequence when something goes wrong.
## Risk Framework and Guardrails
Risk controls are layered; curators should know which constraints are contract-enforced and which are process-enforced.
| Guardrail | What it does | Enforced by |
| --- | --- | --- |
| Non-custodial perimeter | Neither Upshift nor the curator can move funds to an external EOA; transfers limited to vault ↔ subaccount ↔ whitelisted strategy contracts. | Smart contract |
| Policy engine | Whitelists the exact protocols, contracts, and functions a curator may call. | Subaccount layer |
| Liquidity buffer | Configurable % of assets held in-vault for instant redemptions; no forced unwinds. | Contract + ops |
| NAV volatility protection | Max percentage change per update cycle; mitigates bad oracles, erroneous NAV, and MEV/latency arbitrage. | Smart contract |
| Timelocks | Delay configured per vault on management fee, withdrawal-period, NAV-limit and ownership changes; users can exit before they take effect. | Smart contract |
| Hypernative monitoring | Automated unwinds on critical alerts. | Integration |
| Emergency functions | Multisig can instantly pause deposits/withdrawals and pull all strategy funds back into the vault. | Owner multisig |
## Emergency & Unwind
On critical alerts — an exploit on a whitelisted venue, an oracle failure, a depeg — the response sequence is:
1. **Automated unwind.** Hypernative may auto-unwind affected DeFi positions on critical alerts.
2. **Curator unwind.** The curator unwinds remaining exposure and returns capital to the subaccount.
3. **Recall.** The operator pulls funds back into the vault with `withdrawFromSubaccount`.
4. **Lockdown.** The owner multisig can pause deposits/withdrawals (`pauseDepositsAndWithdrawals`) and, if needed, sweep with `emergencyWithdraw` to a safe destination.
### Events to monitor
- `OnEmergencyWithdraw` events
- `DepositWithdrawalStatusChanged` events (Pause/Resume)
- Hypernative critical alerts on any whitelisted venue
---
# Build
# ABI Functions
> Contract ABIs bundled with the Upshift SDK — vaults, receipt tokens, the swap router, loans, rewards, and the infrastructure contracts the SDK reads.
The SDK ships every ABI it uses as an `as const` array, so you can call the same contracts directly with ethers or viem and keep full type inference. All of them are exported from the package root with the `ABI_` prefix; the one exception is `RWA_REDEEM_SUBACCOUNT`. The complete type dump of each ABI is on the [ABIs reference page](/sdk/reference/abis). This page groups them by purpose and lists the functions integrators actually call.
## Typed contracts with `createContract`
`createContract` wraps `ethers.Contract` with address validation and infers the method surface from the ABI. It returns `undefined` when the address fails validation, so check the result before calling.
```typescript
import { createContract, ABI_TOKENIZED_VAULT_V2 } from '@upshiftfinance/sdk';
const vault = createContract({
address: '0x...',
abi: ABI_TOKENIZED_VAULT_V2,
provider,
});
if (!vault) throw new Error('Invalid vault address');
const sharePrice = await vault.getSharePrice();
```
## Which ABI does my vault use?
| Vault generation | ABI | Deposit | Redemption |
| --- | --- | --- | --- |
| EVM-1 lending pool — single asset, the pool is the share token | `ABI_LENDING_POOLS`, `ABI_LENDING_POOL_V2`, `ABI_LENDING_POOL_V3` | `deposit(uint256 assets, address receiver)` | `requestRedeem` queues, `claim` after the lag period; V3 adds `instantRedeem` |
| EVM-2 tokenized vault — multi-asset, separate receipt token | `ABI_TOKENIZED_VAULT_V2` and its variants | `deposit(address assetIn, uint256 amountIn, address receiverAddr)` | `requestRedeem` queues, `claim` after the lag period; `instantRedeem` where enabled |
The SDK's `vaultDeposit` and `vaultRequestRedeem` detect the generation and pick the ABI for you (see [EVM Actions](/sdk/evm-actions)). Reach for these ABIs directly only when you need a call the SDK does not wrap.
## Vault ABIs
### ABI_LENDING_POOLS, ABI_LENDING_POOL_V2, ABI_LENDING_POOL_V3
EVM-1 lending pools. The pool contract is also the share token, so `balanceOf(address)` returns shares. V1 and V2 share the same integrator surface (V2 adds an admin function); V3 adds instant redemption, management fees, and subaccount deposits.
```typescript
import { ABI_LENDING_POOL_V2, ABI_LENDING_POOL_V3 } from '@upshiftfinance/sdk';
```
Deposits and redemptions:
- `deposit(uint256 assets, address receiver)` — deposit the underlying asset and mint shares to `receiver`
- `mint(uint256 shares, address receiver)`
- `requestRedeem(uint256 shares, address receiverAddr, address holderAddr)` — queue a redemption of `holderAddr`'s shares, paid to `receiverAddr` after the lag period
- `claim(uint256 year, uint256 month, uint256 day, address receiverAddr)` — claim the redemption scheduled for that date
- `redeem(uint256, address, address)` and `withdraw(uint256, address, address)` — the ERC-4626 entry points
- `instantRedeem(uint256 shares, address receiverAddr, address holderAddr)` — V3 only, charged `instantRedemptionFee()`
Reads:
- `asset()`, `totalAssets()`, `convertToShares(uint256 assets)`, `convertToAssets(uint256 shares)`
- `previewDeposit(uint256 assets)`, `previewRedeem(uint256 shares)`, and on V3 `previewInstantRedemption(uint256 shares)`
- `maxDeposit(address)`, `maxDepositAmount()`, `maxWithdrawalAmount()`
- `getWithdrawalEpoch()`, `lagDuration()` — when queued redemptions settle
- `getRequirementByDate(year, month, day)`, `getScheduledTransactionsByDate(year, month, day)`, `getClaimableAmountByReceiver(year, month, day, receiverAddr)`, `getBurnableAmountByReceiver(year, month, day, receiverAddr)`
- `depositsPaused()`, `withdrawalsPaused()`, `withdrawalFee()`
- V3: `managementFeePercent()`, `externalAssets()`, `assetsUpdatedOn()`
**Example**
```typescript
import { ethers } from 'ethers';
import { ABI_LENDING_POOL_V2 } from '@upshiftfinance/sdk';
const vault = new ethers.Contract('0xVaultAddress...', ABI_LENDING_POOL_V2, provider);
const [totalAssets, assetAddress, decimals, lag] = await Promise.all([
vault.totalAssets(),
vault.asset(),
vault.decimals(),
vault.lagDuration(),
]);
console.log(`TVL: ${ethers.formatUnits(totalAssets, decimals)}`);
console.log('Asset:', assetAddress, 'redemption lag:', lag.toString());
```
### ABI_TOKENIZED_VAULT_V2
EVM-2 tokenized vaults: deposits in any whitelisted asset, priced against a reference asset; shares issued as a separate receipt token (`lpTokenAddress()`); instant or queued redemption.
```typescript
import { ABI_TOKENIZED_VAULT_V2 } from '@upshiftfinance/sdk';
```
Two variants carry the same base surface:
- `ABI_TOKENIZED_VAULT_V2_DEPOSIT_WITH_PERMIT` adds `depositWithPermit(...)` — an EIP-2612 permit-based deposit (asset, amount, receiver, deadline, `r`, `s`, `v`) that skips the separate `approve` transaction.
- `ABI_TOKENIZED_VAULT_V2_WHITELISTED_ALLOCATION` is the permit variant with per-depositor allocation caps enforced through the sender whitelist.
Deposits and redemptions:
- `deposit(address assetIn, uint256 amountIn, address receiverAddr)` — deposit any whitelisted asset
- `previewDeposit(address assetIn, uint256 amountIn)` — shares a deposit would mint
- `requestRedeem(uint256 shares, address receiverAddr)` — queue a redemption
- `instantRedeem(uint256 shares, address receiverAddr)` — settle now, charged `instantRedemptionFee()`
- `previewRedemption(uint256 shares, bool isInstant)` — payout for either path
- `claim(uint256 year, uint256 month, uint256 day, address receiverAddr)` — claim a processed queued redemption
Reads:
- `getSharePrice()`, `getTotalAssets()`, `asset()`, `lpTokenAddress()`, `assetsWhitelistAddress()`, `sendersWhitelistAddress()`
- `depositCap()`, `maxDepositAmount()`, `maxWithdrawalAmount()`, `depositsPaused()`, `withdrawalsPaused()`
- `getWithdrawalEpoch()`, `lagDuration()`, `getRequirementByDate(...)`, `getScheduledTransactionsByDate(...)`, `getBurnableAmountByReceiver(...)`
- Fees: `managementFeePercent()`, `performanceFeeRate()`, `highWatermark()`, `withdrawalFee()`, `instantRedemptionFee()`
- NAV reporting: `externalAssets()`, `assetsUpdatedOn()`
### ABI_TOKENIZED_VAULT_V2_RECEIPT
The EVM-2 share token: an ERC-20 with EIP-2612 `permit`, and a LayerZero OFT so shares can move between the hub chain and spoke chains.
```typescript
import { ABI_TOKENIZED_VAULT_V2_RECEIPT } from '@upshiftfinance/sdk';
```
- ERC-20: `balanceOf`, `allowance`, `approve`, `transfer`, `transferFrom`, `decimals`, `totalSupply`
- Permit: `permit(address holderAddr, address spenderAddr, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)`, `nonces(address)`, `DOMAIN_SEPARATOR()`
- OFT: `send(SendParam, MessagingFee, address refundAddress)` (payable), `quoteSend(SendParam, bool payInLzToken)`, `quoteOFT(SendParam)`, `peers(uint32 eid)`, `sharedDecimals()`, `token()`
The SDK's cross-chain (OVault) helpers are built on this ABI.
### ABI_TOKENIZED_VAULT_V2_WHITELISTED_ASSETS
The asset whitelist an EVM-2 vault prices deposits against — the contract returned by the vault's `assetsWhitelistAddress()`.
- `getWhitelistedAssets()`, `isWhitelisted(address assetAddr)`
- `REFERENCE_ASSET()`, `REFERENCE_ASSET_DECIMALS()`
- `fromInputAssetToReferenceAsset(address assetAddr, uint256 amount)` — oracle conversion into the reference asset
- `getOracleAddress(address assetAddr)`, `maxOracleUpdatesDuration(address assetAddr)`
- `getTotalAssetsValuation(uint256 externalAssets)`
### ABI_TOKENIZED_VAULT_V2_SENDER_ALLOCATION_WHITELIST
Per-depositor allocation caps for allocation-gated vaults — the contract returned by the vault's `sendersWhitelistAddress()`.
- `isWhitelisted(address addr)`, `getAllocationBps(address addr)`, `deposited(address addr)`
- `getRemainingAllocation(address addr, uint256 depositCapAmount)`, `MAX_BPS()`
### Deposit helpers
- `ABI_SWAP_ROUTER` — the router behind swap-and-deposit and origin-code attribution: `deposit(bytes32 originCode, uint256 depositAmount, address vaultAddr, address assetAddr, address receiverAddr)`, `depositNativeToken(bytes32 originCode, address vaultAddr, address receiverAddr)` (payable), `swapAndDeposit(bytes32 originCode, address vaultAddr, address receiverAddr, SwapParams[] swapParams)`, `swapAndDepositNativeToken(bytes32 originCode, address vaultAddr, address receiverAddr)` (payable). Reads: `vaultInfo(address)`, `whitelistedTokens(address)`, `origins(bytes32)`, `isPaused()`, `NATIVE_TOKEN_ADDRESS()`. Origin codes are explained on the [Fee sharing](/contracts/fee-sharing) page.
- `ABI_MULTI_ASSET_NATIVE_DEPOSIT_WRAPPER` — wraps the chain's native token and deposits it: `depositNative(address receiver)` and `depositNative()` (both payable), `vault()`, `wrappedToken()`.
- `ABI_MULTI_ASSET_PREVIEW_DEPOSIT` (`previewDeposit(address, uint256)`), `ABI_MULTI_ASSET_PREVIEW_REDEEM` (`previewRedemption(uint256, bool)`) and `ABI_STANDARD_PREVIEW_REDEEM` (`previewRedeem(uint256)`) — minimal ABIs the SDK uses to preview across vault generations.
- `ABI_WRAPPER_ADAPTER` — Kelp rsETH adapter: `depositETH(address referralId)` (payable), `depositWETH(uint256 amount, address referralId)`, `getRsETHAmountToMint(address asset, uint256 depositAmount)`.
- `ABI_POOL_ADAPTER` — legacy `swapAndDeposit(params)` adapter.
## Token ABIs
### ABI_ERC20, ABI_ERC20_BYTES32, ABI_CROSS_CHAIN_ERC20
```typescript
import { ABI_ERC20 } from '@upshiftfinance/sdk';
```
`ABI_ERC20` is the standard interface: `balanceOf(address account)`, `allowance(address owner, address spender)`, `approve(address spender, uint256 amount)`, `transfer(address to, uint256 amount)`, `transferFrom(address from, address to, uint256 amount)`, `totalSupply()`, `decimals()`, `symbol()`, `name()`.
`ABI_ERC20_BYTES32` is the same surface for tokens whose `name()` and `symbol()` return `bytes32` (MKR-style). `ABI_CROSS_CHAIN_ERC20` is the minimal `allowance`/`approve` pair used by the cross-chain flows.
**Example**
```typescript
import { ethers } from 'ethers';
import { ABI_ERC20 } from '@upshiftfinance/sdk';
const token = new ethers.Contract('0xTokenAddress...', ABI_ERC20, provider);
const balance = await token.balanceOf('0xWalletAddress...');
const signer = await provider.getSigner();
const decimals = await token.decimals();
const spending = new ethers.Contract('0xTokenAddress...', ABI_ERC20, signer);
const tx = await spending.approve('0xVaultAddress...', ethers.parseUnits('100', decimals));
await tx.wait();
```
### ABI_ERC4626
Standard tokenized-vault interface, useful for third-party ERC-4626 vaults the SDK reads.
- `deposit(uint256 assets, address receiver)`, `mint(uint256 shares, address receiver)`
- `withdraw(uint256 assets, address receiver, address owner)`, `redeem(uint256 shares, address receiver, address owner)`
- `asset()`, `totalAssets()`, `convertToShares(uint256 assets)`, `convertToAssets(uint256 shares)`
- `previewDeposit`, `previewMint`, `previewWithdraw`, `previewRedeem`
- `maxDeposit`, `maxMint`, `maxWithdraw`, `maxRedeem`
### ABI_ERC721
Standard NFT interface: `balanceOf(address owner)`, `ownerOf(uint256 tokenId)`, `tokenURI(uint256 tokenId)`, `transferFrom(address from, address to, uint256 tokenId)`, `safeTransferFrom(...)`, `approve(address to, uint256 tokenId)`, `getApproved(uint256 tokenId)`, `setApprovalForAll(address operator, bool approved)`, `isApprovedForAll(address owner, address operator)`.
## Credit and rewards
### ABI_LOAN
Loan contracts funded by lending pools.
```typescript
import { ABI_LOAN } from '@upshiftfinance/sdk';
```
- Parties and tokens: `borrower()`, `lender()`, `principalToken()`, `collateralToken()`
- Terms: `principalAmount()`, `currentApr()`, `paymentIntervalInSeconds()`, `getNextPaymentDate()`, `getDebt()`, `loanState()`
- Collateral: `getCollateralRequirements()`
- Repayment: `repayInterests()`, `repayPrincipal(uint256 paymentAmountInTokens)`, `repay(uint256 paymentAmount)`
### ABI_REWARD_DISTRIBUTOR
Staking-based reward distribution.
```typescript
import { ABI_REWARD_DISTRIBUTOR } from '@upshiftfinance/sdk';
```
- `stake(uint256 amount)`, `withdraw(uint256 amount)`, `getReward()`
- `earned(address account)`, `balanceOf(address account)`, `totalStaked()`, `rewardsPerSecond()`, `stakingToken()`
### RWA_REDEEM_SUBACCOUNT
The [RWA Clear](/products/rwa-clear) redemption subaccount. Exported without the `ABI_` prefix.
- `previewRedemption(address asset, uint256 amount)`, `redeemAsset(address asset, uint256 amount, uint256 minOut)`
- `redeemableAssets(address asset)`, `getRedeemableAssetsList()`, `availableLiquidity()`, `maxRedemptionPerTx()`, `redemptionsPaused()`
- `REFERENCE_ASSET()`, `REFERENCE_ASSET_DECIMALS()`
## Infrastructure ABIs
- `ABI_MULTICALL3` — `aggregate3(Call3[])`. The SDK batches per-vault reads through it on chains where the canonical deployment is verified.
- `ABI_CHAINLINK_V3` — `latestRoundData()`, `getRoundData(uint80 roundId)`, `decimals()`, `description()`.
- `ABI_FEE_ORACLE` — `getContextFeeRate(bytes32 categoryId, address specificAddr)`, `getContextFeeAmount(uint256 amount, bytes32 categoryId, address specificAddr)`, `FEES_DIVISOR()`.
- ENS: `ABI_ADDRESS_RESOLVER` (`addr(bytes32 node)`), `ABI_TEXT_RESOLVER` (`text(bytes32 node, string key)`), `ABI_UNIVERSAL_RESOLVER_RESOLVE` (`resolve(bytes name, bytes data)`).
- Signatures: `ABI_SMART_ACCOUNT` (`isValidSignature(bytes32, bytes)`, ERC-1271) and `ABI_UNIVERSAL_SIGNATURE_VALIDATOR` (the ERC-6492 deployless validator; a constructor-only ABI executed through `eth_call`).
## Using ABIs directly
### Reading
```typescript
import { ethers } from 'ethers';
import { ABI_TOKENIZED_VAULT_V2 } from '@upshiftfinance/sdk';
const vault = new ethers.Contract('0xVaultAddress...', ABI_TOKENIZED_VAULT_V2, provider);
const [sharePrice, totalAssets, receiptToken] = await Promise.all([
vault.getSharePrice(),
vault.getTotalAssets(),
vault.lpTokenAddress(),
]);
```
### Writing
```typescript
import { ethers } from 'ethers';
import { ABI_ERC20, ABI_TOKENIZED_VAULT_V2 } from '@upshiftfinance/sdk';
const signer = await provider.getSigner();
const owner = await signer.getAddress();
const asset = new ethers.Contract(assetAddress, ABI_ERC20, signer);
const decimals = await asset.decimals();
const amount = ethers.parseUnits('100', decimals);
const approveTx = await asset.approve(vaultAddress, amount);
await approveTx.wait();
const vault = new ethers.Contract(vaultAddress, ABI_TOKENIZED_VAULT_V2, signer);
const depositTx = await vault.deposit(assetAddress, amount, owner);
await depositTx.wait();
```
For most integrations `sdk.evm.vaultDeposit` is the better path: it detects the vault generation, handles approvals, native wrapping and swaps, and validates every input before broadcasting. See [EVM Actions](/sdk/evm-actions).
# Changelog
> Release history for the @upshiftfinance/sdk TypeScript SDK, with integrator highlights for every version.
## 1.0.1 (2026-11-12)
### Patch Changes
- b0e5259: feat: Sui contract IDs are resolved per vault. The SDK now ships the Upshift mainnet deployments (`SUI_KNOWN_VAULT_DEPLOYMENTS`) and picks each vault's package and Registry from the package in its on-chain type. So vaults of different publishes on one network (for example `0x3840…` and `0x6a34…`) work side by side. Before, one global `sui.packageId`/`originalPackageId`/`registryId` served every vault, so reads and writes failed for any vault of another publish.
- `sui.packageId` and `sui.registryId` overrides now apply only to vaults of `sui.originalPackageId`. Setting either without `sui.originalPackageId` throws an `UpshiftValidationError` instead of being ignored.
- New optional `ISuiVaultRef.originalPackageId`. Refs built from backend rows fill it from `sui_vault_metadata.package_id`, so `getVaults` and `getVaultPositions` find each vault's contracts without an extra RPC. For a ref without it, the first Sui read or write per vault costs one extra object read, cached for the process lifetime.
- `Sui.targets.resolveSuiVaultContracts` is deprecated in favour of `resolveSuiVaultContractsFor`. When `originalPackageId` is set, it now fills missing IDs from the known deployment.
- `Sui.constants.SUI_VAULT_CONTRACTS` is deprecated. It is always empty and the SDK no longer reads it. Use `SUI_KNOWN_VAULT_DEPLOYMENTS`. Both deprecated names will be removed in the next major release.
- RPC volume: `getVaultPositions` now reads withdrawal requests for every mainnet Sui vault (one more object read per vault). Before, it skipped them because the SDK shipped no mainnet contract IDs.
- cfd880d: fix: Sui withdrawal-request reads (`getWithdrawalRequests`, `getVaultPositions`, `vaultRequestRedeem`) no longer fail, or hide queued withdrawals, when `ref.originalPackageId` names a different deployment than the vault's on-chain type. They use the on-chain package, at one more object read on a mismatch, warn, and cache it for later calls on the vault. A vault's on-chain package with no known deployment is no longer cached, so its other calls are not stuck failing on it.
- 4be65c0: fix: Sui calls verify the vault's package against the chain instead of trusting `ref.originalPackageId` (filled from the backend's `sui_vault_metadata.package_id`). When that package has no known deployment, every Sui call on the vault (reads, previews, withdrawal-request scans and writes) reads the package from the vault's on-chain type instead of failing; this costs one object read, once per vault per process, and `readSuiVaultState` reuses the read it already makes. When it names a different deployment, `readSuiVaultState` (and so `getVault`, `getVaults`, `getVaultPositions`) detects it from the vault object it already reads, reruns its simulation on the on-chain package, and caches that package for later calls on the vault. Both cases log one warning per vault. No extra RPC when the package matches. A failed object read or a non-vault object is now reported as that error, not as "not a known Upshift deployment".
## 1.0.0 (2026-11-11)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 6b6f04d: feat: 1.0.0 public release. The public API is now considered stable and follows semver — breaking changes will only ship in major versions.
## 0.8.0 (2026-11-06)
### Minor Changes
- d837373: feat: read legacy TokenizedPool vaults from the factory subgraph. When a vault's factory subgraph `factoryVault` row has no receipt and a zero `implAddr` (a static pool source, AUGUST-8463), deposits, withdrawal requests and processed withdrawals are read from the `Pool*` entities (`poolDeposits`, `poolWithdrawalRequesteds`, `poolWithdrawalProcesseds`) with the legacy field set (`assets`/`owner`, `year`/`month`/`day`, `processedOn`/`requestedOn`), aliased to the usual response keys; the deposit user filter is `owner`. Withdraws and transfers stay on the shared entities. Reserve deposits for pools are read from `poolReserveDeposits` on the factory. The pool check is one cached `factoryVault` query per vault; a failed check is not cached and reads use the non-pool path.
## 0.7.0 (2026-11-06)
### Minor Changes
- 61962ed: feat: `getKycStatus` and `getKycRecord` take the KYC `vault` and find its `KycRegistry` on-chain: the vault's share token (`lpTokenAddress()`) names it as its `transferPolicy()`, the same lookup the vault does on deposit. A new registry no longer needs an SDK release. `KYC_REGISTRY_ADDRESSES` is deprecated and no longer read; it is removed in the next major. Breaking for TypeScript callers, who must now pass `vault`; the old chain-only form always threw `INVALID_CHAIN` because no registry was ever listed. The lookup adds two reads the first time per vault, is then cached for 10 minutes, and a status and a record read together share one lookup. A vault whose share token has no transfer policy throws `UpshiftValidationError` (`INVALID_INPUT`). New export: `ABI_TRANSFER_POLICY_GATED`.
### Patch Changes
- 4c245aa: fix: the warning logged when the curator redeem-failure endpoint rejects a report is now `#CuratorAlert.redeemFailure.rejected:` for every chain; it previously said `stellarRedeemFailure` for Sui reports too.
## 0.6.0 (2026-11-06)
### Minor Changes
- dd4e12b: feat: read vaults from per-chain factory subgraphs. Vault metadata with a `factory_subgraph` URL scopes every subgraph query (deposits, withdraws, withdrawal requests/processed, transfers) to `vault:
`, uses the camelCase schema without a probe, and reads receipt-token transfers from the same URL. The factory URL is a separate key from `subgraph`, so SDK versions without factory support keep reading the per-vault subgraph instead of every vault on the chain. Before reading, the SDK checks the factory subgraph's `_meta` (indexing errors, head more than 30 minutes behind), cached per URL for one minute: when it is unhealthy the vault's per-vault `subgraph` is used instead. Reserve deposits are read from the per-vault subgraph only (factory subgraphs have no `reserveDeposits` entity). Missing-subgraph Slack alerts for a factory outage are deduped per factory URL instead of per vault. Factory reads with an invalid vault address and no per-vault fallback return empty instead of querying every vault on the chain. `chainIdFromSubgraphSlug` resolves `-[experimental-]factory-` names and now maps `base` and `fluent`. Non-factory vaults are unchanged. A `factory_subgraph` whose name encodes a different chain than the vault's provider is ignored (guards symbol collisions across chains, which would otherwise read zero rows). Transport failures in the health probe are retried once before falling back. Factory fallback warnings/errors are logged once per factory URL, and missing-subgraph alerts while falling back from a factory dedupe on the factory URL. Factory transfer rows expose `vault` as `contractId_`, so `getUserTransfers` fills `pool`. `chainIdFromSubgraphSlug` also resolves `upshift--` names.
## 0.5.1 (2026-11-06)
### Patch Changes
- e9ec7c5: fix: Sui reads and transaction builds no longer fail with `ERR_REQUIRE_ESM` on hosts whose CommonJS loader refuses `require()` of an ES module (Vercel's Node.js function runtime, Node before 22.12). The CommonJS build now retries the load of `@mysten/sui` with a native dynamic `import()` when `require()` is refused; `getVaults` / `getVault` for Sui vaults consequently return on-chain state there instead of the backend fallback that marked every Sui vault deposit-paused.
## 0.5.0 (2026-11-04)
### Minor Changes
- 54751ba: feat(sui): `getVaultPositions({ suiWallet })` lists a wallet's pending withdrawal requests as redemptions, split like EVM and Solana (claimable in `pendingRedemptions`, waiting or expired in `availableRedemptions`), and marks such positions `REDEEM`, so a holder whose shares are all queued no longer looks empty. If the requests cannot be read (or no contract IDs are configured) the position still shows the share balance. `Sui.actions.suiExecutionErrorToSdkError` is now public, to map errors a wallet's own build or execution throws to `UpshiftVaultAbortError`.
- 8b6ee70: feat: export the Sui adapter from the package root — `Sui` (client, targets, getters, actions), `SuiAdapter` and `ISuiAdapterVault` — like Solana and Stellar. Adds the Sui Actions guide, `UpshiftVaultAbortError` in the error reference, and a Sui localnet suite (`pnpm test:sui-localnet`) that runs the SDK against the pinned contracts.
- 8b6ee70: feat(sui): `vaultDeposit` and `vaultRedeem` accept `slippageBps` (default 10, i.e. 0.1%): the transaction's minimum output is the dry run's preview less that tolerance, so a deposit or redemption no longer aborts when another one lands first and rounding moves the result by a unit. `minSharesOut` / `minAssetsOut` still set an exact minimum, and `slippageBps: 0` restores the exact-preview behaviour. Instant redemption now charges the vault's accrued management fee first, as deposits already did, so the redeemer pays their share instead of the remaining holders.
- 1a45d71: feat: Sui withdrawal queue — `sdk.sui.vaultRequestRedeem`, `vaultCancelRedeemRequest`, `claimWithdrawal` and `getWithdrawalRequests` (plus `Sui.actions.buildSuiRequestRedeemTransaction`, `buildSuiCancelRedeemRequestTransaction`, `buildSuiClaimWithdrawalTransaction` and `Sui.getters.getSuiWithdrawalRequests`). Each builder dry-runs and returns an unsigned `Transaction`, like `vaultRedeem`. A request names its owner as finalizer by default: only the owner can claim it during the first day it is claimable, anyone after (pass a keeper's address as `finalizer`, or `null` to let anyone claim at once). `vaultRequestRedeem` returns `expectedAssets` at today's price and refuses a request that would pay nothing with `zero_output`. Request IDs are sequential per wallet and vault (`0, 1, 2, …`), so pending requests are found from the vault's on-chain claim markers, however old, without an event index: one object read for a wallet with up to 23 requests on a vault, one more per further 25; that read also checks the vault belongs to `sui.originalPackageId` and throws `INVALID_INPUT` if not. A claim pays into the payout address's address balance, not a coin object. `UpshiftVaultAbortError.reason` gains `queue_not_attached`, `invalid_payout`, `request_id_in_use`, `not_request_owner`, `not_finalizer`, `not_eligible_yet` and `request_expired`; code that switches exhaustively over the reasons needs the new cases.
### Patch Changes
- dc06e70: fix: bundlers (Vite, webpack, Next.js) no longer fail with "Could not resolve 'viem'" when the optional `viem` peer is not installed. Multi-asset cross-chain hub reads (`previewDeposit` / `previewRedemption` / `previewRedeem`) now use ethers instead of a dynamic `viem` import, so they also work at runtime without `viem`. Same RPC cost: one `eth_call` per read through the cached provider.
- 8927077: fix: `import UpshiftSDK from '@upshiftfinance/sdk'` now works in ESM projects (Node with `"type": "module"`, Vite SSR, vitest, tsx). Previously the default import resolved to the CommonJS `module.exports` object and `new UpshiftSDK()` threw "UpshiftSDK is not a constructor". The package now has an `exports` map that sends `import` to a thin ESM wrapper (`esm/index.mjs`, with `esm/index.d.mts` types for `moduleResolution: node16 | nodenext`). The wrapper re-exports the same CommonJS module instance, so classes and caches are not duplicated. `require()` and deep imports of `@upshiftfinance/sdk/lib/*` keep working.
- 8091718: fix: `getVault` now rethrows typed `UpshiftSDKError` subclasses (rate limit, server, validation, …) unchanged instead of rewrapping them in a plain `Error`. Other failures are wrapped in `UpshiftSDKError` (code `UNKNOWN`) with the original error as `cause`; the `#getVault::: ` text is unchanged.
- 8b6ee70: fix(sui): vault reads include the management fee accrued since the last charge, so `totalAssets`, share price and previews reflect the current NAV. Reads with a wrong vault ID, coin type or package ID now throw `UpshiftValidationError` instead of raw `@mysten/sui` errors, and `executeTransaction` rejects malformed base64 with `INVALID_INPUT`. An `rpcUrl` that answers a bare HTTP 404 or 400 now fails over to the public fullnode. On a Node.js version that cannot load `@mysten/sui` (it needs ^20.19 or >=22.12) Sui calls now throw an `UpshiftSDKError` saying so, instead of reporting every endpoint as failed. `getVaultPositions({ chainId: -2 })` no longer returns legacy Sui rows without `sui_vault_metadata`.
## 0.4.0 (2026-11-03)
### Minor Changes
- d4f2964: feat: KYC vault reads. `IVault.requiresKyc` maps the backend `requires_kyc` flag. New `getKycStatus` and `getKycRecord` read a wallet's status and record from a chain's `KycRegistry`, `KYC_REGISTRY_ADDRESSES` holds the registry per chain (empty until the first deploy), and `decodeRevertData` now names `KycIneligible` and `WalletBlocked`.
- bee73cb: feat: KYC session API calls. `sdk.apiModule.getKycChallenge` fetches a one-time SIWE challenge, `createKycSession` opens a Sumsub session with the signed challenge (never retried: the nonce is single use), and `refreshKycSession` renews the WebSDK access token. Non-2xx answers throw `UpshiftKycError` with `status`, the backend `detail`, a stable `reason` and `retryable`. Telemetry categories `read.kyc` and `write.kyc`.
- d6f7320: feat: Sui deposit and instant redeem. `sdk.sui.vaultDeposit` builds one unsigned transaction (charge management fee → `deposit_checked` → shares to the sender) and `sdk.sui.vaultRedeem` one for instant redemption (`redeem_checked`, minimum net of the instant fee). Both dry-run first with the sender's coins, so a vault that would reject them fails before signing with the new `UpshiftVaultAbortError` (`code: 'VAULT_ABORTED'`, `reason`: `paused`, `queue_attached`, limits, `slippage`, `version_retired`, …). `sdk.sui.executeTransaction` submits a wallet-signed transaction and waits for it. A rejected or failed Sui redemption is reported to the vault's curator, like Stellar. Telemetry category `write.sui`.
- e02edd0: feat: Sui vault reads. `getVault`, `getVaults` and `getVaultPositions({ suiWallet })` now return Upshift Sui vaults: state comes from the vault's Move package (total assets, supply, share price, limits, pause, queue, instant-redemption fee) in one simulated transaction, and positions from the wallet's share-coin balance. `Sui.getters` adds `readSuiVaultState`, `previewSuiDeposit`, `previewSuiRedemption` and `getSuiShareBalance`. TVL comes from the backend; redemptions and redemption history are empty for Sui in v1. Legacy Sui rows without `sui_vault_metadata` stay excluded. Reads need the Sui contract IDs (`sui.packageId`, `sui.originalPackageId`, `sui.registryId`) until the SDK ships them; without them a vault falls back to backend values with deposits paused. `getVaultLoans` and `getVaultAllocations` on a Sui vault now throw "… is not supported for Sui vaults".
### Patch Changes
- 23e8a46: feat: register RISE (chain 4153)
RISE (OP Stack Ethereum L2, native ETH, 18 decimals) joins the EVM chains the SDK understands:
- **`NETWORKS[4153]`** — `RISE`, explorer `https://explorer.risechain.com` (Blockscout). This is what `explorerLink` uses for tx/address links, and what `chainIdToTagValue` slugifies for the `sdk.chain` Sentry tag (`rise` instead of `unknown:4153`). It also lands the chain in `AVAILABLE_CHAINS`.
- **`FALLBACK_RPC_URLS[4153]`** — `https://rpc.risechain.com`, used when a caller supplies no provider for the chain. Verified live on 2026-11-02: returns `eth_chainId` `0x1039` and sends `access-control-allow-origin: *`, so a browser-side read works without a proxy.
- **`MULTICALL3_VERIFIED_CHAINS`** — 4153 added. `eth_getCode` at `0xcA11bde05977b3631167028862bE2a173976CA11` returned the canonical 3808-byte runtime on 2026-11-02, so vault prefetch batches its reads rather than falling back to the per-call path.
No vault is served on chain 4153 yet — this is chain registration only, so no subgraph slug mapping is added.
## 0.3.0 (2026-10-30)
### Minor Changes
- 1a2ef03: feat: add the SwapRouter deployments on Monad, Base, Flare, Citrea, Fluent and Avalanche.
`SWAP_ROUTER_ADDRESSES`, `SWAP_ROUTER_NAMES`, `SWAP_ROUTER_DEPLOY_BLOCKS` and `SWAP_ROUTER_WRAPPED_NATIVE` gain the six chains: Monad `0xF47ce4B8df30bc3B3b6cc21Fe1552A2198A4A4F7` (WMON), Base `0x261c97E80C105F85BBbe1416E6eC67C76B9910E2` (WETH), Flare `0xe4c219e5966e97A2bF92464F1BAdB9EbAb3164bb` (WFLR), Citrea `0x5B02d6B43fED3EE010741712553F2423A256E9cf` (WCBTC), Fluent `0xAC771209FF2b71EECfF6E85a9AD01db8Ff2618B0` (WETH) and Avalanche `0x3ECc92b2244210BF09485a398f680255E80CC393` (WAVAX).
On these chains a normal deposit of an asset the vault accepts now routes through the router, so integrators that manage approvals themselves must approve `getDepositRoute(...).spender` (the router), not the vault; a native-token deposit into a wrapped-native vault goes through `depositNativeToken`. No DEX aggregator is configured on these chains, so `swapRouterDeposit` of a token the vault does not accept still throws.
## 0.2.0 (2026-10-30)
### Minor Changes
- c651687: feat: Sui client and contract call targets, groundwork for Sui vault reads and writes. Sui calls go over gRPC-web (`@mysten/sui`) with a consumer `sui.rpcUrl` as primary and the public fullnode as failover. `ISuiConfig` gains `packageId`, `originalPackageId` and `registryId`: the SDK ships no Sui contract IDs until the contracts are published, so pass them there. `@mysten/sui` is loaded on the first Sui call, not on import; browser bundles grow by about 63 KB gzipped.
## 0.1.1 (2026-10-30)
### Patch Changes
- 998c332: chore: publish under the `@upshiftfinance` npm scope (previously `@upshift-fi`). Install `@upshiftfinance/sdk`, `@upshiftfinance/react`, `@upshiftfinance/config`, `@upshiftfinance/cli`, and `@upshiftfinance/mcp`.
## 0.1.0 (2024-10-26)
### Minor Changes
- 1e0dc10: feat!: remove the Ember (Bluefin) Sui adapter
`getVaults()` no longer appends the five Ember Sui vaults or calls the Bluefin API. Nothing first-party used them: the apps already filtered them out, and the call slowed every `getVaults()`.
**Breaking:** `sdk.sui` keeps only `chainId`, `isSuiAddress` and `isSuiVault`. Removed: `getEmberVaults`, `getEmberTVL`, `convertFromE9`, `calculateUtilization`, `transformEmberVaultToIVault`, `transformEmberVaultsToIVaults` and the `apiBaseUrl` getter. `AugustVaults` takes `(baseConfig, solana)`; the Sui adapter argument is gone.
- c9102d3: feat: Sui uses chain ID `-2`, with version routing, address checks and config types
- Sui is in `SPECIAL_CHAINS` with chain ID `-2`, the backend's ID for Sui vault rows. `SUI_CHAIN_ID` changes from `101` to `-2`; `101` is no longer a known chain ID.
- `getVaultVersion` / `getVaultVersionV2` return `sui-0` for Sui object IDs and `chain_type: 'sui'` rows.
- Sui addresses (`0x` + 64 hex) are accepted by the vault-list filter, the API module's address validation, `getVaultSymbol`, and the MCP, CLI and config validators.
- New `ISuiConfig` (`new AugustSDK({ sui: { network, rpcUrl } })`), `ISuiNetwork`, `ITokenizedVault.sui_vault_metadata` (`ISuiVaultMetadata`), and a validated `suiWallet` option on `getVaultPositions`.
- Sui vault reads are not supported yet: `getVault`, `getVaultLoans`, `getVaultSubaccountLoans` and `getVaultAllocations` reject chain `-2` with an `AugustValidationError` (`INVALID_CHAIN`).
- Sentry tags Sui calls with the `sui` chain instead of the active EVM network.
### Patch Changes
- 38a2d2a: breaking: rename all `August*` exports to `Upshift*`.
- Classes/errors: `AugustSDKError` → `UpshiftSDKError`, `AugustValidationError` → `UpshiftValidationError` (and all other `August*Error` classes), `AugustErrorCode` → `UpshiftErrorCode`, `AugustErrorOptions` → `UpshiftErrorOptions`, `isAugustSDKError` → `isUpshiftSDKError`.
- Modules: `AugustBase` → `UpshiftBase`, `IAugustBase` → `IUpshiftBase`, `AugustApi` → `UpshiftApi`, `AugustVaults` → `UpshiftVaults`, `AugustSubAccounts` → `UpshiftSubAccounts`.
- Fetch helpers: `fetchAugustPublic` → `fetchUpshiftPublic`, `fetchAugustWithKey` → `fetchUpshiftWithKey`, `fetchAugustWithBearer` → `fetchUpshiftWithBearer`, `verifyAugustKey` → `verifyUpshiftKey`, `IFetchAugustMethods` → `IFetchUpshiftMethods`, `IFetchAugustOptions` → `IFetchUpshiftOptions`.
- Env var: `AUGUST_SDK_DISABLE_CURATOR_ALERTS` → `UPSHIFT_SDK_DISABLE_CURATOR_ALERTS` (the old name is no longer read).
Migration: replace `August` with `Upshift` in imports and env config. React and CLI only have internal renames.
## 9.16.0 (2026-10-27)
### Minor Changes
- a2264c1: feat: `getVaultPositions` now flags a vault whose on-chain reads failed with `readFailed: true` on its zero `PENDING` row, so callers can tell "read failed" from "no position". The default filter is unchanged (failed rows are still dropped); pass `showAllVaults: true` to receive them. On `evm-2` vaults an unresolved receipt token now raises a typed `AugustNetworkError` internally instead of `Cannot read properties of undefined (reading 'balanceOf')`. No change in RPC count.
- 0357b02: feat: `sdk.evm.*` reads (`balanceOf`, `previewDeposit`, `allowance`, `lagDuration`, …) no longer require a signer — they fall back to the provider for the SDK's active network. Writes without a signer now throw a typed `AugustSDKError` with code `NO_SIGNER` instead of a raw `Error('No signer provided')`. No added RPC calls.
- a1f7394: feat: Solana `getVaultAllocations` returns `unattributed`, the gap between the allocations and the vault's on-chain AUM, read fresh from the vault state: `{ usd, onChainAumUsd, idleUsd }`, signed and unthresholded, so a position the portfolio indexer misses shows up as a positive `usd`. Octav lending positions now carry their collateral and debt: `supplyAssets` map to `supply_token_list`, `borrowAssets` to `borrow_token_list`, and `debt_usd_value` is filled in, so a Kamino obligation reads as its supplied and borrowed tokens instead of a net value with no tokens behind it. `SolanaUtils.getVaultStateReadOnly` accepts `fresh: true` to bypass its 24h cache.
### Patch Changes
- c769f0d: fix: signerless EVM reads throw typed `NO_SIGNER` (not a raw `Error`) when the active network's RPC URL is blank; document `NO_SIGNER` via `@throws` on the signerless read methods
- 1d12ccf: fix: `getVault({ allocations: true })` now resolves allocations for Solana (`sol-0`) vaults from each operator's cached Octav portfolio, the same path `getVaultAllocations` already took, and reuses the vault row it fetched instead of reading it again. Previously it skipped them and returned the empty default. Solana vaults also report `idleAssets` from the program's on-chain `local_aum` instead of always `0`, and carry the backend's `eoa_operators`.
Allocation failures now throw a typed `AugustNetworkError` (`NETWORK_ERROR`) with a provider-agnostic message instead of a raw `Error('failure to fetch debank response')` / `Error('Failure fetching debank res')`. As on EVM, a failed portfolio read fails the whole `getVault({ allocations: true })` call; pass `allocations: false` to read the vault without depending on the portfolio provider.
## 9.15.0 (2026-10-27)
### Minor Changes
- 4e0083c: feat: route a deposit of any asset the vault accepts through the SwapRouter, without the router's token whitelist.
The redeployed SwapRouter's `deposit` no longer checks its token whitelist; the vault decides which assets it accepts. `getDepositRoute`, `vaultDeposit`, `approve` and `swapRouterDeposit` follow it: a deposit of an asset the vault accepts directly now goes through the router even when the router does not whitelist that token, and `swapRouterDeposit` deposits such an asset into a Tokenized Vault V2 as-is instead of swapping it. The token whitelist still gates swaps.
- `SWAP_ROUTER_ADDRESSES` and `SWAP_ROUTER_DEPLOY_BLOCKS` point at the redeployed routers: Ethereum `0xC11c6d8fD8FfFB2045d57b149125C44414d8160B` (block 26248966) and HyperEVM `0x1766f1F4C80756c0985ae93E3cf5cA5024bdAE6F` (block 49232457).
- `DepositRouteReason` `router-token-not-whitelisted` is deprecated and no longer returned.
- A routed deposit makes one fewer RPC read (no `whitelistedTokens` call).
### Patch Changes
- 5db7a8e: fix: correctness backlog
- `fetchTokenizedVaults(pool)` now caches the vault catalog once per request shape and filters by `pool` afterwards, instead of storing (and refetching) a full catalog per pool address. Fewer backend calls.
- `fetchAugustWithKey` / `fetchAugustPublic` / `fetchAugustWithBearer` accept any 2xx response (e.g. `201`/`204` from POST routes) instead of rejecting everything but `200`.
- Solana `vaultRedeem` failures refused with `WithdrawalQueueRequired` now include the hint to use `vaultRequestRedeem` + `vaultRedeem({ request })`.
- `getVaultExposure` no longer duplicates wallet tokens once per portfolio item in `wallet_exposure`.
- Removed unreachable `!response.ok` checks in the sub-account fetchers; the typed `AugustSDKError` from the request helper now surfaces unchanged (it already did in practice).
- `getVaultLoans` / `getVaultSubaccountLoans` share one internal implementation; behavior unchanged.
- Type corrections (types only, no runtime change): `ISolanaVaultState.localAum` / `deployedAum` are now `BN | null` (Anchor decodes u64 as `BN`; they were mistyped as `number | null`). `IDebankNormalizedResponse`, `parseVaultLevelDebank`, `getVaultExposure`, `transformOctavfiPortfoliosToDebank`, and `IVaultAllocations.defiPerBorrower` are typed against the existing `IDebank*` interfaces instead of `any`; `IEmberVault.rewards` is `unknown[]`. Code that treated `localAum`/`deployedAum` as numbers, or relied on `any` for fields not in those shapes, may need a type update.
- Documented that Sui/Ember `totalSupply` is a placeholder mirroring `totalDeposits` (share price derived from it is always 1.0).
- 2456b79: fix: `getVaultRedemptionHistory` on Citrea (4114) now scans logs in 999-block chunks, staying under the RPC's 1,000-block `eth_getLogs` cap. Previously every chunk was rejected and the call threw. RPC impact: the default 150k-block window costs ~150 `eth_getLogs` calls on Citrea instead of 15 (all of which failed).
- bdfb508: perf: `getVaultAvailableRedemptions` (and `getVaultPositions`) now filter the Goldsky withdrawal query by the wallet's `receiverAddr` when a wallet is given and `verbose` is off, instead of downloading every wallet's withdrawal rows. Cuts up to ~0.9 MB per busy vault on a cold read. Request count is unchanged. `getSubgraphAllWithdrawals` now takes an optional options object (`{ slackWebookUrl, receiver }`) as its third argument, in place of the positional `slackWebookUrl`.
- d965c04: fix(core): hygiene batch for the fetcher and core helpers.
- `promiseSettle` no longer "retries" already-created promises (which only re-awaited the same rejection after up to 7 s of backoff). A bare promise is settled once; pass a thunk (`() => Promise`) when a retry is actually wanted. The signature is backwards compatible.
- Backend requests no longer send `undefined` header values as the literal string `"undefined"` (e.g. `x-user-id` before `updateWallet` is called); nullish headers are omitted.
- Non-OK HTTP responses are recorded once in the API-call metrics with their real status, instead of twice (the second time as status 0).
- `fetchTokenizedVaultLoans` / `fetchTokenizedVaultSubaccountLoans` cache active-loan lists for 10 minutes instead of 24 hours.
- `fetchTokenPrice` throws `AugustPriceUnavailableError` when the CoinGecko fallback has no price for a vault LP token, instead of resolving and caching a `$0` price.
- `toTitleCase(str, 'camel')` no longer throws on multi-character input.
- `toNormalizedBn` accepts magnitudes of 1e21 and above instead of throwing on exponential notation; `calculateWeights` returns zero weights (not `NaN`) when the total is 0.
- `getManagementFeePercent` issues one `eth_call` instead of two.
- `getSwapRouterWhitelistedTokens` runs its `eth_getLogs` chunks at most 8 at a time instead of all at once.
- `getVaultVersionV2` matches `MULTI_ASSET_VAULTS` entries regardless of address casing.
- `withMethodTracking` never re-runs a wrapped method whose own error mentions "Sentry"; the direct-call fallback only applies when Sentry's `startSpan` failed before the method ran.
- Docs: the default request timeout is documented as 15 s (the actual `REQUEST_TIMEOUT_MS`), not 90 s.
- 302dbb3: fix: DeBank exposure, Sui Ember TVL, and user-identity hygiene
- DeBank loan-level exposure (`parseLoanLevelDebank`) no longer reports every unique exposure at twice its USD value; repeat sightings of the same token now sum correctly.
- DeBank vault-level token exposure merges repeat sightings of the same symbol (`optimized_symbol` when present), exposure type and protocol into one row instead of emitting duplicates.
- `getEmberTVL` (Sui) now shares the 5 s timeout and 5-minute cache that `getEmberVaults` already had, so a hung Ember request can no longer stall callers.
- `core/analytics/user-identity` no longer statically imports Node's `crypto` (browser bundles were pulling in a Node built-in); it is resolved lazily via `process.getBuiltinModule` and the hash output is unchanged for Node consumers. In browsers no Node `crypto` is available, so the telemetry fingerprint is now `undefined` there.
- `pnpm sdk test` now runs the jest unit suite after building instead of pointing at a non-existent `dist/test` script; `cross-env` and `dotenv` dev dependencies dropped (unused).
- 49937e0: fix(solana): vault-state read hygiene
- Solana vaults no longer report `totalAssets` of 0 when the RPC is unreachable or the vault state fails to decode. `getSolanaVault` now treats a missing decoded state as "on-chain unavailable" and falls back to the backend's `latest_reported_tvl`, as it already did for thrown network errors.
- The decoded vault state (`localAum`, `deployedAum`, fees) is now cached for 60 s instead of the shared cache's 24 h default, so TVL and share price track the chain instead of freezing for the life of the process. A failed decode, missing account or RPC failure is no longer cached, so the next caller retries. Mint addresses are immutable and keep the long TTL. RPC delta: +1 vault-state read per vault per minute under sustained polling (previously once per process).
- `getVaultStateReadOnly` decodes the vault state from the single `getAccountInfo` it already makes instead of fetching the same account again through the Anchor account client. RPC delta: −1 call per cache miss.
- Direct `redeem` no longer throws `TokenOwnerOffCurveError` when the vault's fee recipient is a PDA or multisig: the fee-recipient ATA is derived with `allowOwnerOffCurve`, matching the withdrawal-queue claim path.
- `handleSolanaDeposit` throws an `AugustSDKError` (code `UNKNOWN`, with the mint in `context`) instead of a bare `Error` when the deposit mint account cannot be read. Two unreachable "Failed to read vault mints" branches are removed (`getVaultMints` already throws a typed error), and the handlers no longer pass an unused `network` to it.
- 9bce906: fix(subgraph): withdrawal pagination, user-history schema detection, and request timeout
- Subgraph withdrawal readers (`getSubgraphWithdrawRequests`, `getSubgraphWithdrawProccessed`, `getSubgraphAllWithdrawals`) page on `skip` instead of truncating at 1000 rows, so busy vaults return their full withdrawal history (capped at 20 pages, with a warning if hit).
- `getSubgraphUserHistory` picks the Deposit filter field from the detected subgraph schema (`receiverAddr` on the new schema for every vault version) instead of the vault version alone, fixing empty user history for evm-1 vaults deployed on the new schema.
- Subgraph requests abort after the full `REQUEST_TIMEOUT_MS` (15 s) instead of 5 s, and a non-`Error` fetch rejection is re-thrown as-is instead of crashing the retry classifier.
- fdb2783: fix(vaults): deposit, user history, and wallet-mode getVaults hygiene
- **`vaultDeposit` now refuses the Paraswap bridge adapter route up front.** For the one vault wired to the Paraswap adapter (`0x8AcA…2C21`), a deposit whose `depositAsset` differs from the vault underlying previously sent an ERC-20 approval and then a `swapAndDeposit` call with an empty quote and `minAmountOut: 0` — a transaction that could only revert, after the approval had been paid for. The SDK never built the Paraswap calldata. The call now throws `AugustValidationError` (`INVALID_INPUT`) before any allowance read, approval, or deposit transaction; use `swapRouterDeposit` for any-token deposits, or deposit the vault's underlying asset directly. `buildSwapAndDepositTransaction` is deprecated and no longer called. Kept as `patch` because the old path could only revert; a partner that caught that on-chain revert to treat the vault as supported will now see the typed throw instead.
- `getUserHistory` / `getUserTransfers` with `vault` but no `chainId` no longer fail with "no RPC URL provided"; the active network's chain is used, as the TSDoc always promised.
- `getVaults` in wallet mode (positions join) no longer rejects the whole call when a single vault's position read fails after retries — that vault returns `position: null`. Position reads are handed to `promiseSettle` as thunks so transient failures are actually retried, and the fan-out now covers only the vaults that survive the `chainIds` / closed / invisible pre-filter (fewer RPC calls; the returned shape is unchanged).
- `getVaults` in wallet mode skips the Ember (Sui / Bluefin) HTTP fetch, whose result was never part of the wallet-mode response.
- `claimWithdrawal` TSDoc example no longer destructures the epoch from `vaultRequestRedeem` (which returns a tx hash); it reads it from `getWithdrawalRequestsWithStatus`.
- 657fbd7: fix(vaults): getters, formatting, and fetcher hygiene
- `getWithdrawalRequestsWithStatus` resolves a missing `lagDuration()` the same way `getVaultAvailableRedemptions` does (no lag, instead of a 1-day default). The two scans keyed the same request to claimable dates one day apart, so already-processed requests could surface as `ready_to_claim`.
- `getWithdrawalRequestsWithStatus` caps the per-event `getTransaction` decode at 8 concurrent RPC calls instead of an unbounded `Promise.all`.
- `fetchVaultsComprehensive` clears its per-strategy timeout timers; a finished Node/CLI process no longer stays alive for the 60s default timeout.
- Historical TVL fallback when the provider returns no finalized block now uses the current time instead of a value 60,000x in the future.
- `getVaultAvailableRedemptions` skips evm-2 events whose `timestamp_` cannot be parsed instead of emitting entries with `NaN` dates.
- EVM vault `apy` is now built by the shared `formatVaultApy`: `liquidApy` / `underlyingApy` are `0` rather than `NaN` when the backend row has no `reported_apy`, and a genuine 0% `apy` is `0` rather than `null`, matching the Solana and Stellar adapters. Callers that used `apy === null` to detect a 0% vault should compare against `0` instead (kept as `patch`: `null` no longer appears for a reported 0%, and the shape is unchanged).
- Removed unreachable `!response.ok` checks after `fetchAugustPublic`, which already throws typed errors on non-2xx.
- 5540282: perf: request the lean vault row (no subaccounts, no snapshots) at 23 call sites that only read version, `chain`, APY, TVL or Stellar metadata fields. Each call drops from ~95 KB (up to 331 KB) to ~3.7 KB and now shares the lean-row cache entry. No change to RPC call count or return values.
- 30e4d90: fix: generate `SDK_VERSION` on every build (and after the canary version is set) so telemetry reports the real SDK version instead of a stale one.
## 9.14.0 (2026-10-23)
### Minor Changes
- 034f89d: feat: route every normal EVM deposit through SwapRouter v2.
`vaultDeposit`, `approve` and `vaultApprove` now send a deposit of an asset the vault accepts directly through `SwapRouter.deposit` whether or not `attribution.originCode` is set, so integrators that manage approvals themselves must approve `getDepositRoute(...).spender` (the router), not the vault. The deposit carries the instance origin code when it is registered on the router, else the zero code; an unregistered code no longer falls back to a native deposit. It stays on the vault's own path for permit, native-token, adapter and legacy (`evm-0`) lending-pool deposits, an asset the vault does not accept directly, a Tokenized Vault V2 with a senders whitelist (KYC), a token the router does not whitelist, a paused router, and a chain without a SwapRouter. Cross-chain and LayerZero deposits are unchanged.
- `SWAP_ROUTER_ADDRESSES` points at the SwapRouter v2 deployments: Ethereum `0x5ce697Fc962eD2C3f31A42e2A24f287c227E65d4` and HyperEVM `0x2A9F5A2CA9d318D3913D96e0c019412631C249c8` (with their deploy blocks in `SWAP_ROUTER_DEPLOY_BLOCKS`).
- `ABI_SWAP_ROUTER` is the v2 ABI. Every router deposit sends a `vaultType` (`1` ERC-4626, `2` Tokenized Vault V2). `swapAndDeposit`, `depositViaSwapRouter` and `depositNativeViaSwapRouter` take an optional `vaultType`; when omitted it is derived from the vault's version in the August API.
- `swapRouterDeposit`, `swapAndDeposit`, `depositViaSwapRouter` and `depositNativeViaSwapRouter` throw `AugustValidationError` before any approval for a legacy `evm-0` pool or a Tokenized Vault V2 with a senders whitelist, which the router cannot deposit into.
- `IDepositRoute` gains `originCode` and `vaultType` on the router route. `DepositRouteReason` gains `legacy-pool` and `kyc-vault` (an exhaustive `switch` over it needs the new cases); `no-origin-code`, `chain-not-supported` and `vault-not-registered` are deprecated and no longer returned.
- `getSwapRouterEligibleVaults` returns the chain's vaults with the backend `swaps_enabled` flag instead of scanning the router's `VaultEnabled` events; its `rpcUrl` and `fromBlock` options are no longer read. `isNativeSwapRouterDepositSupported` no longer reads the router.
- A routed deposit costs about 60k more gas than a direct vault deposit (about 70k with an origin fee).
### Patch Changes
- eee08d3: fix(telemetry): actually load `@sentry/node` on Node. The runtime loader resolved `require` through `new Function('return require')`, which evaluates in the global scope where a CommonJS module's `require` is not visible, so it returned `null` in every real Node process and the SDK silently fell back to `@sentry/browser`. Node consumers (servers, CLI, MCP) now get the Node SDK and process-level exception capture; browser bundles are unaffected (the module id is still passed through a variable so bundlers cannot statically pull `@sentry/node` in).
- c0fd664: feat(solana): map the withdrawal queue program on mainnet-beta, deployed there with release v0.3.0 on 14 Oct 2026. `getProgramId('withdrawalQueue')`, `vaultRequestRedeem`, `vaultCancelRedeemRequest` and `vaultRedeem` with `options.request` now work on mainnet-beta instead of throwing `AugustValidationError`.
Nothing changes for a vault without a queue. Whether a vault redeems through a queue is still read per vault, from its `withdrawalQueueAuthority`. Vaults with none, which today is every mainnet vault, keep direct `vaultDeposit` and `vaultRedeem`.
Mainnet vault reads now also look up the vault's queue account. For a vault without a queue that returns "no queue" (`withdrawalQueue` stays `undefined`). Position reads also scan for the wallet's withdrawal requests. Each costs one extra RPC call.
- b82be61: fix(solana): send `deposit_mint` read-only in deposit and redeem. The bundled vault and withdrawal-queue IDLs now take their account writability from release v0.3.0, which mainnet-beta and devnet run since 14 Oct 2026. `deposit`, `deposit_checked`, `redeem` and `redeem_checked` send `deposit_mint` and `signer` read-only, so Phantom's Lighthouse assertions no longer fail whenever anyone else mints or burns USDC. Nothing else in the IDLs changes: no accounts, arguments or discriminators.
Needs the v0.3.0 program: an older build rejects a read-only `deposit_mint` with Anchor `ConstraintMut`. A caller who passes an older IDL as `idl` keeps sending it writable, which v0.3.0 accepts.
## 9.13.3 (2026-10-14)
### Patch Changes
- cff0b89: perf(vaults): `getVaultPositions`, `getUserHistory`, `getVaultActivity`, `getVaultAvailableRedemptions`, `getVaultUserLifetimePnl`, `getWithdrawalRequestsWithStatus` and the symbol and decimals reads no longer download the full vault row, subaccounts and snapshots included, only to pick the vault version. They read the lean row (`load_subaccounts=false&load_snapshots=false`), which is the one the rest of the sweep already fetches and caches, and which carries every field the version check reads. A cold `getVaultPositions` no longer downloads about 11 MB of full vault rows, and the number of `GET /tokenized_vault/{address}` requests drops by about half. Results are unchanged.
## 9.13.2 (2026-10-14)
### Patch Changes
- 4126244: fix: `getVaultPositions` returns the correct `vault` address per row when called without an explicit `vault` (the whole-wallet, multi-vault sweep)
The EVM branch built three things from the function's own `vault` parameter
instead of `v.address`, the vault actually being processed in that iteration:
the returned `IVaultPosition.vault` field (on both the success path and the
per-vault error fallback), the `decimals()` read that scales an evm-1 balance,
and the receipt-token lookup that an evm-2 balance is read through.
This is invisible when a caller passes an explicit `vault` (the parameter
happens to equal the one vault being processed), but for a whole-wallet sweep
(`getVaultPositions({ wallet })`, no `vault`) every returned row carried
`vault: undefined`, regardless of which vault its balance belonged to. A
consumer keying positions by `vault` (e.g. `upshift-frontends`'
`enrichPositions`, which joins on `vaultKey(String(position.vault))`) could
never match those rows against vault metadata and silently dropped every held
position from portfolio views. The same sweep also scaled evm-1 balances with
unresolved decimals and returned every evm-2 row as `PENDING` with a zero
balance, because the receipt-token lookup ran against `undefined`.
The Solana and Stellar branches of the same function already returned
`v.address` (with a comment flagging exactly this trap); the EVM branch is now
consistent with them.
- 11f5921: fix: `getVault` no longer crashes with `TypeError: Cannot read properties of undefined (reading 'toString')` when a vault's `decimals()` read fails. Both EVM vault getters now read decimals through `getDecimalsOrThrow`, which retries a transient provider fault and otherwise throws the provider's own error. A provider fault during the vault fan-out (a rate limit, a socket reset, or an empty response to one of the vault's argument-free views such as `asset()` or `withdrawalFee()`) is logged as a breadcrumb rather than a standalone Sentry issue; `getVault` still throws to the caller as before.
- 3a022ad: fix: `setSigner` now works with a viem `WalletClient` built by `createWalletClient`, including local and embedded-wallet accounts such as Para's `createParaViemClient`. The converter called `walletClient.transport` as a function, but viem exposes it as an object, so every signer call failed with "could not coalesce error" before any RPC request. The account and chain id are now answered from the client; transactions, personal messages and EIP-712 typed data are signed through the client's own `sendTransaction`, `signMessage` and `signTypedData`; every other request goes to the client's transport. No extra RPC calls are added.
## 9.13.1 (2026-10-13)
### Patch Changes
- 4194bec: fix: `getVaultPnl` reads the vault's daily history from `/tokenized_vault/{vault}/historical-timeseries` instead of the deprecated `load_snapshots` vault read, so it no longer downloads the vault's full snapshot history. The result no longer depends on the runtime's timezone: east of UTC, each day's PnL used to be matched with the previous day's shares (e.g. -0.4% on a $1.3M PnL vault). A vault with no history still returns zero, but a failed history read now throws instead of returning `$0`.
## 9.13.0 (2026-10-12)
### Minor Changes
- e276ba4: feat: `IVault` now carries `underlyingVaultAddress` / `underlyingChainId` for wrapper vaults (mapped from the backend's `underlying_vault_address` / `underlying_chain`, null otherwise). A wrapper's own on-chain `totalAssets` reads 0, so consumers use these to show the underlying vault's TVL.
## 9.12.0 (2026-10-09)
### Minor Changes
- ba7409e: feat(solana): add the withdrawal queue program id and refresh the vault IDL to the withdrawal-queue release. Adds `programIds..withdrawalQueue` and `getProgramId('withdrawalQueue')` on devnet and localnet, where the queue is deployed; mainnet-beta gets it once the queue ships there, and until then `getProgramId('withdrawalQueue')` throws `AugustValidationError` on mainnet-beta. Vault state reads now return `withdrawalQueueAuthority` (the default key when no queue is attached, which is every mainnet vault today). The refreshed vault IDL works against both the upgraded devnet program and the current mainnet program: every vault instruction the SDK calls is unchanged, and `VaultState` keeps its size, so existing vaults decode as before. Operator transfers (`operatorDeposit` / `operatorWithdraw`) built from the bundled IDL now need `operatorTokenAccount` passed explicitly: it is the ATA of a registered subaccount's address, or of the operator, which the IDL cannot derive.
- 4f1fc68: feat(solana): read withdrawal-queue state. Solana vaults with a queue now carry `withdrawalQueue` (`address`, `enabled`, `cooldownSeconds`, `fulfillmentWindowSeconds`, `pendingCount`, `pendingShares`), and `getVaultPositions` / `getVaultAvailableRedemptions` list a Solana wallet's requests: waiting (`AWAITING_COOLDOWN`) and past-window (the new `VaultRedemptionStatus.EXPIRED`, cancel-only) ones in `availableRedemptions`, claimable ones in `pendingRedemptions`, each with the new optional `estimatedAssets` (net payout at the current share price, priced from vault state and share supply read in one slot) and a `receiver` that is the wallet the request pays. `getVaultAvailableRedemptions` now accepts a Solana vault address. RPC: one extra account read per Solana vault (the queue, with the vault state read fresh for `enabled`), plus one `getProgramAccounts` and one `getMultipleAccountsInfo` per vault where the wallet has requests (another per further 100 distinct payout accounts).
- 919fd8e: feat(solana): withdrawal requests carry a payout floor. `sdk.solana.vaultRequestRedeem` takes `slippageBps` and `minAssetsOut`, as `vaultRedeem` does; by default the request's floor is the current net quote lowered by 50 bps, and a claim that would pay less fails with `PayoutBelowFloor` and leaves the request pending. `minAssetsOut: 0n` requests with no floor. The bundled withdrawal queue IDL is refreshed to the program build that adds the floor (the new `request_withdrawal` argument, `minAssetsOut` on decoded requests and on `WithdrawalRequested`, and the `PayoutBelowFloor` error, with a next-step hint). Requests built with the previous IDL are refused by that build.
- a69fb42: feat(solana): request, claim and cancel withdrawals on vaults with a withdrawal queue. `sdk.solana.vaultRequestRedeem({ vault, wallet, amount, recipient?, finalizer?, requestId? })` escrows shares in a request and returns its address; `sdk.solana.vaultRedeem(..., { request })` claims a ready request (priced when it settles, net of the vault's withdrawal fee); `sdk.solana.vaultCancelRedeemRequest({ wallet, request })` returns a pending request's shares. On a queued vault, a direct `vaultRedeem` without `request` is now refused before signing, with a pointer to the request flow, instead of failing on chain with `WithdrawalQueueRequired`. Queue errors carry a next-step hint. Off-curve owners, such as a multisig vault, are accepted as the fee recipient a claim pays, and as a holder whose token account has to be created (in the queue flows and in `vaultDeposit` / `vaultRedeem`), instead of failing with `TokenOwnerOffCurveError`.
### Patch Changes
- 130ff23: fix: `getTotalDeposited` now skips wrapper vaults (non-null `underlying_vault_address`) so their TVL is not double counted with the underlying vault. Adds `underlying_vault_address` / `underlying_chain` to `ITokenizedVault`.
## 9.11.0 (2026-10-08)
### Minor Changes
- 9fd4cc6: feat: fall back to a native deposit while the SwapRouter is paused
- `getDepositRoute`, `vaultDeposit` and `approve` read the router's `isPaused()` before routing a deposit that carries an origin code. While the router is paused, the deposit goes straight to the vault with the new `DepositRouteReason` `'router-paused'`, and `vaultDeposit` logs `attribution-skipped` with that reason. `attribution.strictOrigin` does not throw on a paused router.
- `swapAndDeposit`, `depositViaSwapRouter`, `depositNativeViaSwapRouter` and `swapRouterDeposit` check the pause before any approval. While the router is paused they throw an `AugustSDKError` (`context.reason: 'router-paused'`) instead of sending an approval to a router that would revert with `ContractIsPaused`.
- The pause state is cached for 15 seconds (the other router reads stay at 5 minutes). This adds at most one `isPaused()` call per routed deposit, and none for a deposit that would not route.
**Heads-up for exhaustive checks:** `DepositRouteReason` gains the member `'router-paused'`. An exhaustive `switch` over `route.reason` (one whose `default` branch assigns to `never`) stops compiling until it handles the new member.
## 9.10.1 (2026-10-07)
### Patch Changes
- fb4822d: feat(types): add `latest_account_value` and `account_value_updated_at` to `IWSSubaccountListItem`.
The backend now caches each subaccount's USD account value (refreshed hourly) on the subaccount list responses (`GET /subaccount`, `GET /users/{address}/subaccounts`, `GET /org/subaccounts`). Both fields are optional and nullable: `null` before the first refresh, absent on older backends. The cached value is a sort key and placeholder; the subaccount summary remains the authoritative live value. Type-only change, no runtime behavior change.
## 9.10.0 (2026-10-05)
### Minor Changes
- bebede8: fix: `getVaultUserLifetimePnl` throws `HISTORY_UNAVAILABLE` when a wallet with no indexed deposit holds shares from a mint that no deposit explains
`getSubgraphUserHistory` returns `[]` when its query fails. If the wallet had also received any peer transfer, even 1e12 wei of shares, the history guard counted the transfer as a deposit and passed. Lifetime PnL then reported almost the whole position as profit: a $2,000 position with a $0.002 dust transfer read +$1,999.998 (+99,999,900%).
A share mint to the wallet proves a deposit. When no indexed deposit (subgraph, `ReserveDeposit` or LayerZero) explains a mint and the wallet has no other deposit, the getter now throws `AugustHistoryUnavailableError` instead of returning a number. Wallets whose shares all arrived by peer transfer are still priced from those transfers.
`assertPnlHistoryConsistent` takes two new optional inputs, `mintsMatchHistory` (default `true`) and `receivedByTransferRaw` (default `0`). Existing calls behave as before.
The `getVaultUserLifetimePnl` TSDoc now says that the share-transfer query runs for every vault, LayerZero OVaults included, and that LayerZero OVaults leave out only the hub composer's and share OFT's transfers.
Request cost: unchanged.
- 86e0a1b: fix(solana): stop reporting landed deposits and redeems as timed out.
Writes through `SolanaAdapter` used Anchor's confirmation. It waits for a WebSocket notification and gives up after a fixed 30s or 60s, even when the transaction has landed. Writes now poll `getSignatureStatuses` over HTTP. Polling ends when the transaction confirms, when its blockhash expires on the finalized chain (never for durable-nonce transactions), or at a 120s backstop that also bounds hung RPC requests.
A transaction that was sent but whose outcome could not be established now throws the new `AugustTransactionError` (`TRANSACTION_UNCONFIRMED`). It carries the `signature`. Check that signature before resubmitting; the SDK never says resubmitting is safe, since an RPC node with incomplete history cannot prove a transaction never landed. `context.reason` says what was seen:
- `expired_not_found`: the blockhash expired and no lookup found the transaction, so it very likely never landed.
- `below_commitment` / `failed_below_commitment`: it was seen landing, or failing, but did not reach the requested commitment in time.
- `rpc_failing` / `not_visible`: reads failed, or the transaction never showed up. `cause` holds the last RPC failure.
A transaction that landed and failed still surfaces Anchor's program error (e.g. `SlippageExceeded`).
RPC usage: confirmation no longer opens a WebSocket subscription. It polls right after sending, then every 2s: typically 1–3 calls at `confirmed` and about 60 for a transaction that expires. After a poll with a failed read, the wait doubles, up to 16s, so a failing RPC is not hit at full cadence.
Internal: Stellar's `withTimeout` moved to a shared internal helper, with no behavior change.
## 9.9.1 (2026-10-02)
### Patch Changes
- 47511b0: fix: read Solana borrower portfolios from the August API; the SDK no longer calls Octav directly
## 9.9.0 (2026-10-02)
### Minor Changes
- d9bc7ca: feat: `getDepositRoute()` / `sdk.evm.getDepositRoute()` report where a deposit goes and which address to approve, and `attribution.strictOrigin` turns an unregistered origin code into a hard error
- `getDepositRoute({ target, depositAsset?, isDepositWithPermit? })` returns `{ via: 'native' | 'router', spender, reason? }`. It returns `router` only when `attribution.originCode` is set, the chain is Ethereum mainnet and has a SwapRouter, the vault is registered on it, the vault accepts the asset directly (its reference asset, or a Tokenized Vault V2 whitelisted asset — deposited as-is, never swapped), the router whitelists the asset (`whitelistedTokens`), the deposit is not a permit, native-token or adapter deposit, and the code is registered. Otherwise it returns `native` with a `reason`; `chain-not-supported` on any chain other than mainnet, even one with a SwapRouter, and `router-token-not-whitelisted` for an asset the router would reject with `InputTokenNotWhitelisted`. Read-only.
- With a code configured on mainnet it reads the router's `vaultInfo`, `whitelistedTokens(asset)` and `origins` (cached 5 minutes) and, for a Tokenized Vault V2 non-reference asset, the vault's assets whitelist: 7 reads worst case, counting the backend vault row and `asset()`. Without a code, or off mainnet, it makes no router reads.
- `attribution.strictOrigin: true` makes an unregistered code throw `AugustValidationError` instead of resolving to `native` / `origin-not-registered`.
- 0f9a6e6: feat: configure a SwapRouter origin code once on the SDK instance with `attribution: { originCode }`, and read a code's on-chain registration with `getOriginInfo()`
- `new AugustSDK({ attribution: { originCode } })` sets the `bytes32` origin (referral / fee-sharing) code that `swapAndDeposit`, `depositViaSwapRouter`, `depositNativeViaSwapRouter` and `swapRouterDeposit` send when a call passes no `originCode` of its own. Precedence: per-call code, then the instance code, then the all-zero sentinel. The instance code is sent on Ethereum mainnet only; on any other chain these methods send the sentinel unless the call passes its own code. A malformed code throws `AugustValidationError` from the constructor; an instance that omits `attribution` resets it. `attribution.builderCodes` is now optional so the origin code can be set on its own.
- `sdk.getOriginInfo({ chainId, originCode })` (and the standalone `getOriginInfo({ chainId, originCode, rpcUrl })`) returns `{ registered, originFeeBps, collector }` from the router's `origins(bytes32)`, cached for 5 minutes. One `eth_call` per uncached (chain, code); none on chains without a SwapRouter.
- `vaultDeposit` is unchanged and still never routes through the SwapRouter. `IContractWriteOptions.receiver` and `slippageBps` are now marked `@deprecated`: `vaultDeposit` has ignored both since the SwapRouter branch was removed.
- 997d6cf: fix: `getVaultUserLifetimePnl` reads High Growth ETH adapter deposits, counts each withdrawal request once, values settled Tokenized Vault V2 redemptions at what the vault paid, prices transfers on closed vaults, and sees share transfers on new-schema receipt subgraphs
Five inputs to lifetime PnL were wrong. Each was checked against an on-chain rebuild of up to 15 wallets per vault across the 60-vault registry.
- **High Growth ETH adapter deposits.** Deposits made through Kelp's gain adapter mint shares with a `ReserveDeposit(account, shares, assets)` event instead of an ERC-4626 `Deposit`. The user history never saw them: 2,969 of 3,939 hgETH mints, 1,664 of 1,898 wallets. When a wallet's history misses a mint, the getter now reads its `reserveDeposits` from the vault subgraph and counts the ones that explain the missing mints at their `assets`. The transfer guard then applies as usual. hgETH lifetime PnL ranged from −100% to +16,451%; the 11 wallets checked now match the on-chain figures (−2.12% to +3.52%).
- **Doubled withdrawal requests.** A redemption requested through the same adapter makes hgETH emit `WithdrawalRequested` twice for one share transfer. In a transaction where the share ledger shows the wallet sending shares to the vault `n` times, at most `n` request rows count now.
- **Tokenized Vault V2 redemptions.** V2 requests carry only shares, and every request was valued at the current share price, so a past withdrawal grew with the vault's yield after it left. Now every processed withdrawal counts at the assets the vault paid (`WithdrawalProcessed.assetsAmount`). Its shares, estimated at that day's `asset_share_ratio`, retire the oldest requests first. Request shares left over count at the ratio on their claim date once claimable, because the subgraph lacks some processed rows (none for earnAUSD before 2026-02-01). Only shares not yet claimable stay at the current share price. If the lag or the ratio history cannot be read, the getter values every request at the current share price, as before. Example: a Sentora USD wallet read +$372,459 against +$261,065 on-chain; it now reads +$261,065.
- **Closed vaults.** Shares that moved after a vault's backend history stopped found no share ratio, so the getter threw `HISTORY_UNAVAILABLE` (an Earn ctUSD holder with $258,000 of shares received on 2026-08-27; the history ends on 2026-08-07). When the window holds no usable ratio, the getter reads the full history and takes the latest earlier day's, as `transferCostBasis` already documents.
- **New-schema receipt subgraphs.** `resolveSubgraphSchema` probed `withdrawalRequesteds`, which no receipt-token subgraph has, so it classified all of them as old-schema. On the 29 vaults whose receipt subgraph uses the new schema, `getSubgraphUserTransfers` queried field names that do not exist and returned no transfers, so lifetime PnL never saw a share transfer there. The probe now falls back to `transfers`.
New exports: `getSubgraphUserReserveDeposits`, `selectReserveDeposits`, `countWithdrawalRequestsOnce` and `settleV2Redemptions` (with their params types and `V2RedemptionValue`), and the `ISubgraphReserveDeposit` type.
Request cost: one `reserveDeposits` subgraph query only when a mint has no indexed deposit (only hgETH today). For a V2 wallet with redemption requests, one `lagDuration()` read plus one backend timeseries request. A second timeseries request, for the full history, when the first window holds no usable ratio. One extra schema probe per receipt subgraph URL per hour.
- caec799: feat: `getVaultUserLifetimePnl` counts shares received or sent by transfer even when the wallet also deposited, and reports the transfer-priced part
Since 9.7.0, shares a wallet received from another holder were valued as cost only when its history had no deposit at all. Once a wallet had any deposit, those received shares had no cost basis, so their whole value read as profit. Examples: a migrated holder who topped up, or a depositor who also bought shares on a DEX. Shares sent to another wallet were ignored in the same case.
The getter now always values peer transfers of the share token at the vault's `asset_share_ratio` on that day. Received shares add to `totalDeposited`, sent shares add to `totalWithdrawn`, and both happen alongside indexed deposits. That also fixes a depositor who moved their shares elsewhere (a lending market as collateral, a DEX sale): their shares used to read as a total loss, for example −100% on a High Growth ETH wallet whose shares went to an Euler vault. Now they count as withdrawn at their value on the day they left. A wallet with no deposit and no received shares keeps a zero transfer basis, so the history guard still decides for it.
- `IVaultUserLifetimePnl` gains `receivedByTransfer` and `receivedByTransferUsd`: the part of `totalDeposited` that came from received shares, zero when none counted. They are typed optional so existing hand-built objects still compile, but the getter always sets them.
- New pure exports `pnlCostBasis` (with the types `PnlCostBasisParams` and `PnlCostBasis`) and `historyCoversMints` (with `HistoryCoversMintsParams`) fold the transfers into the cost basis.
- `transferCostBasis` takes an optional `countSentWithoutReceipt`. It defaults to `false`, which keeps its 9.7.0 output.
- LayerZero OVaults count peer transfers too, except those with the vault's hub composer or hub share OFT. The composer delivers a cross-chain deposit's shares by transfer, and the LayerZero deposit subgraph already counts that deposit; shares bridged to a spoke chain still count in the position. `LAYERZERO_VAULTS` entries gain `hubComposer` and `hubShareOFT`, and `selectPeerTransfers` takes an optional list of counterparties to leave out.
- Transfers fold in for a depositor only when the history explains every share mint (`historyCoversMints`); otherwise the result matches 9.7.0.
- Request cost: wallets with indexed deposits now pay the receipt-transfer subgraph query (and a `symbol()` read) that only zero-deposit wallets paid before, plus one backend timeseries request when they have peer transfers. The query runs in parallel with the history read, so it adds requests but not a sequential round trip.
- Wallets with no peer transfers get the same numbers as before. If the transfers cannot be read or priced, the getter behaves as if there were none.
- d31c45f: fix: `swapAndDeposit`, `depositViaSwapRouter`, `depositNativeViaSwapRouter` and `swapRouterDeposit` now fail the way `vaultDeposit` does instead of throwing raw ethers errors
A malformed-nonce RPC response still resolves to the recovered transaction hash; an account that cannot cover gas throws `AugustValidationError` with code `ACCOUNT_NOT_FUNDED`; any other failure throws `AugustSDKError` with the original error as `cause` and `chainId`, `vault` and the broadcast state (`txHash`, `broadcast`, `confirmationUnknown`) in `context`. Callers that matched raw ethers error codes on these methods should read `error.cause`.
- 9321f91: feat: with `attribution.originCode` configured, `vaultDeposit` sends deposits the SwapRouter can take directly through `SwapRouter.deposit` carrying the code, and `approve` / `vaultApprove` approve the router instead of the vault
- The route is `getDepositRoute()`'s: reference-asset deposits into router-registered vaults, and Tokenized Vault V2 whitelisted assets as direct deposits (never swapped). Every other deposit — and every deposit when no code is configured — keeps the native path unchanged.
- An unregistered code falls back to the native deposit with a `vaultDeposit:attribution-skipped` warning; set `attribution.strictOrigin` to throw `AugustValidationError` before any transaction instead.
- `swapAndDeposit`, `depositViaSwapRouter`, `depositNativeViaSwapRouter` and `swapRouterDeposit` check the origin code's registration before any approval or transaction (one `origins` read, cached 5 minutes; none for the zero sentinel). An `originCode` passed to the call that is not registered throws `AugustValidationError`. An unregistered instance code falls back to the zero sentinel with a `:attribution-skipped` warning and `sdk.attribution.origin=skipped`, or throws under `attribution.strictOrigin`.
- Shares mint to `wallet` on both routes.
- New bounded Sentry tag `sdk.attribution.origin` (`applied` | `skipped` | `none`); the code itself is only a span attribute.
- A routed deposit costs more gas than the direct vault deposit (measured on a mainnet fork, repeat 1000 USDC deposits into Core USDC: direct 102,067; router with a 0% code 161,744, +59.7k; router with a 1% code 173,135, +71.1k), plus a one-time approval of the router per token.
### Patch Changes
- 07eef13: docs: document origin-code attribution (`attribution.originCode`) in the SDK README — constructor example, precedence, fallback and `strictOrigin`, mainnet-only scope, gas cost, the zero-fee caveat, approving `route.spender`, and the process-global config
Operator checklist before an integrator ships an origin code (the SDK cannot do these; the router owner does):
1. Agree the origin fee (bps, at most 7000) and the fee collector address with the business. A 0 bps code is valid for attribution only, but the router emits no `OriginFeeApplied` event for it.
2. Register the code on the Ethereum mainnet SwapRouter with `addOrigin(code, feeBps, collector)` from the Crest `/swap-router-config` page (signed by the router owner).
3. For every additional vault the integrator deposits into, `enableVault` it on the router (a Tokenized Vault V2 also needs the router on its sender whitelist).
4. Verify with `sdk.getOriginInfo({ chainId: 1, originCode })`: `registered: true`, the agreed `originFeeBps` and `collector`.
- a9c7181: fix: `swapRouterDeposit` deposits an asset a Tokenized Vault V2 accepts as-is through `SwapRouter.deposit` instead of swapping it
USDT into Sentora USD was quoted on ParaSwap, swapped to USDC and charged the router's 150 bps swap fee, although `SwapRouter.deposit` takes any asset the vault accepts. It now goes through `SwapRouter.deposit` with no quote and no swap fee whenever the vault's assets whitelist has the asset and the router whitelists it (`whitelistedTokens`). Assets the router does not whitelist (RLUSD, PYUSD) and assets outside the vault's whitelist still swap. A Tokenized Vault V2 non-reference deposit adds the router's `vaultInfo` and `whitelistedTokens` and the vault's assets whitelist reads (cached 5 minutes).
## 9.8.0 (2026-10-01)
### Minor Changes
- 70032b1: feat: register the HyperEVM (chain 999) `SwapRouter` (`0xF47ce4B8df30bc3B3b6cc21Fe1552A2198A4A4F7`, deploy block 47385042) so native HYPE can be deposited into WHYPE-reference vaults. `swapRouterDeposit` with the zero address as `depositAsset`, and `depositNativeViaSwapRouter`, now wrap HYPE to WHYPE and call `depositNativeToken` on chain 999, and `getSwapRouterAddress(999)` / `getSwapRouterName(999)` now resolve. No DEX aggregator is configured on chain 999, so swap deposits of other ERC-20s still throw `INVALID_CHAIN` there. RPC impact: `getSwapRouterWhitelistedTokens(999)` and `getSwapRouterEligibleVaults(999)` previously returned `[]` with no RPC; they now scan the router's event history from the deploy block in 1,000-block `eth_getLogs` chunks (cached for 5 minutes), and `isNativeSwapRouterDepositSupported(999, …)` now makes its 2 reads.
## 9.7.1 (2026-10-01)
### Patch Changes
- 46d6e8e: fix: logging a `@solana/web3.js` error no longer throws `Cannot assign to read only property 'name'`. `sanitizeError` now defines the redacted clone's properties instead of assigning them, so the Solana adapter's typed `Solana deposit failed` / `Solana redeem failed` error — with its `code`, `context` and original `cause` — reaches the caller instead of an opaque `TypeError`.
## 9.7.0 (2026-09-30)
### Minor Changes
- 55b06c3: Make the August API key optional: keyless SDKs read public routes
`fetchAugustWithKey` used to throw `AUTH_MISSING_KEY` before sending anything
when no key was configured. Plenty of the routes behind it are public — the
sub-account reads for vault-linked borrowers, the two collateral risk routes,
timelock requests — so a keyless integration got empty vault allocations and
borrower health factors instead of the data the backend would have served it.
- **No key now means an anonymous request.** The `x-api-key` header is only
attached when a key is set, and routes that do require one answer `401`,
which surfaces as `AugustAuthError` with code `AUTH_UNAUTHORIZED`.
- **`keys` is optional on the constructor.** `new AugustSDK({ appName })` works.
Supply `keys.august` for admin and curator methods, for authenticated-user
reads such as `getDiscountFactors`, and for sub-account reads where the
subaccount is not linked to a vault.
- **`override` has no effect on the request** and stays deprecated: an absent
`apiKey` already sends an anonymous request. It still warns once.
- **The CLI and the MCP server name backend auth refusals.** A 401 becomes
`API_KEY_MISSING` ("no key sent, or the one supplied is invalid"), a 403
becomes `API_KEY_FORBIDDEN` ("valid key, wrong scope"), each with its
remediation, instead of a bare internal error.
`AUTH_MISSING_KEY` remains in the error-code union for consumers that switch on
it, and `init()` still fails without a key — keyless SDKs skip it.
- c09ef25: feat: `getVaultUserLifetimePnl` prices shares a wallet received by transfer instead of throwing `HISTORY_UNAVAILABLE`
Vault shares are transferable, so a wallet can hold a position it never deposited into: a vault migration that airdrops the new shares, a DEX purchase, a transfer from another wallet. With no indexed deposit, the getter threw `AugustHistoryUnavailableError` for a live position, or, after a later withdrawal, reported the whole position as profit.
When the wallet's history has **no deposit at all**, the getter now reads its share-token transfers and values each one at the vault's `asset_share_ratio` on that day (backend historical timeseries). Received shares become `totalDeposited`, and sent shares add to `totalWithdrawn`, but only against a received basis: a wallet that sent shares and received none still hits the history guard. Lifetime PnL for such a wallet runs from the day its shares arrived. Mints, burns and transfers to or from the vault are left out, because history already counts them. The first holders to benefit are the Treehouse Growth Vault v2 wallets, whose shares came from the v1 migration.
- Wallets with at least one indexed deposit are computed exactly as before.
- A zero-deposit wallet costs one extra subgraph query. It costs one backend timeseries request more when it has transfers.
- If the transfers cannot be read or priced, the getter behaves as it did before this change.
- New pure exports: `selectPeerTransfers`, `transferCostBasis`, and the types `PnlTransfer`, `TransferCostBasisParams` and `TransferCostBasis`.
- `getSubgraphUserTransfers` takes an optional `{ receiptSubgraph: true }` to read an evm-2 vault's receipt-token subgraph.
- `IVaultMetadataItem` gains the optional `receipt_subgraph`, which the metadata endpoint already returns.
### Patch Changes
- 1335d1c: fix: `getVaultPositions` no longer reports other users' withdrawal requests as redemptions on EVM vaults when no EVM `wallet` is supplied
A Stellar-only or Solana-only positions read still fans out over every EVM vault. Each one reached `getVaultAvailableRedemptions` without a receiver, whose wallet-less path lists every receiver's processed requests for the vault, so every EVM vault came back `REDEEM` carrying rows that were not the caller's. The redemption read is now skipped when there is no EVM wallet: the position reports empty redemptions and `PENDING`, and those callers no longer pay one subgraph query per EVM vault. Behaviour with an EVM `wallet` is unchanged.
- 8c173cd: fix(solana): fall back to plain `deposit` / `redeem` when the supplied IDL predates the checked instructions
Since 9.4.0, `handleSolanaDeposit` and `handleSolanaRedeem` always called
`deposit_checked` / `redeem_checked`. Both take a caller-supplied `idl`, and an
IDL generated before the program shipped those instructions has no such
methods, so inputs that worked on 9.3.0 threw a `TypeError` before anything was
sent.
- **Such an IDL now gets the plain instruction**, which the program still
accepts unchanged, with a warning logged. No pricing snapshot is read for a
deposit in that case, since there is no floor to quote.
- **A requested floor is never dropped silently.** A non-zero `minSharesOut` /
`minAssetsOut`, or any `slippageBps`, with such an IDL throws
`AugustValidationError` telling the caller to pass `Solana.constants.vaultIdl`.
`0n` is the documented "no floor" and falls back.
Callers passing the SDK's bundled IDL are unaffected.
## 9.6.0 (2026-09-25)
### Minor Changes
- 41c558d: Identify the calling application on every backend request
`fetchAugustWithKey`, `fetchAugustPublic`, and `fetchAugustWithBearer` now send
`x-august-app: ` and `x-august-sdk-version` by default. The `AugustSDK`
constructor wires its validated `appName` in through the new `setSdkAppName`
(process-global, last instance wins, like `setPublicApiBaseUrl`). This gives the
backend per-integrator request counts independent of Sentry sampling. Callers
can still override either header per request.
- b307d78: feat: `getVaultUserLifetimePnl` throws `AugustPriceUnavailableError` (code `PRICE_UNAVAILABLE`) instead of pricing the position at $1 per asset
When the price server had no USD price for a vault's underlying asset — a failed
lookup, a token it does not know, or an unreadable `asset()` — the getter logged a
warning and multiplied every USD field by `1`. For a non-dollar vault (lsETH, tETH,
BTC) that reported `currentPositionValueUsd`, `totalDepositedUsd`,
`totalWithdrawnUsd` and `lifetimePnlUsd` in raw asset units, labelled as dollars: a
~$40k lsETH position read as ~$13, and nothing in the result showed it was wrong.
The getter now throws the new typed `AugustPriceUnavailableError` in that case,
alongside the existing `AugustHistoryUnavailableError`:
```ts
try {
const pnl = await sdk.getVaultUserLifetimePnl({ vault, wallet, chainId });
} catch (err) {
if (err instanceof AugustPriceUnavailableError) hideUsd();
else throw err;
}
```
Consumer impact: a call that previously resolved with $1-priced USD fields now
rejects. `IVaultUserLifetimePnl` is unchanged, and calls with a resolvable price
return exactly what they did before. The failure is also logged at error level
(it was a warning), so a missing price now surfaces as an SDK Sentry issue.
- d49c433: feat: add `isNativeSwapRouterDepositSupported(chainId, vault, options)` — a read-only, provider-agnostic check for whether a vault accepts a native-ETH SwapRouter deposit (a SwapRouter is deployed on the chain, the vault is registered on it with the wrapped-native token as its reference asset, and the vault's own `asset()` is that token). Two parallel RPC reads, no backend call. Lets a UI gate the native-ETH deposit option before offering it, instead of discovering unsupported vaults via a thrown error at deposit time. Also documents the wrap-only, WETH-vaults-only limitation of the on-chain SwapRouter on `SWAP_ROUTER_WRAPPED_NATIVE`, `swapRouterDeposit`, and `depositNativeViaSwapRouter`.
- 41c558d: Set `sdk.surface` once at init via `analytics.surface`
`sdk.surface` was only set inside `captureSdkException`, so errors reaching
Sentry through the SDK's logger sink — the bulk of them — carried no surface at
all. `IAnalyticsConfig` gains an optional `surface` (`'sdk'` by default), which
`initializeSentry` records as a sticky tag on every event and span. The CLI
passes `'cli'`; `captureSdkException` accepts `'mcp'` alongside the existing
values.
### Patch Changes
- 71642b3: Deprecate three `WEBSERVER_ENDPOINTS` constants pointing at routes that do not exist
`default.hello`, `subaccount.rewards`, and `subaccount.batch` have no backend
handler and are never called by the SDK. They stay exported, marked
`@deprecated`, so consumers keep compiling; they are removed in the next major
release.
- 209ce6e: `trackApiCall` and `trackNetworkSwitch` no longer set the global `api.last_endpoint`, `api.server`, and `active.chainId` scope tags. These stamped unrelated later events with stale values; the same data stays on each call's breadcrumb.
- 41c558d: Correct analytics documentation that described behaviour the code no longer has
`IAnalyticsConfig.tracesSampleRate` documents its real default (`0.1`), the
analytics module header no longer advertises cache monitoring, and the
`appName` validation error links to an "App name" section that now exists in
the quick-start guide.
- 41c558d: Tag first-party applications `partner.tier: internal`
`upshift-web-app`, `upshift-earn`, `upshift-prime`, `august-cli`, and
`august-mcp` now report `partner.tier: internal`, so `partner.tier:unverified`
in Sentry means "external integrator" today, without waiting for the backend
verification endpoint. `partner.id` is unchanged.
- c685d31: fix: telemetry bug pass. `hashApiKey` now returns a real SHA-256 hash (was a last-5-characters mask), caches per key instead of returning the first key's value forever, and returns `''` instead of throwing when `crypto.createHash` is unavailable (e.g. a browser bundle without a `crypto` shim), so the Sentry user is still set. `getUserId` precedence is now `apikey > wallet > domain > fingerprint > session` (previously `domain` outranked every identifier). Sync method tracking no longer sets the racy global `sdk.category`/`sdk.chain` tags, and the `beforeSendTransaction` network sub-sampling is removed: the network methods are synchronous and create no transactions, so the filter only ever matched through that leaked tag and dropped ~90% of the unrelated transactions that followed a `switchNetwork`/`updateWallet`/`clearWallet`/`setSigner` call — expect higher SDK transaction counts in Sentry after upgrading. `getCacheStats`/`resetCacheStats` are deprecated (they never recorded anything and always return zeros; removal is planned for the next major). Adds `trackKeyVerification` and success/failure telemetry for `verifyAugustKey`.
- 41c558d: Carry app and partner identity on every `sdk.method` span
`app.name`, `partner.id`, `partner.tier`, `sdk.runtime`, `sdk.surface`, and
`august.sdk_version` were set as Sentry scope tags, which reach only the root
span of a trace. Child `sdk.method` spans — 86% of span rows — carried no
identity at all, so the partner-usage dashboard could not filter them by
application. The resolved identity is now copied onto each span as attributes.
- 41c558d: Close the `sdk.category: unknown` bucket
`previewRwaRedemption` is now classified `read.redemption`, and the EVM
adapter's internal signer helper is renamed `_getSigner` so the instrumenter
skips it (TypeScript `private` does not hide a method from the prototype
walk). A new test walks every instrumented prototype and fails on any public
method without a `METHOD_CATEGORIES` entry, and on any stale entry.
## 9.5.0 (2026-09-23)
### Minor Changes
- 98b5303: feat: `getVaultAllocations` exposure items (`exposurePerCategory.supplying` / `borrowing`) now carry `poolId` — the DeBank `pool.id` of the portfolio item they came from — so consumers can tell apart two positions in the same protocol holding the same token (e.g. two Curve LPs that both report a trUSD leg).
## 9.4.0 (2026-09-22)
### Minor Changes
- cf09fc2: feat: `getVaultAllocations` accepts an optional pre-fetched `tokenizedVault` row, and `getVault(allocations: true)` hands it the row it already holds instead of letting the getter re-read `GET /tokenized_vault/{address}`. The row is only reused when it can carry the borrower list (`loadSubaccounts` not `false`, `.subaccounts`/`.eoa_operators` present), so a row that cannot is fetched in full as before. This removes one backend request per enriched vault wherever the two reads did not already share a cache entry: `getVault` called with `loadSnapshots: false`, and the per-vault enrichment inside `getVaults`, which reads rows from the list endpoint. Backward-compatible; the new parameter is optional.
- ab0f251: `IVault.isDepositPaused` now reflects the vault's on-chain `depositsPaused()` state
For EVM vaults the flag was derived solely from a hardcoded deny list of vault
addresses (`isBadVault`) — no contract read at all — while its sibling
`isWithdrawalPaused` had always been read from the chain. A curator pausing
deposits on-chain therefore left every consumer showing an enabled deposit
action, and each attempt reverted with `DepositsPaused` at `estimateGas`. This
happened in production: Nerona Dollar Yield Strategy (Fluent,
`0xeaB765200189909c806FD6e20eBb4E57D6703C82`) was paused on 2026-09-08 and kept
failing user deposits for a week.
`depositsPaused` is now read alongside `withdrawalsPaused` in the existing v1
and v2 vault batches and mapped onto `isDepositPaused`, OR'd with the deny list
so the previous behavior is preserved:
```ts
isDepositPaused: contractCalls.depositsPaused === true || isBadVault(address);
```
Consumer impact: a vault that is paused on-chain now reports
`isDepositPaused: true` where it previously reported `false` — UIs that gate the
deposit CTA on this field will start blocking those vaults (the intended
behavior). No API shape change; `IPoolFunctions` gains `'depositsPaused'`.
Deployments too old to expose `depositsPaused()` revert the call; that read
resolves to `false` rather than failing the whole vault fetch. Only a contract
revert is demoted that way — transport failures (rate limit, timeout, network
blip) are re-thrown, so a flaky RPC cannot make a paused vault look open.
- a631a2c: Add `claimWithdrawal` — an SDK wrapper for the EVM-2 queued-withdrawal `claim()` call
Tokenized Vault V2 (EVM-2) vaults settle a queued `requestRedeem` through a
separate `claim(year, month, day, receiverAddr)` call once the withdrawal
epoch has elapsed. The SDK had no wrapper for this — integrators building
against EVM-2 vaults had to hand-encode the call themselves.
`augustSdk.evm.claimWithdrawal({ target, wallet, year, month, day, receiver?, wait? })`
wraps it directly, validates the vault is EVM-2, and returns the claim
transaction hash. v1/v0 vaults keep using the existing `vaultRedeem` wrapper.
`year`/`month`/`day` must be non-negative integers (`AugustValidationError`
otherwise), and `wallet` is the default `receiver` of the withdrawn assets.
- a631a2c: Add SDK wrappers for EVM-2 vault-mechanics and queued-withdrawal reads
Integrators building directly against Tokenized Vault V2 (EVM-2) contracts
had to hand-encode several reads the SDK didn't wrap, forcing them to
maintain their own ABI slice for values the SDK already resolves internally.
Six new `augustSdk.evm.*` methods close that gap:
- `getIdleLiquidity({ vault })` — `getTotalAssets() - externalAssets()`, the
balance available to an instant redemption.
- `lagDuration({ vault })` — the queued-withdrawal delay, in seconds.
- `getWithdrawalEpoch({ vault })` — the vault's current withdrawal epoch, by
named field (`year`/`month`/`day`/`claimableEpoch`) rather than a
positional tuple.
- `getBurnableAmountByReceiver({ vault, receiver, year, month, day })` — what
a receiver can currently claim for a withdrawal-epoch date.
- `getRequirementByDate({ vault, year, month, day })` — total shares required
to settle a date's queue.
- `getScheduledTransactionsByDate({ vault, year, month, day })` — scheduled
queued-withdrawal volume for a date.
All six are EVM-2 only and throw `AugustValidationError` against a v1/v0
vault rather than silently returning a wrong value.
The `year`/`month`/`day` inputs are validated up front: a non-integer or
negative value throws `AugustValidationError('INVALID_INPUT')` before any RPC.
- 20a57d2: feat: honor `includeClosed` on the single-vault path. `AugustVaults.getVault` rebuilt its `IVaultBaseOptions` from scratch and dropped the caller's `includeClosed`, so the flag was reachable only via the plural `getVaults`. The per-vault EVM getters null out a `closed` + `is_visible: false` vault unless it is set, which meant reading ONE closed vault by address could never resolve it — no matter what the caller passed. `includeClosed` is now declared on `IVaultCustomOptions` (previously only on `IVaultBaseOptions`, which `getVault`'s `options` parameter does not accept) and forwarded through.
This unblocks holder-facing surfaces that read a single vault by address: a position in a closed vault returned `null`, which consumers dereferenced, leaving no in-app way to withdraw.
- c4e9dc2: Cut backend request timeouts: 15s default, de-duplicated vault fetches, cached and bounded subaccount enrichment
One integrator produced ~40k `AugustTimeoutError` events a week, arriving in
bursts of 20–30 in the same second — a single server render fanning out to the
same endpoints and stalling as a group. Four changes address that:
- **Default request timeout is now 15s** (was 90s), still overridable per call
via `timeoutMs` and process-wide via `setSdkRequestTimeout`. 90s outlived
every realistic caller: a server-rendered integration had been abandoned
upstream long before the abort fired, while the socket stayed open holding
backend capacity and deepening the stall for everyone else.
- **`fetchTokenizedVault` / `fetchTokenizedVaults` de-duplicate in-flight
requests.** The response cache only helped sequential callers; on a cold
process every concurrent `getVault` for the same vault hit the backend. They
now join one request. Failures are not cached — the next caller retries.
- **`getVaultAllocations` memoizes CeFi/OTC answers per borrower for 60s and
fetches them through a bounded concurrency window** instead of one sequential
request per borrower. "No record" is memoized too (it is the common answer);
genuine failures are not.
- **Recovered failures are breadcrumbs, not issues.** A fetcher timeout is
still thrown to the caller — who alone knows whether it is fatal — but is no
longer also logged at error level, and `getSymbol` reports a failed read as a
structured warning instead of an error whose message embedded the token
address.
Behavior for callers is unchanged apart from the shorter default deadline:
integrations that legitimately need longer should set `timeoutMs` or call
`setSdkRequestTimeout`.
- 984a21e: Solana `vaultDeposit` / `vaultRedeem` now send `deposit_checked` / `redeem_checked` with a slippage floor
Both actions sent the program's unguarded `deposit` and `redeem`, so a share-price
move between quote and execution was silently accepted. The program has shipped the
checked variants since v0.1.1; the SDK now uses them.
By default the SDK quotes the expected output from the vault's current state with the
program's own share math (virtual-share offset, pro-rata floor/cap, withdrawal fee) and
passes that quote lowered by 50 bps as the floor. A new trailing `options` argument on
`sdk.solana.vaultDeposit` and `sdk.solana.vaultRedeem` accepts `slippageBps` or an
explicit `minSharesOut` / `minAssetsOut` (raw units; the redeem floor is net of the
withdrawal fee). Passing `0n` restores the old unguarded behaviour.
A deposit that would now revert with `SlippageExceeded` (code 6018) surfaces a message
saying the price moved past the tolerance and how to retry.
An explicit `minSharesOut` / `minAssetsOut` outside `0 .. 2^64-1` (or not a `bigint`)
now throws `AugustValidationError` before any RPC. Previously a negative floor reached
Anchor's unsigned encoder, which writes a `BN`'s magnitude and drops the sign, so `-1n`
became an on-chain floor of `1`.
RPC: vault state and share-mint supply are read in one `getMultipleAccountsInfo`, so
they always come from the same slot — read separately they could straddle someone
else's deposit and price a supply against assets that never coexisted. The deposit path
performs one additional read to build the quote, skipped when `minSharesOut` is
supplied; redeem performs one fewer than before, having folded its share-mint and
vault-state reads into the same snapshot.
### Patch Changes
- a631a2c: Stop sending a redundant receipt-token approval before EVM-2 `instantRedeem`
`vaultRequestRedeem` checked the receipt (share) token's allowance to the vault
and sent an `approve` when it was short on both EVM-2 redeem paths. On the
instant path this was wasted: `instantRedeem` burns the caller's own shares
directly on the vault side rather than pulling them via `transferFrom`, so
there is nothing for an allowance to gate. Verified on a mainnet fork — an
`instantRedeem` succeeds with a `0` receipt-token allowance and no preceding
`approve`.
The queued path is unchanged. `requestRedeem` escrows the shares in the vault
via `transferFrom`, so the vault must be approved as spender — without that
approval the call reverts with `ERC20InsufficientAllowance`. The SDK keeps
sending the approval there whenever the allowance is short.
Consumer impact: an instant redeem that previously sent an `approve`
transaction before `instantRedeem` now sends only the redeem transaction.
Queued redeems behave exactly as before. No API shape change.
- 75a22c0: docs: TSDoc cleanup for the generated reference — describe `init()` and `AugustSDK.vaultDeposit()` correctly, drop internal ticket ids and benchmark file paths from published comments, and replace the expired 2026-01-01 removal date on the `hgETH*LiquidAPY` deprecations with "next major release".
## 9.3.0 (2026-09-11)
### Minor Changes
- cc05a6b: Surface a Stellar vault's asset composition, and stop labelling positions with an asset the report cannot support
Untangled decomposes a vault's TVL two ways — by venue (`byProtocol`) and by
asset (`byAsset`) — and publishes no join between them. The transform read
`byAsset` only to pick a name, tagging every synthesized position with the
single largest asset and discarding the rest. Gami earnUSDC is 84.18% USDC and
15.82% deJTRSY, so the breakdown reported all $25.3M of it as USDC and the
$4.0M of deJTRSY appeared nowhere at all.
`untangledAssetExposure` returns the composition as vault-level token exposure,
and `getVaultAllocations` serves it as `IVaultAllocations.tokens` for Stellar
vaults. Negative rows are kept: a vault holding a position in another Upshift
vault is reported owing the asset it spent (earnXLM carries `earnUSDC
+$1,170,913` against `USDC -$1,170,271`), and the two only sum back to `tvlUsd`
together.
A position is now labelled with the vault's asset only when that asset covers
at least 99% of `tvlUsd` — true of earnXLM (99.98% XLM), false of earnUSDC.
Below that the token carries its value with no symbol rather than asserting a
holding the report does not support; protocol totals, the wallet bucket and
`netValue` are unchanged. Consumers reading a per-venue asset split out of
`exposurePerCategory` should read `tokens` instead for multi-asset vaults.
## 9.2.2 (2026-09-11)
### Patch Changes
- a724e5b: Group Sentry errors by a normalized signature instead of the raw message
The per-signature error rate limiter keyed on the first 120 characters of the
raw message, but the variable part of a message is usually an address near the
front (`Request timeout after 90s: /subaccount/0x3F13…/otc_positions`). Every
vault and wallet therefore got its own signature — its own private rate-limit
allowance, and its own Sentry issue — so one backend timeout billed thousands of
events across dozens of issues in a day.
Addresses, query strings, and long digit runs are now masked before the
signature is built, and outgoing events carry that signature as their Sentry
fingerprint so the copies group into one issue. Distinct endpoints and failure
modes stay separate; the full message and tags still carry the address.
- a724e5b: Stop `getToken` fetching against an undefined Solana RPC endpoint
`endpoint` is optional on `ISolanaConnectionOptions`, so a caller with no Solana
RPC configured reached `fetch(undefined, ...)`. The runtime's fetch wrapper threw
`Cannot read properties of undefined (reading 'toString')`, which `getToken`
swallowed into `Logger.log.error` — an unactionable Sentry error on every server
render of a Solana vault.
`getToken` now returns `null` before the request when no endpoint is configured.
A genuine metadata fetch failure also logs at warn instead of error: callers fall
back to backend metadata on `null`, so the lookup failing is degraded-but-handled,
not an error.
- a724e5b: Recover the Solana RPC endpoint from the connection in `getSolanaVault`
`getSolanaVault` read its endpoint from `options.rpcUrl`, which is resolved
upstream as `providers[vault.chain]` — a map keyed by EVM chain id. Solana's
synthetic chain id is never in it, so the field arrived `undefined` for every
Solana vault regardless of how the consuming app had configured its Solana RPC,
and the deposit-token metadata lookup fetched against `undefined`.
The connection built from that RPC is already passed as `solanaService`, so the
endpoint now falls back to `solanaService.connection.rpcEndpoint`. An explicit
`options.rpcUrl` still wins.
- 69ad798: Stop counting a Stellar vault's position in another Upshift vault as idle
Untangled's `upshift` protocol slug is the vault's own idle buffer **plus** any
receipt tokens it holds in another Upshift vault, and `transformUntangledToDebank`
was filing all of it as wallet holdings. Gami earnXLM therefore showed `$1.97M`
idle on a `$3.71M` vault when only `$797K` was undeployed — the `$1.17M` it has
deposited into earnUSDC was invisible.
The transform now sizes the buffer from the report's `idle` location and emits
the remainder as a real `upshift` position, named after the receipt token whose
`byAsset` value matches it. Vaults whose `upshift` slice is only the idle buffer
(Gami earnUSDC) are unchanged, as are reports with no `idle` location. Naming
abstains rather than guesses: if no asset matches the remainder, or more than one
does, the slice keeps the generic `Upshift` label — the USD value comes from
`byProtocol` either way.
## 9.2.1 (2026-09-01)
### Patch Changes
- c578d64: fix: let `getVault({ allocations: true })` reach the Stellar exposure path
`getVaultAllocations` resolves Stellar vaults through the Untangled portfolio
API, but `getVault` only ran its loans/allocations enrichment when the vault was
EVM — and `stellar-0` is excluded from that check. So the standalone getter
returned real exposure while every consumer going through `getVault` (the
composite the web apps call) received the empty default and fell back to a
deployed/idle split with no indication anything was missing.
The gate is now per-leg rather than one EVM-or-nothing branch: loans stay
EVM-only, because there is no non-EVM loan book to read, and allocations
additionally cover Stellar. Solana and Sui are unchanged — no vault-level
portfolio provider covers them, so they keep the empty defaults on both legs and
pay for no extra call.
No signature or return-shape change. Stellar callers that pass
`allocations: true` now get one additional HTTP call (the Untangled request
`getVaultAllocations` already documented) and a populated `defi` /
`exposurePerCategory`; every other chain family is byte-identical to before.
## 9.2.0 (2026-09-01)
### Minor Changes
- 55a6c32: feat: resolve Stellar vault exposure via Untangled portfolio API in `getVaultAllocations`
Stellar vaults returned an empty exposure breakdown because no portfolio
provider covered them — DeBank and Octav.fi have no Stellar coverage, so the
vault's capital was invisible even though its TVL was not.
`getVaultAllocations` now resolves Stellar vaults through the Untangled
portfolio API, which reconciles the whole vault in one call: the idle buffer,
Stellar protocol positions (Blend, Aquarius), custody wallet balances, and
capital bridged to other chains (Templar on NEAR). The results populate the same
`defi`, `tokens` and `exposurePerCategory` fields EVM vaults already return, so
consumers need no changes.
Adds exactly one HTTP call for Stellar vaults and zero for every other chain. If
the call fails, the exposure section comes back empty rather than throwing — the
CeFi, OTC and loan allocations still resolve.
## 9.1.0 (2026-09-01)
### Minor Changes
- e1f60ed: feat(stellar): notify vault curators when a redemption fails
Stellar vaults are instant-redeem only — there is no withdrawal queue — so a curator whose depositors cannot get out had no signal at all. Failed Stellar redemptions are now reported to the August API (the same base URL the SDK already reads vault data from, so a deployment pointed at staging reports to staging), which validates each report and forwards it to that vault's curator.
Two cases are reported: a redemption the vault cannot serve at build time — the contract rejected the call, or its ledger state needs restoring — and a submitted redeem whose operation ran and failed (`resultCode === 'txFailed'`). The body carries which case it was, the network, the vault contract ID, the redeeming account, the unscaled share amount, a timestamp, the failure reason (secrets scrubbed, capped at 1500 characters), the consumer's `appName`, and for the submitted case the transaction hash and result code. Repeat attempts at the same failure collapse to one report per 10 minutes.
Not reported, because none of them reached the vault: invalid addresses, unfunded Stellar accounts, RPC outages, RPC-rejected broadcasts, confirmation timeouts, and transaction-level failures where the redeem never executed (`txBadSeq`, `txInsufficientBalance`, `txTooLate`, or an undecodable result code). Deposits are never reported. Note that a redeem exhausting its Soroban resource budget _is_ reported — the operation ran, so it arrives as `txFailed`.
Enabled by default in production only: nothing is emitted unless `monitoring.env` is `PROD` (which is the default when `monitoring` is omitted), `NODE_ENV` is neither `development` nor `test`, and — in a browser, where bundlers strip `process.env` — the page is not served from a loopback, private, or link-local host (`localhost`, the `.localhost` and `.local` names, `127.0.0.0/8`, `0.0.0.0/8`, the RFC 1918 ranges, `169.254.0.0/16`, and the IPv6 equivalents including `[::1]`). Non-mainnet failures are dropped as well, unless `curatorAlerts.endpoint` is set — pointing at your own relay lifts the mainnet-only restriction so a testnet integration can exercise the path. So a consumer's CI and local dev runs stay quiet by default. Opt out with `monitoring: { curatorAlerts: { enabled: false } }`, with the newly exported `configureCuratorAlerts` (for code that drives the `Stellar` namespace without constructing an SDK, and the only opt-out available in a browser; `ICuratorAlertsContext` is exported alongside it so a wrapper can be typed), or with the `AUGUST_SDK_DISABLE_CURATOR_ALERTS` env var in Node. Code using the `Stellar` namespace directly has no `monitoring.env`, so `NODE_ENV` and the serving hostname are its gates. Setting `enabled: true` is a force-on that bypasses all of the environment gates — only the env var still overrides it.
Reporting is fire-and-forget: it never delays, alters, or swallows the error the caller receives, and costs at most one extra POST on an already-failing call. Delivery to a browser depends on the API's CORS allowlist, so onboarding a curator also means allowlisting the origin their users load.
The report itself is chain-agnostic: it names its chain family and the receiving endpoint validates the identifiers by that family's rules, so a second chain is a server-side registry entry rather than a new endpoint. Only Stellar is served today — the other chains have a withdrawal queue and a different escalation path.
Sentry analytics is gated on the same, now-shared, internal helper, so its own localhost suppression widens identically — this is a behavior change for existing analytics consumers, independent of curator alerts. Browser sessions served from any of the hosts listed above now stop sending analytics where previously only the bare name `localhost` and `127.0.0.1` were suppressed. In a browser this cannot be overridden: the force-on flag for analytics is read from `process.env`, which a bundler strips, so a partner who deliberately wants analytics from a private-range origin (a LAN-hosted staging app, a container reached by IP) will silently get none. Node is unaffected — its own env override still applies.
Also adds `context.stage` (`'simulation'`, `'restore-required'`, `'assembly'`, `'rpc-failover'`) to the errors thrown while building a Soroban transaction, so callers can tell a vault-level rejection from a transport problem. Validation errors such as `ACCOUNT_NOT_FUNDED` carry no stage.
No `METHOD_CATEGORIES` entry is needed: the new exports are free functions, not methods on an instrumented class.
## 9.0.0 (2026-08-26)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 192f289: feat!: require `appName` on `initializeSentry` — no more anonymous telemetry
**Breaking — `initializeSentry` signature reordered.** The standalone `initializeSentry` export was the last entry point that could start SDK telemetry without an application identity, producing `unverified:anonymous` events that are invisible on the partner-usage dashboard (the `AugustSDK` constructor has required `appName` since v5). The signature is now:
```typescript
initializeSentry(config, environment, appName, walletAddress?, apiKey?)
```
`appName` moved from the optional fifth parameter to the required third parameter and is validated with the same rules as the constructor (3–64 chars, `[a-zA-Z0-9._-]`, slug not display name). Invalid or missing values throw synchronously, before the idempotency short-circuit and the environment gates, so the failure is equally loud everywhere.
**New validation rule (constructor + `initializeSentry`):** values shaped like an EVM address (`0x` + 40 hex chars) are rejected. An address passes the character rules but is a wallet identifier, not an app name — and it is exactly what a pre-v9 caller still on the old positional order would now be passing in the `appName` slot. The error message points at the reorder.
**Typed validation errors:** `appName` validation failures (constructor and `initializeSentry`) now throw `AugustValidationError` with code `INVALID_INPUT` instead of a raw `Error`. Messages are unchanged; `instanceof Error` still holds, so message-based handling keeps working.
Migration: most integrators never call `initializeSentry` directly — the `AugustSDK` constructor calls it — and need no change. Direct callers move `appName` to the third position: `initializeSentry({ enabled: true }, 'PROD', 'acme-trader')`.
The CLI (`@augustdigital/cli`) was updated to the new call shape; its behavior is unchanged (`august-cli` identity, eager init).
## 8.26.0 (2026-08-25)
### Minor Changes
- b84d902: feat: export `IGetVaultsOptions` and use it on both `AugustSDK.getVaults` and `AugustVaults.getVaults`. The facade previously declared a narrower inline options type that rejected documented options (`includeClosed`, and the new `maxRetries`/`baseDelay` retry tuning) at compile time even though they were honored at runtime.
### Patch Changes
- 073a2b3: fix(vaults): `getVaults()` with no arguments no longer throws. The wallet-position gate read `options.wallet` without optional chaining, so the documented no-options call crashed with a TypeError before returning the vault list.
- c0e22a4: perf(vaults): cut the getVaults list-path cost without changing its output
- Skip per-vault enrichment for vaults the post-enrichment filter is
guaranteed to drop (closed vaults without `includeClosed`, unknown-status
visible vaults). On chain-scoped sweeps this removes the majority of the
slowest on-chain reads and their retry backoff; the returned set is
unchanged.
- Re-use the backend list row inside each per-vault `getVault` call instead of
re-fetching `GET /tokenized_vault/{address}` per vault (and once more inside
`getIdleAssets`), removing 2 backend requests per vault per sweep.
- Fetch Ember (Sui) vaults only when the caller's `chainIds` includes the Sui
chain, cache the Bluefin payload for 5 minutes, and abort the request after
5s — previously this uncached third-party call was awaited unconditionally
with no timeout and could stall every `getVaults` consumer indefinitely.
- Expose `maxRetries` / `baseDelay` on `getVaults` options so callers racing
the sweep against their own budget can bound the per-vault retry backoff
(defaults unchanged: 5 attempts, 2000ms base).
- `getVault` accepts an optional pre-fetched `tokenizedVault` row and
`getIdleAssets` an optional pre-resolved version (both backward-compatible).
## 8.25.0 (2026-08-25)
### Minor Changes
- 64abba0: feat: refresh the Solana vault IDL to the deployed ProgramConfig build
The `august_vault` program was upgraded on mainnet on 2026-08-06 (devnet `C8B1…` a day earlier) and the committed IDL was never refreshed, so `vault-idl.ts` described a January build. The two ELFs are the same source build — byte-diffing them yields 279 differing bytes, all of them the program id — but the interface had moved.
**Regenerated from the program repo artifact.** `vault-idl.ts` now comes from solana-vaults `frontend/idl/august_vault.json`, not from `anchor idl fetch`. An Anchor IDL upload is not refreshed by a program upgrade, so every IDL published for this program lineage is seven months stale: `up12…` on mainnet was last written 2026-01-21 and the `C8B1…` devnet reference 2026-01-23. The file header now says so.
**Added surface:** instructions `deposit_checked`, `redeem_checked`, `initialize_config`, `set_config_authority`, `override_config_authority`; account `ProgramConfig`; error codes 6016–6020; and `VaultState.share_offset`. `deposit_checked` / `redeem_checked` are slippage-bounded variants of `deposit` / `redeem` — the program's own docs recommend them for new integrations.
**No behaviour change for existing call sites.** `deposit` and `redeem` are byte-identical to the previous IDL, so every transaction the SDK builds is unchanged. `share_offset` was carved out of `VaultState.padding` (`[u64;32]` → `[u64;31]`), leaving the struct at 455 bytes with every pre-existing field at its original offset, so account decoding is unaffected. The `initialize` and `operator_*` changes in the new build touch instructions the SDK never builds.
**Drift guard reworked.** The structural fingerprint against `C8B1…`'s published IDL was dead weight: it passed while the on-chain interface gained five instructions, because the oracle it compared against predates the build it serves. It is replaced by a check that every discriminator the committed IDL declares is present in the deployed executable, plus an offline check that each declared discriminator still matches `sha256(":")`. The binary pin and live-`VaultState`-decode checks are unchanged.
**Known follow-up.** `share_offset` is a virtual-share offset: the program prices deposits as `amount * (supply + offset) / (total_assets + offset)`, where a stored `0` resolves to `EXTRA_SHARES` (1e6) rather than meaning "no offset". `getSolanaVault` still derives share price pro-rata from `local_aum + deployed_aum` against share-mint supply, which agrees with the program only at par. This changeset does not alter that math — it needs confirmation from the contracts team first.
RPC/latency: unchanged at runtime. The drift test makes one fewer IDL fetch and one extra ProgramData read.
- 0cddc4f: feat: expose the transparency dashboard through the SDK — nine new read methods on `sdk.apiModule`, one per tab/card so partners can compose exactly the subset they want: `getVaultPositionSnapshot`, `getVaultBackingSeries`, `getVaultSmoothedApy`, `getVaultHistoricalAllocations`, `getVaultFeeConfig`, `getVaultGovernanceRoles`, `getVaultGovernancePermissions`, `getVaultGovernanceTimelocks`, `getVaultGovernanceAuditLog`. All public (no API key), one HTTPS request each, zero RPC. Also documents that `getVaultAllocations` is the data source behind the Upshift "Vault Exposure" section (that call itself still needs an RPC provider, and an API key for its CeFi/OTC legs).
### Patch Changes
- 2f2bea9: fix: `swapRouterDeposit` now forwards `originCode` to the SwapRouter
`swapRouterDeposit` accepted an `originCode` in its options type but dropped it
before dispatch, so every deposit settled on the all-zero sentinel and a
partner's origin fee was silently never accrued. The code is now threaded
through all three router paths — direct reference-asset deposit, swap deposit,
and native deposit. Omitting it still sends the sentinel ("no origin fee"), and
a malformed code throws `AugustValidationError` instead of falling back.
## 8.24.0 (2026-08-18)
### Minor Changes
- 6e3caa0: fix: ERC-8021 attribution chain gate is fail-closed, unblocking Ledger approvals
`attribution.chains` used to fail open: a write whose chain ID could not be
determined got the suffix anyway, on the reasoning that over-attribution is
harmless. It is not. The suffix makes calldata longer than the ABI encoding of
the call, which breaks clear-signing on hardware wallets — a Ledger rejects an
over-long ERC-20 `approve` with `EthAppCommandError: Invalid data 6a80`, so a
user on an unattributed chain could not transact at all. Reported against a
mainnet vault deposit from Rabby + Ledger Nano S.
- **`getAttributionSuffix(chainId?)`** returns `undefined` when a `chains`
restriction is configured and no chain ID is passed. Unrestricted
attribution (no `chains`) is unchanged and still attributes every chain.
- **`wrapSignerWithAttribution`** sends the transaction unattributed when the
provider network lookup fails, instead of appending blind. Its enabled check
now uses the new `isAttributionEnabled()`, so the chain gate no longer turns
the whole wrap into a pass-through.
- **`isAttributionEnabled()`** (new, exported) reports config presence
independent of the chain gate.
- **`approveCrossChain`** takes an optional trailing `chainId` and gates its
`dataSuffix` on it; both call sites in `crossChainVault` pass the chain they
already resolve (`props.userChainId`, `props.config.hubChainId`). This was
the one remaining write that appended the suffix with no chain check — and
an `approve`, the exact call Ledger refuses.
Integrators that set `attribution.chains` and rely on unknown-chain writes
being attributed will now see those writes go out clean; pass the chain ID
through if the attribution matters more than clear-signing.
## 8.23.0 (2026-08-14)
### Minor Changes
- b2a1376: fix: let consumers configure their own Slack webhook, and stop shipping August's
Every `slackWebookUrl` parameter in the subgraph readers defaulted to `DEFAULT_SLACK_WEBHOOK_URL`, a hardcoded webhook path baked into the published bundle and the generated `.d.ts`. A Slack webhook path is a bearer credential, so this both exposed an internal August channel to anyone who installed the SDK and sent consumers' vault alerts to that channel with no way to redirect them.
The webhook is now resolved at call time: an explicit argument wins, otherwise `AUGUST_SDK_SLACK_WEBHOOK_URL` from the environment, otherwise alerting is disabled (a one-time console warning, rather than defaulting to somebody else's channel). Both the full `https://hooks.slack.com/services/…` URL and the bare `T…/B…/x…` path are accepted.
**Action required for deployments that relied on the default:** set `AUGUST_SDK_SLACK_WEBHOOK_URL`, or Slack alerts from the subgraph readers will be silently disabled.
`DEFAULT_SLACK_WEBHOOK_URL` is now `''` and deprecated; it is removed in the next major. Use `resolveSlackWebhookUrl()` instead.
### Patch Changes
- 0ad9bd8: feat: add `august.sdk_version` Sentry tag so a consumer's SDK build is queryable
`sdk.version` is a reserved Sentry field — Sentry populates it with the version of its own client, so querying it returned `@sentry/core`'s version for every consumer rather than the Upshift SDK's. The real value was only reachable as `tags[sdk.version]`.
The same value is now also tagged as `august.sdk_version`, which Sentry does not shadow. `sdk.version` is still set for back-compat with existing saved queries, dashboards, and alert rules; it is deprecated and will be removed in the next major.
- 82091ae: fix: retry rate-limited eth_getLogs chunks in getVaultRedemptionHistory and lower batch size to 8
- 7fc29b2: fix: stop the four highest-volume production error paths
- `getVaultAvailableRedemptions` no longer fails outright on vaults that do not implement `lagDuration()`. The empty `eth_call` response is retried, then treated as "no claim lag" — previously it threw, which both raised an error per call and returned an empty redemption list for the affected vaults.
- `getVaultRedemptionHistory` retries `eth_getLogs` chunks rejected by a provider rate limit, and lowers batch concurrency from 20 to 8. A transient cap used to abort the entire scan.
- `getDecimals` records a transient transport fault as a breadcrumb rather than an error. Its contract is unchanged: it still never throws, still does not retry, and still resolves `undefined` on failure.
- CeFi/OTC subaccount enrichment treats a `400` ("borrower not tracked") like `404`/`204` — a breadcrumb. `401` and `5xx` stay error-level.
- 4c6ed05: fix: demote CeFi/OTC subaccount enrichment 400 to breadcrumb severity
## 8.21.1 (2026-08-11)
### Patch Changes
- de20993: feat: register X Layer (chain 196)
X Layer (OKX's Polygon-CDK zkEVM, native OKB, 18 decimals) joins the EVM chains the SDK understands:
- **`NETWORKS[196]`** — `X Layer`, explorer `https://xlayerscan.com`. This is what `explorerLink` uses for tx/address links, and what `chainIdToTagValue` slugifies for the `sdk.chain` Sentry tag (`x-layer` instead of `unknown:196`). It also lands the chain in `AVAILABLE_CHAINS`.
- **`FALLBACK_RPC_URLS[196]`** — `https://rpc.xlayer.tech`, used when a caller supplies no provider for the chain. Verified live on 2026-08-11: returns `eth_chainId` `0xc4` and sends `access-control-allow-origin: *`, so a browser-side read works without a proxy.
- **`MULTICALL3_VERIFIED_CHAINS`** — 196 added. `eth_getCode` at `0xcA11bde05977b3631167028862bE2a173976CA11` returned the canonical 3808-byte runtime on 2026-08-11, so vault prefetch batches its reads rather than falling back to the per-call path. Deployment presence was verified on-chain, not assumed from the deterministic deployer.
No vault is served on chain 196 yet — this is chain registration only, so no subgraph slug mapping is added.
## 8.21.0 (2026-08-11)
### Minor Changes
- 8ad6c43: fix: Solana deposit/redeem create token accounts atomically, and every balance read now agrees with the write path
`handleSolanaDeposit` and `handleSolanaRedeem` treated SPL token accounts as preconditions, and where they did create one they sent it as its own transaction without awaiting confirmation. Two production failures traced to this.
**Deposit no longer races its own ATA creation.** When the depositor had no share account, the SDK fired `createAssociatedTokenAccountInstruction` via `sendTransaction` and then immediately simulated the deposit. Observed in production on 2026-08-11: the deposit failed with `Simulation failed … Logs: []` while the create was still in flight, then succeeded 17s later on retry. The empty log array means the transaction never reached program execution, so nothing was written on-chain to debug from. The on-chain program cannot self-heal here: `Deposit.sender_share_account` is a plain `InterfaceAccount` with no `init_if_needed`. Creation is now prepended to the deposit via `.preInstructions()`, so it is atomic with the transfer and costs one signature instead of two. This affected every first-time depositor into a vault.
**Redeem no longer requires the payout account to pre-exist.** Redeem rejected any wallet holding no deposit-mint account with `No token account found for deposit mint`. That is backwards — redeeming is precisely how a holder first receives the deposit mint — and it left shares acquired by transfer, airdrop, or market buy unredeemable through this SDK. The payout account is now created inline when absent. (A zero-balance account already satisfied the old guard, so this affected only wallets that had never held the deposit token at all.)
**Idempotent creation.** All account creation uses `createAssociatedTokenAccountIdempotentInstruction`, so a concurrent create (another tab, a wallet auto-provisioning the account) is a no-op rather than a failure. The fee-recipient account is created unconditionally on redeem, replacing a `getAccountInfo` read followed by a separate transaction and a hard-coded `setTimeout(1000)`.
**One selection rule for every read and write.** A wallet's account of record for a mint is now the one holding the largest balance, applied uniformly across `fetchUserTokenBalance`, `fetchUserShareBalance`, `fetchUserShareBalanceRaw` and both vault handlers. Previously each took whichever account the RPC happened to return first, an ordering `getParsedTokenAccountsByOwner` does not guarantee — so for a wallet holding more than one account for a mint, the balance shown and the account transacted against could be different accounts. The rule is an internal helper, not part of the public API surface.
An unreadable balance — an RPC response whose `amount` is not a u64 string — is now treated as _unknown_ rather than as zero, since scoring it zero would silently demote a funded account below a dust one and reinstate the behaviour this rule exists to prevent. **On the write paths this surfaces**: deposit and redeem throw rather than transact against an account whose balance could not be established. The three balance readers keep their existing never-throw contract and still return their documented zero fallback, logging the failure — so read behaviour is unchanged for consumers.
**Deposit and redeem now check the balance, not just that an account exists.** A wallet with an empty or under-funded account previously passed the guard and paid a signature to discover an on-chain insufficient-funds revert. The balance is already in hand from the account lookup, so this costs no extra RPC. Both handlers throw `AugustValidationError` before submitting.
**Commitment is now explicit and configurable — the default is unchanged.** `SolanaAdapter` previously passed no commitment when constructing its `Connection` and no `commitment` to `.rpc()`, so reads _and_ confirmations both fell through to the RPC's own `'finalized'` default. That default is now stated explicitly and exposed:
```ts
new AugustSDK({ solana: { rpcUrl, network, commitment: "confirmed" } });
// or directly:
new SolanaAdapter(endpoint, network, commitment /* default: 'finalized' */);
```
The one setting covers reads and write-confirmations together — the vault handlers and both Anchor providers (`SolanaUtils.getProvider`, `getReadOnlyProvider`) all derive their commitment from the same `Connection` rather than hard-coding one, so nothing can drift apart. Pass `'confirmed'` for a markedly faster round trip (seconds rather than tens of seconds), accepting that the state you act on can still, in principle, be rolled back.
> **Action required if you call `getProgram(...).methods…rpc()` directly.** Both provider factories previously hard-coded `commitment: 'confirmed'`, while the connection they wrapped read at `'finalized'` — the inconsistency this change removes. Writes issued through that public API _without_ a per-call `commitment` therefore confirmed at `'confirmed'` before this release and now confirm at the adapter default, `'finalized'`. They are strictly safer but noticeably slower (tens of seconds rather than seconds). To keep the previous latency, configure `commitment: 'confirmed'` — which now applies to reads and writes alike — or pass `commitment` per call to `.rpc()`. Consumers who only use `vaultDeposit` / `vaultRedeem` are unaffected: those already confirmed at `'finalized'`.
Configuring Solana through the legacy `providers` map leaves the commitment at the default: `ISolanaConfig` requires `rpcUrl` and `network`, so a commitment-only object alongside that path is not expressible in TypeScript.
**Frozen accounts are no longer selected for transfers.** A token issuer can freeze an account, and tokens can move neither out of nor into a frozen one. Selection now prefers a spendable account over a richer frozen one, and when every account for a mint is frozen, deposit and redeem raise `AugustValidationError` naming the cause instead of reverting with a bare SPL `0x11` after the user signs. This covers all four roles: the deposit's funding account and share destination, and the redeem's share source and payout destination. The balance readers are unchanged — they still report a frozen balance, because the user does own it.
**Sub-unit amounts are rejected before submission.** A positive UI amount below one raw unit (`1e-7` into a 6-decimal mint) truncates to zero when scaled. Both handlers now re-check the _scaled_ amount, so this raises `AugustValidationError` instead of clearing the balance gate (`0n < 0n` is false) and submitting a no-op transfer.
**One confirmation per transaction.** Both handlers fetched a blockhash that was never used to build the transaction (`.rpc()` builds and signs with its own), then ran a second `confirmTransaction` against that unrelated hash after Anchor had already confirmed. `.rpc()` now owns submission and confirmation, with `commitment` passed explicitly.
**`sendTransaction` is now ignored** by `SolanaAdapter.vaultDeposit`, `SolanaAdapter.vaultRedeem`, and both underlying handlers — there is no longer a second transaction to send, and signing goes through the provider's wallet. Existing call sites keep compiling.
> On the two adapter methods it is a **positional** parameter sitting immediately before `vaultAddress`. **Pass `undefined` in that position — do not delete the argument.** Deleting it shifts your vault address into the `sendTransaction` slot and leaves `vaultAddress` undefined, which falls back to the legacy single-vault PDA derivation and targets a different vault. On the underlying handlers the parameter is a named object property, so it can simply be omitted.
Note that deposit and redeem may debit SOL rent from the signer for accounts they create (~0.00204 SOL each; on redeem this can include the vault's fee-recipient account). This was already true of the old two-transaction flow; it is now documented on both handlers.
## 8.20.1 (2026-08-10)
### Patch Changes
- 3bd6e3f: fix: honour provider RPC limits, stop crashing on non-EVM subaccounts, and cut duplicate error reporting
Five production failures, in descending event volume:
- **dRPC batch rejection.** `createProvider` hard-coded `batchMaxCount: 10`, but dRPC's free tier rejects batches larger than 3 — and rejects the _whole_ batch, so every Mezo read failed with `server response 500 … "Batch of more than 3 requests are not allowed"`. Batch size is now derived from the endpoint host via the new `determineRpcBatchMaxCount` export.
- **Non-EVM subaccounts.** Every `WEBSERVER_ENDPOINTS.subaccount.*` builder ran the identifier through ethers' `getAddress()`, so a Solana or Stellar vault operator threw `TypeError: invalid address` before any request was made — breaking `getVaultAllocations` for mixed-chain vaults. EVM addresses are still checksummed; other identifiers are URL-encoded.
- **`BigInt(undefined)`.** `getVaultAvailableRedemptions` read the amount field of the other subgraph schema (`assets` vs `shares`) and threw `TypeError: Cannot convert undefined to a BigInt`, which emptied the returned redemption list — a claimable withdrawal silently disappeared. Absent or non-numeric amounts now coerce to `0n`.
- **`eth_getLogs` range.** `determineBlockSkipInternal` defaulted to 50 000 blocks; Alchemy, Infura, dRPC and QuickNode all cap the range at 10 000 and reject with JSON-RPC `-32600`, failing `getVaultRedemptionHistory` on Ethereum mainnet. The default is now 10 000 (15 batched `eth_getLogs` calls per 150k-block lookback instead of 3).
- **Duplicate reporting.** A failed log-fetch chunk was captured as an issue and then re-thrown into a catch block that captured it again.
Reporting changes (no behaviour change for callers):
- Per-borrower CeFi/OTC lookups that return 204/404 ("this subaccount has no such position" — the common case) are breadcrumbs instead of captured errors.
- A missing portfolio fetcher for a chain type (Stellar, Sui) is a breadcrumb, and no longer forces `getVaultAllocations` to throw `failure to fetch debank response` — Stellar vaults now return the CeFi/OTC/loan allocations that did resolve.
- `AugustHistoryUnavailableError` is no longer reported: it is a designed outcome thrown to the caller, not an SDK fault.
- Mezo (chain 31612) errors are dropped entirely. Its public dRPC endpoint failed often enough to dominate the error stream without describing an SDK defect. This is a deliberate blind spot — genuine Mezo bugs are silenced too; remove the `MUTED_CHAIN_SLUGS` entry in `core/analytics/sentry.ts` to restore reporting.
- Identical SDK errors are rate-limited to 3 per signature per minute before reaching Sentry, with the suppressed count attached to the next event that is sent (`sdk.suppressed_since_last`).
## 8.20.0 (2026-08-10)
### Minor Changes
- 2c391b8: fix: vault methods now fail fast on an unroutable `chainId` instead of continuing without an RPC URL
`getVault`, `getVaultLoans`, `getVaultSubaccountLoans` and `getVaultAllocations` previously logged `Missing RPC URL for chainId N` and carried on with an undefined RPC URL. That surfaced as a cascade of misleading downstream failures — `connect ECONNREFUSED 127.0.0.1:8545` (ethers falling back to its localhost default), `missing revert data` on `decimals()` reads issued against the wrong chain, and `TypeError: Cannot read properties of undefined`. Entirely unknown chain IDs were swallowed the same way.
These methods now throw a typed `AugustValidationError` with code `INVALID_CHAIN`:
- **Unknown chain ID** (not a supported EVM chain and not Solana `-1` / Stellar `-3` / Sui `101`) — the call site is wrong.
- **Supported EVM chain with no configured RPC URL** — remediated by passing one to the constructor; the error message names the chain and shows the fix.
Non-EVM chain IDs are exempt from the RPC-URL check: Solana, Stellar and Sui vaults route through their adapters and never read the `providers` map.
New exported helpers: `isEvmChainId`, `isKnownChainId`, `assertKnownChainId`, `assertEvmProviderConfigured`, plus the `SUI_CHAIN_ID` and `NON_EVM_CHAIN_IDS` constants.
Callers that previously relied on these methods continuing past a missing provider will now see an error at the call site rather than an opaque RPC failure later.
### Patch Changes
- 47f7e69: fix: `assertKnownChainId` no longer rejects an EVM chain ID missing from `NETWORKS` when the caller configured a provider for it (e.g. chain 10 / Optimism, which ships fallback RPCs and oracle addresses but has no `NETWORKS` entry). Previously such a chain was rejected as "unknown" before the provider check ever ran, breaking a previously-working call.
## 8.19.0 (2026-08-07)
### Minor Changes
- 8ab81d0: feat: ERC-8021 attribution (Base Builder Codes) — new `attribution` constructor option (`{ builderCodes, chains? }`) appends the ERC-8021 calldata suffix to every EVM write: ethers vault writes via the normalized-signer wrap and cross-chain OVault viem writes via `dataSuffix`. Off by default; no viem version requirement.
## 8.18.0 (2026-08-06)
### Minor Changes
- 32f2bc7: fix: stop reporting mined transactions as failed when the RPC hiccups mid-receipt-poll
Bumped `minor` rather than `patch` per CLAUDE.md §3: although the driver is a bug fix, the
change adds six exported symbols (`isRetryableRpcError`, `isEmptyViewResponse`,
`retryOnTransientRpc`, `getDecimalsOrThrow`, `getReceiptTokenAddressOrThrow`,
`LP_TOKEN_ADDRESS_SELECTOR`) to the public surface via `core`'s `export *`.
No existing signature or behavior is removed or changed.
`safeWaitForTx` previously only recovered from malformed-nonce RPC responses. Any other
failure out of `tx.wait()` — most commonly a transient JSON-RPC transport fault while
polling `eth_getTransactionReceipt` (`could not coalesce error (error={ "code": -32603 … })`)
— was rethrown, so `vaultRequestRedeem` and every other write path reported a transaction
that had already been broadcast and mined as FAILED. Users then retried and hit
`ERC20InsufficientBalance`.
- Adds `isRetryableRpcError(error)`, which classifies JSON-RPC `-32603`/`-32000`, ethers'
"could not coalesce error", `eth_getTransactionReceipt` failures, network/timeout/fetch
faults and HTTP 429/5xx as transient transport errors — while explicitly _not_ matching
genuine contract reverts (`CALL_EXCEPTION` carrying revert data, `execution reverted`, or
a receipt with `status === 0`). `missing revert data` is intentionally excluded so this
predicate never contradicts `isExpectedRevertError`.
- Adds `isEmptyViewResponse(error, selector?)` for the one `missing revert data` shape that
really is a provider artefact: an empty response to an argument-free ERC-20 view call
(`decimals()`, `symbol()`, `name()`, `totalSupply()`), which a deployed token cannot
legitimately revert on.
- `safeWaitForTx` now re-polls `provider.waitForTransaction()` with bounded exponential
backoff (3 attempts, 250ms base) on those transport faults. It still throws on a
`status === 0` receipt and on a wait that times out with no receipt, and the existing
nonce-parse fallback is unchanged.
- **Failed writes now say whether the transaction reached the chain.** When a write is
broadcast and only its confirmation is lost, the thrown `AugustSDKError.context` carries
`txHash`, `broadcast: true` and `confirmationUnknown: true` — enough for a UI to render a
pending state instead of "failed" (and to _not_ prompt a retry, which is how a redeem gets
double-submitted). A definitive on-chain revert reports `confirmationUnknown: false`, and
a write that never left carries no `txHash` at all. Wired through `vaultDeposit`,
`vaultRequestRedeem`, `vaultRedeem`, `depositNative`, `rwaRedeemAsset` and the approval
path. No return type or call signature changed.
- Every `decimals()` read in the write paths (approve, deposit, redeem, native deposit and
the SwapRouter paths) now goes through a new `getDecimalsOrThrow`, which shares the
**same cache namespace and the same in-flight dedup map** as the existing `getDecimals`
used by read paths. So a read-then-write flow against the same token costs one
`decimals()` RPC in total instead of two, and concurrent callers for an uncached token
collapse to one call. `getDecimalsOrThrow` differs from `getDecimals` only in that it
surfaces failures instead of resolving `undefined` (an `undefined` decimals reaching
amount encoding silently means 18) and retries the transient ones.
- **Every `lpTokenAddress()` read is now retried the same bounded way.** The evm-2
receipt-token lookup sits one line above those `decimals()` reads on the approve,
deposit, request-redeem and SwapRouter-deposit paths, and was still a bare call — so a
single truncated `eth_call` response failed the whole write with
`missing revert data (action="call", data="0xf5ae497a", …)` (observed in production
against the mainnet Tori Ecosystem Vault, whose `lpTokenAddress()` returns a real address
when the provider is healthy). `0xf5ae497a` is added to the argument-free view selectors
and exported as `LP_TOKEN_ADDRESS_SELECTOR`, and a new `getReceiptTokenAddressOrThrow`
routes the read through `retryOnTransientRpc`. Applied at every call site: `vaultApprove`,
`vaultDeposit`, `vaultRequestRedeem`, `swapRouterDeposit`, the cached
`getReceiptTokenAddress` reader, `getVaultUserLifetimePnl`, `getPreviewRedemption`, and
the evm-2 LP branch of `fetchTokenPrice` (which inlines the same retry because
`core/helpers/web3` imports from `core/fetcher`, so sharing the helper would be a cycle).
**This deliberately does not hide a misrouted vault.** `lpTokenAddress()` exists only on
evm-2 vaults, so empty returndata is also the only signal that version routing put a vault
in the wrong branch — and it is byte-identical to a provider blip. The retry is therefore
bounded (3 attempts, ~750ms), rethrows the **original** error object once they are spent
(identity, message, `code` and `transaction.data` intact, so `AugustSDKError.cause` and
Sentry grouping are unchanged), and has no fallback: it never substitutes another address
and never resolves `null`/`undefined`. A transient blip is absorbed; a deterministic
misroute still fails exactly as loudly as before. Unlike `decimals`, the result is **not**
cached — no vault→receipt-token mapping is memoized on the money path in this pass.
Success-path RPC cost is unchanged at one `eth_call` per read.
- `providerScope` now unwraps a runner to its provider before scoping the cache key. This
is a **no-op for providers** (ethers' `AbstractProvider` defines `get provider() { return
this; }`), so read paths key exactly as before; it is what lets a signer-backed write
share a cache entry with a provider-backed read on the same chain instead of falling back
to the `unknown` scope.
- The retry loop (`retryOnTransientRpc`) is exported from `core/helpers/chain-error` so the
receipt-poll fallback and the decimals reader share one implementation.
Per CLAUDE.md §7.2: `isRetryableRpcError`, `isEmptyViewResponse`, `retryOnTransientRpc` and
`getReceiptTokenAddressOrThrow` are **deliberately excluded from the benchmark suite**. The
last is, on its success path, exactly the single `lpTokenAddress()` `eth_call` the evm-2
write paths already made (no cache, no extra round trip), so its latency is already covered
by the existing `vaultDeposit` / `vaultRequestRedeem` entries. The first two are pure synchronous
classifiers over an already-caught error (string `includes` plus property reads, no RPC or
I/O) that only run on a failure path already dominated by the RPC round trip that failed;
the third's cost is a fixed, deliberate 250/500ms backoff, not a regression surface. The
rationale is recorded alongside the other benchmark exemptions in
`benchmarks/suites/sdk-methods.js`. All three are covered by unit tests instead.
### Patch Changes
- 32b60bc: fix: report the correct broadcast state when a `depositWithPermit` deposit's confirmation is lost to a transient RPC fault
`vaultDeposit`'s permit sub-path sends its single main transaction through `safeSendTx`
and returns immediately on success, so the hoisted `depositTx` local — which every other
sub-path assigns and which the catch block used to read the broadcast marker — was never
set. If that internal wait hit a transient transport fault, the thrown error carried no
`txHash` in its context, so a broadcast-but-unconfirmed permit deposit was reported as
never sent, reintroducing the retry-into-double-submit window `retryable-rpc-transport-errors`
closed for the other write paths. The catch now falls back to reading the marker off the
error itself (`errorTxBroadcastContext`) when `depositTx` is unset — the same mechanism
already used by `vaultRedeem`, `rwaRedeemAsset` and `approveCore` for their single-tx paths.
- 7c7c074: chore: route SDK telemetry to the `august-js-sdk-v2` Sentry project
## 8.17.1 (2026-08-06)
### Patch Changes
- f0dd06d: fix: stop billing a dead subgraph as a Sentry error on every read
The subgraph readers logged a missing subgraph URL, and a non-200 from a resolved
one, at `error` level. Both conditions are per-vault, but the readers run on every
portfolio/history request, so a handful of vaults with retired subgraphs produced
over 2M Sentry error events in 30 days — the single largest consumer of the org's
error quota.
These paths now log at `warn` (a breadcrumb, still attached to any real error that
follows) and route the durable signal through the existing per-pool, TTL-deduped
"Missing Subgraph" Slack alert. The non-200 branches did not alert at all before,
so a URL pointing at a deleted subgraph was previously only visible as error spam;
it now raises the same one-per-pool alert as a missing URL, with the HTTP status as
the reason.
Every reader already resolves its chain id at the top of the function for its
own use, so the alert reuses that value rather than making a second `getChainId`
round trip on a cold provider.
Behaviour is otherwise unchanged: every reader still returns its empty result on
failure. Keeping the alert is deliberate — a 404 makes these readers fall back to
empty history, and silently-empty subgraph history is what made the 2026-07-09 PnL
overinflation incident hard to diagnose.
## 8.17.0 (2026-08-04)
### Minor Changes
- 5d9f67e: Surface two backend tokenized-vault fields on `IVault`:
- `withdrawalMarginSeconds` (number | null) from `withdrawal_margin_seconds` — the display buffer added on top of the on-chain lag for the withdrawal period shown to users. Null means the backend has not configured a margin and consumers should apply their own default; an explicit 0 is a real "no margin" value.
- `iatTraders` (string[] | null) from `iat_traders` — IAT trader wallet addresses for the vault, in the vault chain's address format. Null when not configured.
## 8.16.1 (2026-07-30)
### Patch Changes
- efffd48: fix: `getVaultUserLifetimePnl` now computes `totalDeposited` from the face value of what a user actually deposited, rescaled to the vault's own decimals, instead of re-quoting each deposit through a live price oracle. Previously, `totalDeposited` (and therefore `lifetimePnl`) drifted between calls purely from stablecoin peg noise, and approximately re-inflated deposits back toward face value — which silently excluded the vault's entry/exit fees from PnL. `lifetimePnl` now correctly reflects those fees as a cost.
## 8.16.0 (2026-07-27)
### Minor Changes
- f3dc1e6: fix(solana): target the shared august_vault program and ship the deployed IDL
- Point the Solana adapter at the shared, canonical program — `up12…`, now deployed under the same id on every network — instead of the retired per-vault SyrupBTC program (`7B8n…`) or the interim devnet deploy (`C8B1…`).
- `getProgram` resolves the program id from an explicit `programId` or the per-network `programIds` map, independent of the IDL passed — the IDL's embedded `address` (a build stamp) is only a last-resort fallback when no `network` is known. This closes a sharp edge where a non-reference-equal copy of the built-in IDL on a non-mainnet network could resolve to the embedded mainnet program id.
- Refresh the shipped IDL to the deployed versioned multi-vault interface (fetched from the devnet on-chain IDL), replacing the stale pre-versioned copy. Read paths (`VaultState` decode) and the `deposit`/`redeem` instructions are unchanged; the refresh adds `close_vault`/`set_aum_limits`/`update_share_token_metadata` and the versioned `initialize`. A CI drift guard (`solana-idl-drift`) fails if the committed IDL diverges from the deployed devnet program.
- 2da4cad: fix(solana): honour custom IDL program addresses, drop the undeployed testnet mapping
- `SolanaAdapter.getProgram` now accepts an optional `programId` override and no
longer discards the `address` on a caller-supplied IDL. Resolution order is
explicit `programId` → custom IDL `address` → per-network default → the IDL's
embedded build stamp. A copy of the SDK's bundled `vaultIdl` still defers to the
network default, so the devnet-silently-targets-mainnet edge stays closed.
- Removed the `testnet` entry from `programIds`: the canonical `august_vault`
program is not deployed on Solana testnet, so the mapping handed callers an
address with no executable behind it. `getProgram` and
`SolanaAdapter.getProgramId` now throw `AugustValidationError` naming the
deployed networks instead of returning a dead address (`getProgramId`
previously threw a bare `TypeError`).
- The Solana IDL drift guard now validates the program the SDK actually targets
(`up12…`) by pinning its deployed binary across devnet/mainnet and decoding live
`VaultState` accounts against the committed layout, rather than only comparing
the structurally-matching `C8B1…` reference IDL.
- 8c306f7: feat: surface per-vault data-provenance timestamps as `IVault.freshness`
Maps the backend's new `freshness` object onto `IVault` for every tokenized-vault read
on both the August and Upshift surfaces: `apyComputedAt` (when `historical_apy` / TVL /
drawdown were last recomputed), `shareRatioSnapshotAt` (newest persisted share-price
snapshot), and `cachedAt` (when the backend assembled the response body). A
`shareRatioSnapshotAt` later than `apyComputedAt` means a snapshot has landed that the
APY has not been recomputed from yet — the staleness signal a UI needs to render "data
as of X" instead of implying share price and APY are equally current.
All three are independently nullable and are never defaulted from one another.
`shareRatioSnapshotAt` is populated regardless of `load_snapshots`, so it is present on
the basic and sub-accounts views too. Values are passed through verbatim as RFC 3339
UTC strings with the trailing `Z`. Additive and non-breaking: `freshness` is null when
the backend does not report it, and the existing top-level `cachedAt` is unchanged.
`freshness` is read off the same response body as `historical_apy`, so the timestamps
always describe the payload they annotate — including when that body is served from the
SDK's in-process response cache.
No new RPC or network calls — the field rides along on responses the SDK already
fetches, and the mapping is a synchronous three-key rename.
### Patch Changes
- 75d5168: docs: document the unit contract on `IVaultApy`
Every rate on `IVaultApy` (`apy`, `liquidApy`, `pointsApy`, `campaignApy`,
`underlyingApy`) is a percentage — `7.95` means 7.95%. The backend reports decimal
fractions and the SDK multiplies by 100 exactly once, uniformly, across all of them.
That convention was never written down, which let a consumer scale a subset of the
fields twice and display 1/100th of their real contribution.
Documentation only — no behaviour or value changes. `rewardsClaimable` /
`rewardsCompounded` are also now marked as token amounts rather than rates.
## 8.15.0 (2026-07-23)
### Minor Changes
- 2277991: feat: expose compound-annualized historical APY
`/tokenized_vault` now returns `historical_compound_apy` (same 1/7/30-day
horizon shape as `historical_apy`) plus `apy_override.is_show_compound_apy`
selecting which annualization convention the UI should display. The SDK now
types both fields and passes `historical_compound_apy` through
`buildBackendVault` / `buildFormattedVault` onto `IVault`, so consumers can
honor the flag. Both fields are optional; absence means simple (existing
behavior).
- ab1df85: feat: guard lifetime PnL against unavailable transaction history
`getVaultUserLifetimePnl` now throws a typed `AugustHistoryUnavailableError`
(code `HISTORY_UNAVAILABLE`) when a wallet holds a live on-chain position but
the deposit/withdrawal history failed to load (empty deposits and empty
withdrawals). Previously this state degenerated to reporting the entire
position as profit — the 2026-07-09 over-inflation incident. Adds the exported
`assertPnlHistoryConsistent` guard and the `AugustHistoryUnavailableError`
error class.
## 8.14.0 (2026-07-23)
### Minor Changes
- fae58f3: feat: resolve fee-waiver state in the SDK. `IVault.fees.isManagementWaived` and `isPerformanceWaived` now carry the fully-resolved "show Fee Waived right now?" boolean instead of the raw backend `platform_fee_override.is_fee_waived` flag. Adds the pure helper `resolveFeeWaived(isFeeWaivedToggle, waivedUntilDate, waivedUntilTvl, now?)`: the backend toggle is the master enable and one-way TVL latch (SDK does no TVL math, never reads `latest_reported_tvl`), while the SDK evaluates the date window live against the clock. Also fixes the non-EVM (Solana/Stellar/Sui) mapping path, which previously hardcoded both booleans to `false`. The `*_waived_until_date` / `*_waived_until_tvl` raw fields remain exposed for tooltip rendering. Behavioral change for consumers reading the two booleans — they were unresolved before.
- 70c960b: feat: add revert-decode helpers — `decodeRevertData` (offline decode of `Error(string)`, `Panic(uint256)`, and custom errors against an OZ ERC-6093 / SafeERC20 / LayerZero / vault-ABI corpus, extendable via `extraAbis`), `extractRevertFromErrorText` (recovers revert data, action, code, and transaction fields from an ethers v6 error string, tolerant of truncation), `lookupSelector` (openchain.xyz / 4byte.directory signature lookup for unknown selectors), `simulateCall` (`eth_call` replay that returns fresh, auto-decoded revert data), and `readTokenState` (bounded symbol/decimals/balance/allowance probe set plus issuer compliance getters `isAccountFrozen` / `isBlacklisted` / `isFrozen`). Together these let alert-triage tooling decode why a transaction failed at `estimateGas`, where no transaction hash ever exists.
## 8.13.0 (2026-07-21)
### Minor Changes
- 802b24f: feat: add `getSwapRouterEligibleVaults(chainId)` — resolves the SwapRouter's eligible-vault set on-chain (`VaultEnabled` event scan + `vaultInfo.referenceAsset` verification, fail-closed, 5-min cache) on the SDK root and `AugustVaults`; add `SWAP_ROUTER_NAMES` / `getSwapRouterName(chainId)` for the periphery contract's display name ('Upshift Swap Router' on mainnet). Deprecates the static `SWAP_ROUTER_ELIGIBLE_VAULTS` set and `isSwapRouterEligible` (kept functional as zero-RPC fallbacks) in favor of the on-chain resolver.
- b52a1ab: feat: add `getSwapRouterWhitelistedTokens(chainId)` — resolves a chain's SwapRouter token allowlist by scanning `TokenEnabled` events and verifying each against the on-chain `whitelistedTokens` mapping (the mapping is not enumerable). Exposed on the SDK root and the vaults module; lets UIs render swap-and-deposit token options without a hardcoded candidate list.
### Patch Changes
- 823b5d9: deprecate: `getVaultVersion` (V1) is now marked `@deprecated` in favour of `getVaultVersionV2`. V1 classifies multi-asset vaults only against the static `MULTI_ASSET_VAULTS` list, so any vault missing from it is misclassified as `evm-1` (the root cause of the 2026-07-06 Sentora preview/simulation break). `getVaultVersionV2` reads the backend `internal_type` and falls back to the static list only as a safety net. V1 is retained as a non-breaking shim and scheduled for removal in the next major.
## 8.12.0 (2026-07-16)
### Minor Changes
- b3ea699: feat: add `getSwapRouterDepositResult` (and `EVMAdapter.getSwapRouterDepositResult`) to resolve the real, post-execution amount and shares from a mined SwapRouter deposit's own `Deposit` event, instead of relying on the pre-trade quote. Also adds a `name` field to `SWAP_ROUTER_DEX_AGGREGATOR` for displaying the aggregator's human-readable name instead of its address.
- a093373: feat: expose `assetIn` and `shares` on `IVaultUserHistoryItem` — `assetIn` lets consumers render the actual deposited token for multi-asset (pre-deposit) vaults instead of guessing the vault's first deposit asset; `shares` surfaces the receipt-token amount burned on a withdraw request, whose settled asset value isn't known until processing
### Patch Changes
- 6d9738a: refactor: move `getSwapRouterDepositResult` from `modules/vaults/getters` down to `core/helpers/swap-router` to break the `adapters/evm` ↔ `modules/vaults/getters` circular dependency (the repo's zero-cycle CI gate). The symbol is re-exported from its original location, so every existing import path and the public API are unchanged; no behavior change.
- add shares
- 011740e: perf: batch the per-vault `balanceOf`/`lagDuration` reads behind `getVaults({ wallet })` and `getVaultPositions` into chunked Multicall3 `aggregate3` calls, grouped by chain (10 calls per chunk). Enabled only on chains where the canonical Multicall3 deployment was verified on-chain via `eth_getCode` (all `NETWORKS` chains except Citrea 4114, which keeps the per-call path, as do non-EVM vaults) — 15 chains verified 2026-07-14, Tempo verified in a follow-up pass on 2026-07-15. Each batched call uses `allowFailure`, so a single reverting vault (e.g. paused) falls back to its own per-vault reads instead of affecting the rest of the batch — failure behavior is unchanged from the per-call path. No public API change. Measured with `benchmarks/request-counter.js` (cold cache, wallet with 62 vaults across Ethereum + Avalanche): 83 → 54 RPC HTTP requests (~35% fewer; 124 per-vault `eth_call`s collapse into ~13 aggregated calls). The prefetch's cold-cache receipt-token (`lpTokenAddress`) resolution for evm-2 vaults is capped at 10 concurrent reads per chain, so a wallet with many uncached evm-2 vaults can't burst an unbounded number of simultaneous reads before the batch fires.
## 8.11.0 (2026-07-16)
### Minor Changes
- a093373: feat: expose `assetIn` on `IVaultUserHistoryItem` so consumers can render the actual deposited token for multi-asset (pre-deposit) vaults instead of guessing the vault's first deposit asset
- 84f6a59: feat(stellar): health-gated Soroban RPC failover + optional consumer RPC override
The Stellar adapter resolved a single Soroban RPC endpoint and ran every read, transaction build, and submit against it. When that provider node stalled — as `soroban-rpc.mainnet.stellar.gateway.fm` did at the Protocol 27 upgrade boundary, freezing behind the network head so every simulation failed with `setting ContractComputeV0 is not present in the snapshot` — there was no way to route around it, and deposits/reads failed with `AugustSDKError: Soroban simulation failed: …`. (The EVM path already had `FALLBACK_RPC_URLS`; Stellar had none.)
**Health-gated failover.** `queryContract`, `buildSorobanTx`, and `submitStellarTransaction` now obtain their server from an internal `getHealthyServer`, which probes the configured endpoints in priority order via `getHealth()`, uses the first healthy one, and falls back to the first reachable endpoint (so the caller still surfaces the node's real error) when none report healthy. A malformed configured endpoint (e.g. a typo'd override) is skipped rather than aborting the probe, so a bad primary can't disable every fallback. Mainnet gains `https://mainnet.sorobanrpc.com` as a keyless public fallback. The healthy-endpoint choice is cached ~30s, and concurrent callers on a cold cache share a single in-flight probe (no stampede on the parallel-read hot path).
**Operation-level failover.** Health-gating only proves an endpoint answered `getHealth()` — a node can still hang or return a method-specific error on the real call, and the choice is cached ~30s. So `queryContract` and `buildSorobanTx` now run their (idempotent) RPC work through a failover wrapper that retries the operation against the remaining endpoints on a retryable failure, time-boxed so a hung node can't stall the call. Crucially, retryable failures include node/snapshot _simulation_ errors (e.g. the `… is not present in the snapshot` post-upgrade case): these arrive as a simulation error but are node-specific, so they fail over — only a genuine contract revert (and other deterministic outcomes: unfunded account, archived-state restore) is terminal and never retried across nodes. The wrapper skips the endpoint the health-gated attempt already used (no double timeout; a sole endpoint isn't retried for nothing) and promotes a working fallback into the cache so the next call starts there. During a sustained outage the endpoint set is negative-cached (short TTL) even on the read/build path, so subsequent reads fast-fail on the primary rather than re-probing and re-looping every endpoint per call — the load amplification the negative cache exists to prevent. Submission is deliberately excluded — re-sending a signed transaction across endpoints risks a double-submit, so it needs sequence/DUPLICATE-based idempotency rather than blind retry.
**Optional consumer RPC override (new, additive API).** Mirroring the existing `solana` config, `new AugustSDK({ stellar: { rpcUrl, network } })` now injects a Soroban RPC endpoint (e.g. a keyed Alchemy URL) — the SDK does not embed any key. The override becomes the primary with the built-in public endpoints kept behind it as failover. Also exposed via the `StellarAdapter` constructor (`new StellarAdapter(network, { sorobanRpcUrl })`), an optional per-call `sorobanRpcUrl` on the deposit/redeem params and the getter/submit functions (a per-call value wins over the adapter-level one), and threaded into the `vaults` module so `getVaults`/`getVaultPositions` Stellar reads honor the override too. All additions are optional — existing callers are unaffected.
**Log & telemetry safety.** Health-check warnings redact the RPC URL to protocol+host; the analytics sanitizer treats `sorobanRpcUrl`/`rpcUrl` as sensitive _and_ scrubs provider path-embedded keys (e.g. Alchemy `/v2/`) from free-form strings and object values (not just named fields); and the failover path scrubs every configured URL from the message and chained `cause` of the error it throws. So a keyed provider endpoint — whether a per-call override captured as an instrumented argument or embedded in an SDK error string — never leaks its API key into SDK logs, telemetry, crash reporters, or a surfaced error.
RPC cost: adds one lightweight `getHealth` probe before Soroban operations, cached ~30s per endpoint set (keyed by the full ordered list) and de-duped across concurrent callers — not per call.
## 8.10.0 (2026-07-11)
### Minor Changes
- b774e66: feat: classify insufficient-gas/L1-fee failures on vault write paths
When a chain node rejects a write because the sender can't cover gas — or, on
rollups such as Citrea, the extra L1 data-availability fee — ethers v6 surfaces
an opaque `CALL_EXCEPTION` / "missing revert data" that was previously wrapped as
a generic `UNKNOWN` error and logged as an SDK fault. The real reason lives only
in the nested provider error (`error.info.error.message`).
The write helpers (`vaultApprove`, `vaultDeposit`, `vaultRequestRedeem`,
`vaultRedeem`, `depositNative`, `rwaRedeemAsset`) now detect this case and throw
a typed `AugustValidationError` with code `ACCOUNT_NOT_FUNDED`, so a consuming UI
can branch on `err.code` to prompt the user to top up instead of string-matching.
These failures are also demoted in telemetry (breadcrumb, not a billed Sentry
issue) since they are a wallet-funding prompt, not a defect.
Adds an exported `isInsufficientFundsError(error)` classifier for callers that
want to detect the same condition directly.
## 8.9.0 (2026-07-11)
### Minor Changes
- 29936be: feat: add governance & metrics read methods to `AugustApi` (`sdk.apiModule`) — `getTimelockRequests` (timelock/governance requests for a vault+chain), `getVaultPerformanceFees` (backend-computed performance fees over a period), and `getVaultOracleClassification` (public NAV-oracle classification table), with `ITimelockRequest`, `IVaultPerformanceFees`, `IOracleClassification`, and `IOracleClassificationRow` response types.
- 29936be: feat: add OTC & curator read methods to `AugustApi` (`sdk.apiModule`) — `getOtcPositions` (all tracked OTC positions), `getOtcMarginRequirements` (margin requirements, optionally filtered by counterparty/payer), `getCuratorVaultSubaccounts` (subaccounts linked to a vault), and `getCuratorVaultWhitelist` (EVM-only on-chain whitelist status), with `IOtcPositionRead`, `IOtcMarginRequirement`, and `ICuratorWhitelistStatus` response types (`getCuratorVaultSubaccounts` reuses `IWSSubaccountListItem`).
- 29936be: feat: add loan-book & risk read methods to `AugustApi` (`sdk.apiModule`) — `getDashboardLoans` (admin-only global loan book), `getDiscountFactors` (token collateral-haircut ladders), `getCollateralExcessOrDeficit` (per-subaccount collateral excess/deficit), and `simulateCollateral` (read-only collateral simulation), with `ILoanBookInfo`, `IDiscountFactorLadder`, `ICollateralExcessOrDeficit`, `ICollateralSimulationInput`, and `ICollateralSimulationResults` response types. `AugustApi` now extends `AugustBase` so it can reach the configured August API key.
- 29936be: feat: add tx-triage & activity read methods — `AugustSubAccounts.getSubaccountTransactions` (authenticated `/transactions/v2`), `AugustSubAccounts.getSubaccountLoanByAddress` (admin-only single-loan detail), `AugustSubAccounts.getSubaccountDebank` (cross-chain DeBank positions), and `AugustApi.getRevertReason` (public transaction revert-reason decode), with `ISubaccountTransaction`, `ILoanBookInfo` (reused), `ISubaccountDebank` / `IDebankAccountData`, and `IRevertReason` response types.
- acf2a4d: feat: add `AugustSubAccounts.getAllSubaccounts` — paginated directory of all August subaccounts (admin-only `GET /subaccount` backend endpoint), with `IWSSubaccountListItem` / `IWSSubaccountListChain` response types
### Patch Changes
- 7c86f9f: fix: register the Monarq XRP Yield Vault (Flare) in `VAULT_ALLOCATION_SUBACCOUNTS` so its Lending Allocation Breakdown and borrower subaccount surface. Covered by a regression test that pins the entry.
## 8.8.0 (2026-07-09)
### Minor Changes
- 98176f4: feat: allow overriding the `public` vault-catalog API base URL
Adds an optional `publicApiBaseUrl` to the SDK constructor config (backed by a
new `setPublicApiBaseUrl` / `getPublicApiBaseUrl` fetcher override, mirroring the
existing `timeoutMs` / `setSdkRequestTimeout` pattern). It repoints the
unauthenticated `public` server base — the one `getVault` / `getVaults` /
`fetchTokenizedVault` read from via `fetchAugustPublic` — so a non-prod
deployment can serve its vault catalog from an isolated backend (e.g. a staging
API serving staging-only vaults).
Defaults to the compiled-in prod base (`https://api.augustdigital.io/api/v1`)
when omitted, so production behaviour is unchanged. Invalid or non-http(s) URLs
are ignored (warned) so a bad env value can't break fetches.
### Patch Changes
- 13f0dc9: fix: normalize deposit history against the deposited asset's own decimals
Multi-asset (pre-deposit / evm-2) vaults accept deposit tokens whose decimals
differ from the vault share token. User- and vault-history reads tagged every
deposit with the vault's decimals, so an 18-decimal RLUSD deposit into the
6-decimal Sentora USD vault rendered ~1e12× too large ("500B TOKEN"). Deposit
rows now resolve decimals from their `assetIn` token; single-asset vaults are
unchanged.
- a5e4370: fix: normalize native-token subgraph deposits against 18 decimals instead of 0/vault decimals
Native deposits carry a sentinel `assetIn` (the zero address or the EIP-7528 `NATIVE_ADDRESS`) that has no on-chain `decimals()`. `getDecimals(ZeroAddress)` returned `0` (which the `?? decimals` fallback can't override) and `getDecimals(NATIVE_ADDRESS)` reverted to the vault's decimals — either could misrender a native deposit's amount by up to ~1e18×. `buildDepositAssetDecimals` now maps both sentinels to the new `EVM_NATIVE_DECIMALS` (18) constant.
## 8.7.2 (2026-07-09)
### Patch Changes
- 64d4e2b: Add Tempo network configuration and RPC URL
## 8.7.1 (2026-07-08)
### Patch Changes
- 62c42c2: fix: stop fabricating dead subgraph URLs and stop routing non-EVM vaults through the EVM history path
Two fixes surfaced while debugging missing Citrea vault data:
1. `getDefaultSubgraphUrl` no longer fabricates a Goldsky URL from the chain name
and vault symbol. That guess was unreliable — the chain name isn't the subgraph
slug (ethers reports Citrea as `unknown`), a vault's symbol isn't its subgraph
name (`EctUSD` vs `earn-ctusd`), and the path used a legacy hosted-service
segment. The bogus URL 404'd silently, so a missing subgraph read as "no data".
It now returns `undefined`, so callers hit their existing "Missing Subgraph"
branch (warn + alert). Subgraph URLs must come from backend vault metadata.
That alert branch was previously unreachable (the fabricated URL was always
truthy); it is now deduped per pool so a metadata-less vault surfaces once
rather than flooding the webhook on every read.
2. `getUserHistory` and `getSubgraphUserHistory` no longer route non-EVM
(Solana / Stellar) vaults into the EVM subgraph path. The Solana RPC is
registered under chainId -1, so Solana vaults previously passed the provider
filter and triggered `eth_chainId` against the Solana RPC, failing with
"eth_chainId is not available on SOLANA_MAINNET" on every history fetch. Both
the dispatch filter and the function now gate on an EVM address.
- e8b862a: fix: detect subgraph schema at runtime so History and Pending Withdrawals populate for every vault
Subgraph reads chose their field schema (old snake_case vs new camelCase) from
whether the vault symbol appeared in the deprecated `SUBGRAPH_VAULT_URLS` map.
A newly-added vault whose subgraph was deployed from the old template (e.g.
`august-citrea-earn-ctusd`) is absent from that map, so the SDK queried
new-schema field names (`blockNumber`/`blockTimestamp`/`transactionHash`) the
subgraph does not expose. The subgraph returned GraphQL errors with no `data`,
and the reads collapsed to empty — silently emptying the Portfolio's Pending
Withdrawals and History tabs while the vault, provider and RPC were all healthy.
The schema is now probed once per subgraph URL (`resolveSubgraphSchema`, cached)
and drives the field selection in every subgraph read — withdrawal requests,
processed withdrawals, combined withdrawals, user history, and vault history.
Across a page's reads this adds at most one lightweight query per subgraph; the
result is transparent to callers, which continue to see the internal
(snake_case) shape.
## 8.7.0 (2026-07-08)
### Minor Changes
- 1d92be0: feat(swap-router): add explicit `swapRouterDeposit` deposit method
New high-level method `augustSdk.evm.swapRouterDeposit(options)` (and the
standalone `swapRouterDeposit(signer, options)` export) that always routes a
deposit through the on-chain `SwapRouter`, reading the vault's reference asset
and decimals on-chain and picking the correct path from `depositAsset` (direct
deposit, native wrap, or a swap to the reference asset with a fail-closed
aggregator quote).
This gives the client an explicit opt-in to SwapRouter deposits instead of
depending on `vaultDeposit`'s implicit `VAULTS_USING_SWAP_ROUTER` allowlist
routing — the mechanism that accidentally swapped a native-deposit multi-asset
vault (Sentora USD). `vaultDeposit` is unchanged; use it for native/adapter
deposits and `swapRouterDeposit` for SwapRouter deposits.
- 282dc2b: feat: expand the MCP server into a fuller read/analytics suite (19 new tools)
**SDK** — new `getVaultActivity({ vault, chainId, sinceTs, untilTs, types })`: the vault-wide counterpart to `getVaultUserHistory`, returning every deposit/withdrawal event for a pool (not scoped to one wallet). Its subgraph reader now paginates past the 1000-row page cap and stops early once it pages past the `sinceTs` window, so busy vaults are no longer silently truncated.
**MCP** — 19 new tools:
- Activity/flow: `vault_activity` (per-vault flow feed + computed summary: deposit/withdrawal counts, volumes, net flow, unique actors), `activity_ranking` ("which vaults had the most deposits last week"), `user_activity`, `user_transfers`.
- Reads: `total_deposited`, `token_price`, `vault_withdrawals`, `vault_pnl`, `vault_annualized_apy`, `withdrawal_requests_status`.
- Subaccounts: `subaccount_summary`, `subaccount_health_factor`, `subaccount_loans`, `subaccount_cefi_positions`, `subaccount_otc_positions`.
- Ops: `ops_health`, `ops_redemptions` (parity with the `august ops` CLI).
- LayerZero: `layerzero_deposits`, `layerzero_redeems`.
**config** — new Zod result schemas backing all of the above.
- ef0bdf6: feat(swap-router): fully separate SwapRouter routing from `vaultDeposit`
`vaultDeposit` no longer auto-routes any vault through the SwapRouter — it is now
purely the native / multi-asset / adapter path. This removes the implicit,
registry-driven routing that could silently swap a natively-accepted asset (e.g.
depositing RLUSD/PYUSD/USDT into the multi-asset Sentora USD vault, or forcing a
non-underlying token through a swap). Any-token swap deposits are the explicit,
opt-in job of `swapRouterDeposit`.
The registry is now eligibility metadata, not a routing switch:
- `VAULTS_USING_SWAP_ROUTER` → renamed `SWAP_ROUTER_ELIGIBLE_VAULTS`
- `vaultUsesSwapRouter` → renamed `isSwapRouterEligible`
Both old names remain as `@deprecated` aliases for one release. The set now marks
vaults whose UI may offer the (opt-in) swap-router deposit surface — consumed by
app UIs and, optionally, by `swapRouterDeposit` as a fail-fast check — and is
**never** read by `vaultDeposit`. Sentora USD is the initial eligible vault; its
native assets still deposit via `vaultDeposit`, only foreign tokens route through
`swapRouterDeposit`.
### Patch Changes
- 3f74779: fix(solana): surface the real Anchor revert reason in deposit/redeem errors
`handleSolanaDeposit` / `handleSolanaRedeem` built their wrapped error from `e instanceof Error ? e.message : 'Unknown error'`. When an Anchor program reverts with a recognized error code, `@coral-xyz/anchor`'s `translateError` returns a `ProgramError` whose constructor calls `super()` with no argument — so `.message` is the empty string by construction (the real reason lives on `.msg`/`.code`, and `AnchorError` puts it on `.error.errorMessage`/`.error.errorCode.number`). Every recognized on-chain revert therefore surfaced — and paged Slack — as `"Solana deposit failed: "` with nothing after the colon, discarding the numeric code needed to tell `VaultPaused` (6008) from `InsufficientAmount` (6002) from an account-constraint violation.
Both catch blocks now route the caught error through a new `describeSolanaError` helper that prefers `AnchorError.error.errorMessage`/`errorCode.number`, then `ProgramError.msg`/`code`, then a non-empty `.message`, then `.toString()`, and only falls back to an actionable `"please try again"` for a genuinely reason-less throwable (rather than an "unknown error" admission to the user; the raw throwable is still preserved on `cause` and in telemetry). The message becomes e.g. `Solana deposit failed: Vault is paused (code 6008)`. `cause` and structured `context` on the thrown `AugustSDKError` are unchanged; no public API changes.
## 8.6.1 (2026-06-30)
### Patch Changes
- 543442d: fix: show pending withdrawals for new-schema vaults (e.g. Clearstar Prism)
`getWithdrawalRequestsWithStatus` prunes requests outside a block-based lookback window via `Number(req.block_number) >= blockCutoff`. New-schema subgraphs expose the block height as `blockNumber`, but `NEW_WITHDRAWALS_REQUESTED_QUERY_PROPS` returned it un-aliased, so `req.block_number` was `undefined`, `Number(undefined)` was `NaN`, and `NaN >= blockCutoff` dropped every request. The endpoint returned `[]`, silently emptying the Pending Withdrawals tab for every vault on the new subgraph schema (any metadata-sourced vault not in the legacy `SUBGRAPH_VAULT_URLS` list) — while transaction history, which is sourced independently, still listed the redeem.
The new-schema withdrawal query props now alias `block_number: blockNumber`, matching the existing aliasing used for `transactionHash_`/`timestamp_` (and already applied in the transfer props). The aliases on the processed/withdrawals prop sets are not read today but are added for consistency with the shared `ISubgraphBase` contract to prevent the same `NaN` prune recurring. No public API or thrown-error behaviour changes.
- a5dd13b: fix: reduce Sentry transaction volume and fix data quality issues in analytics instrumentation
- Reduce default `tracesSampleRate` from `1.0` to `0.1` — captures a statistically valid 10% sample while cutting transaction event volume by ~90%
- Remove `captureConsoleIntegration` — SDK errors already route through `Logger.setSentrySink`; the integration was redundantly capturing consumer app `console.error` calls as SDK error events
- Add `beforeSendTransaction` sub-sampling for the `network` category (switchNetwork, updateWallet, clearWallet, setSigner) — these fire on every wallet/chain update and are high-frequency relative to their dashboard signal value; effective rate drops to ~1% of calls
- Remove redundant `setTag` calls for `sdk.category`, `sdk.chain`, and `sdk.last_chainId` from `trackMethodCall` — these values are already recorded as span attributes; the global mutations were contaminating subsequent unrelated events with stale tag values
- Remove `setMeasurement` calls from the sync method tracking path — sync methods have no span of their own, so measurements were attaching to a random parent transaction and overwriting its counters
- 14c56ca: fix: stop billing user-rejected transactions and expected on-chain reverts as Sentry issues
Wallet user-rejections (deposit/redeem/approve) and routine read reverts (probing a function a vault doesn't implement) were logged at `error` level, turning normal product behaviour into high-volume billed Sentry issues. They are now classified via a new `isUserRejectionError` / `isExpectedRevertError` helper and demoted to `warn` (Sentry breadcrumbs, not issues); genuine failures are unchanged and still surface as errors. A narrow `ignoreErrors` backstop also drops user-rejection and localhost-node (`:8545`) noise at the transport. No public API or thrown-error behaviour changes.
## 8.6.0 (2026-06-24)
### Minor Changes
- 15c99c1: feat: serve user history for archived vaults from the backend Mongo snapshot
`getVaultUserHistory` / `getSubgraphUserHistory` now route archived vaults to the backend `/upshift/vault_history` REST endpoint instead of their Goldsky subgraph, so deposit/withdraw history survives retiring those subgraphs. The archived set is fetched from the backend (`fetchArchivedVaults`, cached) — the routing source of truth — so a vault is only rerouted once its history has been backfilled. Adds `fetchArchivedVaults` and async `isArchivedVault`, plus the `tokenizedVault.userHistory` / `tokenizedVault.archivedVaults` endpoints. Return shape (`ISubgraphUserHistoryItem`, types deposit / withdraw-processed / withdraw-request) is unchanged.
- cd53624: feat(stellar): classify unfunded Stellar accounts under a dedicated `ACCOUNT_NOT_FUNDED` error code
When a Soroban deposit/redeem targets a source account that has never been activated, `buildSorobanTx` now throws an `AugustValidationError` with the new `ACCOUNT_NOT_FUNDED` code instead of the generic `INVALID_INPUT`. This is an expected, user-actionable condition (the address just needs ≥1 XLM), so giving it its own code lets it group on its own key in telemetry rather than spamming the generic-error alert bucket. The remediation message and structured context (`sourceAddress`, `method`, `contractId`, original error as `cause`) are unchanged.
`ACCOUNT_NOT_FUNDED` is added to the exported `AugustErrorCode` union and to the codes accepted by `AugustValidationError` — additive, so existing consumers narrowing on `AugustErrorCode` are unaffected.
- 5f47a00: fix(swap-router): pin ParaSwap to a single contract method and fail closed on router/selector drift
`vaultDeposit` through the SwapRouter now constrains ParaSwap to one generic contract method (`swapExactAmountIn`) via the `/prices` `includeContractMethods` filter, so the resulting calldata's selector is deterministic. After fetching the quote it asserts the quote's `router` and payload selector match the new `SWAP_ROUTER_DEX_AGGREGATOR` entry for the chain, throwing a clear `AugustValidationError` instead of letting the deposit revert on-chain with `InvalidRouter()` / `InvalidNotWhitelisted()`.
Adds the exported `SWAP_ROUTER_DEX_AGGREGATOR` constant (the single source of truth tying the off-chain swap-leg builder to the on-chain router whitelist) and an optional `contractMethod` field on `fetchSwapQuote`'s request.
- 93a983c: feat: surface per-reward backend logos via `additionalPointsDetailed`
`getVaultRewards` now emits `additionalPointsDetailed` on `IVaultRewards`, pairing each reward's display label with its backend-provided `img_url`. Consumers can resolve a reward's logo from this `imgUrl` first and fall back to a bundled asset only when absent — so a newly-added reward with a backend logo (e.g. "Cores") renders its icon without any client-side keyword mapping. Adds the `IVaultRewardDetail` type, which carries the reward's stable `id` as the join key (labels are display-only and not guaranteed unique).
### Patch Changes
- 34dc7c6: chore: bump TypeScript `target`/`lib` to es2022 so modern APIs (e.g. `Object.hasOwn`) type-check. Emitted output now targets es2022 — requires Node 16.9+ / modern browsers.
- 1b106e7: fix(coingecko): surface typed errors for unmapped symbols and non-2xx responses
`fetchTokenPricesFromCoinGecko` previously silently returned `null` for every
failure, making rate-limits and server errors indistinguishable from "no price
data". Two latent defects fixed:
- Unmapped symbols now throw `AugustValidationError` (`INVALID_INPUT`) before
any network call is made, avoiding a wasted round-trip with `"undefined"` in
the URL.
- A 429 response now throws `AugustRateLimitError`; any other non-2xx throws
`AugustServerError`. JSON parse errors and network-level failures continue to
return `null` (unchanged).
- 4db12d7: chore: resolve biome and tsdoc lint warnings in `core/fetcher.ts` and `core/helpers/core.ts` — replace `any` with `unknown`/generics, use template literals and `Date.now()`, drop non-null assertions and unused catch bindings, and add the missing `@param` hyphens. No behavior change.
- b9b59c4: fix: carry the deposit asset (`assetIn`/decimals) through archived-vault history so mixed-decimal pre-deposit vaults compute lifetime PnL correctly. Without it, an 18-decimal deposit (e.g. USDS) into a 6-decimal-vault was normalized at the vault's decimals, inflating the cost basis ~1e12 and showing -100% / multi-billion PnL.
- 50a29b4: fix: archived-vault user history now sorts ascending by timestamp (matching the subgraph path's ordering contract) and drops rows with an unparseable timestamp instead of emitting a "NaN" stamp
- 34dc7c6: fix: drop unused `@ts-expect-error` in Buffer polyfill; use `globalThis` cast instead of bare `global`
- 03ba56b: docs(readme): fix broken quick-start snippet and sub-accounts accessor in the package README
The `@augustdigital/sdk` package README (rendered on npmjs.com and bundled in the tarball) used a named import `import { AugustSDK } from '@augustdigital/sdk'`, but the package only exposes `AugustSDK` as a default export — so the copy-pasted snippet resolved to `undefined` and `new AugustSDK(...)` threw. Switched to the default import `import AugustSDK from '@augustdigital/sdk'`.
Also corrected the Sub-Accounts section heading from `sdk.subaccounts` (a private field) to the public accessor `sdk.subAccountsModule`.
- a8a9c74: fix: correct vault LP share-price math and `round()` on bigints
- `fetchTokenPrice` computed a vault LP token's share price by integer-dividing
the raw `totalAssets`/`totalSupply` bigints, which floored a ~1.05 ratio to `1`
and re-normalized it to ~1e-18 — collapsing the LP price to ~0 (and throwing on
a zero-supply vault). Share price is now derived from the normalized values.
- `round()` threw `TypeError` when called on a `bigint` without an options object,
because the bigint branch read `options.decimals` instead of `options?.decimals`.
It now falls back to the default decimals as documented.
- c2cfd5c: fix: correct current-TVL value, loan-cache staleness, and the musd CoinGecko price
- `getVaultTvl` (current/non-historical path) returned the vault's `totalSupply()`
(shares minted) instead of assets under management. It now reads
`getTotalAssets()` (evm-2) / `totalAssets()` (v1), matching the historical path.
TVL is no longer understated by the share-price ratio.
- `fetchTokenizedVaultLoans` / `fetchTokenizedVaultSubaccountLoans` read the
shared LRU cache twice (`if (CACHE.get(key)) loans = CACHE.get(key)`). Because
the cache allows stale reads and deletes a stale entry on first `get`, a stale
hit returned `undefined` instead of refetching. They now use
`getSafeCache`/`setSafeCache`, which refetch on expiry like the rest of the SDK.
- `fetchTokenPricesFromCoinGecko` returned a nested tuple (`[['…', 1]]`) for the
`musd` (mezo-usd) stablecoin while every other branch returns a scalar, yielding
`NaN` (or a non-number "price") downstream. It now returns the scalar peg `1`.
- 093f09d: fix(stellar): surface the decoded Soroban transaction result code on submit failures
`submitStellarTransaction` now decodes the transaction-level XDR result-code discriminant (e.g. `txBadSeq`, `txTooLate`) and attaches it as `resultCode` on both the thrown `AugustSDKError` context and the error log — on the send-time `ERROR` path and the confirm-time `FAILED` path. Previously the reason was only available buried inside the stringified XDR in the error message.
Decoding is best-effort: if the RPC result is not a decoded union, `resultCode` is omitted (`undefined`) and the error still carries the stringified XDR, so the message text is unchanged. As a side effect of the refactor, the failure-detail guard changed from key-presence (`'errorResult' in sendResult`) to truthiness — a present-but-falsy result now yields an empty detail (the message falls back to the status) instead of the literal `"null"`.
No public API surface changes.
- b57c70c: chore: resolve biome and tsdoc lint warnings in `modules/vaults/getters.ts` and `services/coingecko/fetcher.ts` — type the `poolTotalSupply` locals and `defiPerBorrower`/`renderStatus`/CoinGecko response shapes instead of `any`, initialize the redemption-date locals, drop non-null assertions, switch to optional chaining, and fix the `@param` hyphens, `{@link}` throws tags, and a brace-laden `@returns`. No behavior change.
## 8.5.0 (2026-06-18)
### Minor Changes
- 621e098: feat(evm): add cross-chain OVault vault registry + resolver helpers
Adds an address-keyed registry (`CROSS_CHAIN_VAULT_CONFIGS`) of August's LayerZero OVault deployments plus `getCrossChainVaultConfig`, `isCrossChainVault`, `getOVaultChains`, `isHubOnlyReceipt`, and `getWithdrawDestinationChains`. Consumers can now resolve a full `ICrossChainVaultConfig` by vault address — and pass it straight to `crossChainVaultDeposit` / `quoteCrossChainDeposit` — instead of hand-assembling per-chain contract maps and LayerZero EIDs. Mirrors the SwapRouter registry pattern.
## 8.4.0 (2026-06-18)
### Minor Changes
- 70e1792: feat: new `AugustApi` backend module — `sdk.apiModule` (methods also exposed directly on `AugustSDK`) for backend-computed data with no on-chain equivalent:
- `getVaultUnrealizedPnlHistory({ vault, limit? })` — a vault's unrealized-PnL snapshot series, newest first.
- `getLatestUnrealizedPnl()` — the most recent unrealized-PnL snapshot for every tracked vault.
Both methods hit the public (unauthenticated) August API with exactly one HTTPS request and no RPC calls, validate inputs up front (`AugustValidationError`), throw typed errors on HTTP failures and response-contract mismatches, and return camelCased `IUnrealizedPnlSnapshot` objects.
- 8191dc7: feat: `getVaults` gains an opt-in `includeClosed` flag for portfolio use. By default `getVaults` excludes closed vaults, so marketplace/discovery callers never receive a `status: 'closed'` vault and don't have to filter it out themselves. When `includeClosed: true` is passed, closed vaults are returned (regardless of `is_visible`, since closed + invisible vaults bucket as closed) so a consumer joining user positions can render a position held in a closed vault. In that mode, loans/allocations enrichment is also skipped for closed vaults — they have none, and `getVaultAllocations` otherwise re-throws (no debank data / no subaccounts), which previously dropped the vault into the `failed` bucket and silently removed it from the result. Additionally, `includeClosed` now propagates down to the per-vault EVM getter (`getEvmVaultV1`/`getEvmVaultV2`), which otherwise returns `null` for any `status: 'closed'` + `is_visible: false` vault ("skip closed staging vaults") — that null caused `getVault` to return null and the vault to vanish from `getVaults` even with the closed bucket spread in. With `includeClosed`, closed + invisible vaults resolve their metadata. Active vaults are always fully enriched and unaffected.
- 1e1d1b1: feat: trim `@internal` helpers from the published type surface and restore TSDoc in published declarations
- `package.json#types` now points at an api-extractor rollup (`lib/sdk.d.ts`) that omits every export tagged `@internal` (`safeBigInt`, `safeSendTx`, `safeWaitForTx`, `tryRecoverTxHash`, `resolveSpender`, `validateAmountPrecision`, and friends) so they no longer appear in integrator autocomplete or type resolution from the package root.
- The SDK build no longer strips comments from emitted output, so the published `.d.ts` carries the full TSDoc — editors now show hover documentation for every public method.
- Runtime exports are unchanged and deep `lib/**` imports still resolve; this is a types-surface change only. `walletClientToSigner` intentionally remains public until the viem-native signer path ships.
- CI fails if an `@internal` export reappears in the public types (`scripts/check-internal-dts.mjs`).
### Patch Changes
- db5a53a: fix: Phase-2 review hardening
- `@augustdigital/config`: result-schema `address` fields now accept Stellar (`G…` account / `C…` contract) addresses, matching the SDK and backend address contract — previously a Stellar vault passed input validation but failed output-schema validation with a misleading `SCHEMA_MISMATCH`.
- `@augustdigital/mcp`: address validation now accepts Stellar `C…` contract addresses (parity with the SDK's `isStellarAddress`), and the HTTP transport compares bearer tokens in constant time via `crypto.timingSafeEqual`.
- `@augustdigital/sdk`: the unrealized-PnL response guard validates every required snapshot field — including the numeric monetary fields — so backend contract drift throws a typed `AugustServerError` instead of silently emitting `undefined` PnL values.
## 8.3.2 (2026-06-17)
### Patch Changes
- 572b363: feat: add apyOverride and website_url fields to vault types
## 8.3.1 (2026-06-17)
### Patch Changes
- a7077e3: feat: add `apy_override` field to `ITokenizedVault` and `website_url` to `ITokenizedVaultStrategist`
## 8.3.0 (2026-06-16)
### Minor Changes
- ee58832: feat(telemetry): forward SDK-internal logs to Sentry in production
`initializeSentry` now bridges the SDK's `Logger` to the resolved Sentry SDK. `Logger.log.error` is captured as a sanitized Sentry issue (the call-site label becomes the `sdk.origin` tag; structured context becomes scope extras), and `Logger.log.warn` is recorded as a `warning`-level breadcrumb that rides along with the next captured event.
Previously these were no-ops in production unless an integrator manually wired a logger, so the SDK's own diagnostics never reached the partner-usage dashboard. The bridge is installed only when analytics is enabled (it respects every existing disable path — `analytics.enabled: false`, `AUGUST_SDK_DISABLE_ANALYTICS`, dev/test `NODE_ENV`, and localhost), never throws back into the caller, and is cleared by `resetAnalytics()`. The integrator-pluggable `Logger.setLogger` / `Logger.setStructuredLogger` slots are unchanged.
- 908c2c4: fix(stellar): anchor Soroban tx timebounds to the network clock and widen the validity window to 10 minutes
Stellar Soroban deposit/redeem transactions could fail with `txTOO_LATE` after signing. `buildSorobanTx` stamped the transaction's `maxTime` from the signer's local clock via `.setTimeout(120)`, so:
- a device clock lagging behind network time built an already-expired transaction, and
- slow / asynchronous signing paths (hardware wallets, institutional approval flows) could not complete within the 120-second window.
Changes:
- `maxTime` is now anchored to the **network** clock. `buildSorobanTx` reads the latest ledger close time (`getLatestLedger` → `getLedgers().latestLedgerCloseTime`) and builds the tx with `setTimebounds(0, networkCloseTime + TX_TIMEOUT_SECONDS)`, immunizing the deadline against signer clock skew. The network read runs in parallel with the account fetch (no added latency) and falls back to the previous local-clock `setTimeout` window on any RPC failure, so it never regresses.
- `TX_TIMEOUT_SECONDS` raised from 120 to 600 (10 minutes) to cover slow/async signing while staying within the Soroban footprint/ledger-entry TTL.
No public API surface changes. The read-only `queryContract` path is unaffected.
- 15a6fcf: fix(stellar): surface a `decimals()` read failure on `getStellarUserPosition` instead of silently falling back to 7
`getStellarUserPosition` reads `balance()` and `decimals()` in parallel. When `decimals()` failed but `balance()` succeeded, it returned a confident `{ shares, decimals: 7 }` indistinguishable from a genuine 7-decimal vault. A consumer sizing a `redeem` against an ERC4626 offset vault (share decimals = asset + offset, e.g. 13) would then under-redeem by `10^offset` — a silent money-correctness gap (AUGUST-6381, follow-up to AUGUST-6380).
`IStellarUserPosition` now carries an optional `decimalsFromFallback?: boolean` (optional for source back-compat — existing consumer object literals still compile — but always populated by `getStellarUserPosition`). It is `true` when `decimals` is the fallback (the on-chain read failed) and `false` when it is the authoritative on-chain value. Callers that size a redeem MUST refuse to settle when it is `true` rather than trusting `decimals`. The SDK's own `getVaultPositions` now treats a fallback-decimals position as a failed read and reports a zero balance instead of a mis-scaled one. No change to the `null`-on-balance-failure behavior.
### Patch Changes
- d548100: chore: migrate tooling to Biome (lint + format) and add Knip (dead-code/unused-deps)
Replaces ESLint + Prettier + oxlint with [Biome](https://biomejs.dev) for linting
and formatting, and adds [Knip](https://knip.dev) for unused-file/dependency
detection (report-only baseline). A minimal ESLint config is retained solely to run
`eslint-plugin-tsdoc` (`pnpm lint:tsdoc`), which Biome has no equivalent for. Inline
`// eslint-disable` directives that referenced now-Biome rules were translated to
`// biome-ignore` / `// biome-ignore-all`. No runtime behavior or public API change.
- 769c982: refactor(logging): route remaining console.\* calls through Logger
Swept the last non-Solana `console.{log,warn,error}` sites onto `Logger.log.{info,warn,error}`, each tagged with its originating function: `core/fetcher.ts`, `core/helpers/web3.ts`, `core/base.class.ts`, `adapters/sui/getters.ts`, and `modules/vaults/fetcher.ts`. Combined with the Logger→Sentry bridge, these diagnostics are now sanitized and (in production) forwarded to Sentry instead of leaking to the integrator's console.
The `no-console` ESLint rule is tightened to flag every console method (previously `warn`/`error` were allowed). The logger module — the dev-mode floor (`core/logger/index.ts`) and the Slack transport (`core/logger/slack.ts`, which cannot import `Logger` without a cycle) — is exempted, and a few deliberately integrator-facing notices (the version-update nudge and the `override` deprecation warning) keep `console.warn` behind documented inline exceptions.
## 8.2.0 (2026-06-10)
### Minor Changes
- 0070001: feat: SwapRouter integration for vault deposits.
Adds the on-chain `SwapRouter` periphery contract to the SDK so users can deposit any whitelisted ERC-20 (or native ETH) into any opted-in August vault via a single atomic call. The SwapRouter swaps the input to the vault's reference asset and forwards the proceeds to the vault's deposit interface, normalizing ERC-4626 (v1/v3) and multi-asset (v2) flows behind one entry point.
### New public surface
- New methods on `EVMAdapter`: `swapAndDeposit`, `depositViaSwapRouter`, `depositNativeViaSwapRouter` (all in `modules/vaults/write.actions.ts`). Each handles approval automatically against the SwapRouter as spender and returns the resulting tx hash.
- New public function `fetchSwapQuote` in `services/swap-quotes` builds the calldata needed for a SwapRouter swap leg. v1 uses Paraswap; the result is shaped so 1inch/0x can be added later without breaking callers. Results include `fetchedAt` so UI integrators can detect stale quotes.
- `vaultDeposit` now routes through the SwapRouter automatically when the target vault is in `VAULTS_USING_SWAP_ROUTER` and the chain has a registered router. The existing call signature is unchanged. New optional `IContractWriteOptions.receiver` lets callers mint shares to a different address than `wallet` (treasury / cold-storage flows).
- New per-chain constants: `SWAP_ROUTER_ADDRESSES` (Ethereum mainnet: `0xAC771209FF2b71EECfF6E85a9AD01db8Ff2618B0`), `SWAP_ROUTER_WRAPPED_NATIVE` (mainnet: WETH), and `SWAP_ROUTER_MAX_SWAPS` (mirrors the on-chain `MAX_SWAPS = 9`). New vault opt-in set `VAULTS_USING_SWAP_ROUTER` and `ORIGIN_CODES` registry for partner/referral fee tracking.
- New types: `ISwapParams`, `ISwapAndDepositOptions`, `ISwapRouterDirectDepositOptions`, `ISwapRouterNativeDepositOptions`, `SwapRouterVaultType` (values `1` for ERC-4626, `2` for TokenizedVaultV2 — mirrors the on-chain constants).
- New ABI `ABI_SWAP_ROUTER`.
### Safety hardening (vs. naive integration)
- Per-leg `ISwapParams` validation rejects `amountIn === 0n`, `minAmountOut === 0n` (slippage off), `tokenIn === tokenOut`, malformed router/payload at the SDK boundary.
- `slippageBps` accepts `[0, 10_000)` — `10_000` (100% slippage = no protection) is rejected.
- `originCode` must be a 32-byte hex string; the SDK throws a typed `AugustValidationError` instead of waiting for the on-chain `InvalidOrigin` revert.
- Paraswap response shape is validated end-to-end: `priceRoute.destAmount` must be a numeric string, `to` must be a valid address, `data` must be hex calldata with at least a 4-byte selector.
- Vaults in `VAULTS_USING_SWAP_ROUTER` cannot silently fall through to the legacy adapter path. If the chain has no SwapRouter deployed, or `chainId` cannot be resolved, the SDK throws `AugustValidationError('INVALID_CHAIN')` — never routes through the MEV-vulnerable legacy `minAmountOut: 0` path.
- `isDepositWithPermit: true` on a SwapRouter-routed vault throws rather than silently dropping the permit signature.
- Native ETH deposits target only vaults whose reference asset equals the chain's wrapped-native token; other configurations throw with actionable guidance.
- `swapAndDeposit` strictly requires `signer.getAddress()` to return a valid EOA (no silent fallback to receiver). Smart-account integrators (Safe, ERC-4337) should be aware that the SwapRouter pulls from `msg.sender`, not the controlling EOA — for those flows the SDK currently expects the smart account itself to be the signer's address.
- Paraswap quote fetches accept an optional `AbortSignal` for cancellation/timeout.
### Coexistence with legacy adapters
Legacy adapter paths (Treehouse, Kelp, AVAX native, Paraswap `UniversalAdapter` for non-opted-in vaults) continue to work unchanged. The two systems coexist; vaults will converge onto the SwapRouter in follow-up PRs.
### Deployment checklist (operator)
Before adding a vault to `VAULTS_USING_SWAP_ROUTER`, the contract owner must complete the following on the SwapRouter (`0xAC77…18B0` on mainnet):
1. `enableVault(vaultAddr, vaultType, swapFee)` — register the vault with the correct `vaultType` (1 for ERC-4626, 2 for TokenizedVaultV2) and any per-vault swap fee in bps.
2. `enableToken(token)` — per accepted input token (e.g. WBTC, cbBTC, tBTC for the BTC v2 vault).
3. `enableRouter(routerAddr, tokenApprovalAddr, authorizedSelector)` — per DEX router the quote provider may target. Paraswap's "augustor" address is set per chain; the approval-target (`TokenTransferProxy`) and the selectors used by `/transactions` are admin inputs.
4. For non-default origin codes, `addOrigin(originCode, originFee, originFeeCollector)`.
5. For v2 multi-asset vaults: add the SwapRouter to the vault's sender whitelist.
The forknet smoke test at `tests/vaults/forknet-swap-router-abi.test.js` reads `vaultInfo`, `whitelistedTokens`, and the contract constants from the deployed router and fails if any expected vault is unregistered. Run `pnpm test:forknet` to verify before release.
### Behavior change for indexers
For vaults moved to the SwapRouter, deposits no longer emit from the vault contract directly — events are emitted by the SwapRouter (`Deposit`, `SwapExecuted`, `SwapFeeApplied`, `OriginFeeApplied`). Subgraphs that index the vault's deposit events for the BTC v2 vault should be updated to also index the SwapRouter.
### Patch Changes
- 7d4f38f: fix: sync `VAULTS_USING_SWAP_ROUTER` with on-chain `enableVault` state on the mainnet SwapRouter (`0xAC771209FF2b71EECfF6E85a9AD01db8Ff2618B0`).
The set previously listed `0x8AcA0841…362C21` (uptBTC) as a placeholder, but no `VaultEnabled` event was ever emitted for that address — `vaultUsesSwapRouter` was reporting `true` for a vault that the on-chain router would reject with `InvalidVault` at deposit time.
Replaces the set with the two vaults currently registered on the contract:
- `0xE9B725010A9E419412ed67d0fA5f3A5f40159D32` — **Upshift Core USDC** (vaultType=1, ERC-4626, reference asset USDC).
- `0x74aD2F789Ed583DBd141bbdafC673fE1F033718b` — **Sentora USD** (vaultType=2, Tokenized Vault V2, reference asset USDC).
Verified via `vaultInfo(addr)` reads and the full `VaultEnabled` event log on the deployed router. Consumers gated on `vaultUsesSwapRouter` (notably `vaultDeposit` dispatch) will now route the two registered vaults through the SwapRouter and continue to fall back to the legacy adapter path for everything else.
- ea679fc: fix: SwapRouter dispatch now reads the underlying asset's on-chain decimals when fetching a swap quote (previously reused the vault share-token decimals, which diverge for multi-asset v2 vaults — e.g. the 18-decimal share over the 8-decimal WBTC reference asset on the BTC v2 vault — and yielded a mispriced Paraswap quote).
fix: Paraswap calldata now embeds the slippage-adjusted minimum `destAmount` so the aggregator's own min-out check matches the SwapRouter's `minAmountOut`. Previously the calldata was built with the exact priceRoute `destAmount` (0% tolerance) and the DEX leg would revert on any adverse movement before the SwapRouter's slippage check could apply.
feat: `IContractWriteOptions.slippageBps` lets callers of `vaultDeposit` override the default 1% slippage tolerance applied on SwapRouter-routed deposits that require a swap.
- 5242f18: fix: honor `IContractWriteOptions.receiver` on the SwapRouter swap-and-deposit path
`vaultDeposit` dispatched through the SwapRouter was passing `wallet` as the share recipient on the swap leg, ignoring an explicit `receiver` override. The direct-deposit and native-deposit paths already honored it; the swap path now matches.
## 8.1.0 (2026-06-05)
### Minor Changes
- bc5d468: feat: `getVaultBorrowerHealthFactor` is now vault-scopable and resilient to per-loan failures.
- New optional `vault` field on `AugustSDK.getVaultBorrowerHealthFactor({ chainId, vault })` (and matching positional param on `AugustVaults.getVaultBorrowerHealthFactor`). When provided, only that vault's tokenized record is fetched and only its loans are walked — the all-vaults / all-chains fanout is skipped entirely.
- Internal `getVaultBorrowerHealthFactor({ vault, options })` and `getHealthFactorOfBorrowersByVault({ options, vault? })` (both in `modules/vaults/getters.ts`) now use `Promise.allSettled` for the loan-state / borrower / per-vault iterations. A single bad loan contract (e.g. a test loan whose address isn't a real deployed contract, or whose `loanState()` reverts) drops that row from the result and is logged via `Logger.log.warn` instead of rejecting the whole batch. Same applies to the per-borrower August backend call.
- The `Record` returned by `getHealthFactorOfBorrowersByVault` is now keyed by **lowercased** vault address. Callers must look entries up with `address.toLowerCase()`. The previous keys reflected whatever casing the upstream `/public/tokenized_vault/` endpoint returned, which silently caused lookups against `getAddress(pool)` to miss.
- New exported type `IVaultBorrowerHealthFactor` replaces the previous inline `{ borrower, loan, health_factor? }` shape.
Closes the upshift-app issue where the Allocation Breakdown HF column would render a perpetual loading skeleton on Upshift USDC because one bad test loan's RPC call sank the entire health-factor batch.
## 8.0.0 (2026-06-04)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- ebeb2c6: chore: remove two unused symbols from the published type surface — the `@deprecated StellarNetwork` alias (use `IStellarNetwork` instead; the alias existed for back-compat and has 0 internal consumers across our repos) and the `octavfi?: string` field on the SDK constructor's `keys` config (the field was never read; the octavfi service uses a hardcoded API key, not this config). No runtime behavior changes. Consumers that referenced `StellarNetwork` should switch to `IStellarNetwork`; consumers that passed `keys.octavfi` can drop it — it was a no-op.
### Patch Changes
- 66b18f2: fix: `fetchTokenPricesFromCoinGecko` now returns the latest price on the success path. The previous `if (data && data.length)` guard checked the `length` property on an object response (`{ prices, market_caps, total_volumes }`) and silently collapsed every successful response to `null` — only the hardcoded `musd` short-circuit was returning a real value. Fixes defect #1 from `todo/32-coingecko-fetcher-defects.md`; defects #2 (typed errors on non-2xx) and #3 (up-front symbol validation) remain pending.
- 175da88: fix: `fetchVaultsBatch` no longer mis-routes successful fetches that resolve to a falsy value (`0`, `''`, `0n`, `null`, `false`) into the failed pile. The success/failure branch now keys on `result.success` only, respecting the function's documented contract that `data` is the source of truth when `success === true`.
- 10b3b85: fix: break circular dependency `core/index.ts → core/auth → core/fetcher.ts → services/coingecko/fetcher.ts → core/index.ts` by importing `Logger` from the `core/logger` leaf module in `services/coingecko/fetcher.ts` instead of the `core` barrel. Restores the zero-cycle invariant enforced by the `Circular Dependency Check` CI job.
- 66b18f2: chore: route all `console.*` calls under `packages/sdk/src.ts/services/` (coingecko, debank, octavfi, subgraph) through `Logger.log.{info,error}`. Each call is now tagged with the originating function name and carries structured context (status, statusText, pool, address, etc.) instead of the previous raw, unsanitized strings. Errors now flow through `sanitizeError` before reaching Sentry, and dashboards can group by function tag rather than by error-message text. A new `tests/services/services-logger-hygiene.test.ts` regression-tests the floor: no `console.*` in `services/`.
## 7.0.1 (2026-06-03)
### Patch Changes
- ddbfa62: fix: restore `explorerLink` return type to `string` (regression in 7.0.0)
The circular-dependency cleanup unintentionally tightened `explorerLink`'s
return type to `string | undefined` by surfacing a branch that was previously
masked by `strictNullChecks: false`. Consumers had always compiled against
`string` via the emitted `.d.ts`. Restore the historical public shape by
returning `''` when `chain` is falsy or unknown.
## 7.0.0 (2026-06-03)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 7ede403: fix(audit): correctness, validation, and observability hardening across deposit / withdraw / redeem flows
**Breaking** — write helpers now throw `AugustValidationError` on bad input
and `AugustSDKError` on downstream failures (previously returned `undefined`
or threw a plain `Error`). Callers that depended on the silent no-op or were
matching on `Error` message strings need to wrap calls in `try`/`catch` and
narrow on `AugustValidationError` / `AugustSDKError`.
**Breaking** — `handleSolanaDeposit` and `handleSolanaRedeem` (the Solana
adapter's `vaultDeposit` / `vaultRedeem`) now `throw` on failure instead of
returning `null`. Callers checking for a `null` return must convert to
`try`/`catch`.
### EVM `write.actions`
- **vaultDeposit**: amount is now encoded against the _deposit token's_
decimals (not the vault's share decimals). Fixes a silent mis-scaling on
EVM-2 multi-asset vaults and any native-token deposit into a vault whose
share decimals ≠ 18. Native deposits always use 18 decimals.
- **vaultApprove**: now mirrors `vaultDeposit`'s routing — picks the wrapper
as spender for adapter deposits and the vault for multi-asset / standard
deposits. Compares the existing on-chain allowance against the required
amount (was: only re-approved when allowance was exactly `0`).
- **vaultRequestRedeem**: receipt-token approval now goes through
`safeSendTx` so Monad-style RPCs that return malformed pending-tx fields
don't throw during parsing.
- **vaultRedeem** (dated-claim flow) and **rwaRedeemAsset**: both now use
`safeSendTx` + `tryRecoverTxHash` for nonce-fallback parity with
`vaultDeposit` / `vaultRequestRedeem`.
- **rwaRedeemAsset**: doc fix — the **vault share** must be approved to the
subaccount, not the redeemable (output) asset. Caller responsibility
unchanged; the comment was wrong.
- All write helpers (`vaultApprove`, `vaultDeposit`, `vaultRequestRedeem`,
`vaultRedeem`, `depositNative`, `rwaRedeemAsset`) now throw
`AugustValidationError` on invalid wallet/target/wrapper addresses or
missing required inputs, and reject JS `number` amounts that exceed
`Number.MAX_SAFE_INTEGER`.
- `vaultDeposit` and `vaultRequestRedeem` now require `amount`
(previously silently encoded as `0` via `toNormalizedBn(undefined)`).
- `vaultDeposit` throws `AugustValidationError` when `depositAsset` differs
from the vault's underlying but no adapter is configured for the vault
(previously fell through to a cryptic on-chain revert).
- `vaultDeposit` and `vaultRequestRedeem` always wait for the ERC-20
approval receipt before sending the deposit/redeem tx, regardless of the
caller's `wait` flag — closes a race window where a follow-up tx could be
re-ordered ahead of the approval on some RPCs.
- Downstream tx failures (e.g. on-chain reverts) are now wrapped in
`AugustSDKError` with the original error preserved on `cause` and a
structured `context` payload, instead of a plain `Error("Deposit
failed: …")`.
- `safeBigInt` allowance read inside `vaultDeposit` now passes a
`'vaultDeposit:allowance'` context so flaky-RPC warnings are
discriminable from approve-path warnings.
- **safeBigInt**: emits a `Logger.warn` on malformed RPC responses
(e.g. bare `"0x"`) so flaky RPCs don't cause silent gas waste from
spurious approvals.
### EVM cross-chain (`crossChainVault`)
- **crossChainVaultDeposit**: now rejects unsupported user chains up front
with a clear error (was: cryptic config-lookup or gas-estimation revert).
- **approveCrossChain**: throws when the approval receipt reports
`reverted` (was: returned the hash unconditionally).
- Monkey-patch lock: timing out now **throws** instead of silently
proceeding with conflicting concurrent patches.
- Fee patch: warns via `Logger.warn` when the LayerZero SDK returns an
unexpected `contractFunctionName`, so the in-place LZ-fee buffer being
silently no-op'd is visible in telemetry.
- TSDoc on `crossChainVaultDeposit`, `crossChainVaultRedeem`,
`buildCrossChainVaultTx`, and `needsCrossChainApproval` now states the
default slippage / fee / gas buffers and documents the "approval needed
on RPC failure" defensive behavior.
### Solana
- **handleSolanaRedeem**: replaced `parseInt` with the new
`uiAmountToRawBn` BN-based helper. Fixes precision loss for any
18-decimal mint above a few thousandths or any 9-decimal mint above
~9M tokens.
- **handleSolanaDeposit**: now uses the same helper for consistency.
- Both handlers now throw `AugustValidationError` / `AugustSDKError` on
failure instead of returning `null`, matching the EVM helpers' error
contract.
### Stellar
- **submitStellarTransaction**: polling now backs off geometrically
(1.5x, capped at 8s) instead of fixed 2s — same worst-case ceiling on
attempts, lower RPC pressure on long waits.
- `handleStellarRedeem` TSDoc now documents the exact Soroban contract
interface it assumes (`redeem(shares: i128, receiver, owner, operator)`).
### Telemetry
- `rwaRedeemAsset` is now classified under `write.redeem` in
`METHOD_CATEGORIES` (previously fell back to `'unknown'`).
### New exports
- `uiAmountToRawBn` (from `adapters/solana/utils`).
- `resolveDepositTokenDecimals`, `resolveSpender`, `validateAmountPrecision`,
`safeBigInt`, `safeSendTx`, `safeWaitForTx`, `tryRecoverTxHash`,
`isNonceParsing` from `modules/vaults/write.actions` (marked `@internal` —
exported for unit testing).
- New polling constants: `POLL_INTERVAL_MAX_MS`, `POLL_INTERVAL_BACKOFF`.
### Minor Changes
- ae03a7b: feat(sdk): new `approve` method returns a discriminated `ApproveResult`
Adds `augustSdk.evm.approve(...)` (and the underlying `approve` export from
`modules/vaults/write.actions`) that returns one of:
```ts
type ApproveResult =
| { kind: "sent"; hash: string }
| { kind: "sufficient"; existing: bigint }
| { kind: "native" };
```
Lets callers tell apart "we sent a tx", "existing allowance already covers
the amount", and "the resolved deposit asset is native (msg.value, no
allowance applies)" without re-reading on-chain state.
`vaultApprove` is unchanged — same `Promise` shape,
same spender routing, same allowance / native short-circuits. Both functions
share the routing implementation via an internal helper so behavior stays
identical.
Method-taxonomy entry `approve → write.approve` added so Sentry rolls the
new method up next to `vaultApprove`.
- dee70e0: feat: partner-usage telemetry — isomorphic Sentry bootstrap, method taxonomy, dimension tags, and arg-shape capture
- Node + browser Sentry resolved at runtime (`@sentry/node` added alongside `@sentry/browser`); CLI now emits telemetry from its top-level error handler.
- Every method span carries `sdk.category`, `sdk.chain`, and `sdk.argShape` so dashboards can slice partner usage by intent, chain, and call shape without leaking values.
- Fallback `partner.id = 'unverified:'` and `partner.tier = 'unverified'` tags ship until the verified-partner endpoint exists.
- `setMeasurement('sdk.method.invocation' | 'sdk.method.error', …)` adds counter-style aggregates for sum-based dashboards.
- New public exports: `getSentrySDK`, `getSentryRuntime`, `getMethodCategory`, `METHOD_CATEGORIES`, `chainIdToTagValue`, `computeArgShape`, `captureSdkException`.
- ae03a7b: feat(sdk): preview / allowance / balance / maxDeposit read helpers on the EVM adapter
Adds five additive read methods to `augustSdk.evm` so consumers can stop reaching
into raw ABIs for the most common vault reads:
- `previewDeposit({ vault, amount, asset? })` — shares returned by a deposit.
Routes EVM-1 vaults to `IERC4626.previewDeposit(uint256)` and EVM-2 multi-
asset vaults to `previewDeposit(address, uint256)` (returns the share slot
of the tuple).
- `previewRedeem({ vault, shares })` — assets returned by a redeem. Routes
EVM-1 vaults to `IERC4626.previewRedeem(uint256)` and EVM-2 to
`previewRedemption(uint256, false)` (gross slot).
- `allowance({ vault, owner, asset? })` — raw ERC-20 allowance the owner has
granted the vault. When `asset` is omitted the SDK resolves the vault's
underlying via `IERC4626.asset()`.
- `balanceOf({ asset, owner })` — raw ERC-20 balance.
- `maxDeposit({ vault, receiver? })` — vault deposit cap. EVM-2 multi-asset
vaults resolve via `maxDepositAmount()`; EVM-1 vaults use
`maxDeposit(receiver)` with a zero-address default.
All helpers return a raw `bigint` so BigInt math stays precise. Existing
helpers (`vaultAllowance`, `previewRedemption`) are unchanged.
Notes:
- These methods require a signer because they live on `EVMAdapter`, matching
the existing read pattern (`vaultAllowance`, `sendersWhitelistAddress`,
etc.). A read-only `JsonRpcProvider` wrapped via `Wallet.createRandom().connect(provider)`
works for query-only use.
- Method-taxonomy entries (`previewDeposit`, `previewRedeem`, `allowance`,
`balanceOf`, `maxDeposit`) added so Sentry rolls them up correctly.
- Benchmarks for these helpers are deferred — they need a signer plumbed
into `packages/sdk/benchmarks/suites/sdk-methods.js`; unit tests with
mocked contracts cover the routing and validation paths.
- ae03a7b: feat(sdk): constructor option `timeoutMs` overrides the request timeout default
Adds an additive `timeoutMs` option to the `AugustSDK` constructor (via the
shared `IAugustBase` config) that overrides the default request timeout used
by every August fetcher helper. The compiled-in default (90 s) is preserved
when the option is omitted; per-call `IFetchAugustOptions.timeoutMs` still
wins over the SDK-level default.
```ts
const sdk = new AugustSDK({
appName: "acme-trader",
providers: { 1: "..." },
keys: { august: process.env.AUGUST_KEY },
timeoutMs: 20_000, // shorten the default deadline to 20s for this instance
});
```
Also exports two helpers for advanced use:
- `setSdkRequestTimeout(ms | null)` — apply / clear the override directly.
- `getSdkRequestTimeout()` — read the active default (override or
compiled-in).
Notes:
- This is process-global state. If you instantiate multiple `AugustSDK`
objects in the same process with different timeouts, the last constructor
call wins.
- Lowering the default for the entire package was deliberately skipped — that
change is behaviorally observable for current integrators and belongs on a
major bump.
- e3d589e: feat(audit-followup): tx-flow audit fixes — Solana bigint amounts, cross-chain destination validation, quote staleness, Stellar account error
Additive correctness improvements identified during the deposit / withdraw /
redeem audit. No new exported types are renamed or removed.
### Solana (`adapters/solana`)
- **`handleSolanaDeposit` / `handleSolanaRedeem`** now accept `bigint` for
`depositAmount` / `redeemShares`, in addition to the existing `number`
form. When `bigint` is passed it is treated as the raw on-chain unit and
used directly — no `uiAmountToRawBn` round-trip through a JS float.
Recommended for money flows so the value the wallet signs cannot drift
from the value the UI displayed. The `number` form is still supported for
back-compat.
- The SDK wrapper methods `augustSdk.solana.vaultDeposit` and
`vaultRedeem` widen their `depositAmount` / `redeemShares` parameter to
`number | bigint` accordingly.
- Both handlers reject `0n` (and `0`) via `AugustValidationError`.
### Cross-chain (`evm/methods/crossChainVault`)
- **`buildCrossChainVaultTx`** now rejects requests where
`destinationChainId` or `userChainId` (on `DEPOSIT`) is neither the
configured `hubChainId` nor present in `config.layerZeroEids.spokes`.
Previously the unknown chain ID silently fell back to the hub EID,
routing user funds to a chain they did not pick. Behavior unchanged when
the chain ID is omitted / equals the hub / is a configured spoke.
- **`quoteCrossChainDeposit` / `quoteCrossChainRedeem`** now populate
`quotedAt` and `expiresAt` on the returned `IQuoteCrossChainResult`. The
UI should call `isQuoteStale(quote)` before submit and re-quote when it
returns `true` — LayerZero fees drift between quote and submit.
- New exports from `evm/types/crossChain`:
- `CROSS_CHAIN_QUOTE_TTL_MS` (30 000 ms default validity window).
- `isQuoteStale(quote, now?)` helper.
### Stellar (`adapters/stellar/soroban`)
- **`buildSorobanTx`** now wraps `server.getAccount` failures: when the
account does not exist or is unfunded, the SDK throws an
`AugustValidationError` with copy that names the actual fix ("send at
least 1 XLM to activate"). Detected via both `instanceof NotFoundError`
(forward-compat) and the current `"Account not found: "` message
the rpc server actually throws. Other RPC errors propagate unchanged.
### Known limitations (deferred)
- The Solana `deposit` instruction's IDL does not yet accept a
`min_shares_out` argument, so client-side slippage protection cannot be
enforced on-chain for Solana vaults. A `TODO(slippage)` comment marks
the call site in `vault.actions.ts`; on-chain enforcement requires a
program update.
### Patch Changes
- a18ea6d: chore(benchmarks): per-iteration RPC/API request counting
Adds `benchmarks/request-counter.js`, a `globalThis.fetch` wrapper that buckets requests as `rpc` (Alchemy, Helius, QuickNode, etc.) vs `api` (everything else, with a per-host breakdown). The harness now resets the counter before each measured iteration and surfaces `meanRpc`, `meanApi`, `meanRequests`, and a `hostBreakdown` on every result.
Console + markdown reporters render the new columns when counts are present and append a "Total requests across all measured iterations" section so AUGUST-5835-style perf claims (in-flight dedup, whitelist cache, `parallelLimit` fix) can be measured directly instead of estimated from the diff.
Counting is on by default. Set `BENCHMARK_ALCHEMY_REQUEST_COUNT=0` to skip the global fetch patch (e.g. in environments where another tool already wraps `fetch`). No behavior change to the SDK itself — this is a benchmark-tooling-only change.
- 0f92c9c: refactor(vaults/date-utils): lift duplicate `TIMESTAMP_MANIPULATION_WINDOW = 300` to module scope
`computeClaimableDate` and `isClaimableNow` each re-declared the same `const TIMESTAMP_MANIPULATION_WINDOW = 300` inside their function bodies. Lifted to a single module-level constant mirroring `TimelockedVault.sol`'s 5-minute window. Pure refactor — identical observable behavior.
Coverage was thin (no existing tests for `date-utils.ts`); adds `tests/vaults/date-utils.test.ts` covering `computeClaimableDate`, `isClaimableNow`, `formatDateKey`, `isValidClaimableDate`, and `getDaysInMonth` (8 tests, including UTC-day rollover and leap-February).
- 0f92c9c: perf(adapters/evm): parallelize receipt-token + whitelisted-assets fetch in `getEvmVaultV2`
After the initial vault-contract `Promise.all` resolves, `getEvmVaultV2` previously fetched the receipt-token metadata batch (5 RPCs) and the whitelisted-assets list (1 RPC) **sequentially**, even though both depend only on `vaultContractCalls` and have no data dependency on each other. They now run inside a shared outer `Promise.all`, so the wall time per V2 vault read is bounded by the slower of the two batches instead of their sum.
No change to the merged `combinedCalls` / `combinedFunctions` shape, so downstream `buildFormattedVault` sees identical inputs. Static regression test (`tests/adapters/evm-vault-v2-parallel-fetch.test.ts`) guards the wrapping pattern.
- 0f92c9c: docs(adapters/evm): TSDoc for `vaultAllowance`, `vaultDeposit`, `vaultRequestRedeem`, `depositNative`, and `vaultRedeem`
The EVM adapter's public write methods shipped without TSDoc blocks, which CLAUDE.md section 1 requires for every exported symbol on the published surface. Integrators saw "(no description)" in their IDE and had to read `modules/vaults/write.actions.ts` to learn the parameter shape and return semantics. Each method now has a one-sentence summary, `@param` / `@returns` / `@throws` notes, and an `@example`. A static presence test (`tests/adapters/evm-write-tsdoc.test.ts`) guards against regression.
No behavior change.
- 0f92c9c: refactor(vaults/utils): extract local `IEvmAssetMetadata` type
`buildFormattedVault` declared the same `{ address: IAddress; symbol: string; decimals: number }` shape twice as inline types (once for `depositAssets[]`, once for `receipt`). Lifted to a single file-local `@internal` type `IEvmAssetMetadata`. Not exported — kept internal so the public surface doesn't grow. Pure refactor.
- 0f92c9c: perf(core/web3): in-flight request dedup for `getDecimals` and `getSymbol`
`getDecimals` and `getSymbol` already cache results in the shared `lru-cache`, but concurrent identical calls (e.g. a fresh page-load with multiple components asking for the same token's decimals before any cache write lands) each fired their own RPC. The price-fetcher path already used an in-flight `Map` to coalesce these — `PRICE_REQUESTS` in `core/fetcher.ts:250` — and this change applies the same pattern to `getDecimals` (`DECIMALS_REQUESTS`) and `getSymbol` (`SYMBOL_REQUESTS`).
Behavior on a cold cache: the first caller initiates the RPC; subsequent callers within the same tick share that promise instead of starting their own. On error, the in-flight entry is cleared in a `finally` so the next caller can retry. Cache-hit and Solana-address fast paths are unchanged, so no observable difference for callers that aren't concurrent.
Adds `tests/utils/getdecimals-getsymbol-dedup.test.ts` with three cases (coalescing, no-false-coalescing across addresses, getSymbol parity).
- 0f92c9c: perf(core/web3): in-flight request dedup for `getReceiptTokenAddress`
`getReceiptTokenAddress` already caches results in the shared `lru-cache`, but concurrent identical reads (multiple components or vault paths resolving the same vault's receipt-token address before the first cache write lands) each fired their own `lpTokenAddress()` RPC. This change adds a `RECEIPT_TOKEN_REQUESTS` in-flight `Map` so simultaneous identical reads share a single promise — same pattern as the existing `DECIMALS_REQUESTS`, `SYMBOL_REQUESTS`, and `WHITELISTED_ASSETS_REQUESTS` maps. The in-flight entry is cleared in a `finally` so the next caller can retry after a failure.
Cache-hit and missing-arg fast paths are unchanged.
Adds `tests/utils/getreceipttokenaddress-dedup.test.ts` (coalescing + no false-coalescing across addresses).
- 0f92c9c: perf(vaults/getters): lift duplicate `getReceiptTokenAddress` call in the V2 position-read path
Inside the `version === 'evm-2'` branch of the position loop in `modules/vaults/getters.ts`, `getReceiptTokenAddress(provider, vault)` was awaited twice for the same vault in back-to-back lines — once to derive decimals, once again to construct the receipt contract for the balance read. The second call was a cache hit (so cheap in RPC terms) but still incurred a function call, a cache lookup, and a Promise hop per iteration. Both call sites now reuse a single `receiptAddress` local.
Pure lift with no behavior change — same value returned in both spots either way, and the wallet-balance branch only runs when the first await would also have run.
- ae03a7b: fix(adapters): Solana / Stellar adapters now throw typed errors for input validation
Replaces every `throw new Error(...)` in the Solana and Stellar adapter paths
that represents an input-validation failure with `AugustValidationError`, and
the Stellar submit / Soroban downstream failures with `AugustSDKError` /
`AugustTimeoutError`. Consumers can now narrow:
```ts
catch (err) {
if (err instanceof AugustValidationError) { ... }
}
```
…on non-EVM paths, just like EVM. Error messages are unchanged, so existing
substring assertions and Sentry message-based grouping continue to work; the
class-based bucket gains signal.
Affected files:
- `adapters/stellar/actions.ts` — `validateContractAddress`, `validateAccountAddress`
- `adapters/stellar/soroban.ts` — `toBigIntAmount`, simulation / assembly failures (now `AugustSDKError`)
- `adapters/stellar/submit.ts` — submission failures (`AugustSDKError`), poll-timeout (`AugustTimeoutError`)
- `adapters/stellar/getters.ts` — `getStellarUserPosition` / `convertToShares` address validators
- `adapters/stellar/utils.ts` — `assertNotStellar` (now `INVALID_CHAIN`)
- `adapters/solana/vault.actions.ts` — input-validation failures inside `handleSolanaDeposit` / `handleSolanaRedeem`
- `adapters/solana/utils.ts` — wallet / program-id / vault-version validation and `uiAmountToRawBn` precision checks
- bb0873f: fix(perf-pr-review): address review findings on the perf-optimizations PR
Bundle of small fixes responding to the code review of `AUGUST-5835-perf-optimizations`. No public-API change.
- **`CACHE.has` vs `CACHE.get` truthy check** — flipped 4 sites in `core/helpers/web3.ts` (`getDecimals`, `getSymbol`, `getReceiptTokenAddress`, `getWhitelistedAssets`) from `if (CACHE.get(key))` to `if (CACHE.has(key))`. Tokens with `decimals === 0`, empty-string symbols, or empty whitelist arrays were silently re-fetching on every sequential call because the cached value was falsy. Resolves and supersedes `todo/29`.
- **`getWhitelistedAssets` typed error** — replaced `throw new Error(...)` with `AugustValidationError('INVALID_INPUT', ...)`. The function stays `@internal`; the change keeps Sentry's error-grouping intact (raw `Error` collapsed to the generic bucket).
- **`generatePermitSignature` Logger** — the `console.error('Could not fetch DOMAIN_SEPARATOR…')` that the Solana sweep had skipped is now `Logger.log.error('generatePermitSignature', error, { message: … })`, with the original throw preserved.
- **Dead `name` write** — moved `let name` into the cache-miss discovery block (`const name = …`). The assignment on the cache-hit path was never read; `signTypedData` uses `matchingDomain` directly.
- **`runWithConcurrency` correctness note** — one-line comment explaining why `nextIndex++` is safe across workers (JS single-threaded; increment finishes before any `await`).
- **Parallel-fetch test upgrade** — `tests/adapters/evm-vault-v2-parallel-fetch.test.ts` is rewritten from a regex-on-source assertion to a behavior test that mocks `Contract` / `getDecimals` / `getSymbol` / `getWhitelistedAssets` with controlled delays and asserts wall time falls in the parallel range (`1.5×–2.5× RPC_DELAY`), not the serial range (`3× RPC_DELAY`).
- **New regression test** — `tests/utils/cache-falsy-value-hit.test.ts` proves `getDecimals` returning `0` is cached and the second call doesn't re-fetch.
- 0f92c9c: perf(vaults/utils): cache matched permit domain per (chainId, token)
`generatePermitSignature` previously, on every invocation, fetched the token's `name()` (RPC), built 4 candidate EIP-2612 domain configurations, hashed each with `TypedDataEncoder.hashDomain`, and — only if all 4 failed — fell back to fetching `version()` (another RPC). For integrators generating multiple permits against the same token in a session, every signature reran the full discovery.
The matched `TypedDataDomain` is now cached in the SDK's shared `lru-cache` keyed `permit-domain--` for 1 hour. The live `DOMAIN_SEPARATOR()` is still fetched on every call and compared against the cached domain's hash; on mismatch (e.g. an upgraded token contract) the cache entry is invalidated and the original discovery loop runs. On a cache hit the `name()` RPC, the 4-iteration hashing loop, and the rare `version()` fallback are all skipped.
The function also pairs `nonces()` with `DOMAIN_SEPARATOR()` in a single `Promise.all` (they were previously sequential), shaving a round trip on the cache-miss path.
Adds `tests/vaults/permit-domain-cache.test.ts` covering the discovery path and the cached fast-path.
- 0f92c9c: refactor(adapters/solana): route console.\* through Logger
Replaces all 50 raw `console.log` / `console.warn` / `console.error` calls in `adapters/solana/{vault.actions,utils}.ts` with the equivalent `Logger.log.{info,warn,error}` calls. Output is now sanitized via the analytics pipeline and gated by `Logger.setDevMode()` / `Logger.setStructuredLogger()` rather than being printed unconditionally to stdout. Level mapping is preserved (`console.log` → `info`, `console.warn` → `warn`, `console.error` → `error`). No behavior change for callers that have not configured a logger; consumers that have already enabled dev mode or plugged in a structured logger will now receive Solana adapter events on the same channel as the rest of the SDK. A static test (`tests/adapters/solana-logger-hygiene.test.ts`) guards against regression.
- a18ea6d: fix(adapters/solana): propagate the underlying error from `getVaultMints` instead of swallowing it
`SolanaUtils.getVaultMints` previously caught any failure inside `program.account.vaultState.fetch(vaultStatePda)` — Anchor discriminator mismatch, account-not-found, RPC error — logged it, and returned `{ depositMint: '', shareMint: '', vaultVersion: undefined }`. Downstream `handleSolanaDeposit` / `handleSolanaRedeem` checked the empty mints and threw the generic `"Failed to read vault mints from on-chain state"`, which carried zero diagnostic signal. Operators triaging a failed deposit on a specific vault (e.g. Sentora xBTC on the Upshift portfolio page) had nothing actionable in the user-visible error.
`getVaultMints` now throws an `AugustSDKError` (`code: 'UNKNOWN'`) whose `message` includes the underlying cause and whose `context` carries `vaultProgramId` and `vaultAddress`. The original error is set as `.cause`. Successful reads still cache as before; the existing read-side `getVaultStateReadOnly` path is unchanged.
The outer catch in `handleSolanaDeposit` already re-wraps SDK errors with `cause`, so the user-visible message becomes `"Solana deposit failed: Failed to read vault mints from on-chain state: "` — pointing at whether the IDL is wrong, the PDA doesn't exist, or the RPC failed.
Adds `tests/vaults/solana-vault-mints-error-propagation.test.ts` covering account-not-found and discriminator-mismatch causes, asserting the typed-error shape and that the cause string flows through.
- 0f92c9c: fix(vaults/fetcher): honor `parallelLimit` in batch + comprehensive vault fetchers
`fetchVaultsBatch` and `fetchVaultsComprehensive` previously accepted a `parallelLimit` option but renamed it to `_parallelLimit` and ran every task in a batch concurrently via `Promise.all` — the option was a no-op. The default `getVaults` call site (`modules/vaults/main.ts`) passes `parallelLimit: 8` expecting it to take effect, so RPC fan-out for a typical batch of 15 vaults was running 15-wide instead of the intended 8-wide.
Both fetchers now route their per-batch work through an internal `runWithConcurrency` helper that pulls tasks from a queue with a hard in-flight cap. The default `parallelLimit` is `batchSize`, so any caller that did not specify `parallelLimit` sees identical pre-fix concurrency (no regression). Callers that did specify it — including the SDK's own `getVaults` — now get the cap they asked for.
Adds `tests/vaults/fetcher-parallel-limit.test.ts` covering: the cap, the default-preserves-prior-behavior path, and that every task still completes when `parallelLimit < batchSize`.
- 0f92c9c: perf(core/vaults): pre-compute lowercase `VAULT_SYMBOLS` lookup map
`getVaultSymbol`'s hardcoded-fallback path used `Object.entries(VAULT_SYMBOLS).find(([k]) => k.toLowerCase() === address.toLowerCase())` — an O(n) scan over the table on every cache-miss / non-canonical-case lookup. The canonical-case fast path (`VAULT_SYMBOLS[address]`) is preserved; the case-insensitive fallback now reads from a module-level `VAULT_SYMBOLS_LOWERCASE` map built once via `Object.fromEntries`, making it O(1).
The lookup precedence (backend metadata → hardcoded fallback → on-chain `getSymbol`) is unchanged. The hardcoded list is `@deprecated` per its existing TSDoc — backend remains canonical.
Adds `tests/utils/get-vault-symbol-lowercase.test.ts` covering canonical-case, lowercase, and unknown-address paths.
- 0f92c9c: perf(core/web3): cache `getWhitelistedAssets` list per (chain, whitelist contract)
V2 vault reads (`getEvmVaultV2`) call `getWhitelistedAssets` on the vault's whitelist contract on every invocation, and the returned list immediately fans out into per-asset `getDecimals` + `getSymbol` reads inside `buildFormattedVault`. The list itself rarely changes, so a new internal helper `getWhitelistedAssets` (in `core/helpers/web3.ts`) wraps the contract call with an `lru-cache` entry keyed `whitelisted-assets--` and a 5-minute TTL. Concurrent identical reads share an in-flight promise — same pattern as `getDecimals` / `getSymbol`.
`getEvmVaultV2` now delegates to that helper instead of building the contract inline; the merge step that flattens `contractCalls.getWhitelistedAssets` into the formatted vault is unchanged, so callers see the same shape.
Adds `tests/utils/get-whitelisted-assets-cache.test.ts` (in-flight coalescing, sequential cache-hit, no false-coalescing across addresses).
## 6.0.1 (2026-05-26)
### Patch Changes
- c7c508b: fix Flare chain explorer URL from flare-explorer.flare.network to flarescan.com
## 6.0.0 (2026-05-22)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 00c6ba9: `registerUserForPoints` now authenticates via a wallet signature instead of an admin API key. The function gains four required parameters — `chainId`, `signature`, `nonce`, `expiry` — and no longer reads `options.augustKey`. Callers must obtain a personal_sign (EIP-191) signature over a canonical message containing the lowercased user address, lowercased referrer (or `"none"`), chain id, nonce, and expiry; the backend reconstructs the same message and verifies the signature against the claimed wallet (EOA recovery first, then EIP-1271 for smart-contract wallets such as Safe). `chainId` must be one of the chains Upshift supports (see backend `SUPPORTED_REGISTRATION_CHAINS`); unsupported chains return 422. The class method `AugustVaults#registerUserForPoints` and the top-level `Sdk#registerUserForPoints` add `chainId`, `signature`, `nonce`, `expiry` as required positional arguments after `referrerAddress`. See the TSDoc on `registerUserForPoints` for the exact message template and a worked example.
### Patch Changes
- 0422e61: patch an issue with version ts. This patches a broken import in v 5.1.0 and 5.1.1
## 5.1.1 (2026-05-22)
### Patch Changes
- Re-publish of 5.1.0 with a clean build. The 5.1.0 tarball on npm was shipped from a stale `lib/` directory and was missing the Solana share-price + position fixes described in the 5.1.0 changelog below — `lib/adapters/solana/getters.js` still read only `deployedAum` for `totalAssets`. Anyone on `@augustdigital/sdk@5.1.0` should bump to `5.1.1`.
- Added a `prepublishOnly` script (`pnpm clean && pnpm build`) so subsequent publishes refuse to ship a stale `lib/` and force a fresh transpile. The 5.1.0 mishap was caused by a manual `pnpm publish` run without a preceding `pnpm build`; the new hook makes that impossible by construction.
## 5.1.0 (2026-05-22)
### Minor Changes
- 9dbc693: fix(solana): use `local_aum + deployed_aum` for vault total assets; add BigInt-safe share-balance helper; stop dropping Solana from `getVaults` / `getVaultPositions`
**Bump rationale (minor, not patch):** this release is bug-fix-driven but adds two purely additive public-surface elements — `SolanaAdapter.fetchUserShareBalanceRaw()` and the dedicated `IAugustBase.solana = { rpcUrl, network }` config entry point. Per the additive-public-API rule a minor bump is required even though no existing API breaks.
**Root causes**
- `getSolanaVault` read only `vaultState.deployedAum` for `totalAssets`, but the on-chain `VaultState::total_assets()` is `local_aum + deployed_aum`. The displayed share price dropped below 1.0 the instant the operator deployed any portion of the vault, even with zero PnL (jitoSOL showed `0.7370` against a 1:1 share supply).
- `getVaultPositions` Solana branch passed `uiAmount` (a JS number) into `toNormalizedBn` with no decimals argument. It defaulted to 18 and produced a `walletBalance.raw` off by `10**(18 − mintDecimals)`, breaking redemption sizing and max-action math even though the displayed `normalized` looked plausible.
- The provider-availability filter (`vaultsPerAvailableProviders`) had an explicit Stellar pass-through but no Solana one — Solana vaults were silently dropped from both the vault list and position list on any SDK instance whose `providers` map didn't register chainId `-1`.
- The IDL (`vault-idl.ts` / `.json`) and `ISolanaVaultState` were missing `local_aum`, `aum_increase_limit`, `aum_decrease_limit`, and `vault_version` — fields that exist in the Rust `VaultState` struct (see `programs/august-vault/src/state/vault.rs`). Because the missing fields sat _after_ `deployed_aum`, the earlier fields still deserialized correctly but every field after the drift (`pda_bump`, `paused`, `padding`) read from the wrong bytes. `paused` happening to read `0x00` is why this didn't blow up in production sooner.
**Changes**
- `adapters/solana/getters.ts`: sum `localAum + deployedAum` for `totalAssets`. Falls back to backend TVL when on-chain is unavailable.
- `adapters/solana/utils.ts`: new `fetchUserShareBalanceRaw({ publicKey, shareMint })` returning `{ amount: string; decimals: number | null }` from a single `getParsedTokenAccountsByOwner`.
- `adapters/solana/index.ts`: expose the helper on `SolanaAdapter` with TSDoc and a worst-case RPC note.
- `adapters/solana/types.ts`: extend `ISolanaVaultState` with `localAum`, `aumIncreaseLimit`, `aumDecreaseLimit`, and the (re-positioned) `vaultVersion`.
- `adapters/solana/idl/vault-idl.{ts,json}`: re-sync `VaultState` field order with the Rust source.
- `main.ts`: construct `SolanaAdapter` from either `providers[-1]` or the dedicated `solana: { rpcUrl, network }` config, so partner SDK instances can opt into Solana without polluting their EVM providers map.
- `modules/vaults/main.ts`: pass `chain_type === 'solana'` through the provider filter when `this.solanaService` is available — mirrors the existing Stellar clause.
- `modules/vaults/getters.ts`: Solana branch now reads via the raw helper, uses the mint's true decimals, drops the `as any` on `vaultState`, and returns `vault: v.address` instead of the outer parameter (mirrors the Stellar branch).
- `modules/vaults/types.ts`: `ISolanaService.fetchUserShareBalanceRaw` is required (only impl is the in-package `SolanaAdapter`, which now always provides it).
**No behaviour change for EVM or Stellar paths.**
**Verification**
- Borsh layout sanity-checked against `programs/august-vault/src/state/vault.rs:36-50` and against the live jitoSOL vault state at `2tmMcVv2Ene7wFGebPivhwYhAZyjaJoibMz1GYVaXsB1`: 455-byte account decodes cleanly with the new field order — `local_aum=564_529_610`, `deployed_aum=1_582_093_475`, `aum_increase_limit=20`, `aum_decrease_limit=20`, `pda_bump=[254]`, `vault_version=[0]`, `paused=false`, padding all-zero. `local_aum + deployed_aum` equals the share-mint supply at parity. Every byte accounted for.
- Benchmark entry added at `benchmarks/suites/sdk-methods.js`: `fetchUserShareBalanceRaw() [cold, no account]`. Gated on `BENCHMARK_SOLANA_RPC_URL` so the existing EVM-only CI run isn't affected; set the env var to opt in. Uses the jitoSOL share mint with the system-program key as wallet — deterministic "no account" path that measures `getParsedTokenAccountsByOwner` round-trip plus the short-circuit return, which is the hot path on the vault grid for users without a position.
## 5.0.0 (2026-05-21)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 8881c9b: Integrator experience: require `appName`, add a runtime version-nudge.
**Breaking — required `appName`.** `appName` is now a required field on
the `AugustSDK` constructor (and `IAugustBase`). Pass a stable
kebab-case slug identifying your application — e.g.
`new AugustSDK({ appName: 'acme-trader', ... })`. Despite the friendly
name the value is identifier-shaped: 3–64 chars, `[a-zA-Z0-9._-]` only
(it's used as a Sentry tag and HTTP header). Use a slug like
`'acme-trader'`, not a display name like `'Acme Trader'`. The SDK
throws synchronously from the constructor when the value is missing,
empty, or out of the allowed shape.
Why: the SDK now tags outbound analytics events with `app.name`, so
the August Digital team can attribute error spikes to the right
consuming application and reach out about breaking changes / critical
bugs. See the "App Name" section in `packages/sdk/README.md`.
Migration: add `appName: ''` to your existing
`new AugustSDK({ ... })` call. No other changes required.
**Additive — version-nudge on construction.** On non-production builds the
SDK now performs one best-effort npm-registry check per session and prints
a `console.warn` banner when a newer `@augustdigital/sdk` is available.
The check never runs in `NODE_ENV=production`, can be silenced with
`AUGUST_SDK_DISABLE_VERSION_CHECK=1`, or programmatically with
`new AugustSDK({ versionCheck: { enabled: false }, ... })`. Never blocks
construction; failures are silent. New exports: `runVersionCheck`,
`IVersionCheckConfig`, `compareSemver`.
### Minor Changes
- c24003b: feat: production-grade hardening
**Security & errors**
- New typed error hierarchy: `AugustSDKError`, `AugustAuthError`, `AugustNetworkError`, `AugustTimeoutError`, `AugustValidationError`, `AugustRateLimitError`, `AugustServerError`, plus `isAugustSDKError` type guard. All extend `Error` so existing `instanceof Error` consumers are unaffected.
- Secret sanitization in error messages, logger, and Slack adapter via `sanitizeString` / `sanitizeError` / `sanitizeForLogging`.
- URL injection hardening: `buildAugustUrl` rejects unknown server keys, absolute URLs, and protocol-relative paths; origin check enforces same-origin.
- `fetchAugustWithKey(undefined, …)` now throws `AugustAuthError(AUTH_MISSING_KEY)` instead of returning a synthetic `{status: 500}` response — callers using `if (res.status === 200)` previously misclassified missing-auth as a 500 server error; they now receive a proper typed error. `verifyAugustKey` short-circuits empty keys so `init()` behavior is unchanged.
- `override` flag on `IFetchAugustOptions` is `@deprecated` with a one-time runtime warning; will be removed in the next major.
- HTTP errors are now typed by status: 401 → `AugustAuthError`, 429 → `AugustRateLimitError`, else `AugustServerError`.
- `Response.headers.get('x-correlation-id')` (was bracket-accessed; always `undefined`).
**Transport**
- Per-request `signal: AbortSignal` and `timeoutMs: number` on `IFetchAugustOptions`. Combined with the default timeout via `AbortSignal.any` (Node 22+) with a manual relay + cleanup fallback. Distinguishes caller-cancel from timeout via an internal `timedOut` flag.
**Observability**
- New `ILogger` interface and `Logger.setStructuredLogger()` alongside the existing Sentry-compatible `SDKLogger`. Pino-friendly: pass a context object as the first arg.
**Performance**
- Parallelized `getVault` loans + allocations (`Promise.allSettled`, preserves original control flow).
- Removed redundant `fetchTokenizedVault` calls in `getVaultLoans` / `getVaultSubaccountLoans`.
- `createProvider(rpcUrl, chainId?)` enables ethers' `staticNetwork` (skips the `eth_chainId` round-trip).
- `getInfuraProvider` routes through `createProvider` (was rebuilding per call).
- `decimals` / `symbol` / `receipt-token` caches are chain-scoped via `providerScope`.
**Bundle**
- Buffer polyfill extracted to `polyfills.ts`; guarded against clobbering a consumer-set `Buffer`.
- `sideEffects: ["./lib/polyfills.js"]` lets bundlers tree-shake the rest of the SDK.
- Source maps excluded from the npm tarball.
**Bug fixes**
- `fetchAugustWithBearer` no longer crashes when `options` is undefined (`options?.` everywhere).
- `AbortSignal` fallback path now removes its `abort` listener on completion (no more leak across long-lived caller signals).
- Slack adapter's webhook fetch has a 5s timeout.
- `sanitizeError` preserves typed-error subclasses by cloning via prototype + own properties instead of calling the constructor (which would have misaligned positional args like `AugustAuthError(code, message, opts)`).
- `AugustSDKError` and subclasses ship a `toJSON()` so `JSON.stringify(err)` no longer returns `"{}"`. `code`, `correlationId`, `status`, `timeoutMs`, `retryAfterMs`, and `cause` are all included.
**No public API breaks.** All additions are opt-in. The only behavior change is `fetchAugustWithKey(undefined, …)` throwing instead of returning a fake 500 — the thrown value is still an `Error` instance.
- 8881c9b: feat(sdk): expose `getVaultRedemptionHistory` on the `AugustVaults` module and the top-level `AugustSDK` class. Wraps the existing module-level getter with the standard option-plumbing (RPC resolution from `chainId`, `augustKey`/`subgraphKey`/`headers` from the SDK instance), validates the vault input, and returns the same historical redemption records the underlying getter produces. Stellar vaults continue to return `[]` until on-chain indexing lands for that adapter.
### Patch Changes
- 7027223: fix: vault read paths no longer hang or surface ethers' `network is not available yet` when the configured RPC is unreachable or rate-limited
Three related changes that together resolve `august vault tvl --chain ` failures (cryptic `NETWORK_ERROR` on a healthy RPC, infinite "JsonRpcProvider failed to detect network" retry loop on a 403/401 RPC):
- `providerScope` (cache-key builder used by `getDecimals`, `getReceiptTokenAddress`, …) now tolerates ethers v6's lazy-network state. Reading `provider._network` is a _getter_ that throws `network is not available yet` until the first successful request resolves the chain id; the throw was bubbling out of every cached vault read on freshly constructed providers.
- `AugustVaults.getVaultTvl` now threads `chainId` into the getter options, and the EVM branch of `getVaultTvl` (`packages/sdk/src.ts/modules/vaults/getters.ts`) forwards it to `createProvider`. This sets ethers' `staticNetwork`, skipping the `eth_chainId` round-trip and, more importantly, preventing the indefinite network-detection retry loop when the RPC returns 4xx errors.
- `createProvider` now throws a clear, remediable error when called with a missing or empty `rpcUrl`, instead of silently constructing a `JsonRpcProvider` pointed at `http://localhost:8545`.
- f0741e2: fix: HyperEVM RPC compatibility for `getWithdrawalRequestsWithStatus`
- c14c10b: chore: remove unused `name` field from `AugustSDK`. The field was declared but never assigned and never read — `appName` (on `AugustBase`) is the single source of truth for the app identifier.
- 0cb921a: fix: cap `fetchTokenizedVaults` cache at 10 minutes and avoid stale-get eviction
`fetchTokenizedVaults` (bulk list) was calling `CACHE.set(key, value)` with no TTL override, falling back to the 24-hour global default — so vault config changes made on the backend (fee rates, fee waivers, etc.) could take up to 24h to surface to bulk-list consumers. The cache lookup also called `CACHE.get(key)` twice in a row; because the global `CACHE` is configured with `allowStale: true`, the first `.get()` on a stale entry returns it _and_ evicts it, leaving the second `.get()` `undefined`. Switched to `getSafeCache` (which uses `.has()` and so never triggers stale-get eviction) and set an explicit 10-minute TTL to match `fetchTokenizedVault` (single).
## 4.27.3 (2026-05-12)
### Patch Changes
- 651d08f: feat: add a TVL exclusion list for vaults so blacklisted addresses no longer count toward `totalDeposited`.
- b07fd3f: chore: update Goldsky subgraph routes for improved query performance.
## 4.27.2 (2026-05-12)
### Patch Changes
- 7fc6a6b: fix: correct the lookback block window in `getWithdrawalRequestsWithStatus` so older withdrawal requests are no longer missed.
## 4.27.1 (2026-05-12)
### Patch Changes
- 178dbfc: feat: add support for the Fluent network, including default RPC URL and block explorer.
## 4.27.0 (2026-05-12)
### Minor Changes
- 78231b6: feat: add RWA instant redemption — new `AugustVaults.rwaRedeemAsset()` and `previewRwaRedemption()` methods, plus an `instant_redeem_config` field on `IVault` returned from `getVault`/`getVaults`. The SDK automatically routes redemption calls to the correct `RwaRedeemSubaccount` for each vault.
### Patch Changes
- 5766173: fix: `getWithdrawalRequestsWithStatus` now requires a `chainId` argument so cross-chain queries return correct results.
- 8872391: feat: add helpers for OFT (LayerZero Omnichain Fungible Token) flows.
## 4.25.2 (2026-04-14)
### Patch Changes
- f002124: fix: include non-EVM Debank positions in the response from `getVaultAllocations`.
## 4.25.1 (2026-04-14)
### Patch Changes
- 3102191: fix: prevent `ethers v6 tx.wait()` from crashing on Monad RPC when pending transactions return a malformed nonce.
## 4.25.0 (2026-04-14)
### Minor Changes
- a267145: feat: add a Stellar SDK adapter — Soroban RPC support, transaction building and submission, and end-to-end localnet test coverage.
- 455b625: feat: add `getWithdrawalRequestsWithStatus` for tracking the status of withdrawal requests.
- ad5ea73: chore: remove SUI points from vault responses.
- 7e5aa22: feat: add Stellar vault support (backend-only) including a Stellar adapter, routing, and a shared vault builder.
### Patch Changes
- 8f1bcee: chore: refactor Solana vault adapter getters into a shared `buildBackendVault` utility (no public API change).
- c721801: fix: include PnL data in LayerZero (LZ) vault responses.
- e12e957: fix: prevent silent data loss in `getWithdrawalRequestsWithStatus` when responses span multiple pages.
- d6e7f96: feat: add `fetchTokenizedVaultSubaccountLoans` for retrieving subaccount loan data on tokenized vaults.
- bba0483: feat: add `show_cap_filled` to the tokenized vault response so callers can render cap-filled UI states.
- fd90233: feat: add a `getVaultPendingRedemptions` method on `AugustVaults`.
## 4.24.10 (2026-03-04)
### Patch Changes
- ac2bb72: fix: include CeFi positions that were previously missing from the allocations response.
## 4.24.9 (2026-03-03)
### Patch Changes
- ff68463: feat: add withdraw support for the earnAUSD vault.
## 4.24.8 (2026-03-02)
### Patch Changes
- 78b4b2a: fix: use the parsed `uiAmount` when reading Solana share balances so they reflect the correct decimals.
## 4.24.7 (2026-03-02)
### Patch Changes
- 40e6410: feat: support vault version in Solana PDA derivation; remove unused vault token-balance fetching.
- bad15e1: feat: add additional fields to vault responses.
## 4.24.6 (2026-02-26)
### Patch Changes
- bf55850: feat: add earnAUSD support over LayerZero.
- 301e84e: fix: resolve a circular dependency in the Solana adapter imports that caused `AugustBase` to be undefined in CommonJS builds.
- e0a1135: fix: forward `vaultAddress` to `getVaultState` from `getVaultPositions` so PDA derivation no longer returns the wrong address.
- 40d8d3f: fix: read the share mint from on-chain vault state (instead of PDA derivation) so multi-vault Solana programs are supported correctly.
- ebefff4: fix: ensure the tokenized vault API call always issues its query.
## 4.24.5 (2026-02-19)
### Patch Changes
- 6ab5765: feat: expose `default_apy_horizon` on vault responses.
## 4.24.4 (2026-02-17)
### Patch Changes
- a3bf6eb: feat: add a staging API URL for use in non-production environments.
- 4365252: feat: support deposits made through LayerZero relayers.
## 4.24.3 (2026-02-12)
### Patch Changes
- 4cd81a9: feat: add Citrea chain support to explorer link helpers.
## 4.24.2 (2026-02-06)
### Patch Changes
- c53ae5e: feat: add `getSubaccountSummary` for fetching summarized subaccount data.
## 4.24.1 (2026-02-04)
### Patch Changes
- 6213fb9: fix: `getVaultUserLifetimePnl` now excludes invalid transactions when computing PnL.
- 52cc399: fix: `getVaultUserLifetimePnl` correctly handles vaults that accept multi-asset deposits.
## 4.24.0 (2026-02-02)
### Minor Changes
- 654d3f2: feat: support sender-whitelist allocations on the vault contract; fix: include the `withdrawal_only` field on vault responses.
## 4.23.2 (2026-01-29)
### Patch Changes
- cec539b: perf: improve loading speed of `getVaultPositions`.
- a498e6e: feat: expose `cachedAt` on cached responses so callers can reason about staleness.
## 4.23.1 (2026-01-23)
### Patch Changes
- 2d5af1c: feat: expose the Debank service so consumers can access raw Debank data directly.
## 4.23.0 (2026-01-23)
### Minor Changes
- 9bbcc06: chore: internal version bump — no customer-facing changes.
## 4.22.0 (2026-01-23)
### Patch Changes
- 1700a0c: fix: fetch earnAUSD exposures from the Debank API.
- e1c36f3: fix: downgrade the `uuid` dependency to a version that ships CommonJS, restoring CJS consumer compatibility.
## 4.20.1 (2026-01-21)
### Patch Changes
- e6d592f: fix: improve type safety of the contract wrapper.
## 4.20.0 (2026-01-21)
### Minor Changes
- 9c456e8: feat: integrate Sentry for SDK observability and error reporting (opt-in).
### Patch Changes
- 0252a45: feat: introduce a strongly typed ABI-driven contract class for safer reads and writes.
## 4.18.1 (2026-01-14)
### Patch Changes
- 444f2d9: fix: add a hardcoded subaccount address for earnAUSD where on-chain discovery is not available.
## 4.18.0 (2026-01-13)
### Minor Changes
- a765147: feat: add a write function for depositing native assets into multi-asset vaults.
## 4.17.0 (2026-01-12)
### Minor Changes
- dd2bc24: feat: expose the SUI limited vault.
## 4.16.0 (2026-01-09)
### Minor Changes
- d7b8729: feat: remove hardcoded subgraph URLs and vault symbols — these are now fetched from the backend at runtime, so new vaults can appear without an SDK release.
## 4.15.4 (2026-01-06)
### Patch Changes
- 3f45029: fix: correct the function used to fetch the instant redemption fee.
## 4.15.3 (2026-01-05)
### Patch Changes
- 1e34016: chore: generalize the Goldsky URL for better scaling; feat: add EVM2 instant withdrawal logic.
## 4.15.2 (2026-01-01)
### Patch Changes
- 769b4c7: fix: `toNormalizeBN` now correctly handles values represented in exponential notation.
## 4.15.1 (2025-12-23)
### Patch Changes
- e79ced7: feat: add sentUSD to the subgraph configuration.
- fff8076: feat: add `previewRedemption()`; perf: cache the tokenized vault API response in `fetchTokenizedVault`; fix: add the missing `campaignApy` field to `IVault`.
## 4.15.0 (2025-12-19)
### Minor Changes
- c7422f7: feat: expose `getTotalDeposit()`, `depositCap`, `maxDepositAmount`, `enabled_historical_price_horizons`, and `latest_reported_tvl` on vault responses.
## 4.14.1 (2025-12-19)
### Patch Changes
- 1d6fae6: chore: upgrade the supported Node.js version to 22.
- 04c9281: feat: include campaign APY in the tokenized vault response.
- cfc7f40: feat: add support for the earnXRP and Tydro vaults.
## 4.14.0 (2025-12-16)
### Patch Changes
- 1d6fae6: chore: upgrade the supported Node.js version to 22.
- 04c9281: feat: include campaign APY in the tokenized vault response.
- cfc7f40: feat: add support for the earnXRP and Tydro vaults.
## 4.14.0 (2025-12-20)
### Minor Changes
- 0364b53: feat: add new vault API methods.
**New Methods:**
- `getVaultAnnualizedApy` — fetch annualized APY metrics for vaults (cUSDO, tETH, wstETH, rsETH).
- `getVaultSummary` — fetch a summary of a vault (name, type, chain, recent returns).
- `getVaultWithdrawals` — fetch a withdrawal summary and the pending withdrawal queue.
**New Types:**
- `IVaultAnnualizedApy`
- `IVaultSummary`
- `IVaultWithdrawals`
**Deprecation Notice:**
- `IVaultAnnualizedApy.hgETH30dLiquidAPY` — use `liquidAPY30Day` instead (removal: 2026-01-01).
- `IVaultAnnualizedApy.hgETH7dLiquidAPY` — use `liquidAPY7Day` instead (removal: 2026-01-01).
**Documentation:**
- Vault method documentation added to `docs/02-vaults.md`.
## 4.13.2 (2025-12-11)
### Patch Changes
- c6d5ad5: fix: update the type of historical APY values; deprecate `getVaultApy` — use `getVaultHistoricalTimeseries` instead.
## 4.13.1 (2025-12-10)
### Patch Changes
- e67bb0c: fix: make subaccount and snapshot loading optional in `fetchVaultsComprehensive` to reduce unneeded RPC volume.
## 4.13.0 (2025-12-10)
### Minor Changes
- 01f6203: feat: add support for the Katana chain.
### Patch Changes
- e58170f: fix: improve observability when Goldsky subgraph requests fail.
- d417f0b: feat: add subgraph configuration for the superMON, earnMON, and k3EUROP vaults.
- fe74f64: fix: update the query parameters used by the tokenized vault endpoints; deprecate `historical_snapshots` on the vault response — use `getVaultHistoricalTimeseries` instead.
## 4.12.1 (2025-12-09)
### Patch Changes
- 01cb0b6: feat: expose the `getVaultTimeSeries` endpoint on the `AugustSDK` class.
## 4.12.0 (2025-12-09)
### Minor Changes
- 8ef93e5: feat: add a vault time-series endpoint; fix: add an optional `loadSubaccounts` parameter to the get tokenized vault endpoint.
## 4.11.6 (2025-12-07)
### Patch Changes
- b842e02: feat: add `getVaultPnl` for fetching vault-level PnL.
## 4.11.5 (2025-12-04)
### Patch Changes
- f4eb84c: fix: `getVaultUserLifetimePnl` now derives the user's current position from the share price for a more accurate PnL.
## 4.11.4 (2025-12-04)
### Patch Changes
- 3f210b1: fix: update the Monad block explorer URL.
## 4.11.3 (2025-12-03)
### Patch Changes
- 623f3ec: fix: correct the calculation logic in `getVaultUserLifetimePnl`.
## 4.11.2 (2025-12-02)
### Patch Changes
- 73636bd: fix: correct the `lagDuration` calculation.
## 4.11.1 (2025-12-02)
### Patch Changes
- 38dbaa8: fix: additional fixes for the Hyena vaults.
## 4.11.0 (2025-12-02)
### Minor Changes
- 74af6be: feat: add an external points interface for vaults that integrate third-party point programs.
## 4.10.0 (2025-12-02)
### Minor Changes
- a23bce0: perf: optimize `getVaultUserLifetimePnl` for faster execution.
## 4.9.0 (2025-11-26)
### Minor Changes
- 83ee1e1: feat: add `getVaultUserLifetimePnl` for retrieving a user's lifetime PnL on a vault.
### Patch Changes
- f2582b9: feat: support EVM2 for subgraph history queries.
## 4.7.3 (2025-11-21)
### Patch Changes
- f2e0046: chore: update Monad Goldsky subgraph endpoints.
## 4.7.2 (2025-11-20)
### Patch Changes
- 545dd1b: refactor: rename the `getVault` family of functions to `fetchTokenizedVault`.
## 4.7.2 (2025-11-21)
### Patch Changes
- acd34a8: feat: include additional fields on vault responses.
## 4.7.1 (2025-11-19)
### Patch Changes
- 4ffaeeb: fix: revert a recent change to the tokenized vault fetch logic that introduced regressions.
## 4.7.0 (2025-11-19)
### Minor Changes
- 88e5d79: feat: add support for the Ink and Flare chains.
## 4.6.1 (2025-11-14)
### Patch Changes
- 79c3917: feat: add `historical_apy` to the tokenized vault response.
- b01879f: feat: add a deposit-with-permit function so callers can deposit using EIP-2612 signatures.
- 5506682: perf: reduce RPC calls during vault fetching.
- c7b052e: perf: remove the deposit cap query from the initial vault fetch — it's loaded on demand instead.
## 4.6.1 (2025-11-19)
### Patch Changes
- 87c24b2: chore: source the `integration` and `apy` fields from the backend instead of computing them client-side.
## 4.6.0 (2025-11-14)
### Minor Changes
- 4cbe3b4: fix: `getAvailableRedemptions` now uses the correct normalization function.
## 4.5.2 (2025-11-14)
### Patch Changes
- 50d47da: fix: improve the available and pending withdrawal logic for accuracy.
## 4.5.1 (2025-11-12)
### Patch Changes
- 4d1c505: feat: expose the `depositCap` contract call when the vault implements it.
## 4.5.0 (2025-11-07)
### Minor Changes
- 7e03e06: chore: update the SDK to consume the latest subgraph schema.
## 4.4.7 (2025-11-06)
### Patch Changes
- 3a43ccc: fix: improve `bigint` handling for safer arithmetic on large amounts.
## 4.4.6 (2025-11-06)
### Patch Changes
- 715c56f: feat: expose a vault reader function for direct on-chain reads.
## 4.4.5 (2025-11-06)
### Patch Changes
- 394a38e: feat: update the `vaultRequestRedeem` function signature.
## 4.4.4 (2025-11-05)
### Patch Changes
- 9a77fbe: feat: add a `walletToSigner` helper for converting a wallet to an ethers signer.
## 4.4.3 (2025-11-04)
### Patch Changes
- e704bc7: feat: update the `vaultDeposit` function signature.
## 4.4.2 (2025-11-03)
### Patch Changes
- e76546f: feat: add support for the Monad chain.
## 4.4.1 (2025-11-03)
### Patch Changes
- cc0e6cf: chore: internal version bump — no customer-facing changes.
## 4.4.0 (2025-10-31)
### Minor Changes
- d4bad1a: feat: bump the `getVault` API version.
## 4.3.5 (2025-10-31)
### Patch Changes
- 19ffdd2: feat: add support for the farmBOLD vault.
## 4.3.4 (2025-10-31)
### Patch Changes
- f761bfb: chore: update EOA-operator types.
## 4.3.3 (2025-10-30)
### Patch Changes
- 92a0cef: feat: add a user `rank` to the points response.
## 4.3.2 (2025-10-30)
### Patch Changes
- b79ab00: chore: update the Goldsky URL.
- 051fece: feat: support EOA operators on vaults.
## 4.3.1 (2025-10-29)
### Patch Changes
- cf57cc7: feat: update the parameters accepted by `getVault`.
## 4.3.0 (2025-10-29)
### Minor Changes
- ebccf02: fix: correct the URL used to fetch historical APY data.
## 4.2.3 (2025-10-29)
### Patch Changes
- fa53783: feat: add support for the Sentora WBTC and Sentora USCC vaults.
## 4.2.1 (2025-10-23)
### Patch Changes
- d5a62f1: feat: add Goldsky subgraph configuration for new vaults.
## 4.2.0 (2025-10-23)
### Minor Changes
- bc9a666: feat: `getVaultTVL` now takes a `chainId` for cross-chain accuracy.
## 4.1.0 (2025-10-21)
### Minor Changes
- d3cec8b: chore: update the strategists fallback list.
### Patch Changes
- 8ab6dab: chore: add hardcoded fallback values for some vault metadata.
## 3.16.1 (2025-09-22)
### Patch Changes
- 0b615f9: expose raw tokens response from debank
- Updated dependencies [0b615f9]
- @augustdigital/services@3.16.1
- @augustdigital/vaults@3.16.1
- @augustdigital/pools@3.16.1
- @augustdigital/types@3.16.1
- @augustdigital/utils@3.16.1
- @augustdigital/abis@3.16.1
## 3.16.0 (2025-09-19)
### Minor Changes
- 2edc611: adding an optional logger for sentry
### Patch Changes
- Updated dependencies [2edc611]
- @augustdigital/services@3.16.0
- @augustdigital/vaults@3.16.0
- @augustdigital/pools@3.16.0
- @augustdigital/types@3.16.0
- @augustdigital/utils@3.16.0
- @augustdigital/abis@3.16.0
## 3.15.2 (2025-09-10)
### Patch Changes
- 23fcd01: add xhype subgraph
- Updated dependencies [23fcd01]
- @augustdigital/services@3.15.2
- @augustdigital/vaults@3.15.2
- @augustdigital/pools@3.15.2
- @augustdigital/types@3.15.2
- @augustdigital/utils@3.15.2
- @augustdigital/abis@3.15.2
## 3.15.1 (2025-09-09)
### Patch Changes
- 1ef7bfb: adding coingecko key to staking
- 04c7782: add error response to debank res
- Updated dependencies [1ef7bfb]
- Updated dependencies [04c7782]
- @augustdigital/services@3.15.1
- @augustdigital/vaults@3.15.1
- @augustdigital/pools@3.15.1
- @augustdigital/types@3.15.1
- @augustdigital/utils@3.15.1
- @augustdigital/abis@3.15.1
## 3.15.0 (2025-09-09)
### Minor Changes
- 3bf450e: update API fallback fetch
### Patch Changes
- Updated dependencies [3bf450e]
- @augustdigital/services@3.15.0
- @augustdigital/vaults@3.15.0
- @augustdigital/pools@3.15.0
- @augustdigital/types@3.15.0
- @augustdigital/utils@3.15.0
- @augustdigital/abis@3.15.0
## 3.13.10 (2025-08-19)
### Patch Changes
- d2e7f94: adding withdraw event to getWithdraws
- Updated dependencies [d2e7f94]
- @augustdigital/services@3.13.10
- @augustdigital/vaults@3.13.10
- @augustdigital/pools@3.13.10
- @augustdigital/types@3.13.10
- @augustdigital/utils@3.13.10
- @augustdigital/abis@3.13.10
## 3.13.6 (2025-08-12)
### Patch Changes
- a2ca1dd: update lendiingpoolv3
- Updated dependencies [a2ca1dd]
- @augustdigital/services@3.13.6
- @augustdigital/vaults@3.13.6
- @augustdigital/pools@3.13.6
- @augustdigital/types@3.13.6
- @augustdigital/utils@3.13.6
- @augustdigital/abis@3.13.6
## 3.13.4 (2025-08-12)
### Patch Changes
- 383cf57: add upGAMMAusdc subgraph
- Updated dependencies [383cf57]
- @augustdigital/services@3.13.4
- @augustdigital/vaults@3.13.4
- @augustdigital/pools@3.13.4
- @augustdigital/types@3.13.4
- @augustdigital/utils@3.13.4
- @augustdigital/abis@3.13.4
## 3.13.3 (2025-08-07)
### Patch Changes
- Updated dependencies [82d0738]
- @augustdigital/utils@3.13.3
- @augustdigital/pools@3.13.3
- @augustdigital/services@3.13.2
- @augustdigital/vaults@3.13.3
## 3.13.0 (2025-08-05)
### Minor Changes
- 3c1913d: updating token exposure return value
### Patch Changes
- Updated dependencies [3c1913d]
- @augustdigital/vaults@3.13.0
- @augustdigital/pools@3.13.0
- @augustdigital/types@3.13.0
- @augustdigital/utils@3.13.0
- @augustdigital/abis@3.13.0
## 3.12.2 (2025-07-25)
### Patch Changes
- Updated dependencies [cbf643f]
- @augustdigital/utils@3.12.2
- @augustdigital/pools@3.12.2
- @augustdigital/vaults@3.12.2
## 3.12.1 (2025-07-23)
### Patch Changes
- 4ce6f73: add earnAUSD subgraph
- Updated dependencies [4ce6f73]
- @augustdigital/vaults@3.12.1
- @augustdigital/pools@3.12.1
- @augustdigital/types@3.12.1
- @augustdigital/utils@3.12.1
- @augustdigital/abis@3.12.1
## 3.12.0 (2025-07-21)
### Minor Changes
- 1aa9169: fix mezo explorer
### Patch Changes
- Updated dependencies [1aa9169]
- @augustdigital/vaults@3.12.0
- @augustdigital/pools@3.12.0
- @augustdigital/types@3.12.0
- @augustdigital/utils@3.12.0
- @augustdigital/abis@3.12.0
## 3.11.0 (2025-07-17)
### Minor Changes
- 2ab0157: adding mezo-mUSD support
### Patch Changes
- b441f0b: add unichain explorer
- Updated dependencies [b441f0b]
- Updated dependencies [2ab0157]
- @augustdigital/vaults@3.11.0
- @augustdigital/pools@3.11.0
- @augustdigital/types@3.11.0
- @augustdigital/utils@3.11.0
- @augustdigital/abis@3.11.0
## 3.9.1 (2025-07-10)
### Patch Changes
- e1ee449: patch bump
- Updated dependencies [e1ee449]
- @augustdigital/vaults@3.9.1
- @augustdigital/pools@3.9.1
- @augustdigital/types@3.9.1
- @augustdigital/utils@3.9.1
- @augustdigital/abis@3.9.1
## 3.6.0 (2025-06-28)
### Minor Changes
- 1eba6a4: handled errors in vault & services
### Patch Changes
- Updated dependencies [1eba6a4]
- @augustdigital/vaults@3.6.0
- @augustdigital/utils@3.8.0
- @augustdigital/abis@3.6.0
- @augustdigital/pools@3.6.0
- @augustdigital/types@3.6.0
## 3.5.1 (2025-06-26)
### Patch Changes
- Updated dependencies [b56895f]
- @augustdigital/utils@3.7.0
- @augustdigital/pools@3.5.1
- @augustdigital/vaults@3.5.1
## 3.5.0 (2025-06-26)
### Minor Changes
- f9edb34: add hyper evm history for user
### Patch Changes
- Updated dependencies [f9edb34]
- @augustdigital/abis@3.5.0
- @augustdigital/pools@3.5.0
- @augustdigital/types@3.5.0
- @augustdigital/utils@3.6.0
- @augustdigital/vaults@3.5.0
## 3.4.1 (2025-06-25)
### Patch Changes
- Updated dependencies [e945c91]
- @augustdigital/utils@3.5.0
- @augustdigital/pools@3.4.1
- @augustdigital/vaults@3.4.1
## 3.4.0 (2025-06-23)
### Minor Changes
- f98bdf4: update vault with risk
### Patch Changes
- Updated dependencies [f98bdf4]
- @augustdigital/vaults@3.4.0
- @augustdigital/pools@3.4.0
- @augustdigital/types@3.4.0
- @augustdigital/utils@3.4.0
- @augustdigital/abis@3.4.0
## 3.3.1 (2025-06-18)
### Patch Changes
- b364c2b: update fetching isVisible vault logic
- Updated dependencies [b364c2b]
- @augustdigital/vaults@3.3.1
- @augustdigital/pools@3.3.1
- @augustdigital/types@3.3.1
- @augustdigital/utils@3.3.1
- @augustdigital/abis@3.3.1
## 3.3.0 (2025-06-16)
### Minor Changes
- a86b316: update
- c5c2570: update hash in events
- c9b3c1a: update
- 705637a: update fetch user history
- b6e3aba: update version
### Patch Changes
- Updated dependencies [a86b316]
- Updated dependencies [c5c2570]
- Updated dependencies [c9b3c1a]
- Updated dependencies [705637a]
- Updated dependencies [b6e3aba]
- @augustdigital/pools@3.3.0
- @augustdigital/types@3.3.0
- @augustdigital/utils@3.3.0
- @augustdigital/abis@3.3.0
- @augustdigital/vaults@3.3.0
## 3.1.0 (2025-05-27)
### Minor Changes
- 81ab166: add isFeeWaived to pools
- 25bc103: update user history
- 2c4618a: remove console
### Patch Changes
- Updated dependencies [81ab166]
- Updated dependencies [25bc103]
- Updated dependencies [2c4618a]
- @augustdigital/pools@3.1.0
- @augustdigital/types@3.1.0
- @augustdigital/utils@3.1.0
- @augustdigital/abis@3.1.0
- @augustdigital/sdk@3.1.0
## 2.18.11 (2025-05-21)
### Patch Changes
- Updated dependencies [311a622]
- @augustdigital/utils@2.18.11
- @augustdigital/pools@2.18.11
## 2.18.5 (2025-05-08)
### Patch Changes
- 7ebbe39: Update Injective Description
- Updated dependencies [7ebbe39]
- @augustdigital/pools@2.18.5
- @augustdigital/types@2.18.5
- @augustdigital/utils@2.18.5
- @augustdigital/abis@2.18.5
## 2.18.4 (2025-05-08)
### Patch Changes
- b6b86a0: Added Injective Vault USDT
- Updated dependencies [b6b86a0]
- @augustdigital/pools@2.18.4
- @augustdigital/types@2.18.4
- @augustdigital/utils@2.18.4
- @augustdigital/abis@2.18.4
## 2.16.8 (2025-04-19)
### Patch Changes
- 70f3fa8: Mezo Vault Change
- Updated dependencies [70f3fa8]
- Updated dependencies [a3ad743]
- @augustdigital/pools@2.16.8
- @augustdigital/types@2.16.8
- @augustdigital/utils@2.16.8
- @augustdigital/abis@2.16.8
## 2.16.2 (2025-04-18)
### Patch Changes
- Updated dependencies [ba9846d]
- @augustdigital/utils@2.16.2
- @augustdigital/pools@2.16.2
## 2.16.0 (2025-04-17)
### Minor Changes
- 9cf59d6: expose vault whitelist address
### Patch Changes
- Updated dependencies [9cf59d6]
- @augustdigital/pools@2.16.0
- @augustdigital/types@2.16.0
- @augustdigital/utils@2.16.0
- @augustdigital/abis@2.16.0
## 2.15.0 (2025-04-11)
### Minor Changes
- e32fce4: add otc positions
### Patch Changes
- Updated dependencies [e32fce4]
- @augustdigital/pools@2.15.0
- @augustdigital/types@2.15.0
- @augustdigital/utils@2.15.0
- @augustdigital/abis@2.15.0
## 2.13.1 (2025-03-31)
### Patch Changes
- Updated dependencies [f57d7e3]
- @augustdigital/pools@2.14.0
- @augustdigital/utils@2.14.0
## 2.13.0 (2025-03-28)
### Minor Changes
- 83dc214: add debank response
### Patch Changes
- Updated dependencies [83dc214]
- @augustdigital/pools@2.13.0
- @augustdigital/types@2.13.0
- @augustdigital/utils@2.13.0
- @augustdigital/abis@2.13.0
## 2.12.0 (2025-03-25)
### Minor Changes
- dd2cb76: update protocol exposure data
### Patch Changes
- Updated dependencies [dd2cb76]
- @augustdigital/pools@2.12.0
- @augustdigital/types@2.12.0
- @augustdigital/utils@2.12.0
- @augustdigital/abis@2.12.0
## 2.10.2 (2025-03-05)
### Patch Changes
- Updated dependencies [dcc926f]
- @augustdigital/abis@2.10.2
- @augustdigital/pools@2.10.2
- @augustdigital/utils@2.10.2
## 2.10.1 (2025-03-05)
### Patch Changes
- Updated dependencies [f8f709d]
- @augustdigital/abis@2.10.1
- @augustdigital/pools@2.10.1
- @augustdigital/utils@2.10.1
## 2.10.0 (2025-03-03)
### Minor Changes
- 034db45: spelling error
### Patch Changes
- Updated dependencies [034db45]
- @augustdigital/pools@2.10.0
- @augustdigital/types@2.10.0
- @augustdigital/utils@2.10.0
- @augustdigital/abis@2.10.0
## 2.9.0 (2025-03-03)
### Minor Changes
- 31ae26a: add idle capital
### Patch Changes
- Updated dependencies [31ae26a]
- @augustdigital/pools@2.9.0
- @augustdigital/types@2.9.0
- @augustdigital/utils@2.9.0
- @augustdigital/abis@2.9.0
## 2.6.5 (2025-01-23)
### Patch Changes
- Updated dependencies [62619e1]
- @augustdigital/pools@2.6.5
## 2.6.2 (2025-01-22)
### Patch Changes
- Updated dependencies [61d51d4]
- @augustdigital/pools@2.6.2
## 2.6.1 (2025-01-21)
### Patch Changes
- Updated dependencies [8d45228]
- @augustdigital/pools@2.6.1
- @augustdigital/utils@2.5.1
## 2.6.0 (2025-01-17)
### Minor Changes
- update upshift rewards typography
- d56eb68: update AVAX rewards
### Patch Changes
- Updated dependencies
- Updated dependencies [d56eb68]
- @augustdigital/pools@2.6.0
- @augustdigital/types@2.6.0
- @augustdigital/utils@2.5.0
- @augustdigital/abis@2.5.0
## 2.5.0 (2025-01-17)
### Minor Changes
- ca9514d: update rewards for AVAX
### Patch Changes
- Updated dependencies [ca9514d]
- @augustdigital/pools@2.5.0
- @augustdigital/types@2.5.0
- @augustdigital/utils@2.4.1
## 2.4.1 (2025-01-17)
### Patch Changes
- Updated dependencies [44876f7]
- @augustdigital/pools@2.4.1
## 2.4.0 (2025-01-16)
### Minor Changes
- ab136b2: update upshift points multiplier
### Patch Changes
- Updated dependencies [ab136b2]
- @augustdigital/pools@2.4.0
- @augustdigital/types@2.4.0
- @augustdigital/utils@2.4.0
- @augustdigital/abis@2.4.0
## 2.3.1 (2025-01-15)
### Patch Changes
- Updated dependencies [4c562dd]
- @augustdigital/pools@2.3.1
## 2.3.0 (2025-01-13)
### Minor Changes
- 5515b33: override managementFee
### Patch Changes
- Updated dependencies [5515b33]
- @augustdigital/pools@2.3.0
- @augustdigital/types@2.3.0
- @augustdigital/utils@2.3.0
- @augustdigital/abis@2.3.0
## 2.2.0 (2025-01-10)
### Minor Changes
- f47df7b: updated management fee call
### Patch Changes
- Updated dependencies [f47df7b]
- @augustdigital/pools@2.2.0
- @augustdigital/types@2.2.0
- @augustdigital/utils@2.2.0
- @augustdigital/abis@2.2.0
## 2.1.2 (2025-01-10)
### Patch Changes
- Updated dependencies [cf49466]
- @augustdigital/pools@2.1.1
## 2.1.1 (2025-01-08)
### Patch Changes
- Updated dependencies [fe65b9d]
- @augustdigital/pools@2.1.0
- @augustdigital/types@2.1.0
- @augustdigital/utils@2.1.3
## 2.1.0 (2025-01-08)
### Minor Changes
- 8c457fa: update static keys
## 2.0.4 (2025-01-07)
### Patch Changes
- Updated dependencies [e96e036]
- @augustdigital/pools@2.0.4
## 2.0.3 (2025-01-02)
### Patch Changes
- Updated dependencies [0ade132]
- @augustdigital/utils@2.1.2
- @augustdigital/abis@2.1.2
- @augustdigital/pools@2.0.3
## 2.0.2 (2024-12-30)
### Patch Changes
- Updated dependencies [ac83b7d]
- Updated dependencies [5c34d73]
- @augustdigital/utils@2.1.1
- @augustdigital/abis@2.1.1
- @augustdigital/pools@2.0.2
## 2.0.1 (2024-12-30)
### Patch Changes
- Updated dependencies [4c16fd6]
- @augustdigital/utils@2.1.0
- @augustdigital/abis@2.1.0
- @augustdigital/pools@2.0.1
## 2.0.0 (2024-12-27)
**Integrator highlights**
- **Breaking:** This release contains breaking changes — see the full changelog below.
### Major Changes
- 4267b9a: update ethena apy val
### Patch Changes
- Updated dependencies [4267b9a]
- @augustdigital/pools@2.0.0
- @augustdigital/types@2.0.0
- @augustdigital/utils@2.0.0
- @augustdigital/abis@2.0.0
## 1.3.0 (2024-11-04)
### Minor Changes
- c9505a1: added ava labs ausd pool to pool package
### Patch Changes
- Updated dependencies [c9505a1]
- @augustdigital/pools@1.3.0
- @augustdigital/types@1.3.0
- @augustdigital/utils@1.3.0
- @augustdigital/abis@1.3.0
## 1.2.0 (2024-11-01)
### Minor Changes
- 3bfe99b: Added build to workflow
### Patch Changes
- Updated dependencies [3bfe99b]
- @augustdigital/pools@1.2.0
- @augustdigital/types@1.2.0
- @augustdigital/utils@1.2.0
- @augustdigital/abis@1.2.0
## 1.1.0 (2024-11-01)
### Minor Changes
- 4504eda: Testing new github workflow"
### Patch Changes
- Updated dependencies [4504eda]
- @augustdigital/pools@1.1.0
- @augustdigital/types@1.1.0
- @augustdigital/utils@1.1.0
- @augustdigital/abis@1.1.0
## 0.1.0 (2026-10-29)
### Minor Changes
- f9df78f: added parameters to pool fetchers in sdk"
### Patch Changes
- Updated dependencies [f9df78f]
- @augustdigital/pools@0.1.0
- @augustdigital/types@0.1.0
- @augustdigital/utils@0.1.0
- @augustdigital/abis@0.1.0
## 0.0.3 (2024-10-08)
### Patch Changes
- d72f854: (v0.0.3) testing github workflows
- 2f95c56: v0.0.3 edited readme and testing automated npm publish github workflow
- c388be5: (v0.0.2) changeset working appropriately
- Updated dependencies [d72f854]
- Updated dependencies [2f95c56]
- Updated dependencies [c388be5]
- @augustdigital/pools@0.0.3
- @augustdigital/types@0.0.3
- @augustdigital/utils@0.0.3
- @augustdigital/abis@0.0.3
## 0.0.2 (2024-10-08)
### Patch Changes
- (0.0.1) testing changeset
- Updated dependencies
- @augustdigital/pools@0.0.2
- @augustdigital/types@0.0.2
- @augustdigital/utils@0.0.2
- @augustdigital/abis@0.0.2
# Cross-Chain Vaults
> Execute cross-chain vault deposits and redemptions using LayerZero OVault. Functions are available as direct imports from `@upshiftfinance/sdk`.
## Overview
Cross-chain vault operations allow users to deposit into and redeem from ERC4626 vaults across different chains using LayerZero's OVault protocol. The SDK provides functions to build, quote, and execute cross-chain transactions.
**Architecture:**
- **Hub chain** — where the ERC4626 vault contract lives
- **Spoke chains** — chains users can deposit from (assets are bridged to hub via LayerZero)
- **LayerZero OFT** — Omnichain Fungible Token handles the cross-chain asset transport
## Prerequisites
Cross-chain vault functions require the `@layerzerolabs/ovault-evm` SDK as an injected dependency. This design avoids ESM compatibility issues with the LayerZero package.
```typescript
import {
OVaultSyncMessageBuilder,
OVaultSyncOperations,
} from '@layerzerolabs/ovault-evm';
import {
buildCrossChainVaultTx,
crossChainVaultDeposit,
crossChainVaultRedeem,
quoteCrossChainDeposit,
quoteCrossChainRedeem,
needsCrossChainApproval,
approveCrossChain,
classifyCrossChainError,
canDepositFromChain,
canRedeemFromChain,
isCrossChainOperation,
getAvailableChains,
formatCrossChainError,
getLayerZeroScanUrl,
LAYERZERO_ENDPOINT_IDS,
} from '@upshiftfinance/sdk';
// Injected dependency — pass this to all cross-chain functions
const ovaultSdk = { OVaultSyncMessageBuilder, OVaultSyncOperations };
```
## Vault Configuration
Every cross-chain vault requires an `ICrossChainVaultConfig` describing its deployment:
```typescript
import type { ICrossChainVaultConfig } from '@upshiftfinance/sdk';
const vaultConfig: ICrossChainVaultConfig = {
vaultName: 'Upshift USDC',
vaultSymbol: 'upUSDC',
hubChainId: 1, // Ethereum
vaultAddress: '0xE9B725010A9E419412ed67d0fA5f3A5f40159D32',
spokeChainIds: [42161, 8453], // Arbitrum, Base
contracts: {
assetToken: {
1: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC on Ethereum
42161: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // USDC on Arbitrum
8453: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC on Base
},
assetOFT: {
1: '0xc026395860Db2d07ee33e05fE50ed7bD583189C7',
42161: '0xe8CDF27AcD73a434D661C84887215F7598e7d0d3',
8453: '0x27a16dc786820B16E5c9028b75B99F6f604b5d26',
},
shareOFTAdapter: '0x4a21dcba38c3816c78144f33bb42d8fa17f38067',
composerSync: '0xc2637d7721791cc9cb196628d1e5e06887b1d4b9',
shareOFT: {
42161: '0x50a31ff4d57841681011837c17aa201c6a34203c',
8453: '0x1fa931bf85248ad2edf0004dd9a284698358e708',
},
},
layerZeroEids: {
hub: 30101, // Ethereum LZ Endpoint ID
spokes: {
42161: 30110, // Arbitrum LZ Endpoint ID
8453: 30184, // Base LZ Endpoint ID
},
},
};
```
For multi-asset vaults, add the `multiAsset` field:
```typescript
const multiAssetConfig: ICrossChainVaultConfig = {
...vaultConfig,
multiAsset: {
hubAssetAddress: '0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a',
},
};
```
## LayerZero Endpoint IDs
The SDK exports well-known LayerZero Endpoint IDs for convenience:
```typescript
import { LAYERZERO_ENDPOINT_IDS } from '@upshiftfinance/sdk';
LAYERZERO_ENDPOINT_IDS.ETHEREUM; // 30101
LAYERZERO_ENDPOINT_IDS.ARBITRUM; // 30110
LAYERZERO_ENDPOINT_IDS.AVALANCHE; // 30106
LAYERZERO_ENDPOINT_IDS.BASE; // 30184
LAYERZERO_ENDPOINT_IDS.SONIC; // 30332
LAYERZERO_ENDPOINT_IDS.MONAD; // 30390
```
## Quote a Cross-Chain Deposit
Estimate fees and expected output before executing. Does not send a transaction.
```typescript
quoteCrossChainDeposit(props: IQuoteCrossChainDepositRequest): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| -------------------- | ------------------------ | -------- | -------------------------------------------- |
| `ovaultSdk` | `IOVaultSdkDependency` | Yes | Injected LayerZero SDK dependency |
| `config` | `ICrossChainVaultConfig` | Yes | Vault deployment configuration |
| `amount` | `string` | Yes | Human-readable deposit amount |
| `decimals` | `number` | Yes | Token decimals |
| `userChainId` | `number` | Yes | Chain the user is depositing from |
| `walletAddress` | `string` | Yes | User's wallet address |
| `hubChain` | `Chain` | Yes | viem Chain object for hub chain |
| `sourceChain` | `Chain` | Yes | viem Chain object for source chain |
| `destinationChainId` | `number` | No | Chain to receive shares (defaults to user's) |
| `slippageBps` | `number` | No | Slippage in basis points (default: 100 = 1%) |
| `feeBufferPercent` | `number` | No | Buffer on LZ fees (default: 50 = 1.5x) |
### Returns
`IQuoteCrossChainResult` with `nativeFee`, `dstAmount`, and `minDstAmount`, or `null` if the quote fails.
### Example
```typescript
import { arbitrum } from 'viem/chains';
import { mainnet } from 'viem/chains';
const quote = await quoteCrossChainDeposit({
ovaultSdk,
config: vaultConfig,
amount: '1000',
decimals: 6,
userChainId: 42161,
walletAddress: '0xYourWallet...',
hubChain: mainnet,
sourceChain: arbitrum,
});
if (quote) {
console.log('LZ fee:', quote.nativeFee, 'wei');
console.log('Expected shares:', quote.dstAmount);
console.log('Min shares (after slippage):', quote.minDstAmount);
}
```
## Quote a Cross-Chain Redeem
```typescript
quoteCrossChainRedeem(props: IQuoteCrossChainRedeemRequest): Promise
```
Same parameter pattern as deposit quote. The `userChainId` is automatically set to the hub chain.
```typescript
const quote = await quoteCrossChainRedeem({
ovaultSdk,
config: vaultConfig,
amount: '500',
decimals: 6,
walletAddress: '0xYourWallet...',
hubChain: mainnet,
sourceChain: mainnet,
destinationChainId: 42161, // receive assets on Arbitrum
});
```
## Build a Cross-Chain Transaction
Build transaction inputs without executing. Useful for UIs that need to display details before user confirmation.
```typescript
buildCrossChainVaultTx(props: ICrossChainBuildRequest): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------------------------- | -------- | ------------------------------------------------ |
| `ovaultSdk` | `IOVaultSdkDependency` | Yes | Injected LayerZero SDK dependency |
| `config` | `ICrossChainVaultConfig` | Yes | Vault deployment configuration |
| `operation` | `'DEPOSIT' \| 'REDEEM'` | Yes | Operation type |
| `amount` | `string \| number \| bigint` | Yes | Amount to deposit or redeem |
| `decimals` | `number` | Yes | Token decimals |
| `userChainId` | `number` | Yes | Chain the user is currently on |
| `walletAddress` | `string` | Yes | User's wallet address |
| `hubChain` | `Chain` | Yes | viem Chain object for hub chain |
| `sourceChain` | `Chain` | Yes | viem Chain object for source chain |
| `destinationChainId` | `number` | No | Destination chain (defaults to user's chain) |
| `recipientAddress` | `string` | No | Recipient address (defaults to walletAddress) |
| `slippageBps` | `number` | No | Slippage in basis points (1-10000, default: 100) |
| `feeBufferPercent` | `number` | No | Buffer on LZ fees (default: 50) |
| `hubLzComposeGasLimit` | `bigint` | No | Gas limit for lzCompose (default: 2,000,000) |
### Returns
```typescript
interface ICrossChainBuildResult {
success: boolean;
data?: {
contractAddress: string;
contractFunctionName: string;
abi: readonly unknown[];
txArgs: readonly unknown[];
messageValue: bigint; // native value to send (includes LZ fees)
messageFee: {
nativeFee: bigint;
lzTokenFee: bigint;
};
dstAmount: bigint; // expected output
minDstAmount: bigint; // minimum after slippage
approval?: {
tokenAddress: string;
spender: string;
amount: bigint;
};
};
error?: string;
}
```
### Example
```typescript
const result = await buildCrossChainVaultTx({
ovaultSdk,
config: vaultConfig,
operation: 'DEPOSIT',
amount: '1000',
decimals: 6,
userChainId: 42161,
walletAddress: '0xYourWallet...',
hubChain: mainnet,
sourceChain: arbitrum,
});
if (result.success && result.data) {
console.log('Contract:', result.data.contractAddress);
console.log('Function:', result.data.contractFunctionName);
console.log('LZ fee:', result.data.messageFee.nativeFee, 'wei');
console.log('Expected output:', result.data.dstAmount);
if (result.data.approval) {
console.log('Approval needed for:', result.data.approval.tokenAddress);
}
} else {
console.error('Build failed:', result.error);
}
```
## Execute a Cross-Chain Deposit
Full execution flow: build tx, check/execute approval, estimate gas, send transaction, wait for confirmation.
```typescript
crossChainVaultDeposit(props: ICrossChainDepositRequest): Promise
```
### Additional Parameters (beyond build)
| Parameter | Type | Required | Description |
| ------------------- | -------------- | -------- | ------------------------------------ |
| `walletClient` | `WalletClient` | Yes | viem WalletClient for signing |
| `publicClient` | `PublicClient` | Yes | viem PublicClient for chain reads |
| `skipApprovalCheck` | `boolean` | No | Skip approval (if caller handles it) |
| `gasBufferPercent` | `number` | No | Gas multiplier (default: 150 = 1.5x) |
### Returns
```typescript
{
transactionHash: string;
success: boolean;
}
```
### Example
```typescript
import { createWalletClient, createPublicClient, custom, http } from 'viem';
import { arbitrum, mainnet } from 'viem/chains';
const walletClient = createWalletClient({
chain: arbitrum,
transport: custom(window.ethereum),
});
const publicClient = createPublicClient({
chain: arbitrum,
transport: http('https://arb-rpc.example.com'),
});
try {
const result = await crossChainVaultDeposit({
ovaultSdk,
config: vaultConfig,
amount: '1000',
decimals: 6,
userChainId: 42161,
walletAddress: '0xYourWallet...',
walletClient,
publicClient,
hubChain: mainnet,
sourceChain: arbitrum,
slippageBps: 100, // 1%
});
console.log('Deposit tx:', result.transactionHash);
console.log(
'Track on LayerZero:',
getLayerZeroScanUrl(result.transactionHash),
);
} catch (error) {
const errorType = classifyCrossChainError(error);
console.error('Error type:', errorType);
console.error('Message:', formatCrossChainError(error.message));
}
```
## Execute a Cross-Chain Redeem
Redemptions must be executed from the hub chain.
```typescript
crossChainVaultRedeem(props: ICrossChainRedeemRequest): Promise
```
### Additional Parameters (beyond build)
| Parameter | Type | Required | Description |
| ------------------- | -------------- | -------- | ------------------------------------ |
| `walletClient` | `WalletClient` | Yes | viem WalletClient for signing |
| `publicClient` | `PublicClient` | Yes | viem PublicClient for chain reads |
| `skipApprovalCheck` | `boolean` | No | Skip approval (if caller handles it) |
| `gasBufferPercent` | `number` | No | Gas multiplier (default: 200 = 2x) |
| `minGasLimit` | `bigint` | No | Floor gas limit (default: 5,000,000) |
### Example
```typescript
// User must be on hub chain (Ethereum) for redemptions
const result = await crossChainVaultRedeem({
ovaultSdk,
config: vaultConfig,
amount: '500',
decimals: 6,
userChainId: 1, // must match config.hubChainId
walletAddress: '0xYourWallet...',
walletClient,
publicClient,
hubChain: mainnet,
sourceChain: mainnet,
destinationChainId: 42161, // receive assets on Arbitrum
});
console.log('Redeem tx:', result.transactionHash);
```
## Token Approval
Check and execute approvals for cross-chain operations.
### Check Approval
```typescript
const needsApproval = await needsCrossChainApproval(
'0xTokenAddress...', // token to approve
'0xSpenderAddress...', // contract that will spend
'0xYourWallet...', // owner
1000000n, // amount in smallest unit
publicClient,
);
```
### Execute Approval
```typescript
if (needsApproval) {
const approvalHash = await approveCrossChain(
'0xTokenAddress...',
'0xSpenderAddress...',
1000000n,
walletClient,
publicClient,
);
console.log('Approval tx:', approvalHash);
}
```
## Utility Helpers
### Chain Validation
```typescript
// Can the user deposit from their current chain?
canDepositFromChain(vaultConfig, 42161); // true (spoke chain)
canDepositFromChain(vaultConfig, 1); // true (hub chain)
canDepositFromChain(vaultConfig, 999); // false (not configured)
// Can the user redeem from their current chain? (must be hub)
canRedeemFromChain(vaultConfig, 1); // true
canRedeemFromChain(vaultConfig, 42161); // false
// Is this a cross-chain operation?
isCrossChainOperation(vaultConfig, 42161); // true (spoke)
isCrossChainOperation(vaultConfig, 1); // false (hub, no dest)
isCrossChainOperation(vaultConfig, 1, 42161); // true (hub to spoke)
// Get all supported chains
getAvailableChains(vaultConfig); // [1, 42161, 8453]
```
### LayerZero Scan
```typescript
const url = getLayerZeroScanUrl('0xTxHash...');
// https://layerzeroscan.com/tx/0xTxHash...
const testnetUrl = getLayerZeroScanUrl('0xTxHash...', true);
// https://testnet.layerzeroscan.com/tx/0xTxHash...
```
## Error Handling
The SDK provides error classification and formatting for cross-chain operations.
### Error Types
| Type | Description | Example Trigger |
| ---------------------- | ------------------------------------ | --------------------------- |
| `max-deposit` | Vault deposit cap exceeded | `ERC4626ExceededMaxDeposit` |
| `nonce` | Transaction nonce conflict | `invalid nonce` |
| `no-peer` | Missing LayerZero peer configuration | `NoPeer` / `0xf6ff4fb7` |
| `bridge-fee` | LayerZero fee estimation failed | `quoteSend` errors |
| `insufficient-balance` | Not enough tokens | `insufficient balance` |
| `user-rejected` | User cancelled in wallet | `user rejected` |
| `gas` | Gas estimation or limit error | `out of gas` |
| `network` | Network connectivity issue | `connection refused` |
| `unknown` | Unrecognized error | Any other error |
### Example
```typescript
try {
await crossChainVaultDeposit({ ... });
} catch (error) {
const errorType = classifyCrossChainError(error);
switch (errorType) {
case 'user-rejected':
console.log('Transaction cancelled');
break;
case 'insufficient-balance':
console.log('Not enough tokens');
break;
case 'bridge-fee':
console.log('LayerZero bridge unavailable, try again later');
break;
case 'no-peer':
console.log('Cross-chain route not configured');
break;
default:
console.log(formatCrossChainError(error.message));
}
}
```
## Complete Integration Example
```typescript
import { createWalletClient, createPublicClient, custom, http } from 'viem';
import { arbitrum, mainnet } from 'viem/chains';
import {
OVaultSyncMessageBuilder,
OVaultSyncOperations,
} from '@layerzerolabs/ovault-evm';
import {
crossChainVaultDeposit,
quoteCrossChainDeposit,
canDepositFromChain,
isCrossChainOperation,
classifyCrossChainError,
formatCrossChainError,
getLayerZeroScanUrl,
} from '@upshiftfinance/sdk';
const ovaultSdk = { OVaultSyncMessageBuilder, OVaultSyncOperations };
async function depositFromArbitrum(amount: string) {
const userChainId = 42161;
// 1. Validate chain support
if (!canDepositFromChain(vaultConfig, userChainId)) {
throw new Error('Chain not supported for deposits');
}
const isCrossChain = isCrossChainOperation(vaultConfig, userChainId);
console.log('Cross-chain:', isCrossChain); // true
// 2. Get a fee quote
const quote = await quoteCrossChainDeposit({
ovaultSdk,
config: vaultConfig,
amount,
decimals: 6,
userChainId,
walletAddress: '0xYourWallet...',
hubChain: mainnet,
sourceChain: arbitrum,
});
if (!quote) {
throw new Error('Failed to get quote');
}
console.log('LZ fee:', quote.nativeFee, 'wei');
console.log('Expected shares:', quote.dstAmount);
// 3. Execute deposit
const walletClient = createWalletClient({
chain: arbitrum,
transport: custom(window.ethereum),
});
const publicClient = createPublicClient({
chain: arbitrum,
transport: http('https://arb-rpc.example.com'),
});
try {
const result = await crossChainVaultDeposit({
ovaultSdk,
config: vaultConfig,
amount,
decimals: 6,
userChainId,
walletAddress: '0xYourWallet...',
walletClient,
publicClient,
hubChain: mainnet,
sourceChain: arbitrum,
});
console.log('Success!');
console.log('Tx:', result.transactionHash);
console.log('Track:', getLayerZeroScanUrl(result.transactionHash));
} catch (error) {
const type = classifyCrossChainError(error);
console.error(`[${type}]`, formatCrossChainError(error.message));
}
}
```
# Error Handling
> The typed error-class hierarchy, error codes, narrowing patterns, and retry guidance for the Upshift SDK.
All public SDK methods throw typed errors that extend a common base class, `AugustSDKError`. Catch by class for broad handling, or narrow on the `code` field for actionable, per-failure logic.
## Hierarchy
```text
AugustSDKError // base — every SDK error extends this
├── AugustAuthError // missing / invalid / forbidden key
├── AugustValidationError // caller-side input failed validation
├── AugustNetworkError // network or transport-level failure
├── AugustTimeoutError // request exceeded its deadline
├── AugustRateLimitError // backend returned 429 (or equivalent)
└── AugustServerError // backend returned a non-OK status
```
Every instance carries:
| Property | Type | Description |
| --------------- | -------------------------- | --------------------------------------------------------------------------- |
| `code` | `AugustErrorCode` | Stable string identifier — narrow on this for per-case handling. |
| `message` | `string` | Human-readable description suitable for surfacing in dev tools. |
| `correlationId` | `string \| undefined` | Set from the response `x-correlation-id` header when the SDK received one. |
| `context` | `Record?` | Structured payload (e.g. `{ target, amount }`) attached for logging. |
| `cause` | `unknown` | Original error from the underlying RPC / fetch — preserved for inspection. |
| `stack` | `string` | Native stack trace. |
`AugustTimeoutError` adds `timeoutMs` (the deadline that elapsed). `AugustRateLimitError` adds an optional `retryAfterMs`. `AugustServerError` adds `status` (the HTTP status code).
All instances expose `toJSON()` so `JSON.stringify(err)` returns a useful object — native `Error` serializes to `"{}"` without this.
## Codes
| Class | Code | When it fires | Recommended action |
| ----------------------- | -------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| `AugustAuthError` | `AUTH_INVALID_KEY` | Backend rejected the supplied key (malformed or revoked). | Verify the key value; rotate if needed. |
| `AugustAuthError` | `AUTH_FORBIDDEN` | Backend returned HTTP 403 — key lacks permission for this endpoint. | Check the key's permitted scopes; do not retry. |
| `AugustAuthError` | `AUTH_UNAUTHORIZED` | Backend returned HTTP 401 — key was not accepted. | Re-verify the key; do not retry without rotating. |
| `AugustValidationError` | `INVALID_INPUT` | Required field missing, `NaN` / `Infinity` amount, or JS number above `Number.MAX_SAFE_INTEGER`. | Fix the input before retrying. |
| `AugustValidationError` | `INVALID_ADDRESS` | Address fails checksum / wrong length, or is not valid for the target chain family (EVM / Solana). | Fix the input. |
| `AugustValidationError` | `INVALID_CHAIN` | Chain ID is not in the SDK's allowlist for this operation. | Pass a supported chain. |
| `AugustValidationError` | `INVALID_URL` | A user-supplied URL failed validation. | Fix the URL. |
| `AugustValidationError` | `ACCOUNT_NOT_FUNDED` | Stellar (Soroban) deposit/redeem source account has never been activated on-chain (zero balance). | Send ≥1 XLM to the address to activate it, then retry. |
| `AugustNetworkError` | `NETWORK_ERROR` | Underlying `fetch` / WebSocket failed (DNS, connection refused, offline). | Safe to retry with backoff. |
| `AugustTimeoutError` | `TIMEOUT` | Request exceeded its deadline (default 90 s, configurable per-call). | Backoff + retry; check chain / RPC status. |
| `AugustRateLimitError` | `RATE_LIMITED` | Backend returned HTTP 429 (or equivalent rate-limit signal). | Wait `retryAfterMs` before retrying. |
| `AugustServerError` | `SERVER_ERROR` | Backend returned a non-OK status that is not auth / rate-limit / timeout. | Inspect `.status` and `.context`; retry conservatively. |
| `AugustSDKError` (base) | `UNKNOWN` | Wrapped failure from an RPC / contract call. Original error preserved on `.cause`. | Inspect `.cause` and `.context`; do not retry blindly. |
## Narrowing patterns
### Catch broadly, narrow by code
Best for transactional flows where you want one block of recovery logic per failure category.
```typescript
import {
AugustAuthError,
AugustValidationError,
AugustTimeoutError,
AugustRateLimitError,
AugustSDKError,
} from '@upshiftfinance/sdk';
try {
await augustSdk.evm.vaultDeposit({
target: vaultAddress,
wallet: userAddress,
amount: '100',
});
} catch (err) {
if (err instanceof AugustValidationError) {
if (err.code === 'INVALID_INPUT') return showFormError(err.message);
if (err.code === 'INVALID_ADDRESS') return showAddressError();
if (err.code === 'ACCOUNT_NOT_FUNDED') {
// Stellar only: the source account needs ≥1 XLM to be activated on-chain.
// err.message includes the address and the funding hint.
return showFundingPrompt(err.message);
}
}
if (err instanceof AugustAuthError) {
return showAuthError('Check your August API key.');
}
if (err instanceof AugustTimeoutError) {
// err.timeoutMs is the deadline that elapsed
return scheduleRetry(err.timeoutMs);
}
if (err instanceof AugustRateLimitError) {
return scheduleRetry(err.retryAfterMs ?? 5_000);
}
if (err instanceof AugustSDKError) {
// Wrapped downstream failure — inspect cause for the underlying revert / RPC error
reportError(err.code, err.context, err.cause);
return;
}
throw err;
}
```
### Catch using the type guard
Use `isAugustSDKError` when you receive an `unknown` value (e.g. in a global error handler) and want to keep the rest of the runtime's errors flowing through untouched.
```typescript
import { isAugustSDKError } from '@upshiftfinance/sdk';
window.addEventListener('unhandledrejection', (event) => {
if (isAugustSDKError(event.reason)) {
reportSdkError(event.reason);
event.preventDefault();
}
});
```
The guard works across realms (Web Worker, VM contexts) where `instanceof` fails.
### Inspect the original cause
Wrapped errors keep the underlying failure on `.cause`:
```typescript
try {
await augustSdk.evm.vaultRequestRedeem({ target, wallet, amount });
} catch (err) {
if (err instanceof AugustSDKError && err.code === 'UNKNOWN') {
console.error('Underlying error:', err.cause);
console.error('Context:', err.context);
}
throw err;
}
```
For on-chain reverts, `.cause` is the original `ethers` / `viem` error, so revert reasons and gas info remain accessible.
## Retry guidance
| Class | Safe to retry? | Notes |
| -------------------------- | ------------------------- | -------------------------------------------------------------------- |
| `AugustValidationError` | No | The input is wrong; retrying will fail the same way. |
| `AugustAuthError` | No | Fix the key first. |
| `AugustNetworkError` | Yes, with backoff | Transient by definition. |
| `AugustTimeoutError` | Yes, with backoff | Consider raising `timeoutMs` if the operation is legitimately slow. |
| `AugustRateLimitError` | Yes, after `retryAfterMs` | Honor the suggested wait. |
| `AugustServerError` | Conditionally | Retry on 5xx with backoff; treat 4xx as terminal. |
| `AugustSDKError` `UNKNOWN` | Conditionally | Inspect `.cause` first — an on-chain revert is not retryable. |
## Serialization for logging
Every SDK error implements `toJSON()`, so logging with `JSON.stringify` preserves the structured fields:
```typescript
try {
await augustSdk.getVault({ vault });
} catch (err) {
if (err instanceof AugustSDKError) {
logger.error('sdk_error', JSON.stringify(err));
}
throw err;
}
```
The serialized payload includes `name`, `message`, `code`, `correlationId`, `context`, `stack`, and a compact `cause` summary.
# EVM Actions
> Deposit, request withdrawals, claim redemptions, and manage token approvals on EVM vaults with the Upshift SDK.
## Overview
EVM write operations require a connected wallet with a signer. The SDK supports all vault versions (`evm-0`, `evm-1`, `evm-2`) and automatically selects the correct contract ABI and function signatures.
## Setup
```typescript
import { ethers } from 'ethers';
import UpshiftSDK from '@upshiftfinance/sdk';
// Initialize SDK
const sdk = new UpshiftSDK({
appName: '', // required
providers: {
1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY',
},
});
// Connect wallet and set signer
const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
sdk.evm.setSigner(signer);
const userAddress = await signer.getAddress();
```
## Vault Deposit
Deposit tokens into a vault. The SDK automatically handles different vault versions (`evm-0`, `evm-1`, `evm-2`) and adapter deposits.
```typescript
sdk.evm.vaultDeposit({
target: string;
wallet: string;
amount: string | bigint | number;
wait?: boolean;
depositAsset?: string; // Optional: for adapter deposits
chainId?: number; // Optional: for adapter routing
poolName?: string; // Optional: for adapter routing
}): Promise
```
### Vault Version Detection
The SDK automatically detects the vault version and uses the correct deposit method:
| Version | Deposit Function | Parameters | Use Case |
| ----------- | ------------------------------------ | ----------------------- | -------------------------- |
| `evm-0` | `deposit(uint256, address)` | 2 params | Legacy vaults |
| `evm-1` | `deposit(uint256, address)` | 2 params | Standard vaults |
| `evm-2` | `deposit(address, uint256, address)` | 3 params | Multi-asset vaults |
| **Adapter** | Various | Depends on adapter type | Alternative token deposits |
**You don't need to specify the version** - the SDK detects it automatically from the vault's `version` field.
### Parameters
| Parameter | Type | Required | Description |
| -------------- | ---------------------------- | -------- | ----------------------------------------- |
| `target` | `string` | Yes | Vault contract address |
| `wallet` | `string` | Yes | User wallet address |
| `amount` | `string \| bigint \| number` | Yes | Amount to deposit |
| `wait` | `boolean` | No | Wait for confirmation (default: false) |
| `depositAsset` | `string` | No | Token to deposit (defaults to underlying) |
| `chainId` | `number` | No | Chain ID for adapter routing |
| `poolName` | `string` | No | Pool name for adapter routing |
### Returns
Transaction hash as `string`
### Example: Standard Deposit
```typescript
// Deposit underlying token
const txHash = await sdk.evm.vaultDeposit({
target: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42',
wallet: userAddress,
amount: '100', // 100 tokens
wait: true,
});
console.log('Deposit successful:', txHash);
```
### How It Works for Each Version
**EVM-0 & EVM-1 Vaults (Standard)**
**Contract Function:** `deposit(uint256 assets, address receiver)`
**Behavior:**
- Deposits the vault's underlying token only
- 2 parameters: amount and receiver
- Automatic approval of underlying token to vault
**Example:**
```typescript
// Upshift USDC (evm-1)
await sdk.evm.vaultDeposit({
target: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42',
wallet: userAddress,
amount: '100', // 100 USDC
wait: true,
});
// SDK calls: vault.deposit(100e6, userAddress)
```
**EVM-2 Vaults (Multi-Asset)**
**Contract Function:** `deposit(address assetIn, uint256 amount, address receiver)`
**Behavior:**
- Accepts multiple whitelisted tokens (listed in `vault.depositAssets`)
- 3 parameters: asset address, amount, and receiver
- Automatic approval of selected token to vault
**Example:**
```typescript
// Get vault to see deposit options
const vault = await sdk.getVault({
vault: '0x18EE038C114a07f4B08b420fb1E4149a4F357249',
chainId: 1,
});
console.log(
'Can deposit:',
vault.depositAssets.map((a) => a.symbol),
);
// Output: ["USDC", "USDT", "DAI"]
// Deposit any whitelisted asset
await sdk.evm.vaultDeposit({
target: vault.address,
wallet: userAddress,
amount: '100',
depositAsset: '0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT
chainId: 1,
wait: true,
});
// SDK calls: vault.deposit(USDT_ADDRESS, 100e6, userAddress)
```
**Note:** For EVM-2 vaults, you can optionally specify `depositAsset`. If omitted, SDK uses the first asset in `depositAssets` array (usually the primary/underlying token).
**Adapter Vaults (Alternative Tokens)**
**Contract Functions:** Various depending on adapter type
**Behavior:**
- Enables deposits with tokens beyond the vault's standard accepted tokens
- Uses wrapper contracts or swap protocols
- Requires `depositAsset`, `chainId`, and sometimes `poolName` parameters
**Adapter Types:**
1. **Native Token Adapter** (e.g., ETH → wstETH)
- Wraps native tokens before depositing
- Uses `WrapperAdapter` contract
- Example: Treehouse Growth
2. **Token Wrapper Adapter** (e.g., WETH → wstETH)
- Wraps ERC20 tokens before depositing
- Uses `WrapperAdapter` contract
- Example: Treehouse Growth
3. **Swap Adapter** (e.g., USDC → WBTC)
- Swaps tokens via Paraswap before depositing
- Uses `PoolAdapter` contract
- Example: BTC Multi-Token
**Example: Native ETH Deposit**
```typescript
// Treehouse Growth accepts: wstETH, WETH, ETH (via adapter)
await sdk.evm.vaultDeposit({
target: '0x5Fde59415625401278c4d41C6beFCe3790eb357f',
wallet: userAddress,
amount: '1.0', // 1 ETH
depositAsset: '0x0000000000000000000000000000000000000000', // Native ETH
chainId: 1,
poolName: 'Treehouse Growth',
wait: true,
});
// SDK calls: wrapperAdapter.depositETH() with value
```
**Example: WETH Deposit (via adapter)**
```typescript
await sdk.evm.vaultDeposit({
target: '0x5Fde59415625401278c4d41C6beFCe3790eb357f',
wallet: userAddress,
amount: '1.0',
depositAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
chainId: 1,
poolName: 'Treehouse Growth',
wait: true,
});
// SDK calls: wrapperAdapter.deposit() after approving WETH
```
**Example: Swap Adapter Deposit**
```typescript
// BTC Multi-Token accepts WBTC but can swap from USDC
await sdk.evm.vaultDeposit({
target: '0xBTCVaultAddress...',
wallet: userAddress,
amount: '10000', // 10,000 USDC
depositAsset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
chainId: 1,
poolName: 'BTC Multi-Token',
wait: true,
});
// SDK:
// 1. Gets Paraswap quote (USDC → WBTC)
// 2. Approves USDC to PoolAdapter
// 3. Calls: poolAdapter.swapAndDeposit()
```
### Automatic Detection Flow
```typescript
// Step 1: Get vault info
const vault = await sdk.getVault({ vault: vaultAddress, chainId: 1 });
// Step 2: SDK checks vault.version
if (vault.version === 'evm-2') {
// Use 3-param deposit(address, uint256, address)
} else if (depositAsset && depositAsset !== vault.underlying.address) {
// Use adapter logic
} else {
// Use 2-param deposit(uint256, address)
}
// Step 3: SDK handles approvals automatically
// Step 4: SDK calls correct contract method
```
### When to Use Each Parameter
| Parameter | Required | Use When |
| -------------- | --------- | --------------------------------------------- |
| `target` | Always | Vault address |
| `wallet` | Always | User's address |
| `amount` | Always | Deposit amount |
| `wait` | Optional | Want to wait for confirmation |
| `depositAsset` | Sometimes | Using adapter OR EVM-2 with non-primary token |
| `chainId` | Sometimes | Using adapter |
| `poolName` | Sometimes | Using adapter (helps with routing) |
### Quick Reference: Vault Versions
How to check which version a vault uses:
```typescript
const vault = await sdk.getVault({ vault: vaultAddress, chainId: 1 });
console.log('Version:', vault.version); // "evm-0", "evm-1", or "evm-2"
console.log('Has adapters:', vault.depositAssets.length > 1);
```
**Common Vaults by Version:**
| Vault Name | Version | Deposit Tokens | Notes |
| ---------------- | ------- | ----------------------------- | ---------------- |
| Upshift USDC | `evm-1` | USDC only | Standard deposit |
| Upshift USDT | `evm-1` | USDT only | Standard deposit |
| Treehouse Growth | `evm-1` | wstETH, WETH, ETH | Has adapters |
| Kelp TAC rsETH | `evm-1` | rsETH, stETH, ETHx, WETH, ETH | Has adapters |
| Wild USD | `evm-2` | USDC, USDT, DAI | Multi-asset |
| BTC Multi-Token | `evm-1` | WBTC, USDC (via swap) | Has swap adapter |
### Decision Tree
```text
Do you have a depositAsset parameter?
│
├─ NO → Standard deposit with underlying token
│ ├─ EVM-0/1: 2-param deposit
│ └─ EVM-2: 3-param deposit with first depositAsset
│
└─ YES → Is depositAsset different from underlying?
│
├─ NO → Standard deposit (same as above)
│
└─ YES → Is vault EVM-2 with depositAsset whitelisted?
│
├─ YES → Multi-asset deposit (3-param)
│
└─ NO → Adapter deposit
├─ Native token? → Wrapper adapter
├─ Different ERC20? → Swap adapter
└─ Wrapped version? → Wrapper adapter
```
## Adapter Deposits
Deposit with alternative tokens beyond the vault's underlying asset.
### Check Available Tokens
```typescript
const vault = await sdk.getVault({ vault: vaultAddress, chainId: 1 });
console.log('Supported deposit tokens:');
vault.depositAssets.forEach((asset) => {
console.log(`- ${asset.symbol}: ${asset.address}`);
});
```
### Deposit with Alternative Token
```typescript
// Get vault info
const vault = await sdk.getVault({
vault: '0x5Fde59415625401278c4d41C6beFCe3790eb357f', // Treehouse
chainId: 1,
});
// Deposit WETH instead of wstETH
const txHash = await sdk.evm.vaultDeposit({
target: vault.address,
wallet: userAddress,
amount: '1.0',
depositAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
chainId: 1,
wait: true,
});
```
### Deposit Native ETH
```typescript
// Deposit native ETH (zero address)
await sdk.evm.vaultDeposit({
target: '0x5Fde59415625401278c4d41C6beFCe3790eb357f',
wallet: userAddress,
amount: '1.0',
depositAsset: '0x0000000000000000000000000000000000000000', // Native ETH
chainId: 1,
poolName: 'Treehouse Growth',
wait: true,
});
```
### Supported Adapter Vaults
| Vault | Supported Tokens | Type |
| ---------------- | ---------------------- | ----------------------- |
| Treehouse Growth | wstETH, WETH, ETH | Native deposits |
| Kelp TAC rsETH | stETH, ETHx, WETH, ETH | Native deposits |
| BTC Multi-Token | WBTC, cbBTC, tBTC | Swap adapter (Paraswap) |
| AVAX Strategy | WAVAX, AVAX | Native deposits |
## Request Withdrawal
Request to withdraw tokens from a vault. Subject to lag period before claiming.
```typescript
sdk.evm.vaultRequestRedeem({
target: string;
wallet: string;
amount: string | bigint | number;
isInstantRedeem?: boolean;
wait?: boolean;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | ---------------------------- | -------- | -------------------------- |
| `target` | `string` | Yes | Vault contract address |
| `wallet` | `string` | Yes | User wallet address |
| `amount` | `string \| bigint \| number` | Yes | Amount of shares to redeem |
| `isInstantRedeem` | `boolean` | No | Settle immediately on vaults that support instant redemption (default: false) |
| `wait` | `boolean` | No | Wait for confirmation |
### Returns
Transaction hash as `string`
### Example
```typescript
// Request to redeem 50 vault shares
const txHash = await sdk.evm.vaultRequestRedeem({
target: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42',
wallet: userAddress,
amount: '50',
wait: true,
});
console.log('Redemption requested:', txHash);
console.log('Wait for lag period before claiming');
// Check when you can claim
const { availableRedemptions } = await sdk.getVaultAvailableRedemptions({
vault: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42',
wallet: userAddress,
chainId: 1,
});
```
### Behavior
The SDK automatically:
1. Detects vault version
2. Uses correct function signature:
- EVM-0/1: `requestRedeem(uint256, address, address)` (3 params)
- EVM-2: `requestRedeem(uint256, address)` (2 params)
3. Converts amount to proper decimals
4. Submits transaction
## Claim Redemption
Claim tokens from a completed redemption request.
```typescript
sdk.evm.vaultRedeem({
target: string;
wallet: string;
wait?: boolean;
year: string;
month: string;
day: string;
receiverIndex: string;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------------- | --------- | -------- | ----------------------------- |
| `target` | `string` | Yes | Vault contract address |
| `wallet` | `string` | Yes | User wallet address |
| `year` | `string` | Yes | Year from redemption request |
| `month` | `string` | Yes | Month from redemption request |
| `day` | `string` | Yes | Day from redemption request |
| `receiverIndex` | `string` | Yes | Receiver index |
| `wait` | `boolean` | No | Wait for confirmation |
### Returns
Transaction hash as `string`
### Example
```typescript
// Get available redemptions
const { availableRedemptions } = await sdk.getVaultAvailableRedemptions({
vault: vaultAddress,
wallet: userAddress,
chainId: 1,
});
// Claim first available redemption
if (availableRedemptions.length > 0) {
const redemption = availableRedemptions[0];
const txHash = await sdk.evm.vaultRedeem({
target: vaultAddress,
wallet: userAddress,
year: redemption.year.raw,
month: redemption.month.raw,
day: redemption.day.raw,
receiverIndex: '0',
wait: true,
});
console.log('Claimed:', redemption.amount.normalized, 'tokens');
}
```
## Token Approval
Approve vault to spend tokens. Usually called automatically by `vaultDeposit`.
```typescript
sdk.evm.vaultApprove({
target: string;
wallet: string;
amount: string | bigint | number;
wait?: boolean;
}): Promise
```
### Returns
- Transaction hash if approval was needed
- `undefined` if allowance already sufficient
### Example
```typescript
// Manually approve before deposit
const txHash = await sdk.evm.vaultApprove({
target: vaultAddress,
wallet: userAddress,
amount: '1000',
wait: true,
});
if (txHash) {
console.log('Approval tx:', txHash);
} else {
console.log('Already approved');
}
```
## Check Allowance
Check current token allowance for a vault. Two reads are available: `vaultAllowance` returns a normalized `{ raw, normalized }` pair, and `allowance` returns the raw `bigint` (the form used in the [Quick Start](/sdk/quick-start)).
```typescript
sdk.evm.vaultAllowance({
target: string;
wallet: string;
}): Promise
sdk.evm.allowance({
vault: string;
owner: string;
asset?: string;
}): Promise
```
### Example
```typescript
const allowance = await sdk.evm.vaultAllowance({
target: vaultAddress,
wallet: userAddress,
});
console.log('Current allowance:', allowance.normalized);
if (BigInt(allowance.raw) < BigInt(depositAmount)) {
console.log('Need to approve more');
}
```
## Examples
### Complete Deposit Flow
```typescript
// 1. Get vault and check options
const vault = await sdk.getVault({ vault: vaultAddress, chainId: 1 });
console.log('Deposit options:');
vault.depositAssets.forEach((asset) => {
console.log(`- ${asset.symbol}`);
});
// 2. Check if vault accepts deposits
if (vault.isDepositPaused) {
throw new Error('Vault deposits are paused');
}
// 3. Check user balance
const tokenContract = new ethers.Contract(
vault.depositAssets[0].address,
['function balanceOf(address) view returns (uint256)'],
provider,
);
const balance = await tokenContract.balanceOf(userAddress);
// 4. Deposit
const txHash = await sdk.evm.vaultDeposit({
target: vault.address,
wallet: userAddress,
amount: '100',
wait: true,
});
console.log('Success:', txHash);
```
### Complete Withdrawal Flow
```typescript
// 1. Check user position
const position = await sdk.getVaultPositions({
vault: vaultAddress,
wallet: userAddress,
chainId: 1,
});
if (position[0].walletBalance.raw === '0') {
throw new Error('No balance to withdraw');
}
// 2. Request redemption
const requestTx = await sdk.evm.vaultRequestRedeem({
target: vaultAddress,
wallet: userAddress,
amount: '50',
wait: true,
});
console.log('Redemption requested:', requestTx);
// 3. Wait for lag period...
await new Promise((resolve) => setTimeout(resolve, vault.lagDuration * 1000));
// 4. Check if ready to claim
const { availableRedemptions } = await sdk.getVaultAvailableRedemptions({
vault: vaultAddress,
wallet: userAddress,
chainId: 1,
});
// 5. Claim
if (availableRedemptions.length > 0) {
const redemption = availableRedemptions[0];
const claimTx = await sdk.evm.vaultRedeem({
target: vaultAddress,
wallet: userAddress,
year: redemption.year.raw,
month: redemption.month.raw,
day: redemption.day.raw,
receiverIndex: '0',
wait: true,
});
console.log('Claimed:', claimTx);
}
```
### Multi-Asset Vault Deposit
```typescript
// Get EVM-2 vault
const vault = await sdk.getVault({
vault: '0x18EE038C114a07f4B08b420fb1E4149a4F357249',
chainId: 1,
});
console.log('Vault version:', vault.version); // "evm-2"
console.log('Deposit assets:', vault.depositAssets.length);
// Deposit any whitelisted asset
const selectedAsset = vault.depositAssets[0];
const txHash = await sdk.evm.vaultDeposit({
target: vault.address,
wallet: userAddress,
amount: '100',
depositAsset: selectedAsset.address, // Required for evm-2
chainId: 1,
wait: true,
});
```
## Error Handling
```typescript
try {
await sdk.evm.vaultDeposit({
target: vaultAddress,
wallet: userAddress,
amount: '100',
wait: true,
});
} catch (error) {
if (error.message.includes('insufficient balance')) {
console.error('Not enough tokens');
} else if (error.message.includes('Deposit failed')) {
console.error('Transaction reverted');
} else if (error.message.includes('user rejected')) {
console.error('User cancelled transaction');
} else {
console.error('Error:', error.message);
}
}
```
## Best Practices
### 1. Always Check Vault Status
```typescript
const vault = await sdk.getVault({ vault, chainId });
if (vault.isDepositPaused) {
throw new Error('Deposits are currently paused');
}
if (vault.isWithdrawalPaused) {
throw new Error('Withdrawals are currently paused');
}
```
### 2. Verify Deposit Cap
```typescript
const vault = await sdk.getVault({ vault, chainId });
const remaining = BigInt(vault.maxSupply.raw) - BigInt(vault.totalSupply.raw);
console.log(
'Remaining capacity:',
ethers.formatUnits(remaining, vault.decimals),
);
```
### 3. Show User Expected Output
```typescript
// For standard deposits, use previewDeposit
const vaultContract = new ethers.Contract(
vaultAddress,
['function previewDeposit(uint256) view returns (uint256)'],
provider,
);
const expectedShares = await vaultContract.previewDeposit(
ethers.parseUnits('100', vault.decimals),
);
console.log(
'You will receive:',
ethers.formatUnits(expectedShares, vault.decimals),
'shares',
);
```
# SDK
> The Upshift TypeScript SDK — install it, read vault data, and build deposits and redemptions across EVM, Solana, and Stellar.
import { Card, Cards } from 'fumadocs-ui/components/card';
`@upshiftfinance/sdk` is one typed client for every chain Upshift runs on. It
reads vault data, positions, and history, and it builds the deposit, withdrawal,
and claim transactions.
```bash
npm install @upshiftfinance/sdk
```
## Per-chain transaction guides
## Reference
# Migrating SDK from AugustDigital to Upshift
> The August SDK is now the Upshift SDK. This guide covers the new package name, the renamed exports, and every breaking change between @augustdigital/sdk 9.16.0 and @upshiftfinance/sdk 0.8.0.
The August JavaScript SDK is now published as `@upshiftfinance/sdk`. `@augustdigital/sdk` stops at **9.16.0** and will not get new features or fixes. All new work ships to the new package only.
The new package's code continues from `@augustdigital/sdk@9.16.0`, but its version numbers restart at `0.x`. `@upshiftfinance/sdk@1.0.0` is newer than `@augustdigital/sdk@9.16.0`, not a downgrade.
For most integrations the upgrade comes down to three changes:
1. Swap the package.
2. Replace `August` with `Upshift` in imports and identifiers.
3. Rename one environment variable.
The other breaking changes below affect you only if you manage SwapRouter approvals yourself.
## TL;DR checklist
- \[ \] `npm uninstall @augustdigital/sdk && npm install @upshiftfinance/sdk`
- \[ \] Rewrite imports from `@augustdigital/sdk` to `@upshiftfinance/sdk`
- \[ \] Rename `AugustSDK` to `UpshiftSDK`, and every other `August*` export to `Upshift*`
- \[ \] Rename the env var `AUGUST_SDK_DISABLE_CURATOR_ALERTS` to `UPSHIFT_SDK_DISABLE_CURATOR_ALERTS`
- \[ \] Update `catch` blocks and `instanceof` / `.name` checks to the `Upshift*Error` classes
- \[ \] If you use the companion packages, switch them too: `@upshiftfinance/react`, `@upshiftfinance/config`, `@upshiftfinance/cli`, `@upshiftfinance/mcp`
- \[ \] Check the section below if you use **SwapRouter deposits with manual approvals**
## 1. Install the new package
```bash
# npm
npm uninstall @augustdigital/sdk
npm install @upshiftfinance/sdk
# pnpm
pnpm remove @augustdigital/sdk
pnpm add @upshiftfinance/sdk
# yarn
yarn remove @augustdigital/sdk
yarn add @upshiftfinance/sdk
```
`viem@^2` is still an optional peer dependency. If you pinned a range like `^9.x`, use `^1.0.0` for the new package.
**Do not install both packages side by side.** Each one keeps its own caches and error classes, so an `instanceof` check against one package will not match errors thrown by the other.
## 2. Rename imports and identifiers
There are no deprecated `August*` aliases. Code that still uses them will fail to compile, or fail at runtime in plain JavaScript.
```ts
// Before
import AugustSDK, { AugustSDKError, isAugustSDKError } from '@augustdigital/sdk';
const sdk = new AugustSDK({ /* ... */ });
// After
import UpshiftSDK, { UpshiftSDKError, isUpshiftSDKError } from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({ /* ... */ });
```
Constructor config, method names and return shapes are unchanged.
### Full rename table
| Before (`@augustdigital/sdk`) | After (`@upshiftfinance/sdk`) |
| --- | --- |
| `AugustSDK` (default export) | `UpshiftSDK` |
| `AugustSDKError` | `UpshiftSDKError` |
| `AugustValidationError` and every other `August*Error` | `UpshiftValidationError` / `Upshift*Error` |
| `AugustErrorCode` | `UpshiftErrorCode` |
| `AugustErrorOptions` | `UpshiftErrorOptions` |
| `isAugustSDKError` | `isUpshiftSDKError` |
| `AugustBase` / `IAugustBase` | `UpshiftBase` / `IUpshiftBase` |
| `AugustApi` | `UpshiftApi` |
| `AugustVaults` | `UpshiftVaults` |
| `AugustSubAccounts` | `UpshiftSubAccounts` |
| `fetchAugustPublic` | `fetchUpshiftPublic` |
| `fetchAugustWithKey` | `fetchUpshiftWithKey` |
| `fetchAugustWithBearer` | `fetchUpshiftWithBearer` |
| `verifyAugustKey` | `verifyUpshiftKey` |
| `IFetchAugustMethods` / `IFetchAugustOptions` | `IFetchUpshiftMethods` / `IFetchUpshiftOptions` |
In most codebases a find-and-replace does the job:
```bash
# Review the diff before committing
grep -rl '@augustdigital/sdk' src | xargs sed -i '' 's#@augustdigital/sdk#@upshiftfinance/sdk#g'
grep -rlE '\bAugust[A-Z]|\bisAugust|fetchAugust|verifyAugust|IFetchAugust|IAugustBase' src \
| xargs sed -i '' -E 's/\bAugust([A-Z])/Upshift\1/g; s/isAugust/isUpshift/g; s/(fetch|verify|IFetch)August/\1Upshift/g; s/IAugustBase/IUpshiftBase/g'
```
The error classes report new `.name` values, for example `'UpshiftSDKError'` and `'UpshiftValidationError'`. If you match errors by name instead of with `instanceof`, or if your logging, Sentry or alerting rules filter on these strings, update them as well.
The error `code` values (`INVALID_INPUT`, `INVALID_CHAIN`, `NO_SIGNER`, `NETWORK_ERROR`, …) did not change.
## 3. Other breaking changes
These affect you only if you use the feature named in each heading.
### SwapRouter deposits
On **Monad, Base, Flare, Citrea, Fluent and Avalanche**, a deposit of an asset the vault accepts now goes through the SwapRouter. If you manage approvals yourself instead of calling `sdk.approve`, approve `getDepositRoute(...).spender`, which is the router, not the vault. A native-token deposit into a wrapped-native vault goes through `depositNativeToken`.
### `getVault` error wrapping
`getVault` now rethrows typed `UpshiftSDKError` subclasses (rate limit, server, validation, …) unchanged, where it used to wrap them in a plain `Error`. Other failures are wrapped in `UpshiftSDKError` (code `UNKNOWN`) with the original error as `cause`. If you parsed `err.message` to classify failures, switch to `instanceof` or `err.code`.
## 4. Improvements you get by upgrading
- **Native ESM.** `import UpshiftSDK from '@upshiftfinance/sdk'` works in ESM projects (`"type": "module"`, Vite SSR, vitest, tsx). The package now has an `exports` map, and `require()` and deep `lib/*` imports keep working.
- `viem` **is optional.** Bundlers no longer fail with "Could not resolve 'viem'" when it is not installed.
- **Factory subgraphs.** Vault history is read from per-chain factory subgraphs, with automatic fallback to per-vault subgraphs when a factory subgraph is unhealthy. Legacy TokenizedPool vaults are supported.
The full release notes are in the [package CHANGELOG](https://www.npmjs.com/package/@upshiftfinance/sdk?activeTab=changelog).
## What happens to `@augustdigital/sdk`?
Version 9.16.0 stays on npm, so existing installs keep working. It will not get fixes, new chains or new vault types. It will be marked deprecated on npm after the next major release of `@upshiftfinance/sdk`. Migrate now: our backend infrastructure has changed, and some vault history data may not load correctly through `@augustdigital/sdk`.
Questions? Email [support@upshift.finance](mailto:support@upshift.finance) or visit [upshift.finance](https://upshift.finance).
# Quick Start
> Install @upshiftfinance/sdk, read vault data, and build deposit, withdraw and claim transactions on EVM chains, Solana and Stellar.
# SDK Quickstart
`@upshiftfinance/sdk` is the TypeScript SDK for Upshift vaults. One client reads vault data on every supported chain and builds the deposit, withdrawal and claim transactions. Your user's wallet signs every transaction. The SDK never holds keys or funds.
This page takes you from install to a first deposit and withdrawal on each chain type. For the full method list, see the [SDK API Reference](/sdk/reference). Code on this page was checked against version 9.9.1.
## 1. Install
```bash
npm install @upshiftfinance/sdk
```
The SDK has `viem` (v2) as a peer dependency. For EVM writes you can pass an `ethers` signer or a `viem` / `wagmi` wallet client.
To call the SDK from a browser on your own domain, ask Upshift to add your origin to the allow-list. Otherwise CORS blocks the requests.
## 2. Initialize
`UpshiftSDK` is the default export. `appName` is required: a stable kebab-case slug for your app, 3 to 64 characters of `[a-zA-Z0-9._-]`.
```typescript
import UpshiftSDK from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({
appName: 'acme-earn',
providers: {
1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY', // Ethereum
42161: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY', // Arbitrum
-1: 'https://api.mainnet-beta.solana.com', // Solana (chain ID -1)
},
});
```
- Add one RPC URL per EVM chain you use. The first entry is the chain the SDK starts on.
- Add chain ID `-1` for Solana.
- Stellar needs no provider entry. `sdk.stellar` runs against Stellar mainnet by default.
## 3. Read vault data
```typescript
// Every vault, all chains
const vaults = await sdk.getVaults();
// One vault
const vault = await sdk.getVault({
vault: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42', // Upshift USDC
chainId: 1,
});
console.log(vault.name, vault.receipt.symbol);
console.log('APY %:', vault.apy.apy);
console.log('Total assets:', vault.totalAssets.normalized);
console.log('Deposit assets:', vault.depositAssets.map((a) => a.symbol));
console.log('Withdrawal period (s):', vault.lagDuration);
console.log('Paused:', vault.isDepositPaused, vault.isWithdrawalPaused);
```
Amounts come back as `INormalizedNumber`: `{ normalized, raw }`. Use `raw` for math and `normalized` for display.
Other reads you will use often:
| Method | Returns |
| --- | --- |
| `getVaultApy({ vault, chainId })` | APY history |
| `getVaultTvl({ vault, chainId })` | TVL history |
| `getVaultAllocations({ vault, chainId })` | Where the vault's capital is deployed |
| `getVaultPositions({ wallet, solanaWallet, stellarWallet })` | A user's positions across chains |
| `getVaultAvailableRedemptions({ vault, chainId, wallet })` | Pending and claimable redemptions |
| `getVaultUserLifetimePnl({ vault, wallet })` | A user's lifetime PnL in a vault |
APY and performance figures are informational and vary with markets. Check anything you act on against the onchain state.
## 4. EVM: deposit, withdraw, claim
### Connect a signer
```typescript
import { BrowserProvider } from 'ethers';
const provider = new BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
sdk.evm.setSigner(signer); // also accepts a viem / wagmi WalletClient
const wallet = await signer.getAddress();
const target = '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42';
```
### Deposit
```typescript
// Optional: preview the shares (raw units in, raw bigint out)
const shares = await sdk.evm.previewDeposit({ vault: target, amount: 100_000_000n });
const txHash = await sdk.evm.vaultDeposit({
target,
wallet,
amount: '100', // 100 USDC, human units
wait: true,
});
```
`vaultDeposit` detects the vault version and approves the token if needed. On a multi-asset vault, pass `depositAsset` with the address of the token you deposit:
```typescript
await sdk.evm.vaultDeposit({
target: multiAssetVault,
wallet,
amount: '100',
depositAsset: '0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT
chainId: 1,
wait: true,
});
```
A multi-asset vault accepts several deposit assets but has one reference asset. Every redemption pays out in the reference asset.
### Request a withdrawal
```typescript
// Queued redemption: claimable after the vault's withdrawal period
await sdk.evm.vaultRequestRedeem({
target,
wallet,
amount: '50', // shares
wait: true,
});
// Instant redemption, on vaults that support it.
// Charges the instant redemption fee and depends on available liquidity.
await sdk.evm.vaultRequestRedeem({
target,
wallet,
amount: '50',
isInstantRedeem: true,
wait: true,
});
```
### Claim a matured redemption
Upshift processes claimable redemptions daily. If a request is still claimable, the user can claim it directly. Find the matured batch first:
```typescript
const { availableRedemptions } = await sdk.getVaultAvailableRedemptions({
vault: target,
chainId: 1,
wallet,
});
const r = availableRedemptions[0];
if (r) {
if (vault.version === 'evm-2') {
// Multi-asset (Tokenized Vault V2) vaults
await sdk.evm.claimWithdrawal({
target,
wallet,
year: r.year.raw,
month: r.month.raw,
day: r.day.raw,
wait: true,
});
} else {
// evm-0 / evm-1 vaults
await sdk.evm.vaultRedeem({
target,
wallet,
year: r.year.raw,
month: r.month.raw,
day: r.day.raw,
receiverIndex: '0',
wait: true,
});
}
}
```
## 5. Solana: deposit and redeem
Solana redemptions settle in the same transaction, so there is no claim step.
```typescript
import { Solana } from '@upshiftfinance/sdk';
import { useWallet } from '@solana/wallet-adapter-react';
const { publicKey, signTransaction } = useWallet();
sdk.solana.setWalletProvider(publicKey, signTransaction);
const programId = Solana.constants.programIds['mainnet-beta'].vault;
const idl = Solana.constants.vaultIdl;
const vaultAddress = 'VaultStateAccount...'; // the vault's address from getVaults()
// Deposit 100 tokens (number = UI amount, bigint = raw units)
const depositSig = await sdk.solana.vaultDeposit(
programId, idl, publicKey, 100,
undefined, // deprecated argument: pass undefined, do not delete it
vaultAddress,
);
// Redeem 50 shares
const redeemSig = await sdk.solana.vaultRedeem(
programId, idl, publicKey, 50,
undefined,
vaultAddress,
);
```
Keep the `undefined` in the fifth position. If you delete it, `vaultAddress` moves into that slot and the SDK targets a different vault. Both calls apply a 50 bps slippage floor by default. Pass `{ slippageBps }` or `{ minAssetsOut }` as the last argument to change it.
## 6. Stellar: deposit and redeem
Stellar writes follow build, sign, submit. The SDK returns an unsigned XDR string, the user's wallet signs it, and the SDK submits it. Stellar vaults are instant-redeem only, so there is no claim step.
```typescript
import { signTransaction } from '@stellar/freighter-api';
const contractId = 'C...'; // Stellar vault contract ID
const user = 'G...'; // user's Stellar account
// Deposit 1 USDC (7 decimals on Stellar), in smallest units
const depositXdr = await sdk.stellar.vaultDeposit({
contractId,
amount: '10000000',
senderAddress: user,
});
const { signedTxXdr } = await signTransaction(depositXdr, { networkPassphrase: '...' });
const depositHash = await sdk.stellar.submitTransaction(signedTxXdr);
// Redeem: size the redeem from the onchain position
const position = await sdk.stellar.getUserPosition(contractId, user);
if (!position || position.decimalsFromFallback) {
throw new Error('Could not read share decimals. Retry before redeeming.');
}
const redeemXdr = await sdk.stellar.vaultRedeem({
contractId,
shares: position.shares,
receiverAddress: user,
});
// sign redeemXdr with the wallet, then:
// await sdk.stellar.submitTransaction(signedRedeemXdr);
```
To find a Stellar vault's contract ID, list vaults and filter to Stellar. The [Stellar Actions](/sdk/stellar-actions) page filters on `chain_type === 'stellar'`.
## 7. Handle errors
Every public method throws typed errors that extend `AugustSDKError`.
```typescript
import { AugustValidationError, AugustTimeoutError, AugustSDKError } from '@upshiftfinance/sdk';
try {
await sdk.evm.vaultDeposit({ target, wallet, amount: '1' });
} catch (err) {
if (err instanceof AugustValidationError) showFormError(err.message);
else if (err instanceof AugustTimeoutError) scheduleRetry();
else if (err instanceof AugustSDKError) report(err.code);
else throw err;
}
```
See [Error Handling](/sdk/error-handling).
## Next steps
- [EVM Actions](/sdk/evm-actions), [Solana Actions](/sdk/solana-actions), [Stellar Actions](/sdk/stellar-actions) for every parameter
- [Integrating Upshift vaults into your product](/introduction/integration-guide) for the steps from vault selection to launch
- [Build a three-chain vault app](/sdk/three-chain-app): the starter walkthrough, with source at [upshift-protocol/upshift-starter](https://github.com/upshift-protocol/upshift-starter) and live at [integrate.upshift.finance](https://integrate.upshift.finance/)
- [Integrate guide](https://integrate.upshift.finance/): pick a vault and copy its generated `upshift-vault.ts` and `UpshiftVault.tsx`, for example [Upshift USDC on Ethereum](https://integrate.upshift.finance/vaults/ethereum/0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42/integrate)
# Solana Actions
> Query, deposit into, and redeem from Solana vaults with the Upshift SDK, plus low-level Anchor utilities and constants.
## Overview
Solana vault interactions use the same pattern as EVM:
1. Use `sdk.getVault()` to query vault data
2. Use `sdk.solana.vaultDeposit()` to deposit
3. Use `sdk.solana.vaultRedeem()` to withdraw
The SDK handles all Solana-specific complexities (PDAs, token accounts, etc.) automatically.
## Setup
### Basic Initialization
Include Solana RPC endpoint when initializing the SDK:
```typescript
import UpshiftSDK from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({
appName: '', // required
providers: {
-1: 'https://api.mainnet-beta.solana.com', // Solana Mainnet
},
});
// Access Solana adapter
const solana = sdk.solana;
```
### Custom RPC Endpoint
```typescript
const sdk = new UpshiftSDK({
appName: '', // required
providers: {
-1: 'https://solana-mainnet.g.alchemy.com/v2/YOUR_KEY',
},
});
```
### For Write Operations
To execute transactions, you need to set a wallet provider:
```typescript
import { useWallet } from '@solana/wallet-adapter-react';
// In your React component
const { publicKey, signTransaction } = useWallet();
// Set wallet for signing transactions
if (publicKey && signTransaction) {
sdk.solana.setWalletProvider(publicKey, signTransaction);
}
```
## Adapter API
### Methods
**setWalletProvider()**
Set the wallet provider for write operations.
```typescript
sdk.solana.setWalletProvider(
publicKey: PublicKey | string,
signTransaction: (tx: Transaction) => Promise
): void
```
**Parameters:**
- `publicKey`: User's Solana public key
- `signTransaction`: Function to sign transactions (from wallet adapter)
**Example:**
```typescript
import { useWallet } from '@solana/wallet-adapter-react';
function MyComponent() {
const { publicKey, signTransaction } = useWallet();
useEffect(() => {
if (publicKey && signTransaction) {
sdk.solana.setWalletProvider(publicKey, signTransaction);
}
}, [publicKey, signTransaction]);
}
```
## Get Vault Data
Query Solana vault information using the same `sdk.getVault()` method as EVM vaults.
```typescript
sdk.getVault({
vault: string; // Solana program ID
chainId?: number; // -1 for mainnet
options?: {
solanaWallet?: string; // For user position data
};
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | -------- | -------- | ------------------------------------------ |
| `vault` | `string` | Yes | Solana vault program ID |
| `options.solanaWallet` | `string` | No | User's Solana public key for position data |
### Example
```typescript
// Get vault details
const vault = await sdk.getVault({
vault: 'VaultProgramId...',
chainId: -1, // Solana mainnet
});
console.log('Name:', vault.name);
console.log('Version:', vault.version); // "sol-0"
console.log('Total Assets:', vault.totalAssets.normalized);
console.log('APY:', vault.apy.apy);
console.log('Deposit Token:', vault.depositAssets[0].symbol);
// Get vault with user position
const vaultWithPosition = await sdk.getVault({
vault: 'VaultProgramId...',
chainId: -1,
options: {
solanaWallet: 'UserPublicKey...',
},
});
if (vaultWithPosition.position) {
console.log(
'Your balance:',
vaultWithPosition.position.walletBalance.normalized,
);
}
```
### Get All Solana Vaults
```typescript
const solanaVaults = await sdk.getVaults({
chainIds: [-1], // Filter to Solana mainnet only
solanaWallet: 'UserPublicKey...', // Optional: include positions
});
solanaVaults.forEach((vault) => {
console.log(`${vault.name}: ${vault.totalAssets.normalized} TVL`);
});
```
### Get User Positions
```typescript
const positions = await sdk.getVaultPositions({
solanaWallet: 'UserPublicKey...',
chainId: -1,
});
positions.forEach((position) => {
console.log(`Vault: ${position.vault}`);
console.log(`Balance: ${position.walletBalance.normalized}`);
});
```
## Vault Deposit
Deposit tokens into a Solana vault. The SDK derives the vault PDAs, creates the depositor's share token account when it is missing, and sends the program's `deposit_checked` instruction through the wallet registered with `setWalletProvider`.
```typescript
sdk.solana.vaultDeposit(
vaultProgramId: PublicKey | string,
idl: object,
publicKey: PublicKey | string,
depositAmount: number | bigint,
sendTransaction?: undefined,
vaultAddress?: PublicKey | string,
options?: ISolanaDepositOptions,
): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `vaultProgramId` | `PublicKey \| string` | Yes | Vault program ID — `Solana.constants.programIds['mainnet-beta'].vault` on mainnet |
| `idl` | `object` | Yes | Program IDL — pass `Solana.constants.vaultIdl` |
| `publicKey` | `PublicKey \| string` | Yes | Depositor's wallet public key |
| `depositAmount` | `number \| bigint` | Yes | `bigint` is raw on-chain units; `number` is a UI amount converted with the deposit mint's decimals |
| `sendTransaction` | deprecated callback | No | Accepted and ignored — share-account creation is prepended to the deposit instruction, so there is no second transaction to send. Removed in the next major. Pass `undefined` rather than dropping the argument, or `vaultAddress` shifts into this slot |
| `vaultAddress` | `PublicKey \| string` | No | Vault state account. Omit only for legacy single-vault programs, which derive it from the program ID |
| `options` | `ISolanaDepositOptions` | No | Slippage protection, see below |
### Slippage protection
Deposits send the program's `deposit_checked` instruction. The SDK quotes the shares the deposit should mint from the vault's current state and passes that quote, lowered by a tolerance, as `min_shares_out`; the program reverts with `SlippageExceeded` if the share price moves past it before execution. Control it with the trailing `options` argument:
```typescript
// Default: 50 bps (0.5%) below the quote.
await sdk.solana.vaultDeposit(programId, idl, wallet, amount, undefined, vaultAddress);
// Tighter or looser tolerance, in basis points.
await sdk.solana.vaultDeposit(programId, idl, wallet, amount, undefined, vaultAddress, {
slippageBps: 10,
});
// Your own floor in raw share units (skips the quote and its snapshot read).
// `0n` restores the unguarded behaviour of the plain `deposit` instruction.
await sdk.solana.vaultDeposit(programId, idl, wallet, amount, undefined, vaultAddress, {
minSharesOut: 995_000n,
});
```
### Returns
Transaction signature as `string`.
### Example
```typescript
import { Solana } from '@upshiftfinance/sdk';
import { useWallet } from '@solana/wallet-adapter-react';
const { publicKey, signTransaction } = useWallet();
if (publicKey && signTransaction) {
sdk.solana.setWalletProvider(publicKey, signTransaction);
}
const signature = await sdk.solana.vaultDeposit(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
100, // 100 tokens, UI amount
undefined,
'VaultAddress...',
);
console.log('Deposit successful:', signature);
```
### Behavior
The SDK automatically:
1. Fetches the vault state and derives the PDAs
2. Creates the share token account when the depositor has none, in the same transaction
3. Converts a `number` amount to raw units with the deposit mint's decimals
4. Quotes the expected shares and applies the slippage floor
5. Signs through the registered wallet and confirms at the adapter's commitment level (`finalized` by default)
## Vault Withdraw
Redeem shares from a Solana vault. The program's `redeem_checked` instruction burns the shares and transfers the payout in the same transaction.
```typescript
sdk.solana.vaultRedeem(
vaultProgramId: PublicKey | string,
idl: object,
publicKey: PublicKey | string,
redeemShares: number | bigint,
sendTransaction?: undefined,
vaultAddress?: PublicKey | string,
options?: ISolanaRedeemOptions,
): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `vaultProgramId` | `PublicKey \| string` | Yes | Vault program ID — `Solana.constants.programIds['mainnet-beta'].vault` on mainnet |
| `idl` | `object` | Yes | Program IDL — pass `Solana.constants.vaultIdl` |
| `publicKey` | `PublicKey \| string` | Yes | Share holder's wallet public key |
| `redeemShares` | `number \| bigint` | Yes | `bigint` is raw share units; `number` is a UI amount |
| `sendTransaction` | deprecated callback | No | Accepted and ignored — payout- and fee-recipient-account creation is prepended to the redeem instruction, so there is no second transaction to send. Removed in the next major. Pass `undefined` rather than dropping the argument, or `vaultAddress` shifts into this slot |
| `vaultAddress` | `PublicKey \| string` | No | Vault state account. Omit only for legacy single-vault programs |
| `options` | `ISolanaRedeemOptions` | No | Slippage protection, see below |
### Slippage protection
Redemptions send `redeem_checked`. The floor is on what the wallet **receives, net of the withdrawal fee**, quoted from the vault state the SDK already reads; the default tolerance is 50 bps. Pass `slippageBps` or an explicit `minAssetsOut` (raw deposit-mint units) in the trailing `options` argument, exactly as for deposits. A `SlippageExceeded` revert is reported with a message saying the price moved past your tolerance and to retry or raise it.
### Returns
Transaction signature as `string`.
### Example
```typescript
const positions = await sdk.getVaultPositions({
solanaWallet: publicKey.toString(),
chainId: -1,
});
if (positions[0].walletBalance.raw === '0') {
throw new Error('No balance to redeem');
}
const signature = await sdk.solana.vaultRedeem(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
50, // redeem 50 shares, UI amount
undefined,
'VaultAddress...',
);
console.log('Redemption complete:', signature);
```
## Examples
### Complete Deposit Flow
```typescript
import UpshiftSDK, { Solana } from '@upshiftfinance/sdk';
import { useWallet } from '@solana/wallet-adapter-react';
function SolanaVaultDeposit() {
const { publicKey, signTransaction } = useWallet();
const [loading, setLoading] = useState(false);
const sdk = new UpshiftSDK({
appName: '', // required
providers: {
-1: 'https://api.mainnet-beta.solana.com',
},
});
const deposit = async (vaultAddress: string, amount: number) => {
if (!publicKey || !signTransaction) {
throw new Error('Wallet not connected');
}
setLoading(true);
try {
// 1. Set wallet provider
sdk.solana.setWalletProvider(publicKey, signTransaction);
// 2. Get vault details
const vault = await sdk.getVault({
vault: vaultAddress,
chainId: -1,
});
console.log(`Depositing to ${vault.name}`);
// 3. Execute deposit (SDK handles everything)
const signature = await sdk.solana.vaultDeposit(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
amount,
undefined,
vaultAddress,
);
console.log('Deposit successful:', signature);
return signature;
} catch (error) {
console.error('Deposit failed:', error);
throw error;
} finally {
setLoading(false);
}
};
return (
);
}
```
### Complete Withdrawal Flow
```typescript
function SolanaVaultWithdraw() {
const { publicKey, signTransaction } = useWallet();
const sdk = new UpshiftSDK({
appName: '', // required
providers: {
-1: 'https://api.mainnet-beta.solana.com',
},
});
const withdraw = async (vaultAddress: string) => {
if (!publicKey || !signTransaction) {
throw new Error('Wallet not connected');
}
try {
// 1. Set wallet provider
sdk.solana.setWalletProvider(publicKey, signTransaction);
// 2. Check user's position
const position = await sdk.getVaultPositions({
solanaWallet: publicKey.toString(),
chainId: -1,
});
if (!position[0] || position[0].walletBalance.raw === '0') {
throw new Error('No balance to withdraw');
}
const shares = BigInt(position[0].walletBalance.raw);
console.log(`Redeeming ${position[0].walletBalance.normalized} shares`);
// 3. Execute redemption (all shares, in raw units)
const signature = await sdk.solana.vaultRedeem(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
shares,
undefined,
vaultAddress,
);
console.log('Withdrawal successful:', signature);
return signature;
} catch (error) {
console.error('Withdrawal failed:', error);
throw error;
}
};
return (
);
}
```
### Query Vault Before Depositing
```typescript
// 1. Get vault info
const vault = await sdk.getVault({
vault: 'VaultAddress...',
chainId: -1,
});
// 2. Check if deposits are enabled
if (vault.isDepositPaused) {
throw new Error('Vault deposits are paused');
}
// 3. Show user the vault details
console.log(`Vault: ${vault.name}`);
console.log(`APY: ${vault.apy.apy}%`);
console.log(`TVL: ${vault.totalAssets.normalized}`);
console.log(`Deposit token: ${vault.depositAssets[0].symbol}`);
// 4. Deposit
await sdk.solana.vaultDeposit(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
100,
undefined,
vault.address,
);
```
## Advanced Operations
For advanced use cases, the Solana adapter exposes low-level methods and utilities.
### Direct Program Access
Access Solana connection and provider for custom operations:
```typescript
// Get connection
const connection = sdk.solana.connection;
const balance = await connection.getBalance(publicKey);
// Get Anchor provider
const provider = sdk.solana.provider;
// Get program instance
const program = sdk.solana.getProgram(Solana.constants.vaultIdl);
// Query vault account directly
const vaultState = await program.account.vault.fetch(vaultPda);
```
### Utility Functions
```typescript
import { Solana } from '@upshiftfinance/sdk';
```
**deriveShareMintPda()**
Derive the share mint PDA for a vault.
```typescript
const shareMintPda = Solana.utils.deriveShareMintPda('VaultProgramId...');
console.log('Share Mint PDA:', shareMintPda.toString());
```
**getToken()**
Get token metadata from mint address.
```typescript
const token = await Solana.utils.getToken({
mintAddress: 'MintPublicKey...',
endpoint: 'https://api.mainnet-beta.solana.com',
connection: sdk.solana.connection,
});
console.log('Symbol:', token.symbol);
console.log('Decimals:', token.decimals);
console.log('Supply:', token.supply);
```
### getVaultStateReadOnly()
Get vault state without a wallet provider.
```typescript
const vaultState = await Solana.utils.getVaultStateReadOnly({
vaultProgramId: 'VaultProgramId...',
idl: vaultIdl,
endpoint: 'https://api.mainnet-beta.solana.com',
connection: sdk.solana.connection,
});
```
### getProvider()
Create an Anchor provider with wallet.
```typescript
import { PublicKey } from '@solana/web3.js';
const provider = Solana.utils.getProvider({
network: 'mainnet-beta',
connection: sdk.solana.connection,
publicKey: new PublicKey('UserPublicKey...'),
signTransaction: signTransactionFunction,
});
```
### getReadOnlyProvider()
Create a read-only Anchor provider.
```typescript
const provider = Solana.utils.getReadOnlyProvider({
network: 'mainnet-beta',
connection: sdk.solana.connection,
});
```
### getProgram()
Create an Anchor program instance.
```typescript
const program = Solana.utils.getProgram({
network: 'mainnet-beta',
provider: anchorProvider,
idl: programIdl,
});
```
## Constants
```typescript
import { Solana } from '@upshiftfinance/sdk';
```
### Vault IDL
```typescript
const vaultIdl = Solana.constants.vaultIdl;
```
### Program IDs
```typescript
const programId = Solana.constants.programIds['mainnet-beta'].vault;
// Per network; `undefined` where the program is not deployed.
const devnet = Solana.constants.getDeployedProgramIds('devnet');
```
### Fallback Values
```typescript
const fallbackDecimals = Solana.constants.fallbackDecimals; // 8
const fallbackNetwork = Solana.constants.fallbackNetwork; // 'mainnet-beta'
```
## Error Handling
### Connection Errors
```typescript
try {
const vaultState = await sdk.solana.getVaultState('VaultId...', vaultIdl);
} catch (error) {
if (error.message.includes('404')) {
console.error('Vault program not found');
} else if (error.message.includes('Network request failed')) {
console.error('RPC connection failed');
} else {
console.error('Unknown error:', error);
}
}
```
### Transaction Errors
```typescript
try {
await sdk.solana.vaultDeposit(
Solana.constants.programIds['mainnet-beta'].vault,
Solana.constants.vaultIdl,
publicKey,
1_000_000_000n,
undefined,
'VaultAddress...',
);
} catch (error) {
if (error.message.includes('User rejected')) {
console.error('Transaction cancelled by user');
} else if (error.message.includes('insufficient funds')) {
console.error('Not enough SOL for transaction');
} else {
console.error('Transaction failed:', error);
}
}
```
# Stellar Actions
> Build, sign, and submit Stellar vault deposits and redeems with the SDK's XDR-based transaction flow.
## Overview
Stellar vault interactions live on the **Stellar adapter** (`sdk.stellar`), not on the higher-level vaults module (which is read-only for Stellar). Unlike EVM — where a deposit is signed and broadcast in one call — Stellar write methods follow a **build → sign → submit** flow:
1. `sdk.stellar.vaultDeposit()` / `sdk.stellar.vaultRedeem()` build an **unsigned transaction** and return it as a base64-encoded **XDR** string.
2. You sign that XDR with the user's Stellar wallet (e.g. Freighter).
3. `sdk.stellar.submitTransaction()` broadcasts the signed XDR and resolves to the transaction hash once the network confirms it.
The SDK does **not** hardcode vault names like `earnUSDC` or `earnXLM`. You pass a vault's **contract ID** (the `C…` address); resolve it from the vault listing (see Get Vault Data below).
> `sdk.stellar` runs against Stellar **mainnet**. For testnet, see Networks at the bottom of this page.
## Setup
`sdk.stellar` is always available — no extra provider configuration is required, since Stellar vault metadata is served from the Upshift backend.
```typescript
import UpshiftSDK from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({
appName: '', // required: stable kebab-case slug identifying your app
});
// Access the Stellar adapter
const stellar = sdk.stellar;
```
> `UpshiftSDK` is the package's **default** export — import it as `import UpshiftSDK from '@upshiftfinance/sdk'` (not a named import). `appName` is required. No `providers` entry is needed for Stellar, since its vault data is served from the Upshift backend; add `providers` only if you also read EVM/Solana vaults.
Signing happens in your app via the user's wallet — there is no `setWalletProvider` step for Stellar. Whatever wallet you use must expose a "sign XDR" call (Freighter's `signTransaction`, for example).
## Adapter API
### Methods
| Method | Returns | Description |
| ------------------------------------------------------ | --------------------------------------- | ---------------------------------------------- |
| `vaultDeposit({ contractId, amount, senderAddress })` | `Promise` (XDR) | Build an unsigned deposit transaction. |
| `vaultRedeem({ contractId, shares, receiverAddress })` | `Promise` (XDR) | Build an unsigned redeem transaction. |
| `submitTransaction(signedXdr)` | `Promise` (tx hash) | Submit a signed XDR and poll until confirmed. |
| `getUserPosition(vaultAddress, walletAddress)` | `Promise` | Read the user's on-chain share balance. |
| `convertToShares(vaultAddress, rawAmount)` | `Promise` | Preview shares a deposit amount would yield. |
| `isStellarAddress(address)` | `boolean` | Validate a Stellar address (`C…` or `G…`). |
| `getExplorerLink(id, type?)` | `string` | Build a Stellar explorer URL. |
## Get Vault Data
Stellar vaults appear in the standard listing with `chain_type === 'stellar'`. Use a vault's `address` as the `contractId` for deposit/redeem.
```typescript
// List all vaults, then narrow to Stellar
const vaults = await sdk.getVaults();
const stellarVaults = vaults.filter((v) => v.chain_type === 'stellar');
// e.g. find "earnUSDC" by name/symbol
const earnUsdc = stellarVaults.find((v) => v.name?.includes('earnUSDC'));
const contractId = earnUsdc?.address; // "C…"
```
### Get User Positions
To include a user's Stellar balances in the unified positions call, pass `stellarWallet` (the user's `G…` address):
```typescript
const positions = await sdk.getVaultPositions({
stellarWallet: 'G...',
});
positions.forEach((position) => {
console.log(`Vault: ${position.vault}`);
console.log(`Balance: ${position.walletBalance.normalized}`);
});
```
For a direct on-chain read of a single vault, use the adapter (this is also how you obtain the `shares` value needed to redeem):
```typescript
const position = await sdk.stellar.getUserPosition(contractId, 'G...');
// { shares: string, decimals: number, decimalsFromFallback?: boolean } | null
```
> **Sizing a redeem from `getUserPosition`:** if `position.decimalsFromFallback === true`, the on-chain `decimals()` read failed and `decimals` is a fabricated fallback (`7`). **Do not trust it to size a redeem** — against an offset vault (share decimals = asset + offset) this under-redeems by `10^offset`. Refuse and retry instead.
## Vault Deposit
Build an unsigned deposit transaction. This is a **self-deposit**: internally the receiver, from, and operator roles are all set to `senderAddress`.
```typescript
sdk.stellar.vaultDeposit({
contractId: string; // Stellar vault contract ("C…")
amount: string; // deposit amount in the token's smallest unit
senderAddress: string; // user's Stellar account ("G…")
}): Promise // → unsigned base64 XDR
```
### Parameters
| Parameter | Type | Required | Description |
| --------------- | -------- | -------- | --------------------------------------------------------------------------------- |
| `contractId` | `string` | Yes | Stellar vault contract address (`C…`). |
| `amount` | `string` | Yes | Amount in the deposit token's smallest unit (e.g. 1 USDC @ 7 dp → `"10000000"`). |
| `senderAddress` | `string` | Yes | User's Stellar account (`G…`); pays for and receives the deposit. |
### Example
```typescript
// 1. Build the unsigned transaction
const unsignedXdr = await sdk.stellar.vaultDeposit({
contractId,
amount: '10000000', // 1 USDC at 7 decimals
senderAddress: 'G...',
});
// 2. Sign with the user's wallet (Freighter shown here)
import { signTransaction } from '@stellar/freighter-api';
const { signedTxXdr } = await signTransaction(unsignedXdr, { networkPassphrase: '...' });
// 3. Submit and wait for confirmation
const txHash = await sdk.stellar.submitTransaction(signedTxXdr);
console.log('Deposit confirmed:', txHash);
```
Optionally preview the shares a deposit would mint before building it:
```typescript
const expectedShares = await sdk.stellar.convertToShares(contractId, '10000000');
// string | null
```
## Vault Redeem
Build an unsigned redeem transaction. Redeem burns **shares** (not asset amount), so read the user's position first. This is a **self-redeem**: receiver, owner, and operator roles are all set to `receiverAddress`.
```typescript
sdk.stellar.vaultRedeem({
contractId: string; // Stellar vault contract ("C…")
shares: string; // amount of shares to redeem, in smallest unit
receiverAddress: string; // user's Stellar account ("G…")
}): Promise // → unsigned base64 XDR
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------- | -------- | -------- | ------------------------------------------------------------ |
| `contractId` | `string` | Yes | Stellar vault contract address (`C…`). |
| `shares` | `string` | Yes | Shares to redeem, in the share token's smallest unit. |
| `receiverAddress` | `string` | Yes | User's Stellar account (`G…`); receives the redeemed assets. |
### Example
```typescript
// 1. Read the user's share balance
const position = await sdk.stellar.getUserPosition(contractId, 'G...');
if (!position || position.shares === '0') {
throw new Error('No balance to redeem');
}
if (position.decimalsFromFallback) {
throw new Error('Decimals unresolved — refusing to size redeem with fallback decimals');
}
// 2. Build the unsigned transaction (redeem all)
const unsignedXdr = await sdk.stellar.vaultRedeem({
contractId,
shares: position.shares,
receiverAddress: 'G...',
});
// 3. Sign with the user's wallet, then submit
const { signedTxXdr } = await signTransaction(unsignedXdr, { networkPassphrase: '...' });
const txHash = await sdk.stellar.submitTransaction(signedTxXdr);
console.log('Redeem confirmed:', txHash);
```
## Submit a Signed Transaction
`submitTransaction` broadcasts a signed XDR and polls until the network confirms it as successful, returning the transaction hash. The XDR must be signed for the same network the adapter is using.
```typescript
const txHash = await sdk.stellar.submitTransaction(signedXdr);
```
## Error Handling
`submitTransaction` throws typed [Upshift SDK errors](/sdk/error-handling):
- **`AugustTimeoutError`** — the transaction was not confirmed within the poll budget.
- **`AugustSDKError`** — the RPC rejected the submission, or the transaction confirmed as failed. Inspect `err.context` for `{ network, status }` and, when the result XDR decodes, a `resultCode` string carrying the transaction-level reason (e.g. `"txBadSeq"`, `"txTooLate"`). `resultCode` is `undefined` when it cannot be decoded.
```typescript
import { AugustSDKError } from '@upshiftfinance/sdk';
try {
const txHash = await sdk.stellar.submitTransaction(signedXdr);
} catch (err) {
if (err instanceof AugustSDKError && err.context?.resultCode === 'txBadSeq') {
// Stale sequence number — rebuild the transaction and resubmit.
} else {
throw err;
}
}
```
## Curator Notifications
Stellar vaults are **instant-redeem only** — there is no withdrawal queue — so a curator whose depositors cannot redeem has no other way to find out. When a redemption fails, the SDK reports it to the Upshift API (the same base URL it reads vault data from), which validates the report and forwards it to the vault curator's own Telegram group. Curators are onboarded per vault, so a vault nobody has opted in is never reported on.
Two cases are reported:
1. the vault rejecting the redeem at build time — either a Soroban simulation failure or a vault whose ledger state has been archived and needs restoring; and
2. a submitted redeem whose operation ran and failed (`resultCode === 'txFailed'`).
The body sent is exactly: an event name, the chain family (`"stellar"`), which of the two cases it was, the network, the vault contract ID, the redeeming account, the share amount (unscaled), an ISO timestamp, the failure reason (secrets scrubbed, capped at 1500 characters — on the submission path this is the decoded transaction result, not prose), your `appName`, and for case 2 the transaction hash and result code. Repeated attempts at the same failure on the same vault and account collapse to one report per 10 minutes.
Deliberately **not** reported, because none of them is a vault rejecting a redemption: an invalid address, an unfunded Stellar account, an RPC outage, a broadcast the RPC rejected, a confirmation timeout, and any transaction-level failure where the redeem never executed (`txBadSeq`, `txInsufficientBalance`, `txTooLate`, or an undecodable result code). Deposits are never reported. Note that a redeem which exhausts its Soroban resource budget *is* reported — the operation ran, so it arrives as `txFailed`.
Nothing is sent for networks other than mainnet — unless you set `curatorAlerts.endpoint`, which lifts that restriction so your own relay can receive testnet failures. Nothing is sent when `monitoring.env` is set to anything other than `PROD`, when `NODE_ENV` is `development` or `test`, or when the page is served from a loopback, private, or link-local host — so your CI and local dev runs stay silent. That last check covers:
| Kind | Covered |
| --------------- | ----------------------------------------------------------------------------------------------------- |
| Reserved names | `localhost`, any `*.localhost`, any `*.local` |
| IPv4 loopback | `127.0.0.0/8` (not just `127.0.0.1`), `0.0.0.0/8` |
| IPv4 private | `10.0.0.0/8`, `172.16.0.0/12` (Docker's default bridge lives here), `192.168.0.0/16` |
| IPv4 link-local | `169.254.0.0/16` |
| IPv6 | `[::1]` and `::`, unique-local `fc00::/7`, link-local `fe80::/10`, and IPv4-mapped forms of the above |
A public host that merely contains a reserved name — `localhost.example.com` — is treated as a real deployment and does report.
The hostname check is what covers browsers: bundlers strip `process.env`, so `NODE_ENV` is not readable there and cannot be relied on to keep a `next dev` tab quiet.
Note that `monitoring.env` **defaults to `PROD`**, so reporting is on unless you say otherwise; and code that drives the `Stellar` namespace without constructing an `UpshiftSDK` has no `monitoring.env` at all, where `NODE_ENV` and the hostname are the only gates.
> Setting `curatorAlerts.enabled: true` **bypasses all three environment gates** — `monitoring.env`, `NODE_ENV`, and the local-host check. It does *not* lift the mainnet-only restriction; only `endpoint` does that. It is a force-on, not a "yes, use the defaults": a `DEV` or test integration that sets it and then fails a mainnet redeem will page a real curator. Leave it unset to get the safe defaults, and if you set it to exercise the path, point `endpoint` at a relay of your own. The `AUGUST_SDK_DISABLE_CURATOR_ALERTS` env var still overrides it.
Enabled by default. To turn it off:
```typescript
const sdk = new UpshiftSDK({
appName: '',
monitoring: { curatorAlerts: { enabled: false } },
});
```
In Node you can also set `AUGUST_SDK_DISABLE_CURATOR_ALERTS` (to `1`, `true`, `yes`, or `on`). If you call the `Stellar` namespace directly rather than constructing an `UpshiftSDK` (see [Networks](#networks) below), opt out with the top-level `configureCuratorAlerts` — in a browser this is the only way, since environment variables are unreadable there:
```typescript
import { configureCuratorAlerts } from '@upshiftfinance/sdk';
configureCuratorAlerts({ enabled: false });
```
> Constructing an `UpshiftSDK` afterwards **resets** this setting, so call it after any SDK construction, not before.
> The reporting endpoint is chain-agnostic — the chain travels in the payload — but it only serves the families Upshift has enabled, which today means Stellar alone. Curators are onboarded on Upshift's side; there is nothing to configure in the SDK to route notifications to a particular channel. Ask your Upshift contact to enable a vault, and to allowlist the origin your users load the app from: delivery is a cross-origin browser request, so an origin that is not on the API's CORS allowlist loses these reports at the preflight. The `redeem` check on the submit path reads the transaction's contract call rather than a list of Upshift vaults, so submitting an unrelated Soroban contract's failed `redeem` through `submitTransaction` also sends a report; the API discards any vault it does not have an opted-in curator for.
## Networks
`sdk.stellar` is hardwired to **mainnet**. To target **testnet**, use the `Stellar` namespace directly with an explicit `network`:
```typescript
import { Stellar } from '@upshiftfinance/sdk';
// Build an unsigned deposit on testnet
const unsignedXdr = await Stellar.actions.handleStellarDeposit({
contractId,
amount: '10000000',
senderAddress: 'G...',
network: 'testnet',
});
// Submit on testnet
const txHash = await Stellar.submit.submitStellarTransaction(signedXdr, 'testnet');
```
## Notes & Caveats
- **Self-deposit / self-redeem only.** All role addresses are set to the single account you pass; there is no third-party/operator variant.
- **Standard vault ABI assumed.** Redeem assumes the deployed vault exposes `redeem(shares, receiver, owner, operator)`. A divergent ABI surfaces as a generic Soroban simulation error.
- **Read-only on the vaults module.** Available redemptions and redemption history are **not yet supported** for Stellar vaults; deposit/redeem are available only on `sdk.stellar`.
# Sui Actions
> Read, deposit into and instantly redeem from Upshift Sui vaults. Write operations build an unsigned transaction that the user's wallet signs; the SDK can then execute it and wait for confirmation.
## Overview
Sui vault reads go through the standard vaults API (`sdk.getVault`, `sdk.getVaults`, `sdk.getVaultPositions`). Deposits and instant redemptions live on the **Sui adapter** (`sdk.sui`) and follow a **build → sign → execute** flow:
1. `sdk.sui.vaultDeposit()` / `sdk.sui.vaultRedeem()` dry-run the transaction with the sender's own coins and return an **unsigned `Transaction`**. A vault that would reject it (paused, a limit, a withdrawal queue attached) fails here, before the wallet is asked to sign.
2. The user's wallet signs it (e.g. with [dApp Kit](https://sdk.mystenlabs.com/dapp-kit)).
3. `sdk.sui.executeTransaction()` executes the signed transaction and resolves to its digest once the network has indexed it.
Transactions run on the network the SDK was configured with — `mainnet` by default.
## Setup
```typescript
import UpshiftSDK from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({
appName: 'your-app-name',
sui: {
network: 'testnet', // 'mainnet' (default) | 'testnet'
rpcUrl: 'https://your-node.example/…', // optional; must serve gRPC-web
// Optional on mainnet (the SDK ships the Upshift deployments); needed on testnet:
packageId: '0x…', // latest upshift_vault package (move calls target it)
originalPackageId: '0x…', // first published package (vault types name it)
registryId: '0x…', // shared upshift_vault::registry::Registry object
},
});
```
| Option | Required | Description |
| --- | --- | --- |
| `network` | No | `'mainnet'` (default) or `'testnet'`. |
| `rpcUrl` | No | Your node. It must serve **gRPC-web** (the SDK talks gRPC-web so the same code runs in browsers). It becomes the primary endpoint; Mysten's public fullnode stays behind it as failover. |
| `packageId`, `originalPackageId`, `registryId` | Testnet only | Long-form IDs (`0x` + 64 hex chars) of an Upshift vault deployment on `network`. On mainnet the SDK ships every Upshift deployment and picks each vault's contracts from its on-chain type, so you can leave these out. A set of IDs applies only to vaults of its `originalPackageId`; setting `packageId` or `registryId` without `originalPackageId` throws. |
> The SDK loads `@mysten/sui` only on the first Sui call. In **Node.js** that needs Node **^20.19 or >=22.12** (`@mysten/sui` is ESM-only, and older releases cannot `require` it; the SDK then throws an `UpshiftSDKError` saying so). Node 22.12–22.x also prints a harmless `ExperimentalWarning` about loading an ES module with `require()`. Browsers are unaffected.
## Adapter API
| Method | Returns | Description |
| --- | --- | --- |
| `vaultDeposit({ vaultId, assetCoinType, shareCoinType, amount, sender, minSharesOut?, slippageBps? })` | `Promise<{ transaction, expectedShares, minSharesOut }>` | Build an unsigned deposit. |
| `vaultRedeem({ vaultId, assetCoinType, shareCoinType, shares, sender, minAssetsOut?, slippageBps? })` | `Promise<{ transaction, expectedGrossAssets, expectedAssets, minAssetsOut }>` | Build an unsigned instant redemption. |
| `executeTransaction({ bytes, signature })` | `Promise` (digest) | Execute a wallet-signed transaction and wait for it. |
| `isSuiAddress(address)` | `boolean` | `0x` + 64 hex chars. |
| `isSuiVault(chainId)` | `boolean` | `true` for `-2`. |
| `network`, `rpcUrl` | getters | The configured `sui` settings. |
Amounts are `bigint` in base units: `amount` and asset outputs in the deposit coin's decimals, `shares` in the share coin's (the contract requires both to match).
## Get Vault Data
Sui vaults have `chainId === -2` and `version === 'sui-0'`. The adapter methods take three fields from the vault:
```typescript
const vaults = await sdk.getVaults();
const suiVault = vaults.find((v) => v.version === 'sui-0');
const vault = {
vaultId: suiVault.address, // the shared Vault object
assetCoinType: suiVault.depositAssets[0].address, // e.g. "0x…::usdc::USDC"
shareCoinType: suiVault.receipt.address, // the vault's share coin type
};
```
`getVault`/`getVaults` read total assets, supply, decimals, pause state and the deposit cap from the vault's Move package (two RPC requests per vault). Reads include the management fee accrued since it was last charged, so they reflect the current NAV. TVL in `getVaultTvl` comes from the backend.
### Get User Positions
Pass `suiWallet` to read the wallet's share-coin balance (coin objects plus its address balance):
```typescript
const positions = await sdk.getVaultPositions({ suiWallet: account.address });
const position = positions.find((p) => p.vault === vault.vaultId);
const shares = BigInt(position?.walletBalance.raw ?? '0');
```
### Lower-level reads
The `Sui` export exposes the reads behind these calls:
```typescript
import { Sui } from '@upshiftfinance/sdk';
const ref = { ...vault, network: 'testnet' as const };
const state = await Sui.getters.readSuiVaultState(ref, suiConfig);
// { totalAssets, totalSupply, sharePrice, decimals, paused, queueAttached,
// minDeposit, depositCap, maxDepositAmount, maxWithdrawalAmount,
// instantRedemptionFeeBps }
const shares = await Sui.getters.previewSuiDeposit(ref, 1_000_000n, suiConfig);
const { gross, net } = await Sui.getters.previewSuiRedemption(ref, shares, true, suiConfig);
```
## Vault Deposit
One transaction: charge the vault's management fee, deposit with a minimum share amount, and send the shares to the sender. The payment is selected from the sender's coins (and address balance) when the wallet signs.
```typescript
import { useDAppKit, useCurrentAccount } from '@mysten/dapp-kit-react';
const dAppKit = useDAppKit();
const account = useCurrentAccount();
// 1. Build (dry-runs first; throws a typed error if the vault would reject it)
const { transaction, expectedShares } = await sdk.sui.vaultDeposit({
...vault,
amount: 1_000_000n, // 1 USDC at 6 decimals
sender: account.address,
});
// 2. Sign with the wallet
const signed = await dAppKit.signTransaction({ transaction });
// 3. Execute and wait
const digest = await sdk.sui.executeTransaction(signed);
```
The transaction accepts down to the dry run's share amount less `slippageBps` (default **10**, i.e. 0.1%). That absorbs rounding when other deposits land first and a few seconds of fee accrual, while a larger price move (e.g. an operator AUM report) still aborts with `slippage`. Pass `minSharesOut` for an exact minimum, or `slippageBps: 0` to demand exactly the preview.
## Vault Redeem (instant)
One transaction: charge the vault's management fee, redeem shares with a minimum asset amount net of the instant-redemption fee, and send the assets to the sender. Charging first means the redeemer pays their share of the fee accrued since it was last charged, rather than leaving it to the remaining holders.
```typescript
const { transaction, expectedAssets } = await sdk.sui.vaultRedeem({
...vault,
shares, // from getVaultPositions
sender: account.address,
});
const digest = await sdk.sui.executeTransaction(await dAppKit.signTransaction({ transaction }));
```
The minimum defaults to the dry run's net amount less `slippageBps` (default 0.1%); pass `minAssetsOut` or `slippageBps` to change it. A vault with a withdrawal queue attached has instant redemption off; `vaultRedeem` then throws with `reason: 'queue_attached'`.
## Execute a Signed Transaction
`executeTransaction` takes the `{ bytes, signature }` a wallet's `signTransaction` returns, executes it on the configured network, and waits until it is indexed. If it fails on chain it still waits for the failure to be indexed before throwing, so a retry built straight after sees the sender's updated coins.
You can also let the wallet execute (`dAppKit.signAndExecuteTransaction({ transaction })`); you then get the wallet's raw result instead of the SDK's typed errors and curator reporting.
## Error Handling
| Error | When | What to do |
| --- | --- | --- |
| `UpshiftVaultAbortError` (`VAULT_ABORTED`) | The vault rejected the transaction — in the dry run, or on chain. `reason` is stable to branch on; `module`/`constant` name the contract error. | See the reasons below. |
| `UpshiftValidationError` | Malformed address or amount, missing contract IDs, or a transaction that cannot be built (e.g. the sender lacks the coins). | Fix the input. |
| `UpshiftNetworkError` | Every Sui endpoint failed. | Retry with backoff. |
| `UpshiftTransactionError` | Executed, but not indexed in time. `signature` is the digest. | Check the digest before retrying. |
| `UpshiftSDKError` (`UNKNOWN`) | The network refused the signed transaction (bad signature, or inputs changed since signing), or it failed for a non-abort reason. | Rebuild, sign again. |
| `reason` | Meaning |
| --- | --- |
| `paused` | The vault is paused. |
| `below_min_deposit` / `above_max_deposit` | Outside the vault's per-call deposit bounds (`minDeposit`, `maxDepositAmount`). |
| `deposit_cap_exceeded` | The deposit would take total assets past `depositCap`. |
| `above_max_withdrawal` | Gross assets exceed `maxWithdrawalAmount`. |
| `insufficient_liquidity` | The vault's idle assets cannot pay it now. |
| `queue_attached` | Instant redemption is off; the vault uses a withdrawal queue. |
| `slippage` | Output below the transaction's minimum (the price moved more than the tolerance). Rebuild, or pass a higher `slippageBps`. |
| `zero_output` | Amount too small to mint shares or pay assets. |
| `version_retired` | The transaction targets a retired package version. Point `sui.packageId` at the current `upshift_vault` package. |
| `other` | Any other abort; see `module` and `constant`. |
```typescript
import { UpshiftVaultAbortError } from '@upshiftfinance/sdk';
try {
const { transaction } = await sdk.sui.vaultRedeem({ ...vault, shares, sender });
} catch (err) {
if (err instanceof UpshiftVaultAbortError && err.reason === 'queue_attached') {
// instant redemption is off for this vault
} else {
throw err;
}
}
```
## Curator Notifications
As for Stellar, a redemption the vault rejects — in the dry run, or on chain via `executeTransaction` — is reported to the Upshift API for the vault's curator, with the chain family `"sui"`, the vault, the redeeming account, the share amount and (on chain) the digest. The same environment gates and opt-out apply; see [Curator Notifications](/sdk/stellar-actions#curator-notifications) on the Stellar page. The reporting endpoint does not accept Sui reports yet: it rejects them, and the SDK logs one console warning per rejected report (deduplicated per vault, account and failure for 10 minutes). Nothing else changes for the user.
## Notes & Caveats
- **Coin shares only.** Vaults with PAS shares are not supported.
- **No withdrawal queue in v1.** Requesting, claiming and cancelling queued withdrawals are not available yet; redemption history and available redemptions are empty for Sui vaults.
- **Loans and allocations** are not available for Sui vaults; `getVaultLoans` and `getVaultAllocations` throw.
- **Self-deposit / self-redeem.** Shares and assets go to `sender`.
- **Vaults whose asset is SUI.** The dry run does not reserve gas, so a deposit of the whole SUI balance passes `vaultDeposit` and then fails when the wallet builds it. Leave SUI for gas.
# Build a three-chain vault app
> Walk through the Upshift SDK starter, a Vite + React reference app that lists vaults, connects a wallet and deposits and withdraws on EVM, Solana and Stellar. Reads need no API keys; Solana balances and writes need an RPC that allows token-account lookups.
The [starter app](https://github.com/upshift-protocol/upshift-starter) is the reference integration for `@upshiftfinance/sdk`. It runs at [integrate.upshift.finance](https://integrate.upshift.finance/) against mainnet, so every flow on this page is proven against the real vaults. The public repository is a read-only mirror; the source lives in the Upshift frontend monorepo.
To add one vault to your own app, start from the [integrate guide](https://integrate.upshift.finance/). Each vault has an Integrate page that generates `upshift-vault.ts` and `UpshiftVault.tsx` for that vault, next to a live preview, for example [Upshift USDC on Ethereum](https://integrate.upshift.finance/vaults/ethereum/0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42/integrate).
Everything an integrator needs to copy sits in `src/integration/`. That directory imports only the SDK, `wagmi`, `viem`, the Solana wallet adapters and `@stellar/freighter-api`. Shared reads sit at its top level, and each chain has its own folder with a `wallet.tsx` and an `actions.ts`: `evm/`, `solana/` and `stellar/`. `src/components/` is presentation and can be replaced.
## 1. Construct the SDK once
`src/integration/sdk.ts` builds the single SDK instance. The settings that matter:
| Setting | Value | Why |
| --- | --- | --- |
| `appName` | your own slug | Tags telemetry per integrator. |
| `providers` | `{ 1: rpcUrl }` | One RPC per EVM chain. The catalog drops vaults on chains with no provider. |
| `solana` | `{ rpcUrl, network: 'mainnet-beta', commitment: 'confirmed' }` | Configure Solana here, not through `providers[-1]`, or `commitment` stays at `finalized` and wallet preflight guards trip on stale state. `rpcUrl` must allow `getTokenAccountsByOwner`, which free public endpoints reject. |
| `stellar` | `{ network: 'mainnet' }` | The SDK's public Soroban endpoints. |
| `keys` | omitted | Vault reads and writes need no August API key. Pass `options: { loans: false, allocations: false }` to `getVault`: by default it also reads allocations, which need a key and fail with 401 without one. Solana balances and writes still need a Solana RPC that allows `getTokenAccountsByOwner`. |
| `monitoring.curatorAlerts` | `{ enabled: false }` on a demo | A failed Stellar redeem on a public host pages the vault's curator. Leave alerts on in a real product. |
The package is CommonJS. Vite exposes its default export differently in dev and build, so the starter unwraps `default.default ?? default ?? module` and sets `build.commonjsOptions.defaultIsModuleExports` and `define.global` in `vite.config.ts`.
## 2. Read vaults and group them by chain
`src/integration/vaults.ts` calls `sdk.getVaults()` once and groups on the synthetic chain ids: Solana vaults carry `-1`, Stellar `-3`, everything else is EVM. `src/integration/vault-detail.ts` reads one vault with `getVault` and thirty days of `getVaultHistoricalTimeseries` in parallel.
Never lowercase a Solana or Stellar address. Both are case-sensitive and the API rejects a lowercased id.
## 3. Connect a wallet per family
Each chain folder has a `wallet.tsx` with that chain's provider and hook. `src/integration/wallets.tsx` stacks the three providers and normalizes them to `{ family, address, connected, connect, disconnect }`.
- **EVM**: wagmi with the `injected` connector only. WalletConnect needs a project id, which breaks the zero-key goal.
- **Solana**: `ConnectionProvider` and `WalletProvider` with Phantom, Solflare and Coinbase. Wallet-Standard wallets appear on their own.
- **Stellar**: Freighter. `requestAccess` runs only when the user clicks connect, never on mount, because it re-prompts every load. The address is restored from storage inside an effect.
## 4. Solana deposit and withdraw
`src/integration/solana/actions.ts`:
1. Resolve the target with `Solana.utils.resolveProgramId(vault.address, { program_id: vault.programId })`. The catalog's `programId` is required for factory vaults; without it the resolver returns the vault address itself and a v2 vault is targeted as a legacy program. Pass `vaultAddress` only when it differs from the program.
2. Call `sdk.solana.setWalletProvider(publicKey, signTransaction)` immediately before every write.
3. Convert the amount with `toNormalizedBn(amount, decimals).raw` and pass a `bigint`.
4. Call `vaultDeposit(programId, idl, publicKey, raw, undefined, vaultAddress)`. The fifth argument is deprecated and must stay `undefined`; deleting it shifts `vaultAddress` into its slot.
5. Size a withdrawal with the share mint's decimals from `fetchUserShareBalanceRaw`, not the deposit token's.
A failed balance read is shown as unknown, never as zero. The submit button stays disabled until `publicKey` and `signTransaction` are both present.
## 5. Stellar deposit and withdraw
`src/integration/stellar/actions.ts` follows build, sign, submit:
1. `sdk.stellar.vaultDeposit({ contractId, amount, senderAddress })` returns unsigned XDR. `amount` is the raw string in the token's smallest unit (7 decimals for USDC).
2. Freighter signs with the mainnet passphrase and the connected address.
3. `sdk.stellar.submitTransaction(signedXdr)` returns the hash.
Before a deposit, the starter asks Horizon whether the account exists. An unfunded account cannot source a transaction, so the form explains how to activate it and re-checks every eight seconds. For the native XLM vault the ledger keeps the reserve and the fee, so Max is capped at the spendable balance; offering the full balance reverts with `Error(Contract, #10)`.
Before a withdrawal, `getUserPosition` must return `decimalsFromFallback: false`. Share decimals can be the asset decimals plus a vault offset (13 for earnUSDC), and sizing a redeem with assumed decimals under-redeems by that offset.
If `submitTransaction` throws an `AugustSDKError` whose `context.resultCode` is `txBadSeq`, the sequence number went stale. The starter rebuilds and resubmits once.
## 6. EVM deposit, request and claim
`src/integration/evm/actions.ts`:
1. `sdk.evm.setSigner(walletClient)` before every write; the wallet can rotate.
2. `sdk.evm.approve(...)` as its own visible step, then `sdk.evm.vaultDeposit({ target, wallet, amount, wait: true })`. The SDK would approve silently inside `vaultDeposit`; showing the step keeps the user in control.
3. `sdk.evm.vaultRequestRedeem({ target, wallet, amount, wait: true })` with the amount in shares.
4. `sdk.getVaultAvailableRedemptions({ vault, chainId, wallet })` lists matured requests. Claim with `claimWithdrawal` on `evm-2` vaults and `vaultRedeem` with `receiverIndex: '0'` on `evm-0` and `evm-1`, chosen by `vault.version`.
## 7. Positions and errors
`getVaultPositions({ wallet, solanaWallet, stellarWallet })` returns a user's positions across all three families in one call.
`src/integration/tx-flow.ts` classifies every failure. A wallet decline is reported as declined, not as an error. An `AugustTimeoutError` means the outcome is unknown: link the explorer rather than saying it failed.
## Not in the starter
Documented as hardening for a production integration, left out to keep the example small: Solana retry on Lighthouse guard trips and recovery of a landed signature after a confirmation error; the Stellar XDR sequence guard, a collision-safe Freighter transport for multi-wallet setups, and Soroban error decoding; the Solana withdrawal queue; D'CENT, Para, Ledger and Stellar Wallets Kit.
# Vault Actions
> Query vaults, loans, allocations, positions, PnL, and historical data across all supported chains with the Upshift SDK.
## Overview
The Upshift SDK provides comprehensive vault querying capabilities across all supported chains. Vaults follow the ERC4626 standard and include additional features for loan management, allocations, and user positions.
> For detailed vault SDK functions, please refer to the [SDK reference page](/sdk/reference)
### Vault Versions
| Version | Description | Chains |
| ------- | ------------------ | ------------------ |
| `evm-0` | Legacy vaults | Ethereum, Arbitrum |
| `evm-1` | Standard vaults | All EVM chains |
| `evm-2` | Multi-asset vaults | Ethereum, Base |
| `sol-0` | Solana vaults | Solana Mainnet |
## Get All Vaults
Fetch all vaults across configured networks with optional enrichment.
```typescript
import UpshiftSDK from '@upshiftfinance/sdk'
const sdk = new UpshiftSDK({ appName: '' })
sdk.getVaults(options?: {
chainIds?: number[];
loans?: boolean;
allocations?: boolean;
wallet?: string;
solanaWallet?: string;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | ---------- | -------- | --------------------------------------- |
| `options.chainIds` | `number[]` | No | Filter by specific chain IDs |
| `options.loans` | `boolean` | No | Include loan data (default: true) |
| `options.allocations` | `boolean` | No | Include allocation data (default: true) |
| `options.wallet` | `string` | No | EVM wallet to fetch positions for |
| `options.solanaWallet` | `string` | No | Solana wallet to fetch positions for |
### Returns
Array of `IVault` objects
## Get Single Vault
Fetch detailed data for a specific vault with optional enrichment.
```typescript
sdk.getVault({
vault: string;
chainId?: number;
options?: {
loans?: boolean;
allocations?: boolean;
wallet?: string;
solanaWallet?: string;
};
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------- | --------- | -------- | ---------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address or program ID |
| `chainId` | `number` | No | Chain ID (uses active network if not provided) |
| `options.loans` | `boolean` | No | Include loan data (default: true) |
| `options.allocations` | `boolean` | No | Include allocation data (default: true) |
| `options.wallet` | `string` | No | EVM wallet for position data |
| `options.solanaWallet` | `string` | No | Solana wallet for position data |
### Returns
Single `IVault` object
## Get Vault Loans
Fetch active loan data for a vault (EVM-0 vaults only).
```typescript
sdk.getVaultLoans({
vault: string;
chainId?: number;
}): Promise
```
### Returns
Array of loan objects with borrower, principal, interest, and APR data.
## Get Vault Allocations
> **This is the data behind the "Vault Exposure" section on the Upshift app.** One call returns exactly what the Upshift UI renders — read `exposurePerCategory` for the pre-bucketed view (`supplying` / `borrowing` / `wallet` / `lending` legs plus per-category USD totals). It lives on the root `sdk` and requires an RPC provider for the vault's chain. See the [Transparency Dashboard](#transparency-dashboard) section for the per-card methods.
Fetch DeFi, CeFi, and OTC allocation breakdowns for a vault.
```typescript
sdk.getVaultAllocations({
vault: string;
chainId?: number;
}): Promise
```
### Returns
Object containing `defi`, `cefi`, `otc`, and `tokens` arrays.
## Transparency Dashboard
Every tab and card of the Upshift per-vault **Transparency** page is available as an individual read method on `sdk.apiModule`, so you can compose exactly the subset you want — e.g. the Performance tab without the collateral-ratio card. All methods:
- are **public** (no API key), one HTTPS request each, **zero RPC** from the SDK — no `providers` config needed;
- are **snapshot-backed** (positions/oracle refresh hourly; cache ≥ 60 s on your side);
- throw `AugustValidationError` on a bad address / chain id / date / limit **before** any request is made; non-2xx API responses surface as `AugustServerError` (`AugustRateLimitError` on 429, `AugustTimeoutError` on timeout);
- the `chainId`-taking methods are **EVM-only** (Solana/Stellar vaults have no transparency data). `getVaultBackingSeries` / `getVaultSmoothedApy` are keyed by vault address alone;
- date windows (`startDate` / `endDate`) are `YYYY-MM-DD` and **both inclusive**.
Minimal construction — no RPC provider and no API key are needed for anything in this section:
```typescript
import UpshiftSDK from '@upshiftfinance/sdk';
const sdk = new UpshiftSDK({ appName: '', keys: {} });
```
| Dashboard surface | Method | Returns |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------ |
| Overview → strategy breakdown, backing composition, vault buffer, wallets, headline TVL | `getVaultPositionSnapshot({ vault, chainId })` | `ITransparencyPositions` |
| Overview → APY last 30 days · Performance → APY Over Time | `getVaultSmoothedApy({ vault, daysAgo?, averagingPeriodDays?, applySmoothing? })` | `ITransparencyApySeries` |
| Performance → Backing vs Supply · Collateral Ratio · sidebar 7d deltas | `getVaultBackingSeries({ vault, startDate?, endDate?, limit? })` | `ITransparencyRatioPoint[]` |
| Performance → Allocation Over Time | `getVaultHistoricalAllocations({ vault, chainId, startDate?, endDate? })` | `ITransparencyHistoricalAllocations` |
| Performance → fees card | `getVaultFeeConfig({ vault, chainId })` | `ITransparencyFees` |
| Performance → share price / TVL history | `sdk.getVaultHistoricalTimeseries(...)` (root `sdk`, existing) | — |
| NAV Oracle tab | `getVaultOracleClassification(vault, chainId)` (existing; positional args) | `IOracleClassification` |
| Governance → Vault Roles | `getVaultGovernanceRoles({ vault, chainId })` | `ITransparencyGovernanceRoles` |
| Governance → Vault Permissions | `getVaultGovernancePermissions({ vault, chainId })` | `ITransparencyGovernancePermissions` |
| Governance → Pending Timelocks | `getVaultGovernanceTimelocks({ vault, chainId, status? })` | `ITransparencyTimelocks` |
| Governance → Audit Log | `getVaultGovernanceAuditLog({ vault, chainId, category?, before?, limit? })` | `ITransparencyAuditLog` |
| Vault Exposure section (main pool page) | `sdk.getVaultAllocations({ vault, chainId })` (root `sdk`; needs an RPC provider — see above) | `IVaultAllocations` |
### Reproducing the Overview headline numbers
```typescript
const pos = await sdk.apiModule.getVaultPositionSnapshot({
vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA',
chainId: 143,
});
// Headline "Total NAV" on the page is the vault-reported figure from the SAME snapshot:
const headline = pos.reported_tvl ?? pos.total_nav;
// Vault Buffer = liquidity sitting on the vault contract itself:
const deployed = pos.subaccounts.reduce((a, s) => a + s.total_usd, 0);
const vaultBuffer = Math.max(0, pos.total_nav - deployed);
// Every field is from `pos.snapshot_at` — show it as "Last updated".
```
Notes:
- **Borrow legs are negative.** In `ITransparencyTokenExposure`, `role: 'borrow'` rows carry negative `usd_value` and `balance`; a protocol group's `total_usd` is already the net.
- **Pricing follows the published methodology.** Hard-pegged stables price at their peg (the same overrides the NAV Oracle tab lists), so `total_usd` values match the dashboard exactly rather than raw market prices.
- **`getVaultBackingSeries` returns newest-first, hourly points** — sort ascending before charting; `adjusted_redeem_ratio * 100` is the collateral-ratio percent.
- **`getVaultSmoothedApy` is the ONLY way to match the app's APY charts**: the backend applies a rolling-median/mean smoothing filter server-side; recomputing APY locally from share ratios will not match. `values` are decimal fractions (0.0245 = 2.45%), `labels` are `M/D/YYYY`.
- **Audit-log pagination**: pass `before` = the last returned entry's `timestamp` **verbatim** while `has_more` is true (exclusive cursor). Audit and timelock timestamps are naive-UTC (no `Z`); `snapshot_at` carries one.
- **Units**: `pct_of_nav` / `pct_of_subaccount` / `pct_of_tvl` are fractions (0.25 = 25%); the fee `*_pct` fields are already percents (2 = 2%).
- **Pending Timelocks is often empty** — the default filter is `scheduled`; pass `status: 'all'` to show history (the Audit Log covers the same events).
- **Governance `warnings`**: Safe / Fordefi enrichment failures degrade rows and append a warning code rather than failing the call — check the array if a role looks incomplete. Codes seen in the wild: `safe_api_unavailable`, `fordefi_api_unavailable`, `fordefi_partial_coverage` (expected — AA subaccounts are never Fordefi keys), `timelock_duration_unavailable`.
### Example — a Performance tab without the collateral-ratio card
```typescript
const vault = '0x955256B31097dDf47a9E47A95aDfDFB4460D8522';
const [apy, allocations, fees] = await Promise.all([
sdk.apiModule.getVaultSmoothedApy({ vault, daysAgo: 90 }),
sdk.apiModule.getVaultHistoricalAllocations({ vault, chainId: 1, startDate: '2026-08-01' }),
sdk.apiModule.getVaultFeeConfig({ vault, chainId: 1 }),
]);
```
## Get Vault Annualized APY
Fetch annualized APY metrics for specific vaults.
> **Supported Vaults**: cUSDO, tETH, wstETH, rsETH
>
> **Deprecation Notice**: The `hgETH30dLiquidAPY` and `hgETH7dLiquidAPY` response fields are deprecated and will be removed in the next major release. Use `liquidAPY30Day` and `liquidAPY7Day` instead.
```typescript
sdk.getVaultAnnualizedApy({
vault: string;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ---------------------- |
| `vault` | `string` | Yes | Vault contract address |
### Returns
`IVaultAnnualizedApy` object with liquidity APY and annualized metrics.
## Get Vault Historical Timeseries
Fetch comprehensive historical timeseries data for a vault including TVL, APY, PnL, share price, and other metrics.
```typescript
sdk.getVaultHistoricalTimeseries({
vault: string;
nDays?: number;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ------------------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address |
| `nDays` | `number` | No | Number of days of historical data (default: 30, min: 1) |
### Returns
Historical timeseries data object with date string keys containing TVL, APY, PnL, and share price.
## Get Vault TVL
Fetch current or historical total value locked (TVL) for a vault.
```typescript
sdk.getVaultTvl({
vault: string;
chainId?: number;
historical?: {
daysAgo?: number;
order?: 'asc' | 'desc';
interval?: 'days' | 'weeks' | 'months' | 'years';
};
}): Promise<{ value: INormalizedNumber; timestamp: string }[]>
```
### Returns
Array of TVL data points with timestamps.
## Get Vault Positions
Fetch user positions across one or all vaults.
```typescript
sdk.getVaultPositions({
vault?: string;
wallet?: string;
chainId?: number;
showAllVaults?: boolean;
solanaWallet?: string;
stellarWallet?: string;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------------- | --------- | -------- | ------------------------------------------------ |
| `vault` | `string` | No | Specific vault address (omit for all vaults) |
| `wallet` | `string` | No | EVM wallet address |
| `solanaWallet` | `string` | No | Solana wallet address |
| `stellarWallet` | `string` | No | Stellar wallet address (`G…`) |
| `chainId` | `number` | No | Filter by specific chain |
| `showAllVaults` | `boolean` | No | Include vaults with no position (default: false) |
### Returns
Array of vault position objects.
## Get Available Redemptions
Fetch claimable redemption requests for a vault and wallet.
```typescript
sdk.getVaultAvailableRedemptions({
vault: string;
chainId?: number;
wallet?: string;
verbose?: boolean;
}): Promise<{
availableRedemptions: IVaultAvailableRedemption[];
pendingRedemptions: IVaultAvailableRedemption[];
}>
```
### Returns
Object with `availableRedemptions` (ready to claim) and `pendingRedemptions` (waiting for lag period).
## Get Vault Withdrawals
Fetch withdrawal summary and pending withdrawal queue for a vault.
```typescript
sdk.getVaultWithdrawals({
vault: string;
chainId?: number;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ---------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address |
| `chainId` | `number` | No | Chain ID (uses active network if not provided) |
### Returns
`IVaultWithdrawals` object containing total withdrawals and pending queue.
## Get Vault PnL
Fetch vault-level profit and loss (not user-specific).
```typescript
sdk.getVaultPnl({
vault: string;
chainId?: number;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ---------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address |
| `chainId` | `number` | No | Chain ID (uses active network if not provided) |
### Returns
`IVaultPnl` object with total PnL in native token and USD.
## Get User Lifetime PnL
Calculate lifetime profit and loss for a user in a specific vault.
```typescript
sdk.getVaultUserLifetimePnl({
vault: string;
wallet: string;
chainId?: number;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ---------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address |
| `wallet` | `string` | Yes | User wallet address |
| `chainId` | `number` | No | Chain ID (uses active network if not provided) |
### Returns
`IVaultUserLifetimePnl` object with realized and unrealized PnL.
## Get Yield Last Realized
Get the timestamp when yield was last realized for a vault.
```typescript
sdk.getYieldLastRealizedOn({
vault: string;
chainId?: number;
}): Promise
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | ---------------------------------------------- |
| `vault` | `string` | Yes | Vault contract address |
| `chainId` | `number` | No | Chain ID (uses active network if not provided) |
### Returns
Unix timestamp (in seconds) when yield was last realized.
## Get Borrower Health Factor
Get the borrower's health factor by vault.
```typescript
sdk.getVaultBorrowerHealthFactor({
chainId?: number;
}): Promise>
```
### Parameters
| Parameter | Type | Required | Description |
| --------- | -------- | -------- | --------------------------- |
| `chainId` | `number` | No | Filter by specific chain ID |
### Returns
Object mapping vault addresses to their borrower health factors.
## IVault Interface
All vault getter methods return the `IVault` interface:
### Key Fields
**`depositAssets`** - Array of all supported deposit tokens including:
- Underlying asset (always first)
- Adapter tokens (if available)
- Whitelisted assets (for multi-asset vaults)
**`version`** - Determines which deposit/withdrawal functions to use:
- `evm-0`, `evm-1`: 2-param deposit
- `evm-2`: 3-param deposit with asset selection
**`position`** - User-specific data (when wallet provided):
- Wallet balance
- Available redemptions
- Pending redemptions
- Redeemable amount
## Get User History
```typescript
sdk.getUserHistory({
wallet: string;
chainId?: number;
vault?: string;
}): Promise
```
Returns user transaction history (deposits, withdrawals, etc.).
## Get User Transfers
```typescript
sdk.getUserTransfers({
wallet: string;
chainId?: number;
vault?: string;
}): Promise
```
Returns vault share transfer history for a user.
## Get Staking Positions
```typescript
sdk.getStakingPositions(
wallet?: string,
chainId?: number
): Promise
```
Returns active reward staking positions.
## Examples
### Complete Vault Query
```typescript
const vault = await sdk.getVault({
vault: '0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42',
chainId: 1,
options: {
loans: true,
allocations: true,
wallet: '0xYourWallet...',
},
});
// Basic info
console.log(vault.name);
console.log(vault.version);
console.log(vault.apy.apy);
// Deposit options
console.log(
'Can deposit:',
vault.depositAssets.map((a) => a.symbol),
);
// User position
if (vault.position) {
console.log('Your balance:', vault.position.walletBalance.normalized);
console.log(
'Available redemptions:',
vault.position.availableRedemptions.length,
);
}
// Loans (if available)
if (vault.loans) {
console.log('Active loans:', vault.loans.length);
}
```
### Filter Vaults by Criteria
```typescript
const vaults = await sdk.getVaults();
// High APY vaults
const highYield = vaults.filter((v) => v.apy.apy > 10);
// Featured vaults
const featured = vaults.filter((v) => v.isFeatured);
// Active vaults only
const active = vaults.filter((v) => v.status === 'active');
// Vaults with deposits enabled
const depositable = vaults.filter((v) => !v.isDepositPaused);
// Multi-asset vaults
const multiAsset = vaults.filter((v) => v.version === 'evm-2');
```
### Check Deposit Options
```typescript
const vault = await sdk.getVault({
vault: '0x5Fde59415625401278c4d41C6beFCe3790eb357f',
chainId: 1,
});
// Show all deposit options to user
console.log('You can deposit:');
vault.depositAssets.forEach((asset) => {
console.log(`- ${asset.symbol} (${asset.address})`);
});
// Output:
// - wstETH (0x7f39...) <- Underlying
// - WETH (0xC02a...) <- Adapter
// - ETH (0x0000...) <- Adapter
```
## Error Handling
```typescript
try {
const vault = await sdk.getVault({
vault: vaultAddress,
chainId: 1,
});
} catch (error) {
if (error.message.includes('Missing RPC URL')) {
console.error('Configure RPC for this chain');
} else if (error.message.includes('not found')) {
console.error('Vault does not exist');
} else {
console.error('Failed to fetch vault:', error.message);
}
}
```
# ABIs
> Contract ABI definitions bundled with @upshiftfinance/sdk for interacting with Upshift smart contracts.
Contract ABI definitions for interacting with Upshift smart contracts.
## Variables
### ABI\_ADDRESS\_RESOLVER
> `const` **ABI\_ADDRESS\_RESOLVER**: readonly \[\{ `inputs`: readonly \[\{ `name`: `"name"`; `type`: `"bytes32"`; \}\]; `name`: `"addr"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"name"`; `type`: `"bytes32"`; \}, \{ `name`: `"coinType"`; `type`: `"uint256"`; \}\]; `name`: `"addr"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bytes"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_CHAINLINK\_V3
> `const` **ABI\_CHAINLINK\_V3**: readonly \[\{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"description"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint80"`; `name`: `"_roundId"`; `type`: `"uint80"`; \}\]; `name`: `"getRoundData"`; `outputs`: readonly \[\{ `internalType`: `"uint80"`; `name`: `"roundId"`; `type`: `"uint80"`; \}, \{ `internalType`: `"int256"`; `name`: `"answer"`; `type`: `"int256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"startedAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"updatedAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint80"`; `name`: `"answeredInRound"`; `type`: `"uint80"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"latestRoundData"`; `outputs`: readonly \[\{ `internalType`: `"uint80"`; `name`: `"roundId"`; `type`: `"uint80"`; \}, \{ `internalType`: `"int256"`; `name`: `"answer"`; `type`: `"int256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"startedAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"updatedAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint80"`; `name`: `"answeredInRound"`; `type`: `"uint80"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"version"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_CROSS\_CHAIN\_ERC20
> `const` **ABI\_CROSS\_CHAIN\_ERC20**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
ERC20 allowance + approve ABI for cross-chain approval checks
***
### ABI\_ERC20
> `const` **ABI\_ERC20**: readonly \[\{ `constant`: `true`; `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"string"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `constant`: `false`; `inputs`: readonly \[\{ `name`: `"_spender"`; `type`: `"address"`; \}, \{ `name`: `"_value"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bool"`; \}\]; `payable`: `false`; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `constant`: `true`; `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"uint256"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `constant`: `false`; `inputs`: readonly \[\{ `name`: `"_from"`; `type`: `"address"`; \}, \{ `name`: `"_to"`; `type`: `"address"`; \}, \{ `name`: `"_value"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bool"`; \}\]; `payable`: `false`; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `constant`: `true`; `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"uint8"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `constant`: `true`; `inputs`: readonly \[\{ `name`: `"_owner"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `name`: `"balance"`; `type`: `"uint256"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `constant`: `true`; `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"string"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `constant`: `false`; `inputs`: readonly \[\{ `name`: `"_to"`; `type`: `"address"`; \}, \{ `name`: `"_value"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bool"`; \}\]; `payable`: `false`; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `constant`: `true`; `inputs`: readonly \[\{ `name`: `"_owner"`; `type`: `"address"`; \}, \{ `name`: `"_spender"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"uint256"`; \}\]; `payable`: `false`; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `payable`: `true`; `stateMutability`: `"payable"`; `type`: `"fallback"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}\]
***
### ABI\_ERC20\_BYTES32
> `const` **ABI\_ERC20\_BYTES32**: readonly \[\{ `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}, \{ `name`: `"spender"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"spender"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"recipient"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; \}, \{ `name`: `"recipient"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
[bytes32-flavored ERC-20](https://docs.makerdao.com/smart-contract-modules/mkr-module#4.-gotchas-potential-source-of-user-error)
for tokens (ie. Maker) that use bytes32 instead of string.
***
### ABI\_ERC4626
> `const` **ABI\_ERC4626**: readonly \[\{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}, \{ `name`: `"spender"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"spender"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `name`: `"assetTokenAddress"`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"convertToAssets"`; `outputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"convertToShares"`; `outputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"caller"`; `type`: `"address"`; \}\]; `name`: `"maxDeposit"`; `outputs`: readonly \[\{ `name`: `"maxAssets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"caller"`; `type`: `"address"`; \}\]; `name`: `"maxMint"`; `outputs`: readonly \[\{ `name`: `"maxShares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}\]; `name`: `"maxRedeem"`; `outputs`: readonly \[\{ `name`: `"maxShares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}\]; `name`: `"maxWithdraw"`; `outputs`: readonly \[\{ `name`: `"maxAssets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"mint"`; `outputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewMint"`; `outputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedeem"`; `outputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewWithdraw"`; `outputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `name`: `"receiver"`; `type`: `"address"`; \}, \{ `name`: `"owner"`; `type`: `"address"`; \}\]; `name`: `"redeem"`; `outputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalAssets"`; `outputs`: readonly \[\{ `name`: `"totalManagedAssets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `name`: `"receiver"`; `type`: `"address"`; \}, \{ `name`: `"owner"`; `type`: `"address"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
[ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626)
***
### ABI\_ERC721
> `const` **ABI\_ERC721**: readonly \[\{ `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"operator"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `name`: `"approved"`; `type`: `"bool"`; \}\]; `name`: `"ApprovalForAll"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `indexed`: `true`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `name`: `"spender"`; `type`: `"address"`; \}, \{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"getApproved"`; `outputs`: readonly \[\{ `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}, \{ `name`: `"operator"`; `type`: `"address"`; \}\]; `name`: `"isApprovedForAll"`; `outputs`: readonly \[\{ `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"ownerOf"`; `outputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"safeTransferFrom"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"from"`; `type`: `"address"`; \}, \{ `name`: `"to"`; `type`: `"address"`; \}, \{ `name`: `"id"`; `type`: `"uint256"`; \}, \{ `name`: `"data"`; `type`: `"bytes"`; \}\]; `name`: `"safeTransferFrom"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"operator"`; `type`: `"address"`; \}, \{ `name`: `"approved"`; `type`: `"bool"`; \}\]; `name`: `"setApprovalForAll"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"index"`; `type`: `"uint256"`; \}\]; `name`: `"tokenByIndex"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"owner"`; `type`: `"address"`; \}, \{ `name`: `"index"`; `type`: `"uint256"`; \}\]; `name`: `"tokenByIndex"`; `outputs`: readonly \[\{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"tokenId"`; `type`: `"uint256"`; \}\]; `name`: `"tokenURI"`; `outputs`: readonly \[\{ `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"sender"`; `type`: `"address"`; \}, \{ `name`: `"recipient"`; `type`: `"address"`; \}, \{ `name`: `"tokeId"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}\]
[ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721)
***
### ABI\_FEE\_ORACLE
> `const` **ABI\_FEE\_ORACLE**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FEES_DIVISOR"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"categoryId"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"specificAddr"`; `type`: `"address"`; \}\]; `name`: `"getContextFeeAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"feePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"feeAmount"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"categoryId"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"specificAddr"`; `type`: `"address"`; \}\]; `name`: `"getContextFeeRate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"feePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"categoryId"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"specificAddr"`; `type`: `"address"`; \}\]; `name`: `"setContextFeeRate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
***
### ABI\_KYC\_REGISTRY
> `const` **ABI\_KYC\_REGISTRY**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"wallet"`; `type`: `"address"`; \}\]; `name`: `"statusOf"`; `outputs`: readonly \[\{ `internalType`: `"enum IKycRegistry.Status"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"wallet"`; `type`: `"address"`; \}\]; `name`: `"getRecord"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"bool"`; `name`: `"blocked"`; `type`: `"bool"`; \}, \{ `internalType`: `"uint256"`; `name`: `"verifiedAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"expiresAt"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"revokedAt"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IKycRegistry.Record"`; `name`: `""`; `type`: `"tuple"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"canEnter"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"ok"`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"canExit"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"ok"`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"isExempt"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"enum IKycRegistry.Status"`; `name`: `"status"`; `type`: `"uint8"`; \}\]; `name`: `"KycIneligible"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"wallet"`; `type`: `"address"`; \}\]; `name`: `"WalletBlocked"`; `type`: `"error"`; \}\]
ABI for the Upshift `KycRegistry` (one per chain): wallet status and record reads, the vault entry/exit checks, and the check-side errors.
***
### ABI\_LENDING\_POOL\_V2
> `const` **ABI\_LENDING\_POOL\_V2**: readonly \[\{ `inputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newFeeCollectorAddr"`; `type`: `"address"`; \}\]; `name`: `"FeeCollectorUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"aprWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"NewLoanDeployedByPool"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"withdrawalAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevValue"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"OnMaxSupplyChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"processedOn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"requestedOn"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spenderAddr"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"callbackPeriodInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"gracePeriodInSeconds"`; `type`: `"uint256"`; \}\]; `name`: `"callLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lateInterestFeeWithTwoDecimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"latePrincipalFeeWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeLateFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maintenanceCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeMaintenanceCollateralRatio"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newLagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"newUnderlyingAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newLoansOperator"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newLoansDeployerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newFeesCollectorAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newScheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"newProcessingHour"`; `type`: `"uint8"`; \}\]; `name`: `"configurePool"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"convertToAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"convertToShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"fundingPeriodInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newPaymentIntervalInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newLoanAmountInPrincipalTokens"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"originationFeePercent2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newAprWithTwoDecimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"initialCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maintenanceCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lateInterestFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"latePrincipalFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"expiryInfo"`; `type`: `"uint256"`; \}, \{ `internalType`: `"string"`; `name`: `"loanTypeInfo"`; `type`: `"string"`; \}, \{ `internalType`: `"address"`; `name`: `"lenderAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"borrowerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newCollateralToken"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newPrincipalToken"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"feesManagerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"priceOracleAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"feesCollectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"categoryFeesAdress"`; `type`: `"address"`; \}, \{ `internalType`: `"bool"`; `name`: `"allowSeizeCollateral"`; `type`: `"bool"`; \}\]; `internalType`: `"struct LoanDeploymentParams"`; `name`: `"loanParams"`; `type`: `"tuple"`; \}\]; `name`: `"deployLoan"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"contract IERC20"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesCollector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}\]; `name`: `"fundLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getClaimableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getInitializedVersion"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getTotalLoansDeployed"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLoansAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"erc20Decimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Symbol"`; `type`: `"string"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Name"`; `type`: `"string"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}\]; `name`: `"liquidate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"liquidationHour"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"loansDeployed"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loansDeployerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loansOperator"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operator"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"mint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"notifyLoanClosed"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"notifyLoanMatured"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"effectiveLoanAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"principalRepaid"`; `type`: `"uint256"`; \}\]; `name`: `"notifyPrincipalRepayment"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newAprWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"proposeNewApr"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"redeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newFeeCollectorAddr"`; `type`: `"address"`; \}\]; `name`: `"updateFeeCollector"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}\]; `name`: `"updateIssuanceLimits"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newWithdrawalFee"`; `type`: `"uint256"`; \}\]; `name`: `"updateWithdrawalFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_LENDING\_POOL\_V3
> `const` **ABI\_LENDING\_POOL\_V3**: readonly \[\{ `inputs`: readonly \[\]; `name`: `"AccountNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AddressBlacklisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountExceedsAllowance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountExceedsSenderBalance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetsAmountRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"BalanceCheckFailed"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"BurnAmountExceedsBalance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"CannotBlacklistOwner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"CollectorRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientAllowance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientBalance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientShares"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDepositLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidExternalAssets"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidHolder"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidMaxSupply"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOwner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidPercentage"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidWithdrawalLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"LimitRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxAllowedChangeReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxMintReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxSupplyLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NoSharesForReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NonZeroAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NonZeroAmountRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NothingToProcess"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OperatorOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"PoolAlreadyConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"PoolNotConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"PoolOwnerRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SettlementAccountNotSet"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SharesAmountRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TooEarly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TotalAssetsError"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalRequestRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalsPaused"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newFeeCollectorAddr"`; `type`: `"address"`; \}\]; `name`: `"FeeCollectorUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"FeesCollected"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"managementFeeAmount"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeCharged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"MaxChangePercentUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"OnAccountConfigured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"withdrawalAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevValue"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"OnMaxSupplyChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newAddr"`; `type`: `"address"`; \}\]; `name`: `"OperatorUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"processedOn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"requestedOn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"wasBlacklisted"`; `type`: `"bool"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"addToBlacklist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `"arr"`; `type`: `"address[]"`; \}\]; `name`: `"addWhitelistedSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spenderAddr"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargeManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newLagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxChangePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"newUnderlyingAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newFeesCollectorAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newScheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newOperatorAddress"`; `type`: `"address"`; \}\]; `name`: `"configure"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"convertToAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"convertToShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"depositToSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"contract IERC20"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"externalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesCollector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesTimestamp"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getChangePercentage"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getClaimableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getInitializedVersion"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getMaxAllowedChange"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"erc20Decimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Symbol"`; `type`: `"string"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Name"`; `type`: `"string"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"instantRedeem"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"instantRedemptionFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"isBlacklisted"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"managementFeePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxChangePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"mint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operator"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewInstantRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"redeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"removeFromBlacklist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `"arr"`; `type`: `"address[]"`; \}\]; `name`: `"removeWhitelistedSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"settlementAccount"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalWhitelistedSubAccounts"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newFeeCollectorAddr"`; `type`: `"address"`; \}\]; `name`: `"updateFeeCollector"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newFee"`; `type`: `"uint256"`; \}\]; `name`: `"updateInstantRedemptionFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}\]; `name`: `"updateIssuanceLimits"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"updateManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"updateMaxChangePercent"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"updateOperator"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"updateSettlementAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"updateTotalAssets"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newWithdrawalFee"`; `type`: `"uint256"`; \}\]; `name`: `"updateWithdrawalFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"whitelistedSubAccounts"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"withdrawFromSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_LENDING\_POOLS
> `const` **ABI\_LENDING\_POOLS**: readonly \[\{ `inputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"aprWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"NewLoanDeployedByPool"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"withdrawalAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevValue"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"OnMaxSupplyChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"processedOn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"requestedOn"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spenderAddr"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"callbackPeriodInHours"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"gracePeriodInHours"`; `type`: `"uint256"`; \}\]; `name`: `"callLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lateInterestFeeWithTwoDecimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"latePrincipalFeeWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeLateFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maintenanceCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeMaintenanceCollateralRatio"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newLagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"newUnderlyingAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newLoansOperator"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newLoansDeployerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newFeesCollectorAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newScheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"newProcessingHour"`; `type`: `"uint8"`; \}\]; `name`: `"configurePool"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"convertToAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"convertToShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"fundingPeriodInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newPaymentIntervalInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newLoanAmountInPrincipalTokens"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"originationFeePercent2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newAprWithTwoDecimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"initialCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maintenanceCollateralRatioWith2Decimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lateInterestFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"latePrincipalFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"expiryInfo"`; `type`: `"uint256"`; \}, \{ `internalType`: `"string"`; `name`: `"loanTypeInfo"`; `type`: `"string"`; \}, \{ `internalType`: `"address"`; `name`: `"lenderAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"borrowerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newCollateralToken"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newPrincipalToken"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"feesManagerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"priceOracleAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"feesCollectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"categoryFeesAdress"`; `type`: `"address"`; \}, \{ `internalType`: `"bool"`; `name`: `"allowSeizeCollateral"`; `type`: `"bool"`; \}\]; `internalType`: `"struct LoanDeploymentParams"`; `name`: `"loanParams"`; `type`: `"tuple"`; \}\]; `name`: `"deployLoan"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"contract IERC20"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"destinationAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesCollector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}\]; `name`: `"fundLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getClaimableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getInitializedVersion"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getTotalLoansDeployed"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLoansAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"erc20Decimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Symbol"`; `type`: `"string"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Name"`; `type`: `"string"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}\]; `name`: `"liquidate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"liquidationHour"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"loansDeployed"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loansDeployerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loansOperator"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operator"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"maxWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"mint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"notifyLoanClosed"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"notifyLoanMatured"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"effectiveLoanAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"principalRepaid"`; `type`: `"uint256"`; \}\]; `name`: `"notifyPrincipalRepayment"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}\]; `name`: `"previewWithdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"loanAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newAprWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"proposeNewApr"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"redeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxTokenSupply"`; `type`: `"uint256"`; \}\]; `name`: `"updateIssuanceLimits"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newWithdrawalFee"`; `type`: `"uint256"`; \}\]; `name`: `"updateWithdrawalFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_LOAN
> `const` **ABI\_LOAN**: readonly \[\{ `inputs`: readonly \[\]; `name`: `"LIQUIDATE_LOAN_COLLATERAL_CATEGORY"`; `outputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"REPAY_INTERESTS_CATEGORY"`; `outputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"acceptApr"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"aprUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"borrower"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"borrowerCommitment"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"callbackPeriodInSeconds"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"gracePeriodInSeconds"`; `type`: `"uint256"`; \}\]; `name`: `"callLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"callbackDeadline"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"canSeizeCollateral"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"lateInterestFeeWithTwoDecimals"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"latePrincipalFeeWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeLateFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newRatioWith2Decimals"`; `type`: `"uint256"`; \}\]; `name`: `"changeMaintenanceCollateralRatio"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOracleAddr"`; `type`: `"address"`; \}\]; `name`: `"changeOracle"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"claimCollateral"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collateralAmountSeized"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collateralToken"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"currentApr"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"cycleInterestsRepaid"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"deployedBy"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"effectiveLoanAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"expiryInfo"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesCollector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesOracle"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"principalPrice"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"principalQty"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"collateralPrice"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"collateralDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"fromTokenToToken"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"fundLoan"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"fundedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"fundingDeadline"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"fundingPeriod"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getCollateralRequirements"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"initialCollateralAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maintenanceCollateralAmount"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getDebt"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"currentBillingCycle"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"cyclesSinceLastAprUpdate"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"interestOwed"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"applicableLateFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minPaymentAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxPaymentAmount"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getNextPaymentDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"paymentAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getUpcomingAmountAfterFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"upcomingPaymentAmountAfterFees"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"upcomingNetDebtAfterFees"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"initialCollateralRatio"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lateInterestFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"latePrincipalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lender"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"liquidate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loanAmountInPrincipalTokens"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loanState"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"loanTypeInfo"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maintenanceCollateralRatio"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"manager"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"minInterestAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"paymentIntervalInSeconds"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"priceOracle"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"principalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"principalRepaid"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"principalToken"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newAprWithTwoDecimals"`; `type`: `"uint256"`; \}\]; `name`: `"proposeNewApr"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"proposedApr"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"paymentAmount"`; `type`: `"uint256"`; \}\]; `name`: `"repay"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"repayInterests"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"paymentAmountInTokens"`; `type`: `"uint256"`; \}\]; `name`: `"repayPrincipal"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}\]; `name`: `"returnCollateral"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"seizeCollateral"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newFeesCollector"`; `type`: `"address"`; \}\]; `name`: `"setFeesCollector"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newFeesOracle"`; `type`: `"address"`; \}\]; `name`: `"setFeesOracle"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalInterestPaymentFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalInterestRepaid"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newExpiryInfo"`; `type`: `"uint256"`; \}, \{ `internalType`: `"string"`; `name`: `"newLoanTypeInfo"`; `type`: `"string"`; \}\]; `name`: `"updateInfo"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"oldApr"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newApr"`; `type`: `"uint256"`; \}\]; `name`: `"OnAprAcceptedByBorrower"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"OnBorrowerCommitment"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"numberOfTokens"`; `type`: `"uint256"`; \}\]; `name`: `"OnBorrowerWithdrawal"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"OnCollateralCaptured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"collateralClaimed"`; `type`: `"uint256"`; \}\]; `name`: `"OnCollateralClaimed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevValue"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"OnCollateralRatioChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}\]; `name`: `"OnCollateralRedeposited"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"feePercent"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"feeAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}\]; `name`: `"OnFeeProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"paymentAmountTokens"`; `type`: `"uint256"`; \}\]; `name`: `"OnInterestsRepayment"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevLateInterestFee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newLateInterestFee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"prevLatePrincipalFee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newLatePrincipalFee"`; `type`: `"uint256"`; \}\]; `name`: `"OnLateFeesChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"callbackPeriodInHours"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"gracePeriodInHours"`; `type`: `"uint256"`; \}\]; `name`: `"OnLoanCalled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"OnLoanClosed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"OnLoanFunded"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"OnLoanMatured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"oldApr"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newApr"`; `type`: `"uint256"`; \}\]; `name`: `"OnNewAprProposed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"prevAddress"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newAddress"`; `type`: `"address"`; \}\]; `name`: `"OnPriceOracleChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"paymentAmountTokens"`; `type`: `"uint256"`; \}\]; `name`: `"OnPrincipalRepayment"`; `type`: `"event"`; \}\]
***
### ABI\_MULTI\_ASSET\_NATIVE\_DEPOSIT\_WRAPPER
> `const` **ABI\_MULTI\_ASSET\_NATIVE\_DEPOSIT\_WRAPPER**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"contract IWETH"`; `name`: `"_wrappedToken"`; `type`: `"address"`; \}, \{ `internalType`: `"contract IOraclizedMultiAssetVault"`; `name`: `"_vault"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"depositNative"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositNative"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"vault"`; `outputs`: readonly \[\{ `internalType`: `"contract IOraclizedMultiAssetVault"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"wrappedToken"`; `outputs`: readonly \[\{ `internalType`: `"contract IWETH"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"caller"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountInNative"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"sharesOut"`; `type`: `"uint256"`; \}\]; `name`: `"DepositNative"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAmount"`; `type`: `"error"`; \}\]
***
### ABI\_MULTI\_ASSET\_PREVIEW\_DEPOSIT
> `const` **ABI\_MULTI\_ASSET\_PREVIEW\_DEPOSIT**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
Multi-asset vault previewDeposit ABI.
Uses `previewDeposit(address, uint256)` instead of standard ERC4626's
`previewDeposit(uint256)` to specify which asset is being deposited.
***
### ABI\_MULTI\_ASSET\_PREVIEW\_REDEEM
> `const` **ABI\_MULTI\_ASSET\_PREVIEW\_REDEEM**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"isInstant"`; `type`: `"bool"`; \}\]; `name`: `"previewRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assetsAfterFee"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
Multi-asset vault previewRedemption ABI.
Uses `previewRedemption(uint256, bool)` to preview redeem output
with an `isInstant` flag.
***
### ABI\_MULTICALL3
> `const` **ABI\_MULTICALL3**: readonly \[\{ `inputs`: readonly \[\{ `components`: readonly \[\{ `name`: `"target"`; `type`: `"address"`; \}, \{ `name`: `"allowFailure"`; `type`: `"bool"`; \}, \{ `name`: `"callData"`; `type`: `"bytes"`; \}\]; `name`: `"calls"`; `type`: `"tuple[]"`; \}\]; `name`: `"aggregate3"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `name`: `"success"`; `type`: `"bool"`; \}, \{ `name`: `"returnData"`; `type`: `"bytes"`; \}\]; `name`: `"returnData"`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_POOL\_ADAPTER
> `const` **ABI\_POOL\_ADAPTER**: readonly \[\{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountOut"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"srcToken"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"dstToken"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"bridgeId"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes"`; `name`: `"quoteData"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct PoolAdapter.SwapAndDepositParams"`; `name`: `"params"`; `type`: `"tuple"`; \}\]; `name`: `"swapAndDeposit"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
***
### ABI\_REWARD\_DISTRIBUTOR
> `const` **ABI\_REWARD\_DISTRIBUTOR**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"_rewardsPerSecond"`; `type`: `"uint256"`; \}, \{ `internalType`: `"contract IERC20"`; `name`: `"_stakingToken"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `stateMutability`: `"payable"`; `type`: `"receive"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"earned"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getReward"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lastUpdateTime"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"rewardPerTokenStored"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"rewards"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"rewardsPerSecond"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"_rewardsPerSecond"`; `type`: `"uint256"`; \}\]; `name`: `"setRewardRate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"stake"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"stakingToken"`; `outputs`: readonly \[\{ `internalType`: `"contract IERC20"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalStaked"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"userRewardPerTokenPaid"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Received"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"user"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"reward"`; `type`: `"uint256"`; \}\]; `name`: `"RewardPaid"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newRate"`; `type`: `"uint256"`; \}\]; `name`: `"RewardRateUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"user"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"Staked"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"user"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"Withdrawn"`; `type`: `"event"`; \}\]
***
### ABI\_STANDARD\_PREVIEW\_REDEEM
> `const` **ABI\_STANDARD\_PREVIEW\_REDEEM**: readonly \[\{ `inputs`: readonly \[\{ `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedeem"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
Standard ERC4626 previewRedeem ABI.
***
### ABI\_SWAP\_ROUTER
> `const` **ABI\_SWAP\_ROUTER**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"newFeesCollectorAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"wrappedNativeTokenAddr"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"BPS_DENOMINATOR"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_ORIGIN_FEE_BPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_SWAPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_SWAP_FEE_BPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NATIVE_TOKEN_ADDRESS"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VAULT_TYPE_ERC4626"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VAULT_TYPE_TOKENIZED_VAULT_V2"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"originFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}\]; `name`: `"addOrigin"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"vaultType"`; `type`: `"uint8"`; \}, \{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"vaultType"`; `type`: `"uint8"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"depositNativeToken"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes4"`; `name`: `"authorizedSelector"`; `type`: `"bytes4"`; \}\]; `name`: `"disableRouter"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"disableToken"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"tokenApprovalAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes4"`; `name`: `"authorizedSelector"`; `type`: `"bytes4"`; \}\]; `name`: `"enableRouter"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"contract IERC20Metadata"`; `name`: `"token"`; `type`: `"address"`; \}\]; `name`: `"enableToken"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesCollector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes4"`; `name`: `"selector"`; `type`: `"bytes4"`; \}\]; `name`: `"isAuthorizedSelector"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"isPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `name`: `"origins"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"originFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"pause"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}\]; `name`: `"revokeOrigin"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"swapFee"`; `type`: `"uint256"`; \}\]; `name`: `"setVaultSwapFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"vaultType"`; `type`: `"uint8"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenIn"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"tokenOut"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountOut"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"router"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes"`; `name`: `"payload"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct ISwapRouter.SwapParams[]"`; `name`: `"swapParams"`; `type`: `"tuple[]"`; \}\]; `name`: `"swapAndDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"vaultType"`; `type`: `"uint8"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"swapAndDepositNativeToken"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"tokenTransferProxies"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"unPause"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newFeesCollectorAddr"`; `type`: `"address"`; \}\]; `name`: `"updateFeesCollector"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"originFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}\]; `name`: `"updateOrigin"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"vaultSwapFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"whitelistedTokens"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"wrappedNativeTokenAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"ContractPaused"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"ContractResumed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"grossAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"depositedAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"originFeeBps"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"originFeeAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"swapFeeAmount"`; `type`: `"uint256"`; \}\]; `name`: `"DepositRouted"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newAddr"`; `type`: `"address"`; \}\]; `name`: `"FeesCollectorUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"originFee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}\]; `name`: `"OriginAdded"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}\]; `name`: `"OriginRevoked"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"originCode"`; `type`: `"bytes32"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"originFee"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"originFeeCollector"`; `type`: `"address"`; \}\]; `name`: `"OriginUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"ResidualBalanceSwept"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"ResidualRefund"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}\]; `name`: `"RouterPathDisabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"tokenApprovalAddr"`; `type`: `"address"`; \}\]; `name`: `"RouterPathEnabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"TokenDisabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"TokenEnabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"swapFee"`; `type`: `"uint256"`; \}\]; `name`: `"VaultSwapFeeUpdated"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetNotAcceptedByVault"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ContractIsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ContractNotPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"EmptySwapParams"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeesCollectorNoOp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"InputTokenNotSwapped"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"InputTokenNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidErc20Token"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidFeeCollector"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOrigin"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidPair"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidPayload"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidRouter"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"tokenApprovalAddr"`; `type`: `"address"`; \}\]; `name`: `"InvalidRouterPath"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidVault"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidVaultType"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MissingSlippageProtection"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NativeReferenceAssetNotSupported"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NativeSwapFailed"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NativeTokenTransferFailed"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OriginAlreadyExists"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OriginFeeTooHigh"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OriginFeeTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OutputTokenCannotBeNativeToken"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}\]; `name`: `"OutputTokenNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"routerAddr"`; `type`: `"address"`; \}\]; `name`: `"RouterPathAlreadyDisabled"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SelectorRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountOut"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountOut"`; `type`: `"uint256"`; \}\]; `name`: `"SlippageError"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes"`; `name`: `"returnData"`; `type`: `"bytes"`; \}\]; `name`: `"SwapFailed"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SwapFeeAmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SwapFeeTooHigh"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokenAlreadyDisabled"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokenAlreadyEnabled"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TooManySwaps"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAmount"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroSharesReceived"`; `type`: `"error"`; \}\]
ABI for the Upshift `SwapRouter` periphery contract (v2: vault type passed per deposit, per-vault swap fees, `DepositRouted` event).
***
### ABI\_TEXT\_RESOLVER
> `const` **ABI\_TEXT\_RESOLVER**: readonly \[\{ `inputs`: readonly \[\{ `name`: `"name"`; `type`: `"bytes32"`; \}, \{ `name`: `"key"`; `type`: `"string"`; \}\]; `name`: `"text"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2
> `const` **ABI\_TOKENIZED\_VAULT\_V2**: readonly \[\{ `inputs`: readonly \[\]; `name`: `"depositCap"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AccountNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AlreadyConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"remaining"`; `type`: `"uint256"`; \}\]; `name`: `"CollectableFeesExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeeAmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeesMustSum100"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkDurationError"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkViolation"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientShares"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAccountType"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAmount"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidExternalAssets"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidLagDuration"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"LimitRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxAllowedChangeReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxDepositAmountReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MissingFeeCollectors"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NoSharesForReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NotConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NothingToProcess"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyOwnerOrOperator"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OperatorOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReferenceAssetMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SenderNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokenDecimalsMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TooEarly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"Unauthorized"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VaultNotTimelocked"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WhitelistLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddressError"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"ContractConfigured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"senderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"FeesCollected"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"managementFeeAmount"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeCharged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"MaxChangePercentUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferStarted"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"SendersWhitelistUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountDisabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountEnabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"acceptOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargeManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargePerformanceFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"maxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"instantRedemptionFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"withdrawalFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"watermarkTimeWindow"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxChangePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"managementFeePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"performanceFeeRate"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"sendersWhitelistAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"operatorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"scheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"lpTokenAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"referenceAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"futureOwnerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"assetsWhitelistAddress"`; `type`: `"address"`; \}\]; `internalType`: `"struct ITokenizedVault.ConfigInfo"`; `name`: `"newConfig"`; `type`: `"tuple"`; \}\]; `name`: `"configure"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"depositToSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"disableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"accountType"`; `type`: `"uint8"`; \}\]; `name`: `"enableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"externalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"feeCollectors"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesTimestamp"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getChangePercentage"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getFeeCollectors"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getMaxAllowedChange"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getPerformanceFeeRecipients"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getSharePrice"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getTotalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"highWatermark"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"instantRedeem"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"instantRedemptionFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lpTokenAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"managementFeePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxChangePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operatorAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"pendingOwner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"performanceFeeRate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"performanceFeeRecipients"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"isInstant"`; `type`: `"bool"`; \}\]; `name`: `"previewRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assetsAfterFee"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"sendersWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateAssetsWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updateFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"updateManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"updateMaxChangePercent"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updatePerformanceFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateSendersWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"updateTotalAssets"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkTimeWindow"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"whitelistedSubAccounts"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"withdrawFromSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2\_DEPOSIT\_WITH\_PERMIT
> `const` **ABI\_TOKENIZED\_VAULT\_V2\_DEPOSIT\_WITH\_PERMIT**: readonly \[\{ `inputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"acceptOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargeManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargePerformanceFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"maxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"instantRedemptionFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"withdrawalFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"watermarkTimeWindow"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxChangePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"managementFeePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"performanceFeeRate"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"sendersWhitelistAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"operatorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"scheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"lpTokenAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"referenceAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"futureOwnerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"assetsWhitelistAddress"`; `type`: `"address"`; \}\]; `internalType`: `"struct ITokenizedVault.ConfigInfo"`; `name`: `"newConfig"`; `type`: `"tuple"`; \}\]; `name`: `"configure"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositCap"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"depositToSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"deadline"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"r"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"s"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint8"`; `name`: `"v"`; `type`: `"uint8"`; \}\]; `name`: `"depositWithPermit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"disableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"accountType"`; `type`: `"uint8"`; \}\]; `name`: `"enableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"externalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"feeCollectors"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesTimestamp"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getChangePercentage"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getFeeCollectors"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getMaxAllowedChange"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getPerformanceFeeRecipients"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getSharePrice"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getTotalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"highWatermark"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"instantRedeem"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"instantRedemptionFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"keepFeeInVault"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lpTokenAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"managementFeePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxChangePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operatorAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"pendingOwner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"performanceFeeRate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"performanceFeeRecipients"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"isInstant"`; `type`: `"bool"`; \}\]; `name`: `"previewRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assetsAfterFee"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"sendersWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateAssetsWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updateFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"pKeepFeeInVault"`; `type`: `"bool"`; \}\]; `name`: `"updateInstantRedemptionFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newDepositCap"`; `type`: `"uint256"`; \}\]; `name`: `"updateLimits"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"updateManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"updateMaxChangePercent"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updatePerformanceFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateSendersWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"updateTotalAssets"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkTimeWindow"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"whitelistedSubAccounts"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"withdrawFromSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"ContractConfigured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"senderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"FeesCollected"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"managementFeeAmount"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeCharged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"MaxChangePercentUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferStarted"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"SendersWhitelistUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountDisabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountEnabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AccountNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AlreadyConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"remaining"`; `type`: `"uint256"`; \}\]; `name`: `"CollectableFeesExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositCapReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeeAmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeesMustSum100"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkDurationError"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkViolation"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientShares"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAccountType"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAmount"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDepositLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidExternalAssets"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidLagDuration"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidWithdrawalLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"LimitRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxAllowedChangeReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxDepositAmountReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MissingFeeCollectors"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NoSharesForReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NotConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NothingToProcess"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyOwnerOrOperator"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OperatorOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReferenceAssetMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SenderNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokenDecimalsMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TooEarly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"Unauthorized"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VaultNotTimelocked"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WhitelistLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddressError"`; `type`: `"error"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2\_RECEIPT
> `const` **ABI\_TOKENIZED\_VAULT\_V2\_RECEIPT**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_lzEndpoint"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AlreadyConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"allowance"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"needed"`; `type`: `"uint256"`; \}\]; `name`: `"ERC20InsufficientAllowance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"balance"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"needed"`; `type`: `"uint256"`; \}\]; `name`: `"ERC20InsufficientBalance"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"approver"`; `type`: `"address"`; \}\]; `name`: `"ERC20InvalidApprover"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}\]; `name`: `"ERC20InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}\]; `name`: `"ERC20InvalidSender"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}\]; `name`: `"ERC20InvalidSpender"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ExpiredDeadline"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDelegate"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDomainSeparator"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidEndpointCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidEpoch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidInitialization"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidLocalDecimals"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes"`; `name`: `"options"`; `type`: `"bytes"`; \}\]; `name`: `"InvalidOptions"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidSignature"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidSignatureComponentS"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidSigner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"LzTokenUnavailable"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"eid"`; `type`: `"uint32"`; \}\]; `name`: `"NoPeer"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NotConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"msgValue"`; `type`: `"uint256"`; \}\]; `name`: `"NotEnoughNative"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NotInitializing"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"OnlyEndpoint"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}\]; `name`: `"OnlyPeer"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlySelf"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}\]; `name`: `"OwnableInvalidOwner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"OwnableUnauthorizedAccount"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}\]; `name`: `"SafeERC20FailedOperation"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bytes"`; `name`: `"result"`; `type`: `"bytes"`; \}\]; `name`: `"SimulationResult"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountLD"`; `type`: `"uint256"`; \}\]; `name`: `"SlippageExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokensLocked"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"Unauthorized"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"UnauthorizedBurner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"UnauthorizedMinter"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddress"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Approval"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"EIP712DomainChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"uint16"`; `name`: `"msgType"`; `type`: `"uint16"`; \}, \{ `internalType`: `"bytes"`; `name`: `"options"`; `type`: `"bytes"`; \}\]; `indexed`: `false`; `internalType`: `"struct EnforcedOptionParam[]"`; `name`: `"_enforcedOptions"`; `type`: `"tuple[]"`; \}\]; `name`: `"EnforcedOptionSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint64"`; `name`: `"version"`; `type`: `"uint64"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"inspector"`; `type`: `"address"`; \}\]; `name`: `"MsgInspectorSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"guid"`; `type`: `"bytes32"`; \}, \{ `indexed`: `false`; `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"toAddress"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountReceivedLD"`; `type`: `"uint256"`; \}\]; `name`: `"OFTReceived"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"bytes32"`; `name`: `"guid"`; `type`: `"bytes32"`; \}, \{ `indexed`: `false`; `internalType`: `"uint32"`; `name`: `"dstEid"`; `type`: `"uint32"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"fromAddress"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountSentLD"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountReceivedLD"`; `type`: `"uint256"`; \}\]; `name`: `"OFTSent"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"untilEpoch"`; `type`: `"uint256"`; \}\]; `name`: `"OnTokensLocked"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"OnTokensUnLocked"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferStarted"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint32"`; `name`: `"eid"`; `type`: `"uint32"`; \}, \{ `indexed`: `false`; `internalType`: `"bytes32"`; `name`: `"peer"`; `type`: `"bytes32"`; \}\]; `name`: `"PeerSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"preCrimeAddress"`; `type`: `"address"`; \}\]; `name`: `"PreCrimeSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}\]; `name`: `"Transfer"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DOMAIN_SEPARATOR"`; `outputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"PERMIT_TYPEHASH"`; `outputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SEND"`; `outputs`: readonly \[\{ `internalType`: `"uint16"`; `name`: `""`; `type`: `"uint16"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SEND_AND_CALL"`; `outputs`: readonly \[\{ `internalType`: `"uint16"`; `name`: `""`; `type`: `"uint16"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"acceptOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `internalType`: `"struct Origin"`; `name`: `"origin"`; `type`: `"tuple"`; \}\]; `name`: `"allowInitializePath"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}\]; `name`: `"allowance"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"approvalRequired"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"spender"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"approve"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"account"`; `type`: `"address"`; \}\]; `name`: `"balanceOf"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"burn"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"burners"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"_eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"uint16"`; `name`: `"_msgType"`; `type`: `"uint16"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_extraOptions"`; `type`: `"bytes"`; \}\]; `name`: `"combineOptions"`; `outputs`: readonly \[\{ `internalType`: `"bytes"`; `name`: `""`; `type`: `"bytes"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `"newMinters"`; `type`: `"address[]"`; \}, \{ `internalType`: `"address[]"`; `name`: `"newBurners"`; `type`: `"address[]"`; \}\]; `name`: `"configure"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimalConversionRate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"decimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"eip712Domain"`; `outputs`: readonly \[\{ `internalType`: `"bytes1"`; `name`: `"fields"`; `type`: `"bytes1"`; \}, \{ `internalType`: `"string"`; `name`: `"domainName"`; `type`: `"string"`; \}, \{ `internalType`: `"string"`; `name`: `"domainVersion"`; `type`: `"string"`; \}, \{ `internalType`: `"uint256"`; `name`: `"chainId"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"verifyingContract"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"salt"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256[]"`; `name`: `"extensions"`; `type`: `"uint256[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"endpoint"`; `outputs`: readonly \[\{ `internalType`: `"contract ILayerZeroEndpointV2"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"_eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"uint16"`; `name`: `"_msgType"`; `type`: `"uint16"`; \}\]; `name`: `"enforcedOptions"`; `outputs`: readonly \[\{ `internalType`: `"bytes"`; `name`: `""`; `type`: `"bytes"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwnerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"erc20Decimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Symbol"`; `type`: `"string"`; \}, \{ `internalType`: `"string"`; `name`: `"erc20Name"`; `type`: `"string"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `internalType`: `"struct Origin"`; `name`: `""`; `type`: `"tuple"`; \}, \{ `internalType`: `"bytes"`; `name`: `""`; `type`: `"bytes"`; \}, \{ `internalType`: `"address"`; `name`: `"_sender"`; `type`: `"address"`; \}\]; `name`: `"isComposeMsgSender"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"_eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"_peer"`; `type`: `"bytes32"`; \}\]; `name`: `"isPeer"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"untilEpoch"`; `type`: `"uint256"`; \}\]; `name`: `"lockTokens"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `internalType`: `"struct Origin"`; `name`: `"_origin"`; `type`: `"tuple"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"_guid"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_message"`; `type`: `"bytes"`; \}, \{ `internalType`: `"address"`; `name`: `"_executor"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_extraData"`; `type`: `"bytes"`; \}\]; `name`: `"lzReceive"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `internalType`: `"struct Origin"`; `name`: `"origin"`; `type`: `"tuple"`; \}, \{ `internalType`: `"uint32"`; `name`: `"dstEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"guid"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"executor"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes"`; `name`: `"message"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"extraData"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct InboundPacket[]"`; `name`: `"_packets"`; `type`: `"tuple[]"`; \}\]; `name`: `"lzReceiveAndRevert"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"srcEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"sender"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `internalType`: `"struct Origin"`; `name`: `"_origin"`; `type`: `"tuple"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"_guid"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_message"`; `type`: `"bytes"`; \}, \{ `internalType`: `"address"`; `name`: `"_executor"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_extraData"`; `type`: `"bytes"`; \}\]; `name`: `"lzReceiveSimulate"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"mint"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"minters"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"msgInspector"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"name"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `""`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `name`: `"nextNonce"`; `outputs`: readonly \[\{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"nonces"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"oApp"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"oAppVersion"`; `outputs`: readonly \[\{ `internalType`: `"uint64"`; `name`: `"senderVersion"`; `type`: `"uint64"`; \}, \{ `internalType`: `"uint64"`; `name`: `"receiverVersion"`; `type`: `"uint64"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"oftVersion"`; `outputs`: readonly \[\{ `internalType`: `"bytes4"`; `name`: `"interfaceId"`; `type`: `"bytes4"`; \}, \{ `internalType`: `"uint64"`; `name`: `"version"`; `type`: `"uint64"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"_eid"`; `type`: `"uint32"`; \}\]; `name`: `"peers"`; `outputs`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `""`; `type`: `"bytes32"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"pendingOwner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"spenderAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"value"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"deadline"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint8"`; `name`: `"v"`; `type`: `"uint8"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"r"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"s"`; `type`: `"bytes32"`; \}\]; `name`: `"permit"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"preCrime"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"dstEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"to"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes"`; `name`: `"extraOptions"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"composeMsg"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"oftCmd"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct SendParam"`; `name`: `"_sendParam"`; `type`: `"tuple"`; \}\]; `name`: `"quoteOFT"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"minAmountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxAmountLD"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct OFTLimit"`; `name`: `"oftLimit"`; `type`: `"tuple"`; \}, \{ `components`: readonly \[\{ `internalType`: `"int256"`; `name`: `"feeAmountLD"`; `type`: `"int256"`; \}, \{ `internalType`: `"string"`; `name`: `"description"`; `type`: `"string"`; \}\]; `internalType`: `"struct OFTFeeDetail[]"`; `name`: `"oftFeeDetails"`; `type`: `"tuple[]"`; \}, \{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amountSentLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountReceivedLD"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct OFTReceipt"`; `name`: `"oftReceipt"`; `type`: `"tuple"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"dstEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"to"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes"`; `name`: `"extraOptions"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"composeMsg"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"oftCmd"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct SendParam"`; `name`: `"_sendParam"`; `type`: `"tuple"`; \}, \{ `internalType`: `"bool"`; `name`: `"_payInLzToken"`; `type`: `"bool"`; \}\]; `name`: `"quoteSend"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"nativeFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lzTokenFee"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct MessagingFee"`; `name`: `"msgFee"`; `type`: `"tuple"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"renounceOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"dstEid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"to"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minAmountLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes"`; `name`: `"extraOptions"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"composeMsg"`; `type`: `"bytes"`; \}, \{ `internalType`: `"bytes"`; `name`: `"oftCmd"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct SendParam"`; `name`: `"_sendParam"`; `type`: `"tuple"`; \}, \{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"nativeFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lzTokenFee"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct MessagingFee"`; `name`: `"_fee"`; `type`: `"tuple"`; \}, \{ `internalType`: `"address"`; `name`: `"_refundAddress"`; `type`: `"address"`; \}\]; `name`: `"send"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"bytes32"`; `name`: `"guid"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint64"`; `name`: `"nonce"`; `type`: `"uint64"`; \}, \{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"nativeFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lzTokenFee"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct MessagingFee"`; `name`: `"fee"`; `type`: `"tuple"`; \}\]; `internalType`: `"struct MessagingReceipt"`; `name`: `"msgReceipt"`; `type`: `"tuple"`; \}, \{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amountSentLD"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountReceivedLD"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct OFTReceipt"`; `name`: `"oftReceipt"`; `type`: `"tuple"`; \}\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_delegate"`; `type`: `"address"`; \}\]; `name`: `"setDelegate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"uint16"`; `name`: `"msgType"`; `type`: `"uint16"`; \}, \{ `internalType`: `"bytes"`; `name`: `"options"`; `type`: `"bytes"`; \}\]; `internalType`: `"struct EnforcedOptionParam[]"`; `name`: `"_enforcedOptions"`; `type`: `"tuple[]"`; \}\]; `name`: `"setEnforcedOptions"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_msgInspector"`; `type`: `"address"`; \}\]; `name`: `"setMsgInspector"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint32"`; `name`: `"_eid"`; `type`: `"uint32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"_peer"`; `type`: `"bytes32"`; \}\]; `name`: `"setPeer"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_preCrime"`; `type`: `"address"`; \}\]; `name`: `"setPreCrime"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"sharedDecimals"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"pure"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"symbol"`; `outputs`: readonly \[\{ `internalType`: `"string"`; `name`: `""`; `type`: `"string"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"token"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalSupply"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transfer"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"from"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"transferFrom"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}\]; `name`: `"unlockTokens"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2\_SENDER\_ALLOCATION\_WHITELIST
> `const` **ABI\_TOKENIZED\_VAULT\_V2\_SENDER\_ALLOCATION\_WHITELIST**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"attempted"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"limit"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"alreadyDeposited"`; `type`: `"uint256"`; \}\]; `name`: `"AllocationExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ArrayLengthMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"BatchSizeExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"EmptyBatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidBps"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReceiverNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"UnauthorizedRecorder"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"oldBps"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newBps"`; `type`: `"uint256"`; \}\]; `name`: `"AllocationSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"recorder"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"authorized"`; `type`: `"bool"`; \}\]; `name`: `"AuthorizedRecorderSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newDeposited"`; `type`: `"uint256"`; \}\]; `name`: `"DepositRecorded"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"oldAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"admin"`; `type`: `"address"`; \}\]; `name`: `"DepositedSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newDeposited"`; `type`: `"uint256"`; \}\]; `name`: `"WithdrawalRecorded"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_BATCH_SIZE"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_BPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"allocationBps"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"authorizedRecorders"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"checkAndRecordDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDeposited"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"deposited"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"disableSender"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"enableSender"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"getAllocationBps"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getAuthorizedRecorders"`; `outputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `""`; `type`: `"address[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"getDeposited"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositCapAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getRemainingAllocation"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"isWhitelisted"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"recordWithdrawal"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"bps"`; `type`: `"uint256"`; \}\]; `name`: `"setAllocation"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `"addrs"`; `type`: `"address[]"`; \}, \{ `internalType`: `"uint256[]"`; `name`: `"bpsValues"`; `type`: `"uint256[]"`; \}\]; `name`: `"setAllocationBatch"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"recorder"`; `type`: `"address"`; \}, \{ `internalType`: `"bool"`; `name`: `"authorized"`; `type`: `"bool"`; \}\]; `name`: `"setAuthorizedRecorder"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"setDeposited"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `"addrs"`; `type`: `"address[]"`; \}, \{ `internalType`: `"uint256[]"`; `name`: `"amounts"`; `type`: `"uint256[]"`; \}\]; `name`: `"setDepositedBatch"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2\_WHITELISTED\_ALLOCATION
> `const` **ABI\_TOKENIZED\_VAULT\_V2\_WHITELISTED\_ALLOCATION**: readonly \[\{ `inputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AccountNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AlreadyConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"remaining"`; `type`: `"uint256"`; \}\]; `name`: `"CollectableFeesExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositCapReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeeAmountTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"FeesMustSum100"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkDurationError"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"HighWatermarkViolation"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InsufficientShares"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAccountType"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAmount"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDepositLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidExternalAssets"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidLagDuration"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidWithdrawalLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"LimitRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxAllowedChangeReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MaxDepositAmountReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MissingFeeCollectors"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NoSharesForReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NotConfigured"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"NothingToProcess"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyOwnerOrOperator"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OperatorOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReferenceAssetMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SenderNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TokenDecimalsMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"TooEarly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"Unauthorized"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VaultNotTimelocked"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WhitelistLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WithdrawalsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddressError"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"ContractConfigured"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"senderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"Deposit"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bDepositsPaused"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"bWithdrawalsPaused"`; `type`: `"bool"`; \}\]; `name`: `"DepositWithdrawalStatusChanged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\]; `name`: `"FeesCollected"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint8"`; `name`: `"version"`; `type`: `"uint8"`; \}\]; `name`: `"Initialized"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"managementFeeAmount"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeCharged"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"ManagementFeeUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"MaxChangePercentUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"OnEmergencyWithdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferStarted"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"SendersWhitelistUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountDisabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"SubAccountEnabled"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"sender"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiver"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"owner"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assets"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `name`: `"Withdraw"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalProcessed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"holderAddr"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"WithdrawalRequested"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"acceptOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"asset"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"assetsWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargeManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"chargePerformanceFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"claim"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"collectFees"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"maxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"instantRedemptionFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"lagDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"withdrawalFee"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"watermarkTimeWindow"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxChangePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"managementFeePercent"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"performanceFeeRate"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"sendersWhitelistAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"operatorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"scheduledCallerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"lpTokenAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"referenceAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"futureOwnerAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"assetsWhitelistAddress"`; `type`: `"address"`; \}\]; `internalType`: `"struct ITokenizedVault.ConfigInfo"`; `name`: `"newConfig"`; `type`: `"tuple"`; \}\]; `name`: `"configure"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositCap"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"depositToSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"deadline"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"r"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"s"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"uint8"`; `name`: `"v"`; `type`: `"uint8"`; \}\]; `name`: `"depositWithPermit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"depositsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}\]; `name`: `"disableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"emergencyWithdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"addr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"accountType"`; `type`: `"uint8"`; \}\]; `name`: `"enableSubAccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"externalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"feeCollectors"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"feesTimestamp"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"getBurnableAmountByReceiver"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getChangePercentage"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getFeeCollectors"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getMaxAllowedChange"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getPerformanceFeeRecipients"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `""`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getRequirementByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `name`: `"getScheduledTransactionsByDate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"totalTransactions"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"executionEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getSharePrice"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getTotalAssets"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWithdrawalEpoch"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"globalLiabilityShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"highWatermark"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}\]; `name`: `"initialize"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"instantRedeem"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"instantRedemptionFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"keepFeeInVault"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lagDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"lpTokenAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"managementFeePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxChangePercent"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxDepositAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxWithdrawalAmount"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"operatorAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"bPauseDeposits"`; `type`: `"bool"`; \}, \{ `internalType`: `"bool"`; `name`: `"bPauseWithdrawals"`; `type`: `"bool"`; \}\]; `name`: `"pauseDepositsAndWithdrawals"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"pendingOwner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"performanceFeeRate"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `name`: `"performanceFeeRecipients"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetIn"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountIn"`; `type`: `"uint256"`; \}\]; `name`: `"previewDeposit"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"isInstant"`; `type`: `"bool"`; \}\]; `name`: `"previewRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"assetsAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assetsAfterFee"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxLimit"`; `type`: `"uint256"`; \}\]; `name`: `"processAllClaimsByDate"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"receiverAddr"`; `type`: `"address"`; \}\]; `name`: `"requestRedeem"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"claimableEpoch"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"year"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"month"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"day"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"scheduledCallerAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"sendersWhitelistAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"totalCollectableFees"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateAssetsWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updateFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"pKeepFeeInVault"`; `type`: `"bool"`; \}\]; `name`: `"updateInstantRedemptionFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxDepositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newMaxWithdrawalAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newDepositCap"`; `type`: `"uint256"`; \}\]; `name`: `"updateLimits"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newManagementFeePercent"`; `type`: `"uint256"`; \}\]; `name`: `"updateManagementFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"updateMaxChangePercent"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newValue"`; `type`: `"uint256"`; \}\]; `name`: `"updatePerformanceFee"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `components`: readonly \[\{ `internalType`: `"address"`; `name`: `"collectorAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"percentage"`; `type`: `"uint256"`; \}\]; `internalType`: `"struct IFeeCollectorsAware.CollectorDefinition[]"`; `name`: `"collectors"`; `type`: `"tuple[]"`; \}\]; `name`: `"updatePerformanceFeeCollectors"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newWhitelistAddr"`; `type`: `"address"`; \}\]; `name`: `"updateSendersWhitelist"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newDuration"`; `type`: `"uint256"`; \}\]; `name`: `"updateTimelockDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssetsAmount"`; `type`: `"uint256"`; \}\]; `name`: `"updateTotalAssets"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkTimeWindow"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"watermarkUpdatedOn"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"whitelistedSubAccounts"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"inputAssetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"subAccountAddr"`; `type`: `"address"`; \}\]; `name`: `"withdrawFromSubaccount"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalFee"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"withdrawalsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_TOKENIZED\_VAULT\_V2\_WHITELISTED\_ASSETS
> `const` **ABI\_TOKENIZED\_VAULT\_V2\_WHITELISTED\_ASSETS**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"ownerAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"referenceAssetAddr"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetAlreadyEnabled"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidDecimalPlaces"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOraclePrice"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOracleTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimePeriod"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerAddressRequired"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OwnerOnly"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReentrancyGuardReentrantCall"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ReferenceAssetNotPermitted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"RoundNotComplete"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"StalePrice"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"WhitelistLimitReached"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddressError"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"previousOwner"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"OwnershipTransferred"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"REFERENCE_ASSET"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"REFERENCE_ASSET_DECIMALS"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"lpTokenAddress"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"assetInAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"vaultAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"assetInAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"externalAssets"`; `type`: `"uint256"`; \}\]; `name`: `"convertToShares"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"shares"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amountInReferenceTokens"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"oracleAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"newOracleDuration"`; `type`: `"uint256"`; \}\]; `name`: `"enableAsset"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"fromInputAssetToReferenceAsset"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}\]; `name`: `"getOracleAddress"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"externalAssets"`; `type`: `"uint256"`; \}\]; `name`: `"getTotalAssetsValuation"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getWhitelistedAssets"`; `outputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `""`; `type`: `"address[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}\]; `name`: `"isWhitelisted"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"maxOracleUpdatesDuration"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"owner"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"newOwner"`; `type`: `"address"`; \}\]; `name`: `"transferOwnership"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"newMaxOracleUpdatesDuration"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"assetAddr"`; `type`: `"address"`; \}\]; `name`: `"updateOracleLagDuration"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
***
### ABI\_TRANSFER\_POLICY\_GATED
> `const` **ABI\_TRANSFER\_POLICY\_GATED**: readonly \[\{ `inputs`: readonly \[\]; `name`: `"transferPolicy"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
ABI for `ITransferPolicyGated`: the share-token getter naming the policy that gates its transfers (the chain's `KycRegistry` for a KYC vault). Returns the zero address when transfers are ungated.
***
### ABI\_UNIVERSAL\_RESOLVER\_RESOLVE
> `const` **ABI\_UNIVERSAL\_RESOLVER\_RESOLVE**: readonly \[\{ `inputs`: readonly \[\{ `components`: readonly \[\{ `name`: `"target"`; `type`: `"address"`; \}, \{ `name`: `"allowFailure"`; `type`: `"bool"`; \}, \{ `name`: `"callData"`; `type`: `"bytes"`; \}\]; `name`: `"calls"`; `type`: `"tuple[]"`; \}\]; `name`: `"aggregate3"`; `outputs`: readonly \[\{ `components`: readonly \[\{ `name`: `"success"`; `type`: `"bool"`; \}, \{ `name`: `"returnData"`; `type`: `"bytes"`; \}\]; `name`: `"returnData"`; `type`: `"tuple[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"name"`; `type`: `"bytes"`; \}, \{ `name`: `"data"`; `type`: `"bytes"`; \}\]; `name`: `"resolve"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bytes"`; \}, \{ `name`: `"address"`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `name`: `"name"`; `type`: `"bytes"`; \}, \{ `name`: `"data"`; `type`: `"bytes"`; \}, \{ `name`: `"gateways"`; `type`: `"string[]"`; \}\]; `name`: `"resolve"`; `outputs`: readonly \[\{ `name`: `""`; `type`: `"bytes"`; \}, \{ `name`: `"address"`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### ABI\_UNIVERSAL\_SIGNATURE\_VALIDATOR
> `const` **ABI\_UNIVERSAL\_SIGNATURE\_VALIDATOR**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_signer"`; `type`: `"address"`; \}, \{ `internalType`: `"bytes32"`; `name`: `"_hash"`; `type`: `"bytes32"`; \}, \{ `internalType`: `"bytes"`; `name`: `"_signature"`; `type`: `"bytes"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}\]
***
### ABI\_WRAPPER\_ADAPTER
> `const` **ABI\_WRAPPER\_ADAPTER**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"referralId"`; `type`: `"address"`; \}\]; `name`: `"depositETH"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"referralId"`; `type`: `"address"`; \}\]; `name`: `"depositWETH"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"referralId"`; `type`: `"address"`; \}\]; `name`: `"getRSETHWithETH"`; `outputs`: readonly \[\]; `stateMutability`: `"payable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"string"`; `name`: `"referralId"`; `type`: `"string"`; \}\]; `name`: `"getRSETHWithERC20"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"depositAmount"`; `type`: `"uint256"`; \}\]; `name`: `"getRsETHAmountToMint"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"rsETHAmount"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}\]
***
### RWA\_REDEEM\_SUBACCOUNT
> `const` **RWA\_REDEEM\_SUBACCOUNT**: readonly \[\{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"_vault"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"_referenceAsset"`; `type`: `"address"`; \}, \{ `internalType`: `"address"`; `name`: `"_idleVault"`; `type`: `"address"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"constructor"`; \}, \{ `inputs`: readonly \[\]; `name`: `"AssetMismatch"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}\]; `name`: `"AssetNotRedeemable"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"CannotSweepIdleVaultShares"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"CannotSweepReferenceAsset"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"DepositFailed"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"required"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"available"`; `type`: `"uint256"`; \}\]; `name`: `"InsufficientLiquidity"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"requested"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"actual"`; `type`: `"uint256"`; \}\]; `name`: `"InsufficientWithdrawal"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOracleDecimals"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOraclePrice"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidOracleTimestamp"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidReceiver"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTimePeriod"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"InvalidTokenDecimals"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyVault"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyVaultOwner"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"OnlyVaultOwnerOrOperator"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"provided"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minimum"`; `type`: `"uint256"`; \}\]; `name`: `"OracleStalenessTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"referenceValue"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"normalizedAmount"`; `type`: `"uint256"`; \}\]; `name`: `"PriceDeviationExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"requested"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"limit"`; `type`: `"uint256"`; \}\]; `name`: `"RedemptionExceedsLimit"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"RedemptionsPaused"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"RoundNotComplete"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"SenderNotWhitelisted"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"expected"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"actual"`; `type`: `"uint256"`; \}\]; `name`: `"SlippageExceeded"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"provided"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maximum"`; `type`: `"uint256"`; \}\]; `name`: `"SpreadTooHigh"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"provided"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minimum"`; `type`: `"uint256"`; \}\]; `name`: `"SpreadTooLow"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"StalePrice"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAddress"`; `type`: `"error"`; \}, \{ `inputs`: readonly \[\]; `name`: `"ZeroAmount"`; `type`: `"error"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"user"`; `type`: `"address"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"assetIn"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"referenceOut"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"fee"`; `type`: `"uint256"`; \}\]; `name`: `"AssetRedeemed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"Deposited"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"requested"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"actual"`; `type`: `"uint256"`; \}\]; `name`: `"EmergencyWithdrawAll"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"bytes"`; `name`: `"reason"`; `type`: `"bytes"`; \}\]; `name`: `"IdleDepositFailed"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"IdleDeposited"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"bytes"`; `name`: `"reason"`; `type`: `"bytes"`; \}\]; `name`: `"IdleVaultFallback"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"requested"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"actual"`; `type`: `"uint256"`; \}\]; `name`: `"IdleWithdrawn"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"oldLimit"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"newLimit"`; `type`: `"uint256"`; \}\]; `name`: `"MaxRedemptionPerTxUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"enabled"`; `type`: `"bool"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"spreadBps"`; `type`: `"uint256"`; \}, \{ `indexed`: `false`; `internalType`: `"address"`; `name`: `"oracle"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"maxPriceDeviationBps"`; `type`: `"uint256"`; \}\]; `name`: `"RedeemableAssetSet"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `false`; `internalType`: `"bool"`; `name`: `"paused"`; `type`: `"bool"`; \}\]; `name`: `"RedemptionsPausedUpdated"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}\]; `name`: `"TokenSwept"`; `type`: `"event"`; \}, \{ `anonymous`: `false`; `inputs`: readonly \[\{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `indexed`: `false`; `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `indexed`: `true`; `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}\]; `name`: `"Withdrawn"`; `type`: `"event"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MAX_SPREAD_BPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MIN_ORACLE_STALENESS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"MIN_SPREAD_BPS"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"availableLiquidity"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"deposit"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"depositToIdle"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"minActual"`; `type`: `"uint256"`; \}\]; `name`: `"emergencyWithdrawAll"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"actual"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getIdleUtilization"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"idle"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"idleVaultValue"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"getRedeemableAssetsList"`; `outputs`: readonly \[\{ `internalType`: `"address[]"`; `name`: `""`; `type`: `"address[]"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"IDLE_VAULT"`; `outputs`: readonly \[\{ `internalType`: `"contract IERC4626"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"maxRedemptionPerTx"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}\]; `name`: `"previewRedemption"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `""`; `type`: `"uint256"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minOut"`; `type`: `"uint256"`; \}\]; `name`: `"redeemAsset"`; `outputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"referenceOut"`; `type`: `"uint256"`; \}\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `name`: `"redeemableAssets"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"oracle"`; `type`: `"address"`; \}, \{ `internalType`: `"uint8"`; `name`: `"oracleDecimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"uint8"`; `name`: `"tokenDecimals"`; `type`: `"uint8"`; \}, \{ `internalType`: `"uint256"`; `name`: `"spreadBps"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxOracleStaleness"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxPriceDeviationBps"`; `type`: `"uint256"`; \}, \{ `internalType`: `"bool"`; `name`: `"enabled"`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"redemptionsPaused"`; `outputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `""`; `type`: `"bool"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"REFERENCE_ASSET"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"REFERENCE_ASSET_DECIMALS"`; `outputs`: readonly \[\{ `internalType`: `"uint8"`; `name`: `""`; `type`: `"uint8"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"limit"`; `type`: `"uint256"`; \}\]; `name`: `"setMaxRedemptionPerTx"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"asset"`; `type`: `"address"`; \}, \{ `internalType`: `"bool"`; `name`: `"enabled"`; `type`: `"bool"`; \}, \{ `internalType`: `"uint256"`; `name`: `"spreadBps"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"oracle"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxStaleness"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"maxPriceDeviationBps"`; `type`: `"uint256"`; \}\]; `name`: `"setRedeemableAsset"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"bool"`; `name`: `"paused"`; `type`: `"bool"`; \}\]; `name`: `"setRedemptionsPaused"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"token"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address"`; `name`: `"to"`; `type`: `"address"`; \}\]; `name`: `"sweepToken"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\]; `name`: `"VAULT"`; `outputs`: readonly \[\{ `internalType`: `"address"`; `name`: `""`; `type`: `"address"`; \}\]; `stateMutability`: `"view"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"address"`; `name`: `"tokenAddr"`; `type`: `"address"`; \}, \{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"address payable"`; `name`: `"receivingAddr"`; `type`: `"address"`; \}\]; `name`: `"withdraw"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}, \{ `inputs`: readonly \[\{ `internalType`: `"uint256"`; `name`: `"amount"`; `type`: `"uint256"`; \}, \{ `internalType`: `"uint256"`; `name`: `"minActual"`; `type`: `"uint256"`; \}\]; `name`: `"withdrawFromIdle"`; `outputs`: readonly \[\]; `stateMutability`: `"nonpayable"`; `type`: `"function"`; \}\]
# EVMAdapter
> EVM adapter for the Upshift SDK — vault deposits, redemptions, allowances, previews, and SwapRouter flows for both ethers and viem signers.
EVM Adapter for Upshift SDK
EVM Adapter for Upshift SDK
Supports both ethers Signer/Wallet and wagmi/viem WalletClient
**Example**
To access the EVM adapter instance
```
const sdk = new UpshiftSDK()
sdk.evm.vaultRedeem()
```
## Constructors
### Constructor
> **new default**(`signer?`, `getReadProvider?`): `default`
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer?` | `any` | Optional ethers Signer/Wallet or viem WalletClient. Required for writes; reads fall back to `getReadProvider` when absent. |
| `getReadProvider?` | () => `IContractRunner` | Optional thunk returning a read-only provider for the SDK's active network. Called on every signerless read so it tracks `switchNetwork`. `UpshiftSDK` wires this to its configured `providers`. |
**Returns**
`default`
## Methods
### allowance()
> **allowance**(`options`): `Promise`
Read the ERC-20 allowance an owner has granted the vault. Defaults to the
vault's underlying asset; pass `asset` to override.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IAllowanceOptions` |
**Returns**
`Promise`
Allowance as a raw `bigint`.
**Example**
```ts
const raw = await upshiftSdk.evm.allowance({ vault, owner });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### approve()
> **approve**(`options`): `Promise`
Approve a vault to spend a deposit token, returning a discriminated
ApproveResult so callers can tell `sent` from `sufficient`
(existing allowance covers) and `native` (no allowance applies).
Prefer this over [vaultApprove](#vaultapprove) for new integrations.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IContractWriteOptions` |
**Returns**
`Promise`
**Example**
```ts
const r = await upshiftSdk.evm.approve({
target: vaultAddress,
wallet: walletAddress,
amount: '100',
wait: true,
});
if (r.kind === 'sent') console.log('approve tx', r.hash);
```
### balanceOf()
> **balanceOf**(`options`): `Promise`
Read an ERC-20 token balance.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IBalanceOfOptions` |
**Returns**
`Promise`
Balance as a raw `bigint`.
**Example**
```ts
const raw = await upshiftSdk.evm.balanceOf({ asset: usdcAddress, owner });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### claimWithdrawal()
> **claimWithdrawal**(`options`): `Promise`
Claim a previously-requested queued withdrawal on an EVM-2 (Tokenized
Vault V2) vault, once its withdrawal epoch has passed. EVM-2 only — v1/v0
vaults use [EVMAdapter.vaultRedeem](#vaultredeem) instead.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IClaimWithdrawalOptions` | IClaimWithdrawalOptions: `target` / `wallet` plus the `year` / `month` / `day` tuple returned by `vaultRequestRedeem`. |
**Returns**
`Promise`
Claim transaction hash.
**Throws**
UpshiftValidationError on invalid inputs or a non-EVM-2 vault.
**Throws**
UpshiftSDKError on RPC / contract revert.
**Example**
```ts
const { year, month, day } = await upshiftSdk.evm.vaultRequestRedeem({
target: vaultAddress,
wallet: walletAddress,
amount: '10',
});
await upshiftSdk.evm.claimWithdrawal({
target: vaultAddress,
wallet: walletAddress,
year,
month,
day,
wait: true,
});
```
### depositNative()
> **depositNative**(`options`): `Promise`
Deposit the chain's native asset (ETH / AVAX / etc.) into a vault by
routing through the `MultiAssetNativeDepositWrapper`. The wrapper handles
native-to-wrapped conversion and the subsequent vault deposit in a single
transaction.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `INativeDepositOptions` | INativeDepositOptions: `wrapperAddress`, `amount` (native, scaled by the chain's native decimals), optional `receiver` (defaults to the signer), and optional `wait`. |
**Returns**
`Promise`
The deposit `TransactionResponse`.
**Throws**
UpshiftValidationError on invalid inputs.
**Throws**
UpshiftSDKError on RPC / contract revert.
**Example**
```ts
const tx = await upshiftSdk.evm.depositNative({
wrapperAddress: nativeWrapperAddress,
amount: parseEther('1'),
wait: true,
});
```
### depositNativeViaSwapRouter()
> **depositNativeViaSwapRouter**(`options`): `Promise`
Deposit native ETH (or chain-native equivalent) into a vault via the
SwapRouter. Only valid when the vault's reference asset is the chain's
wrapped-native token — the SwapRouter wraps `amount` and deposits.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ISwapRouterNativeDepositOptions` | ISwapRouterNativeDepositOptions. |
**Returns**
`Promise`
The transaction hash of the `depositNativeToken` call.
**Throws**
UpshiftSDKError while the SwapRouter is paused (checked before any
approval), or on RPC / contract revert.
### depositViaSwapRouter()
> **depositViaSwapRouter**(`options`): `Promise`
Deposit a vault's reference asset through the SwapRouter — no swap.
Use this when the caller already holds the reference asset but wants
the origin/referral fee accounting that the SwapRouter path provides.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ISwapRouterDirectDepositOptions` | ISwapRouterDirectDepositOptions. |
**Returns**
`Promise`
The transaction hash of the `deposit` call.
**Throws**
UpshiftSDKError while the SwapRouter is paused (checked before any
approval), or on RPC / contract revert.
### getBurnableAmountByReceiver()
> **getBurnableAmountByReceiver**(`options`): `Promise`
Read how much of a withdrawal-epoch date's queue a receiver can
currently claim, before calling [EVMAdapter.claimWithdrawal](#claimwithdrawal).
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IGetBurnableAmountByReceiverOptions` |
**Returns**
`Promise`
Claimable amount as a raw `bigint`.
**Example**
```ts
const claimable = await upshiftSdk.evm.getBurnableAmountByReceiver({
vault, receiver, year, month, day,
});
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### getDeposited()
> **getDeposited**(`options`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | \{ `vault`: `` `0x${string}` ``; `wallet`: `` `0x${string}` ``; `whitelist`: `` `0x${string}` ``; \} |
| `options.vault` | `` `0x${string}` `` |
| `options.wallet` | `` `0x${string}` `` |
| `options.whitelist` | `` `0x${string}` `` |
**Returns**
`Promise`
### getDepositRoute()
> **getDepositRoute**(`options`): `Promise`
Resolve whether a deposit goes through the SwapRouter with the instance
origin code or takes the vault's native path, and the address to approve
(`route.spender`, not necessarily the vault). See [getDepositRoute](#getdepositroute).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IGetDepositRouteOptions` | IGetDepositRouteOptions. |
**Returns**
`Promise`
`{ via, spender, reason? }` — `reason` explains a native route
(`router-paused` while the SwapRouter is paused).
**Throws**
UpshiftValidationError on an invalid target, or an unregistered
code under `attribution.strictOrigin` while the router is not paused.
**Throws**
UpshiftSDKError when a backend, vault or router read fails.
**Example**
```ts
const { via, spender } = await upshiftSdk.evm.getDepositRoute({ target: vault });
```
### getIdleLiquidity()
> **getIdleLiquidity**(`options`): `Promise`
Read an EVM-2 vault's idle liquidity (`getTotalAssets() -
externalAssets()`) — the balance available to an instant redemption
without a synchronous recall from the settlement module.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IGetIdleLiquidityOptions` |
**Returns**
`Promise`
Idle liquidity as a raw `bigint`.
**Example**
```ts
const idle = await upshiftSdk.evm.getIdleLiquidity({ vault });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### getRemainingAllocations()
> **getRemainingAllocations**(`options`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | \{ `depositCapAmount?`: `bigint`; `vault`: `` `0x${string}` ``; `wallet`: `` `0x${string}` ``; `whitelist`: `` `0x${string}` ``; \} |
| `options.depositCapAmount?` | `bigint` |
| `options.vault` | `` `0x${string}` `` |
| `options.wallet` | `` `0x${string}` `` |
| `options.whitelist` | `` `0x${string}` `` |
**Returns**
`Promise`
### getRequirementByDate()
> **getRequirementByDate**(`options`): `Promise`
Read the total shares required to settle a withdrawal-epoch date's
entire queue.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IWithdrawalDateOptions` |
**Returns**
`Promise`
Required shares as a raw `bigint`.
**Example**
```ts
const shares = await upshiftSdk.evm.getRequirementByDate({ vault, year, month, day });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### getScheduledTransactionsByDate()
> **getScheduledTransactionsByDate**(`options`): `Promise`
Read the scheduled queued-withdrawal volume for a withdrawal-epoch date.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IWithdrawalDateOptions` |
**Returns**
`Promise`
IScheduledTransactionsByDate.
**Example**
```ts
const { totalTransactions, executionEpoch } =
await upshiftSdk.evm.getScheduledTransactionsByDate({ vault, year, month, day });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### getSwapRouterDepositResult()
> **getSwapRouterDepositResult**(`options`): `Promise`
Resolves the real, post-execution outcome of a SwapRouter deposit from
its mined receipt — the actual amount that reached the vault (and shares
minted), decoded from the vault's own `Deposit` event, rather than the
pre-trade quote shown before submission.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ISwapRouterDepositResultOptions` | ISwapRouterDepositResultOptions. |
**Returns**
`Promise`
The decoded ISwapRouterDepositResult, or `null` if the
receipt isn't found yet or carries no matching `Deposit` log.
**Example**
```ts
const hash = await upshiftSdk.evm.swapRouterDeposit({ ... });
const result = await upshiftSdk.evm.getSwapRouterDepositResult({ txHash: hash, vault });
```
### getWithdrawalEpoch()
> **getWithdrawalEpoch**(`options`): `Promise`
Read an EVM-2 vault's current withdrawal epoch by named field
(`year`/`month`/`day`/`claimableEpoch`).
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IGetWithdrawalEpochOptions` |
**Returns**
`Promise`
IWithdrawalEpoch.
**Example**
```ts
const epoch = await upshiftSdk.evm.getWithdrawalEpoch({ vault });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### isWhitelisted()
> **isWhitelisted**(`options`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | \{ `wallet`: `` `0x${string}` ``; `whitelist`: `` `0x${string}` ``; \} |
| `options.wallet` | `` `0x${string}` `` |
| `options.whitelist` | `` `0x${string}` `` |
**Returns**
`Promise`
### lagDuration()
> **lagDuration**(`options`): `Promise`
Read an EVM-2 vault's queued-withdrawal lag, in seconds.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `ILagDurationOptions` |
**Returns**
`Promise`
Lag duration as a raw `bigint`.
**Example**
```ts
const seconds = await upshiftSdk.evm.lagDuration({ vault });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### maxDeposit()
> **maxDeposit**(`options`): `Promise`
Read the maximum deposit accepted by the vault for the supplied
receiver. Useful for "vault is full" gates.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IMaxDepositOptions` |
**Returns**
`Promise`
Max deposit as a raw `bigint`.
**Example**
```ts
const cap = await upshiftSdk.evm.maxDeposit({ vault });
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### previewDeposit()
> **previewDeposit**(`options`): `Promise`
Preview the share output of a deposit without broadcasting a transaction.
See readPreviewDeposit for the routing details (EVM-1 vs EVM-2
multi-asset vaults).
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IPreviewDepositOptions` |
**Returns**
`Promise`
Shares minted in raw on-chain units (share-token decimals).
**Example**
```ts
const shares = await upshiftSdk.evm.previewDeposit({
vault: '0x...',
amount: 1_000_000n,
});
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### previewRedeem()
> **previewRedeem**(`options`): `Promise`
Preview the assets returned by redeeming a number of shares, without
broadcasting a transaction.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IPreviewRedeemOptions` |
**Returns**
`Promise`
Assets returned in raw on-chain units (asset decimals).
**Example**
```ts
const assets = await upshiftSdk.evm.previewRedeem({
vault: '0x...',
shares: 1_000_000_000_000_000_000n,
});
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### sendersWhitelistAddress()
> **sendersWhitelistAddress**(`options`): `Promise`\<`` `0x${string}` ``\>
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | \{ `vault`: `` `0x${string}` ``; \} |
| `options.vault` | `` `0x${string}` `` |
**Returns**
`Promise`\<`` `0x${string}` ``\>
### setSigner()
> **setSigner**(`signer`): `void`
Set a new signer (supports both ethers and viem/wagmi)
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `any` | Either an ethers Signer/Wallet or viem WalletClient |
**Returns**
`void`
### swapAndDeposit()
> **swapAndDeposit**(`options`): `Promise`
Swap one or more whitelisted ERC-20s into a vault's reference asset via
the on-chain `SwapRouter` and deposit the proceeds. The router handles
fee accrual, slippage protection, and the v1/v3 vs v2 deposit-interface
branching. Approval is sent automatically for each `swaps[i].tokenIn`
when the caller's allowance against the SwapRouter is below `amountIn`.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ISwapAndDepositOptions` | ISwapAndDepositOptions. |
**Returns**
`Promise`
The transaction hash of the `swapAndDeposit` call.
**Throws**
UpshiftValidationError on invalid inputs (bad chain, empty swaps).
**Throws**
UpshiftSDKError while the SwapRouter is paused (checked before any
approval), or on RPC / contract revert.
**Example**
```ts
const quote = await fetchSwapQuote({
chainId: 1, srcToken: WBTC, srcDecimals: 8,
destToken: USDC, destDecimals: 6, amount: 100_000_000n,
receiver: SWAP_ROUTER_ADDRESSES[1]!,
});
const hash = await upshiftSdk.evm.swapAndDeposit({
chainId: 1, vault, receiver: wallet,
swaps: [{ tokenIn: WBTC, tokenOut: USDC, amountIn: 100_000_000n,
minAmountOut: quote.minAmountOut, router: quote.router, payload: quote.payload }],
});
```
### swapRouterDeposit()
> **swapRouterDeposit**(`options`): `Promise`
Deposit into a vault through the on-chain `SwapRouter`, choosing the router
path from `depositAsset` (direct deposit, native wrap, or a swap to the
reference asset). The explicit, opt-in swap entry point —
[vaultDeposit](#vaultdeposit) never swaps — so a native-deposit vault is never
accidentally swapped.
Reads the vault's reference asset + decimals on-chain, resolves the swap
quote and fail-closes on aggregator/whitelist drift, and sends the ERC-20
approval to the SwapRouter when allowance is short.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ISwapRouterDepositOptions` | ISwapRouterDepositOptions. |
**Returns**
`Promise`
The transaction hash of the router deposit call.
**Throws**
UpshiftValidationError on unsupported chain, invalid address, zero
amount, a native deposit into a non-wrapped-native vault, or quote drift.
**Throws**
UpshiftSDKError while the SwapRouter is paused (checked before any
approval), or on RPC / contract revert.
**Example**
```ts
const hash = await upshiftSdk.evm.swapRouterDeposit({
chainId: 1, vault, depositAsset: USDT, amount: '100', slippageBps: 50,
});
```
### vaultAllowance()
> **vaultAllowance**(`options`): `Promise`
Read the ERC-20 allowance the wallet has granted the vault to spend its
underlying asset, returned as a normalized number. For the newer typed
read that returns a raw `bigint` and accepts an explicit `asset` override,
use [EVMAdapter.allowance](#allowance).
Only `target` (vault address) and `wallet` are read from `options`; the
remaining IContractWriteOptions fields are ignored.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IContractWriteOptions` | `{ target, wallet }` (other fields ignored). |
**Returns**
`Promise`
Normalized allowance (`{ raw, normalized }`), or `undefined` when
`target` / `wallet` fail address validation.
**Example**
```ts
const a = await upshiftSdk.evm.vaultAllowance({
target: vaultAddress,
wallet: walletAddress,
});
console.log(a?.normalized);
```
**Throws**
UpshiftSDKError `NO_SIGNER` when the SDK has no signer and no
configured provider for the active network.
### vaultApprove()
> **vaultApprove**(`options`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options` | `IContractWriteOptions` |
**Returns**
`Promise`
### vaultDeposit()
> **vaultDeposit**(`options`): `Promise`
Deposit into an Upshift vault. Routes automatically: V1 single-asset vaults
deposit the underlying directly; V2 multi-asset vaults route through the
adapter for non-underlying `depositAsset`. With `attribution.originCode`
configured, eligible deposits go through the SwapRouter instead (see
[EVMAdapter.getDepositRoute](#getdepositroute)). If allowance is insufficient
the method submits an approve transaction first (the approve step always
waits for confirmation to close a race window, regardless of `wait`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IContractWriteOptions` | IContractWriteOptions. `target` and `wallet` are required; pass `amount`, `depositAsset` (defaults to the vault's underlying), `chainId`, `poolName`, `wait`, and `isDepositWithPermit` as needed. |
**Returns**
`Promise`
The deposit `TransactionResponse`, or `undefined` if an
approval-only path was taken and no deposit transaction was sent.
**Throws**
UpshiftValidationError on invalid inputs (bad address, bad amount).
**Throws**
UpshiftSDKError on RPC / contract revert during the deposit.
**Example**
```ts
const tx = await upshiftSdk.evm.vaultDeposit({
target: vaultAddress,
wallet: walletAddress,
amount: '100',
wait: true,
});
```
### vaultRedeem()
> **vaultRedeem**(`options`): `Promise`
Claim assets from a matured redemption request on a dated-redemption
(RWA-style) vault. The `year`, `month`, `day`, and `receiverIndex` tuple
identifies which batch of the user's matured requests to redeem from —
these are emitted at request-time and indexed by the subgraph.
For non-dated vaults that complete their redemption via `instantRedeem`,
see [EVMAdapter.vaultRequestRedeem](#vaultrequestredeem) with `isInstantRedeem: true`.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IContractWriteOptions` & `object` | IContractWriteOptions plus `year` / `month` / `day` / `receiverIndex` identifying the matured batch to claim. |
**Returns**
`Promise`
The redeem `TransactionResponse`.
**Throws**
UpshiftValidationError on invalid inputs.
**Throws**
UpshiftSDKError on RPC / contract revert.
**Example**
```ts
const tx = await upshiftSdk.evm.vaultRedeem({
target: vaultAddress,
wallet: walletAddress,
amount: shareAmount,
year: '2026',
month: '06',
day: '02',
receiverIndex: '0',
wait: true,
});
```
### vaultRequestRedeem()
> **vaultRequestRedeem**(`options`): `Promise`
Submit a redemption request against a vault. Shares are escrowed and the
underlying assets are released asynchronously by the protocol; callers
collect the matured assets via [EVMAdapter.vaultRedeem](#vaultredeem), or use the
instant-redeem variant by setting `isInstantRedeem: true`.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `IContractWriteOptions` | IContractWriteOptions. `target`, `wallet`, and `amount` (in shares) are required. Set `isInstantRedeem: true` to take the instant-redeem path when the vault supports it. |
**Returns**
`Promise`
The request `TransactionResponse`, or `undefined` if the request
could not be built (validation failure).
**Throws**
UpshiftValidationError on invalid inputs.
**Throws**
UpshiftSDKError on RPC / contract revert.
**Example**
```ts
const tx = await upshiftSdk.evm.vaultRequestRedeem({
target: vaultAddress,
wallet: walletAddress,
amount: shareAmount,
wait: true,
});
```
## Functions
### getEvmVaultV1()
> **getEvmVaultV1**(`tokenizedVault`, `options`): `Promise`
Fetch EVM vault data for v1 vault contracts (legacy format).
Queries on-chain state and combines with backend metadata.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `tokenizedVault` | `ITokenizedVault` | Vault metadata from backend |
| `options` | [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions) | RPC configuration and chain details |
**Returns**
`Promise`
Formatted vault object or null if closed/invisible
***
### getEvmVaultV2()
> **getEvmVaultV2**(`tokenizedVault`, `options`): `Promise`
Fetch EVM vault data for v2 vault contracts (current format).
V2 vaults use separate contracts for vault, receipt token, and whitelist.
Queries all three contracts and combines results.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `tokenizedVault` | `ITokenizedVault` | Vault metadata from backend |
| `options` | [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions) | RPC configuration and chain details |
**Returns**
`Promise`
Formatted vault object or null if closed/invisible
# SDK API Reference
> Generated API reference for @upshiftfinance/sdk — the SDK entry point, vault and subaccount modules, chain adapters, and contract ABIs.
For a guided introduction, start with the [Quick Start](/sdk/quick-start),
[Vault Actions](/sdk/vault-actions), and [Error Handling](/sdk/error-handling) guides.
## Modules
| Module | Description |
| ------ | ----------- |
| [UpshiftSDK](/sdk/reference/upshift-sdk) | The main Upshift SDK class. |
| [UpshiftVaults](/sdk/reference/upshift-vaults) | The Upshift Vaults Module. |
| [UpshiftSubAccounts](/sdk/reference/upshift-subaccounts) | The Upshift Sub Accounts Module. |
| [UpshiftApi](/sdk/reference/upshift-api) | The Upshift backend API Module — read-only client for public backend endpoints (transparency dashboard, unrealized PnL) and authenticated loan-book / risk / OTC reads. Accessible as `sdk.apiModule`. |
| [EVMAdapter](/sdk/reference/evm-adapter) | EVM Adapter for Upshift SDK |
| [SolanaAdapter](/sdk/reference/solana-adapter) | Solana Adapter for Upshift SDK |
| [SuiAdapter](/sdk/reference/sui-adapter) | Sui Adapter for Upshift SDK |
| [StellarAdapter](/sdk/reference/stellar-adapter) | Stellar Adapter for Upshift SDK |
| [ABIs](/sdk/reference/abis) | Contract ABI definitions for interacting with Upshift smart contracts. |
# SolanaAdapter
> Solana adapter for the Upshift SDK — Anchor-based vault deposits, redemptions, and balance/state reads over a configurable RPC connection.
Solana Adapter for Upshift SDK
**Example**
To access the Solana adapter instance
```
const sdk = new UpshiftSDK()
sdk.solana.getVaultState()
```
## Constructors
### Constructor
> **new default**(`endpoint`, `network?`, `commitment?`): `default`
**Parameters**
| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `endpoint` | `` `https://${string}` `` | `undefined` | - |
| `network` | `ISolanaNetwork` | `SolanaUtils.fallbackNetwork` | - |
| `commitment` | `Commitment` | `'finalized'` | Commitment for every read this adapter makes *and* for the confirmation of every write, so the two always describe the same chain state — the vault handlers take it from this same `Connection`. Defaults to `'finalized'`, which is what this adapter has always used in practice: it previously passed no commitment at all, so both reads and confirmations fell through to the RPC's own `'finalized'` default. The default is stated explicitly now rather than inherited, but it is unchanged. Pass `'confirmed'` for a markedly faster round trip — seconds rather than tens of seconds — accepting that the state you act on can still, in principle, be rolled back. Also settable as the `commitment` field of the `solana` config passed to `UpshiftSDK`. |
**Returns**
`default`
## Accessors
### connection
**Get Signature**
> **get** **connection**(): `Connection`
**Returns**
`Connection`
### endpoint
**Get Signature**
> **get** **endpoint**(): `` `https://${string}` ``
**Returns**
`` `https://${string}` ``
### network
**Get Signature**
> **get** **network**(): `ISolanaNetwork`
**Returns**
`ISolanaNetwork`
### provider
**Get Signature**
> **get** **provider**(): `AnchorProvider`
**Returns**
`AnchorProvider`
## Methods
### fetchUserShareBalance()
> **fetchUserShareBalance**(`publicKey`, `shareMint`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `publicKey` | `string` \| `PublicKey` |
| `shareMint` | `string` \| `PublicKey` |
**Returns**
`Promise`
### fetchUserShareBalanceRaw()
> **fetchUserShareBalanceRaw**(`publicKey`, `shareMint`): `Promise`\<\{ `amount`: `string`; `decimals`: `number`; \}\>
BigInt-safe variant of [fetchUserShareBalance](#fetchusersharebalance). Returns the raw u64
`amount` (as a base-units string) plus the mint's `decimals` (or `null`
when the scale can't be determined — see Returns), so the caller can
produce a correct `INormalizedNumber` without losing precision.
Prefer this anywhere the result feeds BigInt math — positions, max-
actions, redemption sizing, allowance checks. `fetchUserShareBalance`
returns a JS-number `uiAmount` which silently encodes against 18 decimals
when passed through `toNormalizedBn(value)` without an explicit decimals
argument; that's exactly how the jitoSOL "missing position" regression
manifested.
RPC cost: 1 `getParsedTokenAccountsByOwner` call. Worst case ~150ms on a
healthy mainnet endpoint.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `publicKey` | `string` \| `PublicKey` | Wallet owner (PublicKey or base58 string). |
| `shareMint` | `string` \| `PublicKey` | The vault's share-token mint (PublicKey or base58). |
**Returns**
`Promise`\<\{ `amount`: `string`; `decimals`: `number`; \}\>
`{ amount, decimals }`. Three observable shapes:
- `{ amount: '', decimals: }` — token account exists.
- `{ amount: '0', decimals: null }` — no token account for this mint
under this wallet, OR `tokenAmount` was missing from the response,
OR `publicKey`/`shareMint` was not supplied. Distinguishable from a
genuine zero-balance account (`decimals` would be set there).
- `{ amount: '0', decimals: null }` — RPC threw (error is logged).
`decimals === null` means "we could not determine the scale" — callers
that need an `INormalizedNumber` must fall back to a known decimals
value (typically the deposit mint's decimals from backend metadata)
before normalizing. Never throws.
### fetchUserTokenBalance()
> **fetchUserTokenBalance**(`publicKey`, `depositMint`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `publicKey` | `string` \| `PublicKey` |
| `depositMint` | `string` \| `PublicKey` |
**Returns**
`Promise`
### getProgram()
> **getProgram**(`programIdl?`, `programId?`): `Program`
Build an Anchor `Program` bound to this adapter's provider and network.
The program id is resolved as: explicit `programId` → the `address` carried
by a custom `programIdl` → the canonical deployment for this adapter's
network. A copy of the SDK's bundled `vaultIdl` defers to the network
default (its embedded `address` is a build stamp, not network-aware), so
forwarding it on devnet never silently targets the mainnet program.
An IDL whose `metadata.name` is `august_withdrawal_queue` resolves against
the withdrawal queue program's network default instead of the vault's.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `programIdl?` | `any` | Anchor IDL to bind. Defaults to the SDK's bundled `august_vault` IDL. A custom IDL's `address` is honoured when it differs from the program's canonical id (the build stamp every bundled copy of the vault or queue IDL carries). |
| `programId?` | `string` | Base58 program id that overrides both the IDL's address and the network default. Use this to target a non-canonical deployment. |
**Returns**
`Program`
An Anchor `Program` for the resolved program id. No RPC is made —
construction is offline.
**Throws**
UpshiftValidationError if no program id can be resolved
because the program has no canonical deployment on this adapter's network
(neither program on `testnet`) and neither `programId` nor a custom IDL
address was supplied.
**Example**
```ts
// canonical program on the adapter's network
const program = sdk.solana.getProgram();
// a different deployment, same interface
const legacy = sdk.solana.getProgram(vaultIdl, '7B8n9vL51b6ibqRAd1adZsi3x3kxtq5NZaondh22Vkyq');
```
### getProgramId()
> **getProgramId**(`type`): `string`
Canonical program id for a program type on this adapter's network.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `type` | `"vault"` \| `"withdrawalQueue"` | Program to look up: `'vault'` (august_vault) or `'withdrawalQueue'` (august_withdrawal_queue). |
**Returns**
`string`
The base58 program id.
**Throws**
UpshiftValidationError if `type` is not one of the two
program types, or the program is not deployed on this adapter's network
(neither program on `testnet`).
**Example**
```ts
const queueProgram = adapter.getProgramId('withdrawalQueue');
```
### getToken()
> **getToken**(`mintAddress`): `Promise`\<\{ `address`: `string`; `decimals`: `number`; `image`: `string`; `name`: `string`; `symbol`: `string`; \}\>
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `mintAddress` | `string` \| `PublicKey` |
**Returns**
`Promise`\<\{ `address`: `string`; `decimals`: `number`; `image`: `string`; `name`: `string`; `symbol`: `string`; \}\>
### getTokenSymbol()
> **getTokenSymbol**(`mintAddress`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `mintAddress` | `string` \| `PublicKey` |
**Returns**
`Promise`
### getVaultState()
> **getVaultState**(`vaultProgramId`, `idl`, `vaultAddress?`): `Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `unknown`; \}\>
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `vaultProgramId` | `string` \| `PublicKey` |
| `idl` | `any` |
| `vaultAddress?` | `string` \| `PublicKey` |
**Returns**
`Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `unknown`; \}\>
### getVaultStateReadOnly()
> **getVaultStateReadOnly**(`vaultProgramId`, `idl`, `vaultAddress?`): `Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `ISolanaVaultState`; \}\>
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `vaultProgramId` | `string` \| `PublicKey` |
| `idl` | `any` |
| `vaultAddress?` | `string` \| `PublicKey` |
**Returns**
`Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `ISolanaVaultState`; \}\>
### setWalletProvider()
> **setWalletProvider**(`_publicKey`, `signTransaction`): `void`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `_publicKey` | `string` \| `PublicKey` |
| `signTransaction` | \<`T`\>(`transaction`) => `Promise` |
**Returns**
`void`
### vaultCancelRedeemRequest()
> **vaultCancelRedeemRequest**(`params`): `Promise`
Cancel a pending withdrawal request, returning its shares to the holder.
Allowed at any time while the request exists: during the cooldown, after
it, past the fulfillment window, and while the vault is paused. Only the
holder who made the request may cancel it. Signs through the provider's
wallet; the request's rent is refunded to the holder.
RPC: three reads, then the send.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISolanaCancelRedeemRequestParams`](#isolanacancelredeemrequestparams) | The holder and the request address. See [ISolanaCancelRedeemRequestParams](#isolanacancelredeemrequestparams). |
**Returns**
`Promise`
The confirmed transaction's signature.
**Throws**
UpshiftValidationError for a missing request, or one this
wallet did not make, before signing.
**Throws**
UpshiftSDKError when the transaction fails.
**Example**
```ts
await sdk.solana.vaultCancelRedeemRequest({ wallet: wallet.publicKey, request });
```
### vaultDeposit()
> **vaultDeposit**(`vaultProgramId`, `idl`, `publicKey`, `depositAmount`, `sendTransaction?`, `vaultAddress?`, `options?`): `Promise`
Deposit funds into a Solana Upshift vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vaultProgramId` | `string` \| `PublicKey` | - |
| `idl` | `any` | - |
| `publicKey` | `string` \| `PublicKey` | - |
| `depositAmount` | `number` \| `bigint` | `bigint` (raw on-chain units) or `number` (UI amount). |
| `sendTransaction?` | (`transaction`, `connection`, `options?`) => `Promise` | **Ignored; scheduled for removal in the next major release.** Share-account creation is now prepended to the deposit instruction, so the SDK sends no second transaction and never invokes this callback — signing goes through the provider's wallet. **Pass `undefined` here; do not delete the argument.** It sits *before* `vaultAddress`, so removing it shifts your vault address into this slot and leaves `vaultAddress` undefined — which silently falls back to the legacy single-vault PDA derivation and targets a different vault. |
| `vaultAddress?` | `string` \| `PublicKey` | - |
| `options?` | [`ISolanaDepositOptions`](#isolanadepositoptions) | Slippage protection. By default the SDK quotes the shares this deposit should mint from the vault's current state and passes that quote, lowered by 50 bps, as the floor to the program's checked instruction. See [ISolanaDepositOptions](#isolanadepositoptions). |
**Returns**
`Promise`
### vaultRedeem()
> **vaultRedeem**(`vaultProgramId`, `idl`, `publicKey`, `redeemShares`, `sendTransaction?`, `vaultAddress?`, `options?`): `Promise`
Redeem vault shares from a Solana Upshift vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vaultProgramId` | `string` \| `PublicKey` | - |
| `idl` | `any` | - |
| `publicKey` | `string` \| `PublicKey` | - |
| `redeemShares` | `number` \| `bigint` | `bigint` (raw share units) or `number` (UI amount). |
| `sendTransaction?` | (`transaction`, `connection`, `options?`) => `Promise` | **Ignored; scheduled for removal in the next major release.** Payout- and fee-recipient-account creation is now prepended to the redeem instruction, so the SDK sends no second transaction and never invokes this callback — signing goes through the provider's wallet. **Pass `undefined` here; do not delete the argument.** It sits *before* `vaultAddress`, so removing it shifts your vault address into this slot and leaves `vaultAddress` undefined — which silently falls back to the legacy single-vault PDA derivation and targets a different vault. |
| `vaultAddress?` | `string` \| `PublicKey` | - |
| `options?` | [`ISolanaRedeemOptions`](#isolanaredeemoptions) | Slippage protection. By default the SDK quotes the net payout these shares should return from the vault's current state and passes that quote, lowered by 50 bps, as the floor to the program's checked instruction. See [ISolanaRedeemOptions](#isolanaredeemoptions). **On a vault with a withdrawal queue**, holders cannot redeem directly: request with [SolanaAdapter.vaultRequestRedeem](#vaultrequestredeem), then claim here with `options.request` once the cooldown has run. The claim settles at the share price of that moment, net of the withdrawal fee, held to the floor set at request time, and pays the request's recipient; `redeemShares` and `vaultAddress` are then ignored, and `slippageBps` / `minAssetsOut` must be left unset. Without `request`, a queued vault is refused before signing. |
**Returns**
`Promise`
The confirmed transaction's signature.
**Throws**
UpshiftValidationError for bad input, for a queued vault
without `options.request`, or for a request the wallet cannot claim yet.
**Example**
```ts
// A vault with a withdrawal queue: claim a ready request.
const { pendingRedemptions } = await sdk.getVaultAvailableRedemptions({ vault, wallet });
await sdk.solana.vaultRedeem(programId, vaultIdl, wallet, 0n, undefined, undefined, {
request: pendingRedemptions[0].id,
});
```
### vaultRequestRedeem()
> **vaultRequestRedeem**(`params`): `Promise`\<[`ISolanaRequestRedeemResult`](#isolanarequestredeemresult)\>
Request a withdrawal from a Solana vault that has a withdrawal queue.
With a queue attached, a vault's shares cannot be redeemed directly: the
holder escrows them in a request, waits out the queue's cooldown, then
claims with [SolanaAdapter.vaultRedeem](#vaultredeem) and `options.request`, or
anyone the request permits (a keeper, by default) claims for them. The
payout is priced when the request is claimed, not now, but never below the
floor set here: by default the current net quote lowered by 50 bps, so a
fee rise or mark-down in between makes the claim fail rather than pay
less. A pending request
can be cancelled at any time with
[SolanaAdapter.vaultCancelRedeemRequest](#vaultcancelredeemrequest), which returns the shares.
Signs through the provider's wallet and submits one transaction, which
also creates the recipient's deposit-token account when it has none. The
holder pays the request account's rent, refunded when it is claimed or
cancelled, plus rent for any account created. Use
`getVaultAvailableRedemptions` to list requests and see when they can be
claimed.
RPC: three to four reads, then the send.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISolanaRequestRedeemParams`](#isolanarequestredeemparams) | Vault, wallet, shares, and optional recipient, finalizer, request id and floor. See [ISolanaRequestRedeemParams](#isolanarequestredeemparams). |
**Returns**
`Promise`\<[`ISolanaRequestRedeemResult`](#isolanarequestredeemresult)\>
The signature, the request's address (pass it as `request` to
claim or cancel) and its id.
**Throws**
UpshiftValidationError for bad input, a vault without an
attached queue, a frozen account or too few shares, before signing.
**Throws**
UpshiftSDKError when the transaction fails.
**Example**
```ts
const { request } = await sdk.solana.vaultRequestRedeem({
vault: vaultStateAddress,
wallet: wallet.publicKey,
amount: 10, // shares, UI units
});
// ...once the cooldown has run:
await sdk.solana.vaultRedeem(programId, vaultIdl, wallet.publicKey, 0n, undefined, undefined, { request });
```
## Interfaces
### ISolanaCancelRedeemRequestParams
Input to SolanaAdapter.vaultCancelRedeemRequest.
#### Properties
| Property | Type | Description |
| ------ | ------ | ------ |
| `request` | `string` \| `PublicKey` | The request account's address, as returned by `vaultRequestRedeem`. |
| `wallet` | `string` \| `PublicKey` | The holder who made the request; only they may cancel it. |
***
### ISolanaDepositOptions
Slippage protection for SolanaAdapter.vaultDeposit.
The SDK quotes the shares a deposit should mint from the vault's current
state and passes a floor to the program's `deposit_checked` instruction,
which reverts with `SlippageExceeded` if the share price moves past it
before execution.
#### Properties
| Property | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `minSharesOut?` | `bigint` | `undefined` | Explicit floor in raw share units, passed to `deposit_checked` as is. Skips the quote and the single snapshot read it needs. `0n` restores the unguarded behaviour of the plain `deposit` instruction. When the handler's `idl` predates `deposit_checked`, a non-zero floor or any `slippageBps` throws UpshiftValidationError instead of being silently dropped; with neither, the plain `deposit` is sent. Must be a `bigint` in `0 .. 2^64-1`; anything else throws UpshiftValidationError before the transaction is built. |
| `slippageBps?` | `number` | `50 (0.5%)` | Tolerance below the quoted shares, in basis points (`0` to `10000`). `0` demands the quote exactly. Ignored when `minSharesOut` is given. |
***
### ISolanaRedeemOptions
Slippage protection for SolanaAdapter.vaultRedeem.
The floor is measured **net of the withdrawal fee**, i.e. on what the wallet
actually receives, matching the program's `redeem_checked`.
#### Properties
| Property | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `minAssetsOut?` | `bigint` | `undefined` | Explicit floor in raw deposit-mint units, net of the withdrawal fee, passed to `redeem_checked` as is. Skips the quote. `0n` restores the unguarded behaviour of the plain `redeem` instruction. When the handler's `idl` predates `redeem_checked`, a non-zero floor or any `slippageBps` throws UpshiftValidationError instead of being silently dropped; with neither, the plain `redeem` is sent. |
| `request?` | `string` \| `PublicKey` | `undefined` | Claim this withdrawal request instead of redeeming instantly: the request account's address, as `id` on the entries `getVaultAvailableRedemptions` returns. Its shares, recipient and vault come from the request, so the `redeemShares` and `vaultAddress` arguments are ignored. The queue pays at the share price of the moment it settles, held to the floor the request was made with, so `slippageBps` and `minAssetsOut` must not be set alongside it. Required on a vault with a withdrawal queue attached, which refuses a direct redeem. See SolanaAdapter.vaultRequestRedeem. |
| `slippageBps?` | `number` | `50 (0.5%)` | Tolerance below the quoted net payout, in basis points (`0` to `10000`). `0` demands the quote exactly. Ignored when `minAssetsOut` is given. |
***
### ISolanaRequestRedeemParams
Input to SolanaAdapter.vaultRequestRedeem.
#### Properties
| Property | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `amount` | `number` \| `bigint` | `undefined` | Shares to escrow: `bigint` in raw share units, or `number` as a UI amount. |
| `finalizer?` | `string` \| `PublicKey` | `undefined` | The one key besides the holder that may claim the request, e.g. a keeper. Defaults to anyone, which is what lets a keeper settle requests for holders who do not come back. |
| `minAssetsOut?` | `bigint` | `undefined` | Explicit floor on the net payout, in raw deposit-mint units, stored on the request as is. Skips the quote. `0n` means no floor: the claim pays whatever the shares are worth when it lands. Must be a `bigint` in `0 .. 2^64-1`; anything else throws UpshiftValidationError before the transaction is built. |
| `recipient?` | `string` \| `PublicKey` | `undefined` | Wallet to pay when the request is claimed; its deposit-token account is created in the same transaction if it has none, at the holder's expense. Defaults to the holder. |
| `requestId?` | `bigint` | `undefined` | The request's id, unique per holder while it is pending. Defaults to a random `u64`; pass one only to choose it yourself. |
| `slippageBps?` | `number` | `50 (0.5%)` | Tolerance below the quoted net payout, in basis points (`0` to `10000`). The floor is fixed now and checked when the request is claimed, so it guards against a fee rise or an AUM mark-down in between; yield earned in the meantime only raises the payout. Ignored when `minAssetsOut` is given. |
| `vault` | `string` \| `PublicKey` | `undefined` | The vault's `VaultState` account address. |
| `wallet` | `string` \| `PublicKey` | `undefined` | The holder, who signs, escrows the shares and pays rent for the request. |
***
### ISolanaRequestRedeemResult
What SolanaAdapter.vaultRequestRedeem returns.
#### Properties
| Property | Type | Description |
| ------ | ------ | ------ |
| `request` | `string` | The new request account's address: pass it as `request` to claim or cancel. `getVaultAvailableRedemptions` lists it as `id`. |
| `requestId` | `string` | The request id, as a decimal string (a `u64`). |
| `signature` | `string` | The confirmed transaction's signature. |
## Variables
### Solana
> `const` **Solana**: `object`
**Type Declaration**
| Name | Type | Default value |
| ------ | ------ | ------ |
| `actions` | `__module` | `SolanaActions` |
| `constants` | `__module` | `SolanaConstants` |
| `getters` | `__module` | `SolanaGetters` |
| `utils` | `object` | `SolanaUtils` |
| `utils.deriveShareMintPda()` | (`vaultProgramId`) => `PublicKey` | - |
| `utils.deriveVaultStatePda()` | (`vaultProgramId`) => `PublicKey` | - |
| `utils.deriveVaultTokenAtaPda()` | (`vaultProgramId`, `depositMint`, `vaultVersion?`) => `PublicKey` | - |
| `utils.fallbackDecimals` | `number` | - |
| `utils.fallbackNetwork` | `ISolanaNetwork` | - |
| `utils.fetchUserShareBalance()` | (`__namedParameters`) => `Promise` | - |
| `utils.fetchUserShareBalanceRaw()` | (`__namedParameters`) => `Promise`\<\{ `amount`: `string`; `decimals`: `number`; \}\> | - |
| `utils.fetchUserTokenBalance()` | (`__namedParameters`) => `Promise` | - |
| `utils.getBestRpcEndpoint()` | (`__namedParameters`) => `Promise`\<`"http://127.0.0.1:8899"` \| `` `https://${string}` ``\> | - |
| `utils.getExplorerLink()` | (`__namedParameters`) => `string` | - |
| `utils.getProgram()` | (`__namedParameters`) => `Program` | - |
| `utils.getProvider()` | (`__namedParameters`) => `BlockhashConfirmingProvider` | - |
| `utils.getReadOnlyProvider()` | (`__namedParameters`) => `AnchorProvider` | - |
| `utils.getToken()` | (`__namedParameters`) => `Promise`\<\{ `address`: `string`; `decimals`: `number`; `image`: `string`; `name`: `string`; `symbol`: `string`; \}\> | - |
| `utils.getTokenSymbol()` | (`__namedParameters`) => `Promise` | - |
| `utils.getVaultMints()` | (`__namedParameters`) => `Promise`\<\{ `depositMint`: `string`; `shareMint`: `string`; `vaultVersion`: `number`; \}\> | - |
| `utils.getVaultState()` | (`__namedParameters`) => `Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `unknown`; \}\> | - |
| `utils.getVaultStateReadOnly()` | (`__namedParameters`) => `Promise`\<\{ `depositMintDecimals`: `number`; `vaultState`: `ISolanaVaultState`; \}\> | - |
| `utils.isSolana()` | (`signature`) => `boolean` | - |
| `utils.isSolanaAddress()` | (`address`) => `boolean` | - |
| `utils.programIds` | `object` | - |
| `utils.programIds.devnet` | `object` | - |
| `utils.programIds.devnet.vault` | `string` | `'up12bytoZBmwofqsySf2uqKQ7zpfeKiAWwfvqzJjtRt'` |
| `utils.programIds.devnet.withdrawalQueue` | `string` | `'upQhC7mgYwmHLVaatRWoGAu394piLT9th9FiQZHnPrW'` |
| `utils.programIds.localnet` | `object` | - |
| `utils.programIds.localnet.vault` | `string` | `'up12bytoZBmwofqsySf2uqKQ7zpfeKiAWwfvqzJjtRt'` |
| `utils.programIds.localnet.withdrawalQueue` | `string` | `'upQhC7mgYwmHLVaatRWoGAu394piLT9th9FiQZHnPrW'` |
| `utils.programIds.mainnet-beta` | `object` | - |
| `utils.programIds.mainnet-beta.vault` | `string` | `'up12bytoZBmwofqsySf2uqKQ7zpfeKiAWwfvqzJjtRt'` |
| `utils.programIds.mainnet-beta.withdrawalQueue` | `string` | `'upQhC7mgYwmHLVaatRWoGAu394piLT9th9FiQZHnPrW'` |
| `utils.resolveProgramId()` | (`vaultAddress`, `solanaMetadata?`) => `string` | - |
# StellarAdapter
> Stellar adapter for the Upshift SDK — Soroban vault deposits, redemptions, position queries, and signed-transaction submission.
Stellar Adapter for Upshift SDK
Provides Stellar vault operations: deposit, redeem, position queries,
and on-chain data fetching via Soroban RPC.
Stellar Adapter for Upshift SDK
**Example**
```
const adapter = new StellarAdapter('testnet');
const xdr = await adapter.vaultDeposit({
contractId: 'CBGWW5...',
amount: '1000000',
senderAddress: 'GDLZ...',
});
// Sign xdr with wallet (e.g. Freighter), then submit via adapter.submitTransaction()
```
## Constructors
### Constructor
> **new StellarAdapter**(`network?`, `options?`): `StellarAdapter`
**Parameters**
| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `network` | `IStellarNetwork` | `'mainnet'` | Stellar network to operate on; defaults to `'mainnet'`. |
| `options?` | \{ `sorobanRpcUrl?`: `string`; \} | `undefined` | Optional adapter configuration. Its `sorobanRpcUrl` field overrides the Soroban RPC endpoint (e.g. a keyed Alchemy URL): it becomes the primary with the SDK's built-in public endpoints kept behind it as failover, and a per-call `sorobanRpcUrl` (on the deposit/redeem params) takes precedence over this adapter-level one. |
| `options.sorobanRpcUrl?` | `string` | `undefined` | - |
**Returns**
`StellarAdapter`
## Accessors
### network
**Get Signature**
> **get** **network**(): `IStellarNetwork`
**Returns**
`IStellarNetwork`
## Methods
### convertToShares()
> **convertToShares**(`vaultAddress`, `rawAmount`): `Promise`
Preview how many vault shares a deposit amount would yield.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vaultAddress` | `string` | Stellar contract ID (C… address) |
| `rawAmount` | `string` | Deposit amount in the deposit token's smallest unit |
**Returns**
`Promise`
Raw share amount as a string, or null if query fails.
### getExplorerLink()
> **getExplorerLink**(`id`, `type?`): `string`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `id` | `string` |
| `type?` | `"tx"` \| `"account"` \| `"contract"` |
**Returns**
`string`
### getUserPosition()
> **getUserPosition**(`vaultAddress`, `walletAddress`): `Promise`
Get user's vault share balance.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `vaultAddress` | `string` |
| `walletAddress` | `string` |
**Returns**
`Promise`
The position `{ shares, decimals, decimalsFromFallback }`, or null
if the balance read fails. When `decimalsFromFallback` is `true` the
`decimals()` read failed and `decimals` is the fallback (7) — callers sizing
a redeem MUST refuse rather than trust it.
### isStellarAddress()
> **isStellarAddress**(`address`): `boolean`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `address` | `string` |
**Returns**
`boolean`
### submitTransaction()
> **submitTransaction**(`signedXdr`): `Promise`
Side effect: a submitted transaction that the network reports as a failed
`redeem` operation is reported to that vault's curator, on the same
fire-and-forget terms as [StellarAdapter.vaultRedeem](#vaultredeem).
Submit a signed Soroban transaction and poll until the network confirms it.
Submits on the network this adapter was constructed with, so `signedXdr`
must be signed for that same network.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signedXdr` | `string` | Base64-encoded XDR of the signed transaction. |
**Returns**
`Promise`
The transaction hash once the network confirms it as successful.
**Throws**
UpshiftTimeoutError when the transaction is not confirmed
within the poll budget (`MAX_POLL_ATTEMPTS`).
**Throws**
UpshiftSDKError when the RPC rejects the submission or the
transaction confirms as failed. Its `context` carries `{ network, status }`
plus, when the result XDR decodes, a `resultCode` string holding the
transaction-level reason (e.g. `"txBadSeq"`, `"txTooLate"`); `resultCode`
is `undefined` when the code cannot be decoded.
**Example**
```ts
try {
const hash = await adapter.submitTransaction(signedXdr);
} catch (err) {
if (err instanceof UpshiftSDKError && err.context?.resultCode === 'txBadSeq') {
// stale sequence number — rebuild the transaction and resubmit
}
}
```
### vaultDeposit()
> **vaultDeposit**(`params`): `Promise`
Build an unsigned deposit transaction for a Stellar vault.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `params` | `Omit`\<`IStellarDepositParams`, `"network"`\> |
**Returns**
`Promise`
Base64-encoded XDR of the unsigned transaction.
### vaultRedeem()
> **vaultRedeem**(`params`): `Promise`
Build an unsigned redeem transaction for a Stellar vault.
Side effect on failure: a redemption the vault cannot serve is reported to
that vault's curator, since Stellar vaults are instant-redeem only and this
is the curator's only signal. Fire-and-forget — it never delays or alters
the error you receive. On by default in production; see
`monitoring.curatorAlerts` and the Curator Notifications section of the
Stellar Actions guide for exactly what is sent and how to opt out.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `params` | `Omit`\<`IStellarRedeemParams`, `"network"`\> |
**Returns**
`Promise`
Base64-encoded XDR of the unsigned transaction.
## Variables
### Stellar
> `const` **Stellar**: `object`
**Type Declaration**
| Name | Type | Default value |
| ------ | ------ | ------ |
| `actions` | `__module` | `StellarActions` |
| `constants` | `__module` | `StellarConstants` |
| `getters` | `__module` | `StellarGetters` |
| `submit` | `__module` | `StellarSubmit` |
| `utils` | `object` | `StellarUtils` |
| `utils.assertNotStellar()` | (`address`, `operation`) => `void` | - |
| `utils.getExplorerLink()` | (`__namedParameters`) => `string` | - |
| `utils.isStellarAddress()` | (`address`) => `boolean` | - |
## References
### default
Renames and re-exports StellarAdapter
# SuiAdapter
> Sui adapter for the Upshift SDK — Move vault deposits, instant redemptions, and signed-transaction execution, plus Sui chain-identity helpers.
Sui Adapter for Upshift SDK
Sui Adapter for Upshift SDK.
Holds the Sui configuration passed to `new UpshiftSDK({ sui })`, the Sui
chain-identity helpers, and the vault deposit / instant-redeem builders.
Transactions run on the configured network.
**Example**
```ts
const sdk = new UpshiftSDK({ appName: 'my-app', sui: { network: 'testnet' } });
sdk.sui.network; // 'testnet'
sdk.sui.isSuiAddress(vault.address);
```
## Constructors
### Constructor
> **new SuiAdapter**(`config?`): `SuiAdapter`
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `config` | `ISuiConfig` | Optional Sui settings; omit to target Sui mainnet. |
**Returns**
`SuiAdapter`
## Accessors
### chainId
**Get Signature**
> **get** **chainId**(): `number`
The SDK's Sui chain ID, `-2` (same as the backend's `chain` for Sui vaults).
**Returns**
`number`
### network
**Get Signature**
> **get** **network**(): `ISuiNetwork`
Configured Sui network; `'mainnet'` unless the SDK was built with another.
**Returns**
`ISuiNetwork`
### rpcUrl
**Get Signature**
> **get** **rpcUrl**(): `string`
Configured RPC endpoint override, or `undefined` when none was given.
**Returns**
`string`
## Methods
### claimWithdrawal()
> **claimWithdrawal**(`params`): `Promise`
Build an unsigned claim of a withdrawal request on the configured
network: burns the escrowed shares and pays their current value, with no
instant fee, to the request's payout.
The payout lands in the payout address's address balance, not as a coin
object. A request can be claimed from `eligibleAtMs` until `expiresAtMs`
by its owner or finalizer (anyone when it names none), and by anyone from
one day after it became eligible.
RPC cost: one dry run.
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault, the `request` object ID, the `sender`, and optionally `minAssetsOut` or `slippageBps` (the minimum defaults to the dry run's payout less 0.1%). |
**Returns**
`Promise`
The unsigned transaction, the shares it burns, the dry run's
payout, and the minimum it enforces.
**Throws**
UpshiftValidationError for malformed input, unknown
contract IDs, or a request that no longer exists.
**Throws**
UpshiftVaultAbortError when the vault would reject it,
e.g. `not_eligible_yet`, `request_expired` or `insufficient_liquidity`.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
**Example**
```ts
const [pending] = await sdk.sui.getWithdrawalRequests({ ...vault, owner: account.address });
const { transaction } = await sdk.sui.claimWithdrawal({
...vault, request: pending.request, sender: account.address,
});
```
### executeTransaction()
> **executeTransaction**(`signed`): `Promise`
Execute a wallet-signed transaction on the configured network and wait
until it is indexed. Not needed when the wallet executes the transaction
itself (e.g. dApp Kit's `signAndExecuteTransaction`).
Side effect on failure: a failed instant redemption is reported to that
vault's curator with its digest (fire-and-forget).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signed` | `ISuiSignedTransaction` | `{ bytes, signature }` from the wallet's `signTransaction`. |
**Returns**
`Promise`
The transaction digest.
**Throws**
UpshiftVaultAbortError when the vault aborted it on chain.
**Throws**
UpshiftSDKError (`UNKNOWN`) when it failed otherwise.
**Throws**
UpshiftTransactionError when it executed but was not
indexed in time.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
### getWithdrawalRequests()
> **getWithdrawalRequests**(`params`): `Promise`\<`ISuiWithdrawalRequest`[]\>
A wallet's pending withdrawal requests on a vault, on the configured
network, oldest first. Finds every request made through the SDK however
old; claimed and cancelled requests are left out.
RPC cost: one object read for a wallet that has made up to 23 requests on
the vault (most wallets), one more per further 25.
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault and the `owner` wallet. |
**Returns**
`Promise`\<`ISuiWithdrawalRequest`[]\>
The pending requests, with shares, payout, and the times they
become claimable and expire; empty when there are none.
**Throws**
UpshiftValidationError for malformed input, or a vault ID
that is not an Upshift vault of a known or configured deployment.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
**Example**
```ts
const pending = await sdk.sui.getWithdrawalRequests({
vaultId, assetCoinType, shareCoinType, owner: account.address,
});
const now = Date.now();
const claimable = pending.filter(
(r) => r.eligibleAtMs <= now && (r.expiresAtMs === null || now < r.expiresAtMs),
);
```
### isSuiAddress()
> **isSuiAddress**(`address`): `boolean`
Check whether a string is a Sui address or object ID (`0x` + 64 hex chars).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `address` | `string` | Candidate address. |
**Returns**
`boolean`
`true` for the long, 64-hex-digit form only.
### isSuiVault()
> **isSuiVault**(`chainId`): `boolean`
Check whether a chain ID is Sui's (`-2`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `chainId` | `number` | Numeric chain ID, e.g. a backend vault row's `chain`. |
**Returns**
`boolean`
`true` only for `-2`.
### vaultCancelRedeemRequest()
> **vaultCancelRedeemRequest**(`params`): `Promise`
Build an unsigned cancellation of a pending withdrawal request on the
configured network; the escrowed shares go back to the sender. Allowed at
any time while the request exists, also while the vault is paused. Only
the wallet that made the request may cancel it.
RPC cost: one dry run.
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault, the `request` object ID and the `sender`. |
**Returns**
`Promise`
The unsigned transaction and the shares it returns.
**Throws**
UpshiftValidationError for malformed input, unknown
contract IDs, or a request that no longer exists.
**Throws**
UpshiftVaultAbortError when the vault would reject it,
e.g. `not_request_owner`.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
**Example**
```ts
const { transaction } = await sdk.sui.vaultCancelRedeemRequest({
vaultId, assetCoinType, shareCoinType, request, sender: account.address,
});
```
### vaultDeposit()
> **vaultDeposit**(`params`): `Promise`
Build an unsigned deposit on the configured network: charge the
management fee, deposit with a minimum share amount, send the shares to
the sender. Dry-runs it first, so a vault that would reject it fails here.
RPC cost: one dry run (plus the coin lookup it needs).
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault, `amount` in asset base units, the `sender`, and optionally `minSharesOut` or `slippageBps` (the minimum defaults to the dry run's preview less 0.1%). |
**Returns**
`Promise`
The unsigned transaction for the sender's wallet, the shares the
dry run minted, and the minimum it enforces.
**Throws**
UpshiftValidationError for malformed input, unknown
contract IDs, or a transaction that cannot be built.
**Throws**
UpshiftVaultAbortError when the vault would reject it.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
**Example**
```ts
const { transaction } = await sdk.sui.vaultDeposit({
vaultId: vault.address,
assetCoinType: vault.depositAssets[0].address,
shareCoinType: vault.receipt.address,
amount: 1_000_000n,
sender: account.address,
});
const digest = await sdk.sui.executeTransaction(
await dAppKit.signTransaction({ transaction }),
);
```
### vaultRedeem()
> **vaultRedeem**(`params`): `Promise`
Build an unsigned instant redemption on the configured network: charge
the management fee, redeem shares with a minimum net asset amount, send
the assets to the sender.
Dry-runs it first; a vault with a withdrawal queue attached fails with
`queue_attached`.
Side effect on failure: a redemption the vault rejects is reported to that
vault's curator (fire-and-forget; see `monitoring.curatorAlerts`).
RPC cost: one dry run (plus the coin lookup it needs).
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault, `shares` in share base units, the `sender`, and optionally `minAssetsOut` (net of the instant fee) or `slippageBps` (the minimum defaults to the dry run's preview less 0.1%). |
**Returns**
`Promise`
The unsigned transaction, the dry run's gross and net assets, and
the minimum it enforces.
**Throws**
UpshiftValidationError for malformed input, unknown
contract IDs, or a transaction that cannot be built.
**Throws**
UpshiftVaultAbortError when the vault would reject it.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
### vaultRequestRedeem()
> **vaultRequestRedeem**(`params`): `Promise`
Build an unsigned withdrawal request on the configured network, for a
vault with a withdrawal queue attached (where instant redemption is off).
Escrows the shares in a new request; dry-runs it first, so a vault that
would reject it fails here.
The request is priced when it is claimed. Once the vault's cooldown has
run, claim it with [SuiAdapter.claimWithdrawal](#claimwithdrawal); cancel it at any
time with [SuiAdapter.vaultCancelRedeemRequest](#vaultcancelredeemrequest). List a wallet's
requests with [SuiAdapter.getWithdrawalRequests](#getwithdrawalrequests).
RPC cost: one object read for a wallet with up to 23 earlier requests on
the vault (one more per further 25), then one dry run.
Plus the vault's package lookup (see `ISuiVaultRef.originalPackageId`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`ISuiAdapterVault`](#isuiadaptervault) & `object` | The vault, `shares` in share base units, the `sender`, and optionally `payout` (defaults to the sender) and `finalizer`: who besides the owner may claim during the first day the request is claimable (anyone may after). Defaults to the owner alone; pass a keeper address, or `null` to let anyone claim as soon as the cooldown ends. |
**Returns**
`Promise`
The unsigned transaction, the request ID, the request's object ID
(`request`) for claiming or cancelling, and `expectedAssets` at today's
price.
**Throws**
UpshiftValidationError for malformed input, unknown
contract IDs, or a transaction that cannot be built.
**Throws**
UpshiftVaultAbortError when the vault would reject it,
e.g. `queue_not_attached` (redeem instantly instead) or `paused`.
**Throws**
UpshiftNetworkError when every Sui endpoint fails.
**Example**
```ts
const { transaction, request } = await sdk.sui.vaultRequestRedeem({
vaultId: vault.address,
assetCoinType: vault.depositAssets[0].address,
shareCoinType: vault.receipt.address,
shares: 1_000_000n,
sender: account.address,
});
await sdk.sui.executeTransaction(await dAppKit.signTransaction({ transaction }));
```
## Interfaces
### ISuiAdapterVault
A Sui vault as the adapter methods take it; the network is the adapter's.
From an `IVault`: `vaultId` is `address`, `assetCoinType` is
`depositAssets[0].address`, `shareCoinType` is `receipt.address`.
#### Properties
| Property | Type | Description |
| ------ | ------ | ------ |
| `assetCoinType` | `string` | Move type of the deposit coin. |
| `shareCoinType` | `string` | Move type of the vault's share coin. |
| `vaultId` | `string` | Vault object ID (`0x` + 64 hex chars). |
## Variables
### Sui
> `const` **Sui**: `object`
Sui helpers by area: chain identity (`utils`), constants, the gRPC client
with failover (`client`), move-call targets (`targets`), vault reads
(`getters`) and deposit / instant-redeem builders (`actions`).
**Type Declaration**
| Name | Type | Default value |
| ------ | ------ | ------ |
| `actions` | `__module` | `SuiActions` |
| `client` | `__module` | `SuiClient` |
| `constants` | `__module` | `SuiConstants` |
| `getters` | `__module` | `SuiGetters` |
| `targets` | `__module` | `SuiTargets` |
| `utils` | `__module` | `SuiUtils` |
## References
### default
Renames and re-exports SuiAdapter
# UpshiftApi
> API reference for the UpshiftApi class (sdk.apiModule) — read-only backend reads: transparency dashboard, unrealized PnL, governance, fee config, and the authenticated loan-book and risk endpoints.
The Upshift backend API Module — read-only client for public backend
endpoints (transparency dashboard, unrealized PnL) and authenticated
loan-book / risk / OTC reads. Accessible as `sdk.apiModule`.
Read-only client for Upshift backend REST endpoints that have no on-chain
equivalent: the unrealized-PnL series, the transparency dashboard
(position snapshot, backing series, smoothed APY, allocations, fee config,
governance), plus authenticated loan-book / risk / OTC reads.
Every public method makes exactly one HTTPS request to the Upshift API and
zero RPC calls. Responses are not cached by the SDK: this is time-sensitive
state where staleness is worse than a request. Accessible as
`sdk.apiModule`; only the unrealized-PnL methods are also mirrored on the
root `UpshiftSDK` class.
**Extends:** `UpshiftBase`
## Constructors
### Constructor
> **new UpshiftApi**(`baseConfig`): `UpshiftApi`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `baseConfig` | `IUpshiftBase` |
**Returns**
`UpshiftApi`
**Overrides**
`UpshiftBase.constructor`
## Properties
| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| `activeNetwork?` | `public` | `IActiveNetwork` | - | `UpshiftBase.activeNetwork` |
| `appName` | `public` | `string` | Validated app-name slug from the constructor. | `UpshiftBase.appName` |
| `authorized` | `public` | `boolean` | - | `UpshiftBase.authorized` |
| `keys` | `public` | `IKeys` | - | `UpshiftBase.keys` |
| `monitoring` | `public` | `IMonitoring` | - | `UpshiftBase.monitoring` |
| `providers` | `public` | `IProvidersConfig` | - | `UpshiftBase.providers` |
## Methods
### clearWallet()
> **clearWallet**(): `void`
Remove wallet address from SDK state and monitoring headers.
**Returns**
`void`
**Inherited from**
`UpshiftBase.clearWallet`
### createKycSession()
> **createKycSession**(`options`): `Promise`
Open a KYC session with a signed challenge (`POST /kyc/session`). The
first call creates the user's Sumsub applicant; later calls resume it.
Every call activates the identity on `chainId`.
Makes one HTTPS request and never retries: the nonce is single use. On
any failure, fetch a new challenge before trying again.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `ICreateKycSessionOptions` | The challenge fields exactly as returned, plus `signature`. |
**Returns**
`Promise`
IKycSession with the Sumsub WebSDK `accessToken`.
**Throws**
UpshiftValidationError When an input is malformed.
**Throws**
UpshiftKycError When the backend answers non-2xx. `reason` names the
case; `retryable` is true for the in-progress and timed-out answers.
**Throws**
UpshiftServerError When the response body is malformed.
**Example**
```ts
const session = await sdk.apiModule.createKycSession({ ...challenge, signature });
openSumsubWidget(session.accessToken);
```
### getCollateralExcessOrDeficit()
> **getCollateralExcessOrDeficit**(`params`): `Promise`
Compute how much collateral a subaccount has in excess of — or is short
of — what it needs to hold a target health factor, for one collateral
token.
Backed by `GET /risk/collateral_excess_or_deficit` (60-second server-side
cache), which resolves the subaccount and reads its current health factor.
The backend serves this route to anonymous callers today, so no Upshift API
key is needed; pass one if you get `AUTH_UNAUTHORIZED`. Makes exactly one
HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `subaccount`: `string`; `targetHealthFactor?`: `number`; `tokenAddress`: `string`; `tokenChain`: `number`; \} | - |
| `params.subaccount` | `string` | Subaccount (smart-contract wallet) address. |
| `params.targetHealthFactor?` | `number` | Health factor to solve for. Defaults server-side to the minimum healthy factor (1.2); when supplied must be a finite number greater than 0. |
| `params.tokenAddress` | `string` | Collateral token address to evaluate. |
| `params.tokenChain` | `number` | Numeric Upshift chain id of the token (e.g. `1` for Ethereum mainnet). |
**Returns**
`Promise`
The signed excess (positive) or deficit (negative) in USD and token units. Zeroes when the subaccount has no debt.
**Throws**
UpshiftValidationError When an address is invalid, `tokenChain` is not an integer, or `targetHealthFactor` is out of range.
**Throws**
UpshiftServerError When the token has no discount factor (backend 404) or the API otherwise responds non-2xx.
**Example**
```ts
const r = await sdk.apiModule.getCollateralExcessOrDeficit({
subaccount: '0xabc…',
tokenAddress: '0xdef…',
tokenChain: 1,
});
console.log(r.amount_usd > 0 ? 'excess' : 'deficit');
```
### getCuratorVaultSubaccounts()
> **getCuratorVaultSubaccounts**(`vaultAddress`): `Promise`\<`IWSSubaccountListItem`[]\>
List the subaccounts linked to a vault (curator surface).
Backed by the curator-or-admin `GET
/curator/vaults/{vault_address}/subaccounts` backend endpoint, so the
configured Upshift API key must belong to the vault's curator or an admin.
Makes exactly one HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vaultAddress` | `string` | The vault address (EVM `0x…`, Solana, or Stellar) |
**Returns**
`Promise`\<`IWSSubaccountListItem`[]\>
Array of subaccount records linked to the vault (same shape as the subaccount directory); empty when none are linked.
**Throws**
UpshiftValidationError When `vaultAddress` is not a valid address.
**Throws**
UpshiftAuthError When the API key is missing or not curator/admin for the vault.
**Throws**
UpshiftServerError When the API responds with a non-2xx status.
**Example**
```ts
const subs = await sdk.apiModule.getCuratorVaultSubaccounts('0xvault…');
```
### getCuratorVaultWhitelist()
> **getCuratorVaultWhitelist**(`vaultAddress`): `Promise`\<`ICuratorWhitelistStatus`[]\>
Get on-chain whitelist status for every subaccount linked to a vault
(curator surface).
Backed by the curator-or-admin `GET
/curator/vaults/{vault_address}/whitelist` backend endpoint. EVM vaults
only — non-EVM vaults manage access internally and the backend returns a
400 (surfaced as UpshiftServerError). Makes exactly one HTTP
request and no RPC calls from the SDK.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vaultAddress` | `string` | The EVM vault address (`0x…`) |
**Returns**
`Promise`\<`ICuratorWhitelistStatus`[]\>
Array of ICuratorWhitelistStatus, one per linked subaccount; empty when the vault has no subaccounts.
**Throws**
UpshiftValidationError When `vaultAddress` is not a valid address.
**Throws**
UpshiftAuthError When the API key is missing or not curator/admin for the vault.
**Throws**
UpshiftServerError When the vault is non-EVM (backend 400) or the API otherwise responds non-2xx.
**Example**
```ts
const status = await sdk.apiModule.getCuratorVaultWhitelist('0xvault…');
console.log(status.filter((s) => !s.is_whitelisted));
```
### getDashboardLoans()
> **getDashboardLoans**(): `Promise`\<`ILoanBookInfo`[]\>
Retrieve the global loan-book aggregate across every active client
subaccount — one ILoanBookInfo entry per loan, with principal /
interest amounts, APRs, state, and the next upcoming payment.
Backed by the admin-only `GET /dashboard/loans` backend endpoint (60-second
server-side cache), so the Upshift API key configured on the SDK must
belong to an admin user. Makes exactly one HTTP request and no RPC calls.
**Returns**
`Promise`\<`ILoanBookInfo`[]\>
Array of loan-book entries; empty when there are no active loans.
**Throws**
UpshiftAuthError When the API key is missing or not admin-scoped.
**Throws**
UpshiftServerError When the API responds with a non-2xx status.
**Example**
```ts
const loans = await sdk.apiModule.getDashboardLoans();
const active = loans.filter((l) => l.state === 'ACTIVE');
```
### getDiscountFactors()
> **getDiscountFactors**(): `Promise`\<`IDiscountFactorLadder`[]\>
Retrieve every token discount-factor ladder the risk engine applies when
valuing collateral.
Backed by `GET /risk/discount_factors` (60-second server-side cache),
which requires an authenticated Upshift user; an admin-scoped API key
works. Makes exactly one HTTP request and no RPC calls.
**Returns**
`Promise`\<`IDiscountFactorLadder`[]\>
Array of IDiscountFactorLadder, one per whitelisted token that has a configured ladder.
**Throws**
UpshiftAuthError When the API key is missing or not authorized.
**Throws**
UpshiftServerError When the API responds with a non-2xx status.
**Example**
```ts
const ladders = await sdk.apiModule.getDiscountFactors();
console.log(ladders.map((d) => `${d.address}@${d.chain}`));
```
### getKycChallenge()
> **getKycChallenge**(`params`): `Promise`
Fetch a one-time SIWE challenge that proves the wallet is the user's
before KYC starts (`GET /kyc/challenge`).
Makes one HTTPS request to the public Upshift API; no RPC calls. Never
cached: the nonce is single use and expires after 600 s.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `wallet`: `` `0x${string}` ``; \} | `wallet`, the EVM wallet that will sign `message`, and `chainId`, the EVM chain whose `KycRegistry` the session activates. |
| `params.chainId` | `number` | - |
| `params.wallet` | `` `0x${string}` `` | - |
**Returns**
`Promise`
IKycChallenge. Sign `message` verbatim with `personal_sign`.
**Throws**
UpshiftValidationError When `wallet` or `chainId` is malformed.
**Throws**
UpshiftKycError When the backend answers non-2xx: `no_registry` (400) or `unavailable` (503).
**Throws**
UpshiftServerError When the response body is malformed.
**Example**
```ts
const challenge = await sdk.apiModule.getKycChallenge({ wallet, chainId: 1 });
const signature = await walletClient.signMessage({ message: challenge.message });
```
### getLatestUnrealizedPnl()
> **getLatestUnrealizedPnl**(): `Promise`\<`IUnrealizedPnlSnapshot`[]\>
Fetch the latest unrealized-PnL snapshot for every vault the backend
tracks — one entry per vault.
Makes one HTTPS request to the public Upshift API; no RPC calls.
**Returns**
`Promise`\<`IUnrealizedPnlSnapshot`[]\>
Array of IUnrealizedPnlSnapshot, one per tracked vault.
**Throws**
UpshiftServerError When the API responds with a 5xx, or returns a body that is not a snapshot array.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const all = await sdk.getLatestUnrealizedPnl();
const losing = all.filter((s) => s.unrealizedPnl < 0);
```
### getOtcMarginRequirements()
> **getOtcMarginRequirements**(`options?`): `Promise`\<`IOtcMarginRequirement`[]\>
Retrieve OTC margin requirements, optionally filtered by counterparty
and/or payer.
Backed by the admin-only `GET /otc/margin_requirement` backend endpoint,
so the configured Upshift API key must belong to an admin user. Makes
exactly one HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | \{ `otcCounterpartyId?`: `string`; `payer?`: `string`; \} | Optional filters |
| `options.otcCounterpartyId?` | `string` | Restrict to a single counterparty (UUID) |
| `options.payer?` | `string` | Restrict to a single payer address |
**Returns**
`Promise`\<`IOtcMarginRequirement`[]\>
Array of IOtcMarginRequirement matching the filters (all when none given).
**Throws**
UpshiftAuthError When the API key is missing or not admin-scoped.
**Throws**
UpshiftServerError When the API responds with a non-2xx status.
**Example**
```ts
const reqs = await sdk.apiModule.getOtcMarginRequirements({ payer: '0xabc…' });
```
### getOtcPositions()
> **getOtcPositions**(): `Promise`\<`IOtcPositionRead`[]\>
Retrieve every tracked OTC position.
Backed by the admin-only `GET /otc/position` backend endpoint, so the
configured Upshift API key must belong to an admin user. Makes exactly one
HTTP request and no RPC calls.
**Returns**
`Promise`\<`IOtcPositionRead`[]\>
Array of IOtcPositionRead; empty when there are no OTC positions.
**Throws**
UpshiftAuthError When the API key is missing or not admin-scoped.
**Throws**
UpshiftServerError When the API responds with a non-2xx status.
**Example**
```ts
const positions = await sdk.apiModule.getOtcPositions();
```
### getRevertReason()
> **getRevertReason**(`txHash`, `chain`): `Promise`
Fetch the decoded revert reason(s) for a transaction — error messages,
revert strings, and recognized universal-subaccount errors extracted from
a `debug_traceTransaction` call tree.
Backed by the public (unauthenticated) `GET /revert_reason` endpoint; no
API key required. The backend relies on the target chain's RPC supporting
`debug_trace*`; on chains/RPCs without it the backend returns a 5xx whose
detail explains why, surfaced here as an UpshiftServerError. Makes
exactly one HTTP request and no RPC calls from the SDK itself.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `txHash` | `string` | Transaction hash to trace. |
| `chain` | `number` | Numeric Upshift chain id the transaction is on (e.g. `1` for Ethereum mainnet). |
**Returns**
`Promise`
The decoded IRevertReason; all arrays empty when the trace yielded no matching signal.
**Throws**
UpshiftValidationError When `txHash` is empty or `chain` is not an integer.
**Throws**
UpshiftServerError When the chain/RPC does not support tracing, or the API otherwise responds non-2xx.
**Example**
```ts
const r = await sdk.apiModule.getRevertReason('0xabc…', 1);
console.log(r.revert_reasons);
```
### getTimelockRequests()
> **getTimelockRequests**(`params`): `Promise`\<`ITimelockRequest`[]\>
List timelock (governance) requests for a vault on a chain, optionally
filtered by status.
Backed by the `GET /timelock-requests` backend endpoint. Makes exactly one
HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `status?`: `string`; `vaultAddress`: `string`; \} | - |
| `params.chainId` | `number` | Numeric Upshift chain id (must be a positive integer). |
| `params.status?` | `string` | Status filter: `"scheduled"` (backend default), `"executed"`, `"cancelled"`, or `"all"`. Omit to use the backend default. |
| `params.vaultAddress` | `string` | The vault address the requests target. |
**Returns**
`Promise`\<`ITimelockRequest`[]\>
Array of ITimelockRequest; empty when the vault has no matching requests.
**Throws**
UpshiftValidationError When `vaultAddress` is invalid or `chainId` is not a positive integer.
**Throws**
UpshiftServerError When the API responds with a non-2xx status (e.g. an invalid status filter).
**Example**
```ts
const reqs = await sdk.apiModule.getTimelockRequests({ vaultAddress: '0xvault…', chainId: 1 });
```
### getVaultBackingSeries()
> **getVaultBackingSeries**(`params`): `Promise`\<`ITransparencyRatioPoint`[]\>
Fetch the backing / supply / collateral-ratio time series behind the
Performance tab's "Backing vs Supply" and "Collateral Ratio" charts, and
the Overview sidebar's 7-day deltas.
Public `GET /upshift/unrealized_pnl?fields=ratio`; no API key. One HTTPS
request, no RPC. Points are hourly, returned newest-first — sort before
charting. `actual_tvl` = backing (mark-to-market), `tvl_on_vault` = supply
(vault-reported), `adjusted_redeem_ratio` = collateral ratio.
Unlike the chain-scoped transparency endpoints (positions, fees,
governance…), this one is keyed by vault address only and accepts
non-EVM (Solana / Stellar) vaults — same contract as
[UpshiftApi.getVaultUnrealizedPnlHistory](#getvaultunrealizedpnlhistory), which it shares a route with.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `endDate?`: `string`; `limit?`: `number`; `startDate?`: `string`; `vault`: `string`; \} | - |
| `params.endDate?` | `string` | Optional inclusive upper bound, `YYYY-MM-DD`. |
| `params.limit?` | `number` | Optional max points. |
| `params.startDate?` | `string` | Optional inclusive lower bound, `YYYY-MM-DD`. |
| `params.vault` | `string` | Vault address (EVM, Solana, or Stellar). |
**Returns**
`Promise`\<`ITransparencyRatioPoint`[]\>
Array of ITransparencyRatioPoint; empty when no history.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const pts = await sdk.apiModule.getVaultBackingSeries({ vault, startDate: '2026-08-01' });
const ratio = pts.map((p) => p.adjusted_redeem_ratio * 100); // percent
```
### getVaultFeeConfig()
> **getVaultFeeConfig**(`params`): `Promise`
Fetch a vault's fee configuration — the Performance tab's fee card.
Public `GET /upshift/fees/{vault_address}`; no API key. One HTTPS
request, no RPC. Percent fields are already scaled (`management_fee_pct`
of `1.5` means 1.5%).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyFees.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const fees = await sdk.apiModule.getVaultFeeConfig({ vault, chainId: 143 });
console.log(`${fees.management_fee_pct}% mgmt / ${fees.performance_fee_pct}% perf`);
```
### getVaultGovernanceAuditLog()
> **getVaultGovernanceAuditLog**(`params`): `Promise`
Fetch one page of the vault's governance audit log, newest first — the
Governance tab's "Audit Log" timeline. Merges live timelock events with
manually recorded entries (attestations, permission changes).
Public `GET /upshift/governance/{vault_address}/audit_log`; no API key.
Paginate with `before` = the last returned entry's `timestamp` while
`has_more` is true (exclusive cursor; ties at the exact boundary
timestamp are skipped, never duplicated).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `before?`: `string`; `category?`: `ITransparencyAuditCategory`; `chainId`: `number`; `limit?`: `number`; `vault`: `string`; \} | - |
| `params.before?` | `string` | Optional exclusive cursor — pass the previous page's last `entry.timestamp` back verbatim (naive-UTC, no offset). |
| `params.category?` | `ITransparencyAuditCategory` | Optional ITransparencyAuditCategory filter. Any other string is rejected with `UpshiftValidationError` before a request is made. |
| `params.chainId` | `number` | Numeric chain id. |
| `params.limit?` | `number` | Page size, 1–200. Backend default 50. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyAuditLog.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
// Walk the whole log, newest first.
let before: string | undefined;
do {
const page = await sdk.apiModule.getVaultGovernanceAuditLog({ vault, chainId: 1, before, limit: 50 });
for (const e of page.entries) console.log(e.timestamp, e.type, e.summary);
before = page.has_more ? page.entries.at(-1)?.timestamp : undefined;
} while (before);
```
### getVaultGovernancePermissions()
> **getVaultGovernancePermissions**(`params`): `Promise`
Fetch the integrations each vault wallet is whitelisted to operate —
the Governance tab's "Vault Permissions" table.
Public `GET /upshift/governance/{vault_address}/permissions`; no API key.
One HTTPS request, no RPC.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyGovernancePermissions.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const { permissions } = await sdk.apiModule.getVaultGovernancePermissions({ vault, chainId: 143 });
for (const p of permissions) console.log(p.integration, p.functions.join(','));
```
### getVaultGovernanceRoles()
> **getVaultGovernanceRoles**(`params`): `Promise`
Fetch the vault's privileged addresses (owner / operators) with custody
enrichment — the Governance tab's "Vault Roles" card.
Public `GET /upshift/governance/{vault_address}/roles`; no API key. One
HTTPS request from the SDK (the backend performs the on-chain reads).
Third-party enrichment failures (Safe / Fordefi) degrade rows and append
to `warnings` rather than failing.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyGovernanceRoles.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const { roles, warnings } = await sdk.apiModule.getVaultGovernanceRoles({ vault, chainId: 143 });
const owner = roles.find((r) => r.role === 'owner'); // owner?.is_safe → Safe threshold in safe_threshold
```
### getVaultGovernanceTimelocks()
> **getVaultGovernanceTimelocks**(`params`): `Promise`
Fetch the vault's timelock queue — the Governance tab's "Pending
Timelocks" table. Defaults to pending (`scheduled`) requests.
Public `GET /upshift/governance/{vault_address}/timelocks`; no API key.
`executable_at` is `scheduled_at + TIMELOCK_DURATION()` read live from
the timelock contract; null (plus a warning) when that read failed.
The default filter is pending only — the list is often empty; pass
`status: 'all'` for history. `getTimelockRequests` returns the raw
backend rows; this returns the dashboard view (labels, `executable_at`,
warnings).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `status?`: `ITransparencyTimelockStatus` \| `"all"`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id. |
| `params.status?` | `ITransparencyTimelockStatus` \| `"all"` | Filter: a single ITransparencyTimelockStatus or `'all'`. Default `'scheduled'`. Any other string is rejected with `UpshiftValidationError` before a request is made. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyTimelocks.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const { timelocks } = await sdk.apiModule.getVaultGovernanceTimelocks({ vault, chainId: 1 }); // pending only
const ready = timelocks.filter((t) => t.executable_at && Date.parse(`${t.executable_at}Z`) <= Date.now());
```
### getVaultHistoricalAllocations()
> **getVaultHistoricalAllocations**(`params`): `Promise`
Fetch daily allocation history per protocol — the Performance tab's
"Allocation Over Time" chart.
Public `GET /upshift/historical_allocations/{vault_address}`; no API key.
One HTTPS request, no RPC.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `endDate?`: `string`; `startDate?`: `string`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id. |
| `params.endDate?` | `string` | Optional inclusive upper bound, `YYYY-MM-DD`. |
| `params.startDate?` | `string` | Optional inclusive lower bound, `YYYY-MM-DD`. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyHistoricalAllocations.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const h = await sdk.apiModule.getVaultHistoricalAllocations({ vault, chainId: 143, startDate: '2026-08-01' });
const byDate = Map.groupBy(h.points, (p) => p.date);
```
### getVaultOracleClassification()
> **getVaultOracleClassification**(`vault`, `chainId`): `Promise`
Fetch a vault's NAV-oracle classification table — how each position/token
is priced (Primary / Secondary Market / CeFi) and its USD value, plus
warnings for tokens that could not be resolved.
Backed by the public (unauthenticated) `GET
/upshift/oracle_classification/{vault_address}` endpoint; no API key
required. Reads the newest daily snapshot. Makes exactly one HTTP request
and no RPC calls from the SDK.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `vault` | `string` | The vault address (EVM `0x…`, Solana, or Stellar). |
| `chainId` | `number` | Numeric Upshift chain id the vault lives on. |
**Returns**
`Promise`
The vault's IOracleClassification.
**Throws**
UpshiftValidationError When `vault` is invalid or `chainId` is not an integer.
**Throws**
UpshiftServerError When the vault or its snapshot is not found, or the API otherwise responds non-2xx.
**Example**
```ts
const cls = await sdk.apiModule.getVaultOracleClassification('0xvault…', 1);
console.log(cls.warnings);
```
### getVaultPerformanceFees()
> **getVaultPerformanceFees**(`params`): `Promise`
Compute a vault's performance fees over a period (backend-computed from
its snapshot history).
Backed by `GET /metrics/vault_performance_fees`. The backend runs pandas
over the vault's full snapshot history, so the first call is slow; results
are cached server-side for 20 minutes. Makes exactly one HTTP request and
no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `annualizedFeesPct?`: `number`; `calculationPeriod?`: `string`; `endDate?`: `string`; `nativeDenominated?`: `boolean`; `startDate?`: `string`; `vault`: `string`; \} | - |
| `params.annualizedFeesPct?` | `number` | Annualized performance-fee percentage. Defaults to 20. |
| `params.calculationPeriod?` | `string` | Period preset — `"YearToDate"` (default) or `"MonthToDate"`. Ignored by the backend when a custom `startDate`/`endDate` range is supplied. |
| `params.endDate?` | `string` | ISO-8601 datetime range end. Must be supplied together with `startDate`. |
| `params.nativeDenominated?` | `boolean` | Whether to denominate in the vault's native token. Defaults to `true`. |
| `params.startDate?` | `string` | ISO-8601 datetime range start. Must be supplied together with `endDate`. |
| `params.vault` | `string` | The vault address (EVM `0x…`, Solana, or Stellar). |
**Returns**
`Promise`
The vault's IVaultPerformanceFees computation.
**Throws**
UpshiftValidationError When `vault` is invalid, or exactly one of `startDate`/`endDate` is supplied.
**Throws**
UpshiftServerError When there is insufficient snapshot data for the period, or the API otherwise responds non-2xx.
**Example**
```ts
const fees = await sdk.apiModule.getVaultPerformanceFees({ vault: '0xvault…' });
console.log(fees.total_perf_fees_asset);
```
### getVaultPositionSnapshot()
> **getVaultPositionSnapshot**(`params`): `Promise`
Fetch the latest position snapshot for a vault, grouped per wallet — the
data behind the transparency Overview tab (strategy breakdown, backing
composition, vault buffer, per-wallet table, headline TVL).
Public `GET /upshift/positions/{vault_address}`; no API key. One HTTPS
request, no RPC. Snapshots land hourly; every field is from the single
`snapshot_at` instant. Vault buffer = `total_nav − Σ subaccounts[].total_usd`;
`reported_tvl` is the vault-contract-reported total assets from the same snapshot.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `chainId`: `number`; `vault`: `string`; \} | - |
| `params.chainId` | `number` | Numeric chain id the vault lives on. |
| `params.vault` | `string` | EVM vault address. |
**Returns**
`Promise`
ITransparencyPositions.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const p = await sdk.apiModule.getVaultPositionSnapshot({ vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA', chainId: 143 });
const buffer = p.total_nav - p.subaccounts.reduce((a, s) => a + s.total_usd, 0);
```
### getVaultSmoothedApy()
> **getVaultSmoothedApy**(`params`): `Promise`
Fetch the smoothed 7-day APY series — the exact series the Upshift app
charts (Overview "APY last 30 days" and Performance "APY Over Time").
Public `GET /upshift/historical_apy/chart`; no API key. One HTTPS request,
no RPC. The backend marks this route deprecated in its OpenAPI spec but it
remains the series the Upshift app itself charts; this wrapper tracks it.
The backend applies a rolling-median/mean smoothing filter server-side
when `applySmoothing` is true (the app default); computing APY locally from
raw share ratios will NOT match the published figures.
Unlike the chain-scoped transparency endpoints (positions, fees,
governance…), this one is keyed by vault address only and accepts
non-EVM (Solana / Stellar) vaults.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `applySmoothing?`: `boolean`; `averagingPeriodDays?`: `number`; `daysAgo?`: `number`; `vault`: `string`; \} | - |
| `params.applySmoothing?` | `boolean` | Apply the backend smoothing filter. Default true. |
| `params.averagingPeriodDays?` | `number` | Rolling window for the annualized return; must be ≥ 2. Default 7 (the app's "7D APY"). |
| `params.daysAgo?` | `number` | Window length in days; pass `-1` for the full history since inception. Default 30. |
| `params.vault` | `string` | Vault address (EVM, Solana, or Stellar). |
**Returns**
`Promise`
ITransparencyApySeries — `labels` are `M/D/YYYY`, `values` are decimal fractions (0.0245 = 2.45%). Empty arrays when the vault has no data.
**Throws**
UpshiftValidationError When arguments fail validation (no request is made).
**Throws**
UpshiftServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
**Throws**
UpshiftServerError (status 200) When the body is not the documented shape — backend contract drift.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const apy = await sdk.apiModule.getVaultSmoothedApy({ vault, daysAgo: 30 });
console.log(apy.values.at(-1)); // latest 7D APY as a fraction
```
### getVaultUnrealizedPnlHistory()
> **getVaultUnrealizedPnlHistory**(`params`): `Promise`\<`IUnrealizedPnlSnapshot`[]\>
Fetch the historical unrealized-PnL series for a vault, newest first,
as computed by the Upshift backend from periodic vault snapshots.
Makes one HTTPS request to the public Upshift API; no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `limit?`: `number`; `vault`: `string`; \} | - |
| `params.limit?` | `number` | Maximum number of snapshots to return (1–1000). Backend default applies when omitted. |
| `params.vault` | `string` | Vault address (EVM `0x…`, Solana, or Stellar). |
**Returns**
`Promise`\<`IUnrealizedPnlSnapshot`[]\>
Array of IUnrealizedPnlSnapshot; empty when the backend has no history for the vault.
**Throws**
UpshiftValidationError When `vault` is not a valid address or `limit` is out of range.
**Throws**
UpshiftServerError When the API responds with a 5xx, or returns a body that is not a snapshot array.
**Throws**
UpshiftRateLimitError When the API responds 429.
**Throws**
UpshiftTimeoutError When the request exceeds the SDK request timeout.
**Example**
```ts
const series = await sdk.getVaultUnrealizedPnlHistory({ vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA', limit: 30 });
console.log(series[0]?.unrealizedPnlInAsset);
```
### init()
> **init**(): `Promise`
Verify the configured Upshift API key and mark this instance as authorized.
Only for SDKs built with `keys.upshift`; a keyless SDK skips `init()`.
**Returns**
`Promise`
**Throws**
Error when `keys.upshift` is missing or rejected by the API.
**Inherited from**
`UpshiftBase.init`
### refreshKycSession()
> **refreshKycSession**(`params`): `Promise`
Get a fresh Sumsub WebSDK access token for an open session without a new
signature (`POST /kyc/session/refresh`). A session lasts 4 h.
Makes one HTTPS request; no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | \{ `sessionToken`: `string`; \} | `sessionToken` from [UpshiftApi.createKycSession](#createkycsession). |
| `params.sessionToken` | `string` | - |
**Returns**
`Promise`
The new Sumsub access token.
**Throws**
UpshiftValidationError When `sessionToken` is malformed.
**Throws**
UpshiftKycError When the backend answers non-2xx: `session_expired` (401) once the session ends or the wallet is unbound.
**Example**
```ts
const expirationHandler = () => sdk.apiModule.refreshKycSession({ sessionToken });
```
### simulateCollateral()
> **simulateCollateral**(`input`): `Promise`
Simulate the collateral required to open a hypothetical loan against a
chosen basket of collateral tokens.
This is a pure, read-only simulation: the backend `POST
/risk/collateral_simulation` endpoint (60-second server-side cache)
computes required collateral and effective discount factors and changes
no state. The route is public, so no Upshift API key is needed. Makes
exactly one HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `input` | `ICollateralSimulationInput` | Simulation parameters — see ICollateralSimulationInput. `collateral_tokens` and `collateral_token_allocation` must be non-empty and equal length; when `on_platform` is `true`, both `loan_redeployed_token_*` fields are required. |
**Returns**
`Promise`
The simulated ICollateralSimulationResults: total debt, required collateral, resulting health factor, and a per-token breakdown.
**Throws**
UpshiftValidationError When addresses are invalid, `loan_amount` is not a finite non-negative number, the collateral arrays are empty / mismatched, or `on_platform` is set without redeployed-token details.
**Throws**
UpshiftServerError When the API responds with a non-2xx status (e.g. a token missing a discount factor).
**Example**
```ts
const sim = await sdk.apiModule.simulateCollateral({
loan_token_chain: 1,
loan_token_address: '0xloan…',
loan_amount: 1_000_000,
collateral_tokens: [[1, '0xcol…']],
collateral_token_allocation: [1],
});
console.log(sim.total_required_collateral_usd);
```
### switchNetwork()
> **switchNetwork**(`chainId`): `void`
Switch the active blockchain network.
Updates both chain ID and RPC URL for subsequent operations.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `chainId` | `number` |
**Returns**
`void`
**Inherited from**
`UpshiftBase.switchNetwork`
### updateWallet()
> **updateWallet**(`address`): `void`
Set active wallet address and update monitoring headers.
Preserves existing environment setting.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `address` | `` `0x${string}` `` |
**Returns**
`void`
**Inherited from**
`UpshiftBase.updateWallet`
# UpshiftSDK
> API reference for the UpshiftSDK class — the main entry point for interacting with Upshift vaults and services across EVM, Solana, Sui, and Stellar.
The main Upshift SDK class.
Main SDK class for interacting with Upshift vaults and services.
Provides unified access to EVM, Solana, Sui, and Stellar blockchain adapters.
**Extends:** `UpshiftBase`
## Constructors
### Constructor
> **new UpshiftSDK**(`baseConfig`): `UpshiftSDK`
Initialize the Upshift SDK with provider configuration.
Automatically sets up EVM adapter and optionally initializes Solana if RPC URL is provided.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `baseConfig` | `IUpshiftBase` |
**Returns**
`UpshiftSDK`
**Overrides**
`UpshiftBase.constructor`
## Properties
| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| `activeNetwork?` | `public` | `IActiveNetwork` | - | `UpshiftBase.activeNetwork` |
| `appName` | `public` | `string` | Validated app-name slug from the constructor. | `UpshiftBase.appName` |
| `authorized` | `public` | `boolean` | - | `UpshiftBase.authorized` |
| `evm` | `public` | [`default`](/sdk/reference/evm-adapter) | - | - |
| `keys` | `public` | `IKeys` | - | `UpshiftBase.keys` |
| `monitoring` | `public` | `IMonitoring` | - | `UpshiftBase.monitoring` |
| `providers` | `public` | `IProvidersConfig` | - | `UpshiftBase.providers` |
| `solana` | `public` | [`default`](/sdk/reference/solana-adapter) | - | - |
| `stellar` | `public` | [`StellarAdapter`](/sdk/reference/stellar-adapter) | - | - |
| `sui` | `public` | [`SuiAdapter`](/sdk/reference/sui-adapter) | - | - |
## Accessors
### apiModule
**Get Signature**
> **get** **apiModule**(): [`UpshiftApi`](/sdk/reference/upshift-api)
Get the backend API module instance ([UpshiftApi](/sdk/reference/upshift-api)) — read-only
access to backend-computed data with no on-chain equivalent: the
unrealized-PnL series and the transparency dashboard (position snapshot,
backing series, smoothed APY, allocations, fee config, governance).
**Returns**
[`UpshiftApi`](/sdk/reference/upshift-api)
### subAccountsModule
**Get Signature**
> **get** **subAccountsModule**(): [`UpshiftSubAccounts`](/sdk/reference/upshift-subaccounts)
Get the Sub-Accounts module instance.
**Returns**
[`UpshiftSubAccounts`](/sdk/reference/upshift-subaccounts)
### vaultsModule
**Get Signature**
> **get** **vaultsModule**(): [`UpshiftVaults`](/sdk/reference/upshift-vaults)
Get the Vaults module instance.
**Returns**
[`UpshiftVaults`](/sdk/reference/upshift-vaults)
## Methods
### clearWallet()
> **clearWallet**(): `void`
Clear the active wallet address from the SDK state and monitoring headers.
**Returns**
`void`
**Overrides**
`UpshiftBase.clearWallet`
### fetchPointsLeaderboard()
> **fetchPointsLeaderboard**(`params?`): `Promise`
Fetch the points leaderboard data.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params?` | \{ `page?`: `number`; `perPage?`: `number`; `sortBy?`: `"streakDays"` \| `"totalPoints"`; \} | Optional parameters for pagination and sorting |
| `params.page?` | `number` | - |
| `params.perPage?` | `number` | - |
| `params.sortBy?` | `"streakDays"` \| `"totalPoints"` | - |
**Returns**
`Promise`
Leaderboard response data
### getKycRecord()
> **getKycRecord**(`options`): `Promise`
Read a wallet's raw record (blocked flag and Unix-second timestamps) in
the `KycRegistry` a vault enforces. Delegates to
[UpshiftVaults.getKycRecord](/sdk/reference/upshift-vaults#getkycrecord).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `Omit`\<`IKycWalletOptions`, `"rpcUrl"`\> | `chainId`, the KYC `vault` and the `wallet`. |
**Returns**
`Promise`
IKycRecord.
**Throws**
UpshiftValidationError when no provider is configured for
`chainId`, `vault` or `wallet` is malformed, or the vault's share token
has no transfer policy.
**Throws**
UpshiftSDKError when a read fails.
**Example**
```ts
const { expiresAt } = await upshiftSdk.getKycRecord({ chainId: 1, vault, wallet });
```
### getKycStatus()
> **getKycStatus**(`options`): `Promise`
Read a wallet's status in the `KycRegistry` a vault enforces. Delegates to
[UpshiftVaults.getKycStatus](/sdk/reference/upshift-vaults#getkycstatus).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | `Omit`\<`IKycWalletOptions`, `"rpcUrl"`\> | `chainId`, the KYC `vault` and the `wallet`. |
**Returns**
`Promise`
`'none' | 'active' | 'expired' | 'blocked'`.
**Throws**
UpshiftValidationError when no provider is configured for
`chainId`, `vault` or `wallet` is malformed, or the vault's share token
has no transfer policy.
**Throws**
UpshiftSDKError when a read fails.
**Example**
```ts
const status = await upshiftSdk.getKycStatus({ chainId: 1, vault, wallet });
```
### getLatestUnrealizedPnl()
> **getLatestUnrealizedPnl**(): `Promise`\<`IUnrealizedPnlSnapshot`[]\>
Fetch the latest unrealized-PnL snapshot for every tracked vault.
Delegates to [UpshiftApi.getLatestUnrealizedPnl](/sdk/reference/upshift-api#getlatestunrealizedpnl) — see it for
return shape and thrown errors.
**Returns**
`Promise`\<`IUnrealizedPnlSnapshot`[]\>
### getLayerZeroDeposits()
> **getLayerZeroDeposits**(`props`): `Promise`\<`ILayerZeroDeposit`[]\>
Query LayerZero USDC deposits from the august-layerzero subgraphs.
Returns all deposits or filters by sender wallet address if provided.
**Important Notes:**
- Only deposit transactions are tracked (not withdrawals or other operations)
- Sender and recipient addresses are stored in bytes32 format in the subgraph
- Timestamps are available from the subgraph
**Supported Vaults:**
- `upusdc`: 0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42
- `coreusdc`: 0xE9B725010A9E419412ed67d0fA5f3A5f40159D32
- `earnausd`: 0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `receiptToken`: `"upusdc"` \| `"coreusdc"` \| `"earnausd"`; `wallet?`: `` `0x${string}` ``; \} | Receipt token type ('upusdc', 'coreusdc', or 'earnausd') and optional wallet address to filter by sender |
| `props.receiptToken` | `"upusdc"` \| `"coreusdc"` \| `"earnausd"` | - |
| `props.wallet?` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`ILayerZeroDeposit`[]\>
Array of deposit events with the following structure:
- `assetAmt`: Amount of assets deposited (as string)
- `shareAmt`: Amount of shares received (as string)
- `sender`: Sender address in bytes32 format
- `recipient`: Recipient address in bytes32 format
- `dstEid`: Destination endpoint ID (LayerZero chain identifier)
- `transactionHash_`: Transaction hash
**Throws**
Error if receipt token is invalid or GraphQL request fails
**Example**
```typescript
// Get all coreUSDC deposits
const allDeposits = await sdk.getLayerZeroDeposits({
receiptToken: 'coreusdc'
});
// Get deposits for a specific wallet
const userDeposits = await sdk.getLayerZeroDeposits({
receiptToken: 'upusdc',
wallet: '0xb0280B58F541131b29D1B33319CD440a99eA0305'
});
```
### getLayerZeroRedeems()
> **getLayerZeroRedeems**(`props?`): `Promise`\<`ILayerZeroRedeem`[]\>
Get LayerZero redeems for earnAUSD vault
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `props?` | \{ `wallet?`: `` `0x${string}` ``; \} |
| `props.wallet?` | `` `0x${string}` `` |
**Returns**
`Promise`\<`ILayerZeroRedeem`[]\>
**Example**
```typescript
// Get all earnAUSD redeems
const allRedeems = await sdk.getLayerZeroRedeems();
// Get redeems for a specific wallet
const userRedeems = await sdk.getLayerZeroRedeems({
wallet: '0x2de1DCB8EaAd40fAd327fa3eE3F48774b8e20649'
});
```
### getOriginInfo()
> **getOriginInfo**(`options`): `Promise`
Read a SwapRouter origin code's on-chain registration (registered, fee in
bps, collector). Delegates to [UpshiftVaults.getOriginInfo](/sdk/reference/upshift-vaults#getorigininfo).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | \{ `chainId`: `number`; `originCode`: `` `0x${string}` ``; \} | `chainId` and the `bytes32` `originCode` to look up. |
| `options.chainId` | `number` | - |
| `options.originCode` | `` `0x${string}` `` | - |
**Returns**
`Promise`
`{ registered, originFeeBps, collector }`.
**Throws**
UpshiftValidationError when no provider is configured for `chainId`
or `originCode` is malformed.
**Example**
```ts
const { registered } = await upshiftSdk.getOriginInfo({ chainId: 1, originCode });
```
### getPrice()
> **getPrice**(`symbol`): `Promise`
Get the current USD price of a token by symbol or contract address.
Falls back to CoinGecko if primary price source fails.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `symbol` | `string` | Token symbol or contract address |
**Returns**
`Promise`
Current price in USD
### getSwapRouterEligibleVaults()
> **getSwapRouterEligibleVaults**(`chainId`, `options?`): `Promise`\<`` `0x${string}` ``[]\>
Resolve the vaults that offer the any-token `SwapRouter` deposit surface
(swap tokens) on a chain — every vault the Upshift API marks
`swaps_enabled`.
Delegates to [UpshiftVaults.getSwapRouterEligibleVaults](/sdk/reference/upshift-vaults#getswaproutereligiblevaults). Returns
`[]` when no router is deployed on `chainId`. App-level policy (e.g.
OVault exclusions) remains the caller's responsibility.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `chainId` | `number` | EVM chain ID to resolve eligible vaults for. |
| `options?` | \{ `fromBlock?`: `number`; \} | Kept for compatibility; `fromBlock` is no longer read. |
| `options.fromBlock?` | `number` | - |
**Returns**
`Promise`\<`` `0x${string}` ``[]\>
Checksummed `swaps_enabled` vault addresses; `[]` when unavailable.
**Throws**
When the Upshift API vault-list request fails.
**Example**
```ts
const vaults = await upshiftSdk.getSwapRouterEligibleVaults(1);
```
### getSwapRouterWhitelistedTokens()
> **getSwapRouterWhitelistedTokens**(`chainId`, `options?`): `Promise`\<`` `0x${string}` ``[]\>
Resolve the ERC-20 tokens currently whitelisted for the `SwapRouter` on a
chain — the any-token set a deposit UI can offer as swap-and-deposit inputs.
Delegates to [UpshiftVaults.getSwapRouterWhitelistedTokens](/sdk/reference/upshift-vaults#getswaprouterwhitelistedtokens), which
reconstructs the set from the router's `TokenEnabled` events and verifies
each against the on-chain `whitelistedTokens` mapping (not enumerable).
Returns `[]` when no router is deployed on `chainId` or no provider is
configured for it.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `chainId` | `number` | EVM chain ID to resolve the allowlist for. |
| `options?` | \{ `fromBlock?`: `number`; \} | Optional `fromBlock` to override the deploy-block scan floor. |
| `options.fromBlock?` | `number` | - |
**Returns**
`Promise`\<`` `0x${string}` ``[]\>
Checksummed whitelisted token addresses; `[]` when unavailable.
**Throws**
UpshiftSDKError when an `eth_getLogs` scan chunk fails.
**Example**
```ts
const tokens = await upshiftSdk.getSwapRouterWhitelistedTokens(1);
```
### getTotalDeposited()
> **getTotalDeposited**(`options?`): `Promise`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `options?` | \{ `loadSnapshots?`: `boolean`; `loadSubaccounts?`: `boolean`; \} |
| `options.loadSnapshots?` | `boolean` |
| `options.loadSubaccounts?` | `boolean` |
**Returns**
`Promise`
### getUserPoints()
> **getUserPoints**(`userAddress`): `Promise`
Get user points from the backend API.
This fetches processed points data directly from the backend,
removing the need for client-side points calculation.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `userAddress` | `` `0x${string}` `` | User wallet address |
**Returns**
`Promise`
Points data from the backend API
### getVault()
> **getVault**(`props`): `Promise`
Fetch detailed information for a specific vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `loadSnapshots?`: `boolean`; `loadSubaccounts?`: `boolean`; `options?`: [`IVaultCustomOptions`](/sdk/reference/upshift-vaults#ivaultcustomoptions); `vault`: `` `0x${string}` ``; \} | Vault address, chain ID, and optional enrichment options |
| `props.chainId?` | `number` | - |
| `props.loadSnapshots?` | `boolean` | - |
| `props.loadSubaccounts?` | `boolean` | - |
| `props.options?` | [`IVaultCustomOptions`](/sdk/reference/upshift-vaults#ivaultcustomoptions) | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Single vault object with full metadata
### getVaultActivity()
> **getVaultActivity**(`props`): `Promise`\<`IVaultUserHistoryItem`[]\>
Get a vault's deposit/withdrawal activity across every participant.
The vault-wide counterpart to [UpshiftSDK.getVaultUserHistory](#getvaultuserhistory) — use
it to answer flow questions ("how many deposits in the last 7 days", "net
flow this week") that point-in-time TVL cannot. Reads from the Goldsky
subgraph, paginated so busy vaults are not truncated; a `sinceTs` window
keeps short lookbacks cheap.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `sinceTs?`: `number`; `types?`: (`"deposit"` \| `"withdraw-request"` \| `"withdraw-processed"` \| `"redeem"`)[]; `untilTs?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address, optional chain id, optional `sinceTs`/`untilTs` Unix-second bounds, and an optional `types` filter. |
| `props.chainId?` | `number` | - |
| `props.sinceTs?` | `number` | - |
| `props.types?` | (`"deposit"` \| `"withdraw-request"` \| `"withdraw-processed"` \| `"redeem"`)[] | - |
| `props.untilTs?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultUserHistoryItem`[]\>
Array of activity items (oldest-first) with normalized amounts,
actor addresses, event type, and transaction hashes.
**Throws**
If `vault` is not a valid address or no chain id can be resolved.
**Example**
```ts
const weekAgo = Math.floor(Date.now() / 1000) - 7 * 86_400;
const items = await sdk.getVaultActivity({ vault, chainId: 143, sinceTs: weekAgo });
```
### getVaultAllocations()
> **getVaultAllocations**(`props`): `Promise`\<`IVaultAllocations` \| \{ `message`: `string`; `status`: `number`; \}\>
Get vault asset allocations across DeFi protocols, CeFi, and OTC positions.
This is the data behind the "Vault Exposure" section of the Upshift app —
a partner rendering that section in their own frontend needs only this
call. Read `exposurePerCategory` for the pre-bucketed view the UI renders
(`supplying` / `borrowing` / `wallet` / `lending` legs plus per-category
USD totals) and `netValue` for the headline figure; the raw `defi` /
`cefi` / `otc` arrays back the drill-downs. See the "Rendering the Vault
Exposure section" guide in the vaults docs for a faithful reproduction.
Stellar vaults resolve their DeFi exposure through the Untangled portfolio
API instead of DeBank — one extra HTTP call, covering the idle buffer,
Stellar protocol positions, custody wallets and bridged capital. If that
call fails the exposure legs come back empty rather than throwing, so CeFi,
OTC and loan allocations still resolve.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultAllocations` \| \{ `message`: `string`; `status`: `number`; \}\>
Detailed breakdown of vault allocations by category
**Example**
```ts
const { exposurePerCategory, netValue } = await sdk.getVaultAllocations({
vault: '0xcd69123b3FBBfC666E1f6a501da27B564C00De54',
chainId: 1,
});
for (const item of exposurePerCategory?.supplying ?? []) {
console.log(item.protocol, item.symbol, item.amount);
}
```
### ~~getVaultAnnualizedApy()~~
> **getVaultAnnualizedApy**(`props`): `Promise`
Get annualized APY metrics for a vault.
Supported Vaults: cUSDO, tETH, wstETH, rsETH
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `vault`: `` `0x${string}` ``; \} | Vault address |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Annualized APY data including liquidity APY
The `hgETH30dLiquidAPY` and `hgETH7dLiquidAPY` response fields are deprecated.
These fields will be removed in the next major release.
Use `liquidAPY30Day` and `liquidAPY7Day` fields instead.
### ~~getVaultApy()~~
> **getVaultApy**(`props`): `Promise`\<`object`[]\>
Get current or historical APY for a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `historical?`: \{ `daysAgo?`: `number`; \}; `vault`: `` `0x${string}` ``; \} | Vault address and optional historical lookback period |
| `props.historical?` | \{ `daysAgo?`: `number`; \} | - |
| `props.historical.daysAgo?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`object`[]\>
APY data including rewards breakdown
use getVaultHistoricalTimeseries instead
### getVaultAvailableRedemptions()
> **getVaultAvailableRedemptions**(`props`): `Promise`\<\{ `availableRedemptions`: `IVaultAvailableRedemption`[]; `pendingRedemptions`: `IVaultAvailableRedemption`[]; `processedWithdrawals`: `ISubgraphWithdrawProccessed`[]; `requestedWithdrawals`: `ISubgraphWithdrawRequest`[]; \}\>
Get redemption requests that are ready to be claimed.
For a Solana vault, `wallet` is the holder's base58 address and the result
lists their withdrawal-queue requests: waiting (`AWAITING_COOLDOWN`) and
past-window (`EXPIRED`, cancel-only) ones in `availableRedemptions`, and
claimable ones (`READY_TO_CLAIM`) in `pendingRedemptions`, each with
`estimatedAssets`, the net payout at the current share price. Without a
Solana wallet, or for a vault with no queue, both lists are empty. Solana
RPC: the vault state, one `getAccountInfo` for the queue, and, when it
exists, one `getProgramAccounts` and one `getMultipleAccountsInfo` (the
vault state, share mint and payout accounts, read together).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; `verbose?`: `boolean`; `wallet?`: `` `0x${string}` ``; \} | Vault address, chain ID, and optional wallet filter |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
| `props.verbose?` | `boolean` | - |
| `props.wallet?` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<\{ `availableRedemptions`: `IVaultAvailableRedemption`[]; `pendingRedemptions`: `IVaultAvailableRedemption`[]; `processedWithdrawals`: `ISubgraphWithdrawProccessed`[]; `requestedWithdrawals`: `ISubgraphWithdrawRequest`[]; \}\>
Array of available redemption requests with amounts and timestamps
**Example**
```ts
const { availableRedemptions, pendingRedemptions } =
await sdk.getVaultAvailableRedemptions({ vault: solanaVault, wallet: holder });
```
### getVaultBorrowerHealthFactor()
> **getVaultBorrowerHealthFactor**(`props?`): `Promise`\<`Record`\<`string`, `IVaultBorrowerHealthFactor`[]\> \| `Record`\<`string`, `IVaultBorrowerHealthFactor`[]\>[]\>
Get the borrower's health factor by vault.
Pass `vault` whenever the caller knows which pool it cares about — it
skips the all-vaults cross-chain fanout and only reads the loans for
that one pool. The response map is keyed by **lowercased** vault
address; look entries up with `address.toLowerCase()`.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props?` | \{ `chainId?`: `number`; `vault?`: `` `0x${string}` ``; \} | - |
| `props.chainId?` | `number` | Optional chain to scope the read to. |
| `props.vault?` | `` `0x${string}` `` | Optional vault address. When provided alongside `chainId`, only that vault's borrower-health-factor data is fetched. |
**Returns**
`Promise`\<`Record`\<`string`, `IVaultBorrowerHealthFactor`[]\> \| `Record`\<`string`, `IVaultBorrowerHealthFactor`[]\>[]\>
Object containing the borrower's health factor by vault.
### getVaultHistoricalTimeseries()
> **getVaultHistoricalTimeseries**(`props`): `Promise`
Get historical timeseries data for a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `nDays?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and optional number of days |
| `props.nDays?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Historical timeseries data with TVL, APY, PnL, share price, and other metrics
### getVaultLoans()
> **getVaultLoans**(`props`): `Promise`\<`IVaultLoan`[]\>
Get active loans deployed from a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultLoan`[]\>
Array of loan details including borrower, principal, APR
### getVaultPnl()
> **getVaultPnl**(`props`): `Promise`
Get PnL for a vault (vault-level, not user-specific).
Returns the vault's overall profit and loss across all users.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Vault PnL in USD and notional value
### getVaultPositions()
> **getVaultPositions**(`props`): `Promise`\<`IVaultPosition`[]\>
Get user positions across vaults including shares and claimable redemptions.
Supports both EVM and Solana vaults.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `options?`: [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions); `showAllVaults?`: `boolean`; `solanaWallet?`: `string`; `stellarWallet?`: `string`; `suiWallet?`: `string`; `vault?`: `` `0x${string}` ``; `wallet?`: `` `0x${string}` ``; \} | Wallet address, chain ID, and optional vault filter |
| `props.chainId?` | `number` | - |
| `props.options?` | [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions) | - |
| `props.showAllVaults?` | `boolean` | - |
| `props.solanaWallet?` | `string` | - |
| `props.stellarWallet?` | `string` | - |
| `props.suiWallet?` | `string` | Sui wallet address (`0x` + 64 hex chars). Its share balance and its pending withdrawal requests (as redemptions) are read for each Sui vault: one balance read plus, when the SDK has the contract IDs, one object read (one more per further 25 requests the wallet has made on the vault). |
| `props.vault?` | `` `0x${string}` `` | - |
| `props.wallet?` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultPosition`[]\>
Array of positions with balances and pending redemptions
**Throws**
UpshiftValidationError (`INVALID_ADDRESS`) when `suiWallet`
is not a Sui address.
### getVaultRedemptionHistory()
> **getVaultRedemptionHistory**(`props`): `Promise`\<`IVaultRedemptionHistoryItem`[]\>
Get historical redemption requests for a vault (settled, cancelled,
pending-but-out-of-window), optionally filtered to one wallet.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `lookbackBlocks?`: `number`; `vault`: `` `0x${string}` ``; `wallet?`: `` `0x${string}` ``; \} | Vault address, chain ID, optional wallet, and an optional `lookbackBlocks` for how far back to scan. |
| `props.chainId?` | `number` | - |
| `props.lookbackBlocks?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
| `props.wallet?` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultRedemptionHistoryItem`[]\>
Historical redemption records, newest first.
### getVaults()
> **getVaults**(`options?`): `Promise`\<`IVault`[]\>
Fetch all available vaults across configured networks.
Optionally filter by chain IDs and include loan/allocation data.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options?` | [`IGetVaultsOptions`](/sdk/reference/upshift-vaults#igetvaultsoptions) | Configuration for filtering and enriching vault data — see [IGetVaultsOptions](/sdk/reference/upshift-vaults#igetvaultsoptions) for the full surface (`includeClosed` portfolio mode, `maxRetries`/`baseDelay` retry tuning) |
**Returns**
`Promise`\<`IVault`[]\>
Array of vault objects with metadata and optional position data
### getVaultStakingPositions()
> **getVaultStakingPositions**(`props`): `Promise`\<`IActiveStakingPosition`[]\>
Get user's staking positions for vault receipt tokens.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `wallet?`: `` `0x${string}` ``; \} | Wallet address and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.wallet?` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IActiveStakingPosition`[]\>
Array of staking positions with rewards
### getVaultSummary()
> **getVaultSummary**(`props`): `Promise`
Get summary data for a vault (name, type, chain, recent returns).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `vault`: `` `0x${string}` ``; \} | Vault address |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Vault summary data
### getVaultTvl()
> **getVaultTvl**(`props`): `Promise`\<`object`[]\>
Get current or historical TVL for a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `historical?`: `IVaultHistoricalParams`; `vault`: `` `0x${string}` ``; \} | Vault address and optional historical parameters |
| `props.chainId?` | `number` | - |
| `props.historical?` | `IVaultHistoricalParams` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`object`[]\>
TVL in vault's base asset units
### getVaultUnrealizedPnlHistory()
> **getVaultUnrealizedPnlHistory**(`params`): `Promise`\<`IUnrealizedPnlSnapshot`[]\>
Fetch the historical unrealized-PnL series for a vault, newest first.
Delegates to [UpshiftApi.getVaultUnrealizedPnlHistory](/sdk/reference/upshift-api#getvaultunrealizedpnlhistory) — see it for
parameter semantics and thrown errors.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `params` | \{ `limit?`: `number`; `vault`: `string`; \} |
| `params.limit?` | `number` |
| `params.vault` | `string` |
**Returns**
`Promise`\<`IUnrealizedPnlSnapshot`[]\>
### getVaultUserHistory()
> **getVaultUserHistory**(`props`): `Promise`\<`IVaultUserHistoryItem`[]\>
Get user's historical vault interactions including deposits and withdrawals.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `options?`: [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions); `vault?`: `` `0x${string}` ``; `wallet`: `` `0x${string}` ``; \} | Wallet address and optional vault/chain filters |
| `props.chainId?` | `number` | - |
| `props.options?` | [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions) | - |
| `props.vault?` | `` `0x${string}` `` | - |
| `props.wallet` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`IVaultUserHistoryItem`[]\>
Array of historical transactions with amounts and timestamps
### getVaultUserLifetimePnl()
> **getVaultUserLifetimePnl**(`props`): `Promise`
Get lifetime PnL for a user in a specific vault.
Calculates realized and unrealized PnL based on deposit/withdrawal history and current position.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; `wallet`: `` `0x${string}` ``; \} | Vault address, wallet address, and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
| `props.wallet` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Lifetime PnL data including realized and unrealized PnL in both native token and USD
**Throws**
UpshiftHistoryUnavailableError (`HISTORY_UNAVAILABLE`) when a
live position has no indexed deposits, withdrawals or priceable share
transfers.
**Throws**
UpshiftPriceUnavailableError (`PRICE_UNAVAILABLE`) when the
vault's underlying asset has no USD price — the USD fields are never
computed from a stand-in price.
### getVaultUserTransfers()
> **getVaultUserTransfers**(`props`): `Promise`\<`object`[]\>
Get user's vault share transfer history from subgraph.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `options?`: [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions); `vault?`: `` `0x${string}` ``; `wallet`: `` `0x${string}` ``; \} | Wallet address and optional vault/chain filters |
| `props.chainId?` | `number` | - |
| `props.options?` | [`IVaultBaseOptions`](/sdk/reference/upshift-vaults#ivaultbaseoptions) | - |
| `props.vault?` | `` `0x${string}` `` | - |
| `props.wallet` | `` `0x${string}` `` | - |
**Returns**
`Promise`\<`object`[]\>
Array of transfer events
### getVaultWithdrawals()
> **getVaultWithdrawals**(`props`): `Promise`
Get withdrawal summary and pending queue for a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Withdrawal summary and pending queue
### getYieldLastRealizedOn()
> **getYieldLastRealizedOn**(`props`): `Promise`
Get the timestamp when yield was last realized for a vault.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `vault`: `` `0x${string}` ``; \} | Vault address and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
Timestamp (Unix timestamp in seconds) when yield was last realized
### init()
> **init**(): `Promise`
Verify the configured Upshift API key and mark this instance as authorized.
Only for SDKs built with `keys.upshift`; a keyless SDK skips `init()`.
**Returns**
`Promise`
**Throws**
Error when `keys.upshift` is missing or rejected by the API.
**Inherited from**
`UpshiftBase.init`
### previewRedemption()
> **previewRedemption**(`props`): `Promise`
Preview the amount of assets that would be received for redeeming shares (queued redemption).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | \{ `chainId?`: `number`; `sharesAmount`: `string` \| `number` \| `bigint`; `vault`: `` `0x${string}` ``; \} | Vault contract address, shares amount, and optional chain ID |
| `props.chainId?` | `number` | - |
| `props.sharesAmount` | `string` \| `number` \| `bigint` | - |
| `props.vault` | `` `0x${string}` `` | - |
**Returns**
`Promise`
The amount of assets as INormalizedNumber
### registerUserForPoints()
> **registerUserForPoints**(`userAddress`, `referrerAddress`, `chainId`, `signature`, `nonce`, `expiry`): `Promise`
Register a user for the points program, authenticated by a wallet signature.
The caller produces a personal_sign signature over a canonical message
containing the user address, referrer (or `"none"`), chain, nonce, and
expiry — see `UpshiftVaults.registerUserForPoints` for the exact template.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `userAddress` | `` `0x${string}` `` | EVM wallet address being registered. |
| `referrerAddress` | `` `0x${string}` `` | Optional EVM referrer address. |
| `chainId` | `number` | Chain on which the wallet signed; powers the EIP-1271 fallback for smart-contract wallets and pins the signature cross-chain. |
| `signature` | `string` | 0x-prefixed personal_sign signature over the canonical message. |
| `nonce` | `string` | Single-use random string (8–128 chars). |
| `expiry` | `number` | Unix seconds; must be in the future, within the backend's TTL. |
**Returns**
`Promise`
Raw `Response` from the backend.
### switchNetwork()
> **switchNetwork**(`chainId`): `void`
Switch the active network for vault operations.
Updates the SDK's active chain and RPC provider.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `chainId` | `number` |
**Returns**
`void`
**Overrides**
`UpshiftBase.switchNetwork`
### updateWallet()
> **updateWallet**(`address`): `void`
Set the active wallet address for tracking user-specific vault data.
Updates monitoring headers with the wallet address.
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `address` | `` `0x${string}` `` |
**Returns**
`void`
**Overrides**
`UpshiftBase.updateWallet`
### vaultDeposit()
> **vaultDeposit**(`signer`, `options`): `Promise`
Deposit into a vault with an explicit signer. When `depositAsset` differs
from the vault's underlying asset the deposit goes through the vault's
multi-asset `deposit`, permit path, or configured adapter. It never swaps
(use `evm.swapRouterDeposit` for that); with `attribution.originCode` set,
eligible deposits go through the SwapRouter (see `evm.getDepositRoute`).
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `signer` | `Signer` \| `Wallet` | ethers Signer or Wallet that sends the transaction |
| `options` | `IContractWriteOptions` | Vault address (`target`), depositor `wallet`, `amount`, and optional `depositAsset`, `wait`, `isDepositWithPermit` |
**Returns**
`Promise`
Deposit transaction hash
# UpshiftSubAccounts
> API reference for the UpshiftSubAccounts class — querying subaccount summaries, positions, loans, transactions, and health factors.
The Upshift Sub Accounts Module.
Subaccount operation class interacting with Upshift Subaccounts
Subaccount is a smart contract wallet that serves as the fundamental infrastructure for Upshift's platform.
It functions as a cross-margin account designed for optimal capital efficiency.
`getSubaccountSummary`, `getSubaccountHealthFactor`, `getSubaccountLoans`,
`getSubaccountCefiPositions` and `getSubaccountOtcPositions` work without an
Upshift API key for subaccounts linked to a vault; `getSubaccountDebank` is
public. `getSubaccountTransactions` needs a key authorized for the
subaccount, and `getAllSubaccounts` and `getSubaccountLoanByAddress` need an
admin key.
**Extends:** `UpshiftBase`
## Constructors
### Constructor
> **new UpshiftSubAccounts**(`baseConfig`): `UpshiftSubAccounts`
**Parameters**
| Parameter | Type |
| ------ | ------ |
| `baseConfig` | `IUpshiftBase` |
**Returns**
`UpshiftSubAccounts`
**Overrides**
`UpshiftBase.constructor`
## Properties
| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| `activeNetwork?` | `public` | `IActiveNetwork` | - | `UpshiftBase.activeNetwork` |
| `appName` | `public` | `string` | Validated app-name slug from the constructor. | `UpshiftBase.appName` |
| `authorized` | `public` | `boolean` | - | `UpshiftBase.authorized` |
| `keys` | `public` | `IKeys` | - | `UpshiftBase.keys` |
| `monitoring` | `public` | `IMonitoring` | - | `UpshiftBase.monitoring` |
| `providers` | `public` | `IProvidersConfig` | - | `UpshiftBase.providers` |
## Methods
### clearWallet()
> **clearWallet**(): `void`
Remove wallet address from SDK state and monitoring headers.
**Returns**
`void`
**Inherited from**
`UpshiftBase.clearWallet`
### getAllSubaccounts()
> **getAllSubaccounts**(`options?`): `Promise`\<`IWSSubaccountListItem`[]\>
Retrieves one page of the directory of all Upshift subaccounts.
Backed by the admin-only `GET /subaccount` backend endpoint, so the
Upshift API key configured on the SDK must belong to an admin user —
non-admin keys are rejected with an auth error by the backend. Makes
exactly one HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | \{ `limit?`: `number`; `offset?`: `number`; \} | Pagination window over the subaccount directory |
| `options.limit?` | `number` | Page size. Defaults to 100; must be an integer between 1 and 1000 (backend maximum). |
| `options.offset?` | `number` | Number of records to skip. Defaults to 0; must be a non-negative integer. |
**Returns**
`Promise`\<`IWSSubaccountListItem`[]\>
The page of subaccount records (address, internal/friendly names, status, type, linked chains, risk metadata). An empty array means the offset is past the end of the directory.
**Throws**
UpshiftValidationError when `offset` or `limit` is out of range
**Throws**
UpshiftAuthError when the API key is missing or not admin-scoped
**Example**
```ts
const page = await upshiftSdk.subAccountsModule.getAllSubaccounts({
offset: 0,
limit: 200,
});
console.log(page.map((s) => `${s.internal_name}: ${s.address}`));
```
### getSubaccountCefiPositions()
> **getSubaccountCefiPositions**(`subaccountAddress`): `Promise`\<`IWSSubaccountCefi`[]\>
Retrieves CeFi (Centralized Finance) positions for a subaccount.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `subaccountAddress` | `` `0x${string}` `` | The address of the subaccount to query |
**Returns**
`Promise`\<`IWSSubaccountCefi`[]\>
List of CeFi positions held by the subaccount
### getSubaccountDebank()
> **getSubaccountDebank**(`subaccountAddress`): `Promise`
Retrieves cross-chain DeBank protocol positions and token balances for a
subaccount and its associated strategies.
Backed by `GET /subaccount/{subaccount_address}/debank` (300-second
server-side cache). This is a slow endpoint — it fans out to DeBank
across every supported chain — so expect higher latency than other
subaccount reads. Makes exactly one HTTP request and no RPC calls.
**Parameters**
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `subaccountAddress` | `` `0x${string}` `` | The address of the subaccount to query |
**Returns**
`Promise