🔤Types
This package contains all common interfaces used throughout the entire SDK.
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;
};
Last updated