TypeScript Types
TypeScript types and interfaces of Papaya SDK
Main Types
PapayaSDK
The main SDK class for interacting with the Papaya Protocol.
class PapayaSDK {
static create(
provider: ethers.Provider | ethers.Signer,
network?: NetworkName,
tokenSymbol?: TokenSymbol,
contractVersion?: string
): PapayaSDK;
static getAvailableNetworks(): NetworkName[];
static getAvailableTokens(network: NetworkName): TokenSymbol[];
}NetworkName
Type for supported network names.
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