npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@augustdigital/sdk

v4.13.2

Published

JS SDK powering the August Digital ecosystem.

Readme

August Digital SDK

TypeScript SDK for interacting with August Digital vaults across EVM and Solana chains.

Installation

npm install @augustdigital/sdk ethers
# or
pnpm add @augustdigital/sdk ethers
# or
yarn add @augustdigital/sdk ethers

Wagmi/Viem Support

The SDK supports both ethers and wagmi/viem signers. If you're using wagmi in your React app, also install viem:

npm install viem

The SDK will automatically detect and convert viem WalletClient to ethers-compatible signers.

Quick Start

import { AugustSDK } from '@augustdigital/sdk';

// Initialize with RPC providers
const sdk = new AugustSDK({
  providers: {
    1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY',
    42161: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY',
    -1: 'https://api.mainnet-beta.solana.com', // Solana
  },
  keys: {
    august: 'YOUR_API_KEY', // Optional
  },
  monitoring: {
    env: 'DEV', // Optional: 'DEV' enables console logging (defaults to 'PROD')
  },
});

// Fetch all vaults
const vaults = await sdk.getVaults();

// Fetch specific vault with loans and allocations
const vault = await sdk.getVault({
  vault: '0x...',
  options: { loans: true, allocations: true }
});

// Get user positions
const positions = await sdk.getVaultPositions({
  wallet: '0x...',
  showAllVaults: true,
});

Architecture

src.ts/
├── main.ts              # Main SDK class (AugustSDK)
├── core/                # Base utilities
│   ├── base.class.ts    # Base SDK functionality
│   ├── fetcher.ts       # API client with retry logic
│   └── web3.helpers.ts  # Blockchain utilities
├── adapters/            # Chain-specific implementations
│   ├── evm/             # EVM vault adapters (v1, v2)
│   └── solana/          # Solana program adapters
├── modules/             # Feature modules
│   └── vaults/          # Vault operations
│       ├── main.ts      # AugustVaults class
│       ├── getters.ts   # Data fetching functions
│       └── utils.ts     # Helper utilities
├── services/            # External service integrations
│   ├── debank/          # DeFi allocation data
│   ├── coingecko/       # Token pricing
│   └── subgraph/        # Historical transaction data
└── types/               # TypeScript interfaces

Key Concepts

Multi-Chain Support

  • EVM Chains: Ethereum, Arbitrum, Base, BSC, Avalanche
  • Solana: Native Solana program support
  • Unified interface across all chains

Vault Versions

  • evm-0/evm-1: Legacy vault contracts
  • evm-2: Current EVM vault architecture (separate receipt tokens)
  • sol-0: Solana program-based vaults

Data Enrichment

All vault queries support optional enrichment:

  • loans: Include active loan data
  • allocations: DeFi/CeFi/OTC position breakdowns
  • wallet: User-specific position data

Code Conventions

Naming Patterns

  • Interfaces: Prefixed with I (e.g., IVault, IVaultLoan)
  • ABIs: Prefixed with ABI_ (e.g., ABI_LENDING_POOL_V2)
  • Types: Descriptive names (e.g., IAddress, IChainId)

Important Tags

Search codebase for these comments to find areas needing attention:

  • @todo: Planned improvements or missing features
  • @hardcoded: Hardcoded values that may need configuration
  • @solana: Solana-specific logic or notes

Error Handling

  • Automatic retry logic for network errors with exponential backoff
  • 90-second request timeout (configurable via REQUEST_TIMEOUT_MS)
  • Correlation IDs logged for debugging failed requests
  • Write actions throw errors instead of silent failures

Environment Configuration

// Development mode (enables console logging)
const devSdk = new AugustSDK({
  providers: {
    /* ... */
  },
  monitoring: {
    env: 'DEV',
  },
});

// Production mode (default - no console logs)
const prodSdk = new AugustSDK({
  providers: {
    /* ... */
  },
  // monitoring is optional - defaults to PROD
});
  • env: 'DEV' - Enables console logging for debugging
  • env: 'PROD' or omitted - Disables console, uses custom logger only (safer default)

API Reference

Main Methods

Vault Queries

  • getVaults(options?): Fetch all vaults across chains
  • getVault({ vault, chainId?, options? }): Get single vault details
  • getVaultLoans({ vault, chainId }): Fetch active loans
  • getVaultAllocations({ vault, chainId }): Get allocation breakdown
  • getVaultApy({ vault, historical? }): Current/historical APY
  • getVaultTvl({ vault, historical? }): Current/historical TVL

User Positions

  • getVaultPositions({ wallet?, vault?, chainId? }): User vault positions
  • getVaultAvailableRedemptions({ vault, wallet?, chainId, verbose?}): Claimable redemptions
  • getVaultUserHistory({ wallet, vault?, chainId? }): Transaction history
  • getVaultStakingPositions({ wallet, chainId }): Staking positions

Utilities

  • getPrice(symbol): Get token price in USD
  • switchNetwork(chainId): Change active chain
  • updateWallet(address): Set active wallet for tracking

Development

Running Tests

pnpm test

Building

pnpm build

Type Checking

All exports are fully typed. Use TypeScript for best developer experience.

Support

For issues or questions, refer to the main repository or contact the August Digital team.