August
  • 👋Introduction
  • 🎦Protocol Overview
  • 🪙Token & Tokenomics
  • Using August
    • 🚄TWAP
  • Smart Contracts
    • 🚥Risks and Audits
    • 🔗Contract Addresses
  • Developers
    • 📦Javascript SDK
      • 🤽Lending Pools
      • ⚡Utilities
      • 🔤Types
      • 📜ABI's
    • 🔮Subgraphs
  • Legal
    • 🗒️Legal
      • Terms of Service
      • Privacy Policy
      • Cookie Policy
  • Community
    • Home Page
    • X
Powered by GitBook
On this page
  • Installation
  • Featured Interfaces
  • Commonly Used
  • Lending Pools
  1. Developers
  2. Javascript SDK

Types

This package contains all common interfaces used throughout the entire SDK.

PreviousUtilitiesNextABI's

Last updated 10 months ago

There are many interfaces exported from the types package. We'll present a few examples of the more commonly used interfaces, but take a look at the entire API here.

Installation

Install the package in your project directory with:

npm install @augustdigital/types

You can import individual methods and constants from the utilities package with the following:

import { <METHOD> } from '@augustdigital/types';

or the CommonJS way:

const augustTypes from '@augustdigital/types';

Featured Interfaces

Commonly Used

INormalizedNumber

Return type when working with any number value with the August JS ecosystem.

type INormalizedNumber = {
  normalized: string;
  raw: bigint;
};

Lending Pools

IPoolWithUnderlying

Lending pool object including the underlying token details. This is what is returned when interacting with the AugustPools class.

type IPoolWithUnderlying = {
  address: IAddress;
  name: string;
  asset: IAddress;
  apy?: INormalizedNumber;
  collateral?: IAddress[];
  loansOperator: IAddress;
  globalLoansAmount: INormalizedNumber;
  symbol: string;
  totalAssets: INormalizedNumber;
  totalSupply: INormalizedNumber;
  totalBorrowed?: INormalizedNumber;
  decimals: number;
  loans?: IPoolLoan[];
  getTotalLoansDeployed: INormalizedNumber;
  underlying: {
    address: IAddress;
    symbol: string;
    decimals: number;
  }
};

IAvailableRedemption

Interface used with using getAvailableRedemptions from the AugustPools class.

type IPoolAvailableRedemption = {
  receiver: IAddress;
  day: INormalizedNumber;
  month: INormalizedNumber;
  year: INormalizedNumber;
  amount: INormalizedNumber;
  date: Date;
};
📦
🔤
npm: @augustdigital/typesnpm
Logo