TypeScript Types

TypeScript types and interfaces of Azoth SDK

The Azoth SDK provides full TypeScript typing for better development experience and autocompletion.

Main Types

AzothSDK

The main SDK class for interacting with the AzothPay Protocol.

class AzothSDK {
  static create(
    provider: ethers.Provider | ethers.Signer,
    network?: NetworkName,
    tokenSymbol?: TokenSymbol,
    contractVersion?: string
  ): AzothSDK;
  
  static getAvailableNetworks(): NetworkName[];
  static getAvailableTokens(network: NetworkName): TokenSymbol[];
}

NetworkName

Type of supported networks

TokenSymbol

Type for supported token symbols.

RatePeriod

Enum for time periods of rates.

Data Interfaces

UserInfo

Interface for user information.

Subscription

Interface for subscription information.

SubscriptionInfo

Interface for detailed subscription information.

Type Usage Examples

Creating a Typed Instance

Working with User Information

Working with Subscriptions

Checking Subscriptions

Utility Types

BigNumberish

Type for numbers that can be converted to BigNumber.

TransactionResponse

Type for ethers.js transaction responses.

Last updated