Suilend SDK Types Reference

This document provides a comprehensive reference for all types, interfaces, and enums used in the Suilend SDK.

Table of Contents

  • [Core Enums]

  • [Client Types]

  • [Configuration Types]

  • [Event Types]

  • [Reward Types]

  • [Generated Types]

  • [Utility Types]

Core Enums

Side

Represents the side of a lending operation for rewards and positions.

enum Side {
  DEPOSIT = "deposit",
  BORROW = "borrow",
}

Usage:

Action

Represents different types of lending actions.

Client Types

UiLendingMarket

Represents a lending market configuration for UI purposes.

Example:

ObligationWithUnclaimedRewards

Represents an obligation with associated unclaimed rewards.

Configuration Types

CreateReserveConfigArgs

Configuration parameters for creating a new reserve.

Example:

CreateRateLimiterConfigArgs

Configuration for rate limiting functionality.

Event Types

ApiReserveAssetDataEvent

Event data for reserve asset updates.

ApiDepositEvent

Event data for deposit operations.

ApiWithdrawEvent

Event data for withdrawal operations.

ApiBorrowEvent

Event data for borrow operations.

ApiRepayEvent

Event data for repay operations.

ApiLiquidateEvent

Event data for liquidation operations.

ApiInterestUpdateEvent

Event data for interest rate updates.

ApiObligationDataEvent

Event data for obligation state updates.

Reward Types

ClaimRewardsReward

Specification for claiming a specific reward.

Example:

ApiClaimRewardEvent

Event data for reward claims.

ApiMintEvent

Event data for cToken minting (when depositing to reserves).

ApiRedeemEvent

Event data for cToken redemption (when withdrawing from reserves).

Generated Types

The SDK includes many generated types from on-chain smart contracts. These are located in the _generated directory.

Key Generated Interfaces

LendingMarket

Obligation

ObligationOwnerCap

Reserve

FeeReceivers

Utility Types

DownsampledApiReserveAssetDataEvent

Extended reserve asset data with sampling information.

Transaction Types

These are re-exported from @mysten/sui:

Constants

Precision Constants

Market Constants

Type Guards and Utilities

Common Type Checks

Working with BigInt

Many amounts in the SDK are represented as bigint or string representations of large numbers:

Example Type Usage