AugustSDK
SDK Reference / AugustSDK
AugustSDK
The main August SDK class.
Main SDK class for interacting with August Digital vaults and services. Provides unified access to EVM, Solana, Sui, and Stellar blockchain adapters.
Extends: AugustBase
Constructors
Constructor
new AugustSDK(
baseConfig):AugustSDK
Initialize the August SDK with provider configuration. Automatically sets up EVM adapter and optionally initializes Solana if RPC URL is provided.
Parameters
baseConfig
IAugustBase
Returns
Overrides
AugustBase.constructor
Properties
activeNetwork?
public
IActiveNetwork
-
AugustBase.activeNetwork
appName
public
string
Validated app-name slug from the constructor.
AugustBase.appName
authorized
public
boolean
-
AugustBase.authorized
keys
public
IKeys
-
AugustBase.keys
monitoring
public
IMonitoring
-
AugustBase.monitoring
providers
public
IProvidersConfig
-
AugustBase.providers
Accessors
apiModule
Get Signature
get apiModule():
AugustApi
Get the backend API module instance (AugustApi) — 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
subAccountsModule
Get Signature
get subAccountsModule():
AugustSubAccounts
Get the Sub-Accounts module instance.
Returns
vaultsModule
Get Signature
get vaultsModule():
AugustVaults
Get the Vaults module instance.
Returns
Methods
clearWallet()
clearWallet():
void
Clear the active wallet address from the SDK state and monitoring headers.
Returns
void
Overrides
AugustBase.clearWallet
fetchPointsLeaderboard()
fetchPointsLeaderboard(
params?):Promise<any>
Fetch the points leaderboard data.
Parameters
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<any>
Leaderboard response data
getLatestUnrealizedPnl()
getLatestUnrealizedPnl():
Promise<IUnrealizedPnlSnapshot[]>
Fetch the latest unrealized-PnL snapshot for every tracked vault. Delegates to AugustApi.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: 0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42coreusdc: 0xE9B725010A9E419412ed67d0fA5f3A5f40159D32earnausd: 0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA
Parameters
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 formatrecipient: Recipient address in bytes32 formatdstEid: Destination endpoint ID (LayerZero chain identifier)transactionHash_: Transaction hash
Throws
Error if receipt token is invalid or GraphQL request fails
Example
getLayerZeroRedeems()
getLayerZeroRedeems(
props?):Promise<ILayerZeroRedeem[]>
Get LayerZero redeems for earnAUSD vault
Parameters
props?
{ wallet?: `0x${string}`; }
props.wallet?
`0x${string}`
Returns
Promise<ILayerZeroRedeem[]>
Example
getPrice()
getPrice(
symbol):Promise<number>
Get the current USD price of a token by symbol or contract address. Falls back to CoinGecko if primary price source fails.
Parameters
symbol
string
Token symbol or contract address
Returns
Promise<number>
Current price in USD
getSwapRouterEligibleVaults()
getSwapRouterEligibleVaults(
chainId,options?):Promise<`0x${string}`[]>
Resolve the vaults currently eligible for the any-token SwapRouter deposit surface on a chain — every vault the router has enableVault-ed whose on-chain registration is still live.
Delegates to AugustVaults.getSwapRouterEligibleVaults, which reconstructs the set from the router's VaultEnabled events and verifies each vault's current vaultInfo registration (not enumerable). Returns [] when no router is deployed on chainId or no provider is configured for it. On-chain eligibility only — app-level policy (e.g. OVault exclusions) remains the caller's responsibility.
Parameters
chainId
number
EVM chain ID to resolve eligible vaults for.
options?
{ fromBlock?: number; }
Optional fromBlock to override the deploy-block scan floor.
options.fromBlock?
number
-
Returns
Promise<`0x${string}`[]>
Checksummed eligible vault addresses; [] when unavailable.
Throws
AugustSDKError when an eth_getLogs scan chunk fails.
Example
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 AugustVaults.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
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
AugustSDKError when an eth_getLogs scan chunk fails.
Example
getTotalDeposited()
getTotalDeposited(
options?):Promise<number>
Parameters
options?
{ loadSnapshots?: boolean; loadSubaccounts?: boolean; }
options.loadSnapshots?
boolean
options.loadSubaccounts?
boolean
Returns
Promise<number>
getUserPoints()
getUserPoints(
userAddress):Promise<any>
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
userAddress
`0x${string}`
User wallet address
Returns
Promise<any>
Points data from the backend API
getVault()
getVault(
props):Promise<IVault>
Fetch detailed information for a specific vault.
Parameters
props
{ chainId?: number; loadSnapshots?: boolean; loadSubaccounts?: boolean; options?: IVaultCustomOptions; vault: `0x${string}`; }
Vault address, chain ID, and optional enrichment options
props.chainId?
number
-
props.loadSnapshots?
boolean
-
props.loadSubaccounts?
boolean
-
props.vault
`0x${string}`
-
Returns
Promise<IVault>
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 AugustSDK.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
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
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
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
getVaultAnnualizedApy()
getVaultAnnualizedApy(
props):Promise<IVaultAnnualizedApy>
Get annualized APY metrics for a vault.
Supported Vaults: cUSDO, tETH, wstETH, rsETH
Parameters
props
{ vault: `0x${string}`; }
Vault address
props.vault
`0x${string}`
-
Returns
Promise<IVaultAnnualizedApy>
Annualized APY data including liquidity APY
Deprecated
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
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
Deprecated
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
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
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
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<IHistoricalTimeseriesResponse>
Get historical timeseries data for a vault.
Parameters
props
{ nDays?: number; vault: `0x${string}`; }
Vault address and optional number of days
props.nDays?
number
-
props.vault
`0x${string}`
-
Returns
Promise<IHistoricalTimeseriesResponse>
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
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<IVaultPnl>
Get PnL for a vault (vault-level, not user-specific). Returns the vault's overall profit and loss across all users.
Parameters
props
{ chainId?: number; vault: `0x${string}`; }
Vault address and optional chain ID
props.chainId?
number
-
props.vault
`0x${string}`
-
Returns
Promise<IVaultPnl>
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
props
{ chainId?: number; options?: IVaultBaseOptions; showAllVaults?: boolean; solanaWallet?: string; stellarWallet?: string; vault?: `0x${string}`; wallet?: `0x${string}`; }
Wallet address, chain ID, and optional vault filter
props.chainId?
number
-
props.showAllVaults?
boolean
-
props.solanaWallet?
string
-
props.stellarWallet?
string
-
props.vault?
`0x${string}`
-
props.wallet?
`0x${string}`
-
Returns
Promise<IVaultPosition[]>
Array of positions with balances and pending redemptions
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
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
options?
Configuration for filtering and enriching vault data — see 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
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<IVaultSummary>
Get summary data for a vault (name, type, chain, recent returns).
Parameters
props
{ vault: `0x${string}`; }
Vault address
props.vault
`0x${string}`
-
Returns
Promise<IVaultSummary>
Vault summary data
getVaultTvl()
getVaultTvl(
props):Promise<object[]>
Get current or historical TVL for a vault.
Parameters
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 AugustApi.getVaultUnrealizedPnlHistory — see it for parameter semantics and thrown errors.
Parameters
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
props
{ chainId?: number; options?: IVaultBaseOptions; vault?: `0x${string}`; wallet: `0x${string}`; }
Wallet address and optional vault/chain filters
props.chainId?
number
-
props.vault?
`0x${string}`
-
props.wallet
`0x${string}`
-
Returns
Promise<IVaultUserHistoryItem[]>
Array of historical transactions with amounts and timestamps
getVaultUserLifetimePnl()
getVaultUserLifetimePnl(
props):Promise<IVaultUserLifetimePnl>
Get lifetime PnL for a user in a specific vault. Calculates realized and unrealized PnL based on deposit/withdrawal history and current position.
Parameters
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<IVaultUserLifetimePnl>
Lifetime PnL data including realized and unrealized PnL in both native token and USD
Throws
AugustHistoryUnavailableError (HISTORY_UNAVAILABLE) when a live position has no indexed deposits, withdrawals or priceable share transfers.
Throws
AugustPriceUnavailableError (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
props
{ chainId?: number; options?: IVaultBaseOptions; vault?: `0x${string}`; wallet: `0x${string}`; }
Wallet address and optional vault/chain filters
props.chainId?
number
-
props.vault?
`0x${string}`
-
props.wallet
`0x${string}`
-
Returns
Promise<object[]>
Array of transfer events
getVaultWithdrawals()
getVaultWithdrawals(
props):Promise<IVaultWithdrawals>
Get withdrawal summary and pending queue for a vault.
Parameters
props
{ chainId?: number; vault: `0x${string}`; }
Vault address and optional chain ID
props.chainId?
number
-
props.vault
`0x${string}`
-
Returns
Promise<IVaultWithdrawals>
Withdrawal summary and pending queue
getYieldLastRealizedOn()
getYieldLastRealizedOn(
props):Promise<number>
Get the timestamp when yield was last realized for a vault.
Parameters
props
{ chainId?: number; vault: `0x${string}`; }
Vault address and optional chain ID
props.chainId?
number
-
props.vault
`0x${string}`
-
Returns
Promise<number>
Timestamp (Unix timestamp in seconds) when yield was last realized
init()
init():
Promise<void>
Verify the configured August API key and mark this instance as authorized. Only for SDKs built with keys.august; a keyless SDK skips init().
Returns
Promise<void>
Throws
Error when keys.august is missing or rejected by the API.
Inherited from
AugustBase.init
previewRedemption()
previewRedemption(
props):Promise<INormalizedNumber>
Preview the amount of assets that would be received for redeeming shares (queued redemption).
Parameters
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<INormalizedNumber>
The amount of assets as INormalizedNumber
registerUserForPoints()
registerUserForPoints(
userAddress,referrerAddress,chainId,signature,nonce,expiry):Promise<Response>
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 AugustVaults.registerUserForPoints for the exact template.
Parameters
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<Response>
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
chainId
number
Returns
void
Overrides
AugustBase.switchNetwork
updateWallet()
updateWallet(
address):void
Set the active wallet address for tracking user-specific vault data. Updates monitoring headers with the wallet address.
Parameters
address
`0x${string}`
Returns
void
Overrides
AugustBase.updateWallet
vaultDeposit()
vaultDeposit(
signer,options):Promise<string>
Deposit into a vault with an explicit signer. When depositAsset differs from the vault's underlying asset the deposit is routed through the matching adapter (native wrapper, swap router, or permit path).
Parameters
signer
Signer | Wallet
ethers Signer or Wallet that sends the transaction
options
IContractWriteOptions
Vault address (target), depositor wallet, amount, and optional depositAsset, wait, receiver, slippageBps
Returns
Promise<string>
Deposit transaction hash
Last updated