For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

The August Digital SDK provides a TypeScript API for August services and resources. You can use the TypeScript API to build applications or libraries for the browser or Node.js.

npm version

The August Digital SDK provides a comprehensive TypeScript methods for interacting with August Digital vaults and services across multiple blockchain networks. Whether you're building web applications, backend services, or integrations, the SDK offers a unified interface for EVM and Solana chains. If you would like to integrate our SDK on your own front end, please reach out to us as we would need to add your domain to our whitelist so you do not get restricted by CORS.

Key Features

Multi-Chain Support

  • EVM Chains: Ethereum, Arbitrum, Base, BSC, Avalanche, and more — wagmi/viem and ethers signers supported

  • Solana: Native Solana program support with full vault functionality

  • Stellar: Stellar vault deposit, redeem, and position queries

  • Sui: Ember vault read operations

  • Unified interface across all supported chains

Comprehensive Vault Operations

  • Query all vaults or specific vault details

  • Fetch user positions and balances

  • Get loan data and allocations

  • Retrieve historical APY and TVL data

  • Track user transaction history

Transaction Support

  • Deposit assets into vaults (EVM and Solana)

  • Adapter deposits with alternative tokens (ETH, WETH, native tokens)

  • Multi-asset vault deposits

  • Request withdrawals/redemptions

  • Claim available redemptions

  • Approve token spending

Getting Started

Installation

Install the package in your project directory with:

Initialization

Then, initialize the SDK in your project with your provider RPC URLs. An August API key is optional — supply one 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:

Note: the first provider in the providers object will be what network the SDK is initially connected to.

App name

appName is required. It is a stable slug that identifies your application: 3–64 characters, letters, digits, ., _ and - only — something like acme-trader, never a display name or a wallet address. The constructor throws an AugustValidationError for anything else. Pick one slug per application and keep it fixed across releases.

The SDK uses it in two places:

  • Telemetry attribution. Every Sentry event and span the SDK emits carries app.name (and a derived partner.id), so a defect or a usage pattern can be traced to the integration it came from. Telemetry is on by default; turn it off with analytics: { enabled: false } or the AUGUST_SDK_DISABLE_ANALYTICS=1 environment variable.

  • Backend request identification. Every request the SDK makes to the August API carries x-august-app: <appName> and x-august-sdk-version, which gives us per-integration request counts and speeds up support when you report an issue.

It is not an on-chain identifier. Transaction attribution (the ERC-8021 attribution option) and SwapRouter fee sharing (originCode) are separate mechanisms with their own configuration.

Development Mode

Enable console logging for debugging:

With Solana Support

Include Solana by adding its RPC endpoint with chain ID -1:

End-to-End Deposit Walkthrough

The snippets below show a complete deposit flow against an EVM vault. Substitute the vault address with the one you're integrating against.

1. Connect a wallet

Either ethers or wagmi/viem works — setSigner accepts both. With ethers:

With wagmi/viem (browser):

2. Preview the deposit

previewDeposit returns the shares you would receive without broadcasting a transaction:

3. Check the allowance

4. Deposit

5. Request a redemption

Standard (queued) redemption:

Instant redemption (if supported by the vault):

6. Handle errors

Every public method throws typed errors that subclass AugustSDKError. See the Error Handling page for the full reference; the short version:

Read Helpers Reference

The EVM adapter exposes typed read helpers so you don't have to reach into the ABIs:

Method
Description

previewDeposit

Shares minted for a given deposit amount.

previewRedeem

Assets returned for a given share amount.

allowance

Raw ERC-20 allowance the owner has granted the vault.

balanceOf

Raw ERC-20 balance for any token / owner.

maxDeposit

Maximum deposit currently accepted by the vault.

All return raw bigint values so BigInt math stays precise.

Example App

We also have an example app that can be found in this repo: https://github.com/upshift-protocol/example-sdk-app The example app can be found at https://starter.upshift.finance/

Last updated