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 and Solana 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
authorized
public
boolean
AugustBase.authorized
evm
public
EVMAdapter
-
keys
public
IKeys
AugustBase.keys
monitoring
public
IMonitoring
AugustBase.monitoring
name
public
string
-
providers
public
IProvidersConfig
AugustBase.providers
solana
public
SolanaAdapter
-
sui
public
SuiAdapter
-
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
getPrice()
getPrice(
symbol):Promise<any>
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<any>
Current price in USD
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.options?
IVaultCustomOptions
-
props.vault
`0x${string}`
-
Returns
Promise<IVault>
Single vault object with full metadata
getVaultAllocations()
getVaultAllocations(
props):Promise<IVaultAllocations| {message:string;status:number; }>
Get vault asset allocations across DeFi protocols, CeFi, and OTC positions.
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
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 on 2026-01-01. 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.
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
getVaultBorrowerHealthFactor()
getVaultBorrowerHealthFactor(
props?):Promise<{ }>
Get the borrower's health factor by vault.
Parameters
props?
{ chainId?: number; }
Optional chain ID
props.chainId?
number
-
Returns
Promise<{ }>
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; vault?: `0x${string}`; wallet?: `0x${string}`; }
Wallet address, chain ID, and optional vault filter
props.chainId?
number
-
props.options?
IVaultBaseOptions
-
props.showAllVaults?
boolean
-
props.solanaWallet?
string
-
props.vault?
`0x${string}`
-
props.wallet?
`0x${string}`
-
Returns
Promise<IVaultPosition[]>
Array of positions with balances and pending redemptions
getVaults()
getVaults(
options?):Promise<IVault[]>
Fetch all available vaults across configured networks. Optionally filter by chain IDs and include loan/allocation data.
Parameters
options?
object & IVaultCustomOptions
Configuration for filtering and enriching vault data
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
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.options?
IVaultBaseOptions
-
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
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.options?
IVaultBaseOptions
-
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 API keys and authorize SDK usage. TODO: initialize class with appropriate keys and verify august key
Returns
Promise<void>
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?):Promise<Response>
Register a user for the points program.
Parameters
userAddress
`0x${string}`
User wallet address
referrerAddress?
`0x${string}`
Optional referrer wallet address
Returns
Promise<Response>
Registration response
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>
Fetch all available vaults across configured networks. Optionally filter by chain IDs and include loan/allocation data.
Parameters
signer
Signer | Wallet
-
options
IContractWriteOptions
Configuration for filtering and enriching vault data
Returns
Promise<string>
Array of vault objects with metadata and optional position data
Last updated