Skip to main content

Types

Complete type reference for the SatsTerminal Borrow SDK.

Enums

ChainType

Supported blockchain networks.

SessionScope

Session permission levels.

ErrorCode

Error classification codes.

Configuration

BorrowSDKConfig

SDK configuration options.

WalletProvider

Wallet integration interface.

StorageProvider

Storage abstraction interface.

RetryConfig

Request retry configuration.

Logger

Logging interface.

User & Session

UserStatus

Current user status.

ActiveSession

Active session details.

Loan & Quote

QuoteRequest

Parameters for requesting quotes.

Quote

Loan quote from a protocol. Use getQuoteFees() to fetch the fee breakdown for a selected quote.

LoanCollateralInfo

Collateral information for a loan.

Webhooks

SdkWebhookEventType

SdkWebhookConfig

SdkWebhookConfigUpdateRequest

SdkWebhookSecretResponse

SdkBtcDepositConfirmedWebhookPayload


Transactions

UserTransaction

User transaction record.

BorrowSettlementLegStatus

Status of a borrow settlement leg.

BorrowFeeDistributionStatus

High-level outcome of fee distribution.

BorrowFeeSettlementMode

How the borrow fee is settled to treasury.

BorrowFeeBridgeSource

Which user-owned wallet funded the fee settlement.

BorrowFeeBridgeStatus

Progress of the fee settlement transfer or bridge.

BorrowFeePayoutStatus

Progress of the treasury payout to the referrer.

BorrowFeeBridgeStatusContext

Persisted context used to resume LI.FI bridge status checks.

BorrowSettlementLeg

Settlement leg recorded on a borrow transaction.

BorrowFeeSnapshot

Snapshot of borrow fee collection, settlement, and referral payout.

PaginatedResponse

Paginated response wrapper.

RepayTransaction

Repayment transaction details.

RepayTransactionStatusResponse

Status response for repay transactions.

Workflow

BorrowWorkflowStage

Stages shared by Borrow, Borrow More, and Deposit More. Each operation visits only the stages relevant to its flow.
Import it from the Borrow SDK:

WorkflowStatus

Current workflow status.

WorkflowCallbacks

Callbacks for workflow tracking.

DepositInfo

Deposit information.

MoreTransactionStatusResponse

Status returned by getBorrowMoreStatus() and getDepositMoreStatus().

RepayWorkflowStage

Repay workflow stages.

RepayWorkflowStep

Repay workflow steps.

RepayWorkflowState

Repay workflow state.

Wallet & Portfolio

WalletPosition

Token position in wallet.

WalletPositionsResponse

Response for wallet positions.

WalletPortfolio

Portfolio summary.

WalletPortfolioResponse

Response for wallet portfolio.

Fees & Withdrawals

FeesRequest

Fee information request.

FeesResponseData

Fee information response.

QuoteFeesRequestData

Request body for BorrowSDK.getQuoteFees().

BorrowQuoteFeesData

Borrow-side fee breakdown for the requested loan. feeSource is 'campaign' when a discount applies, otherwise 'default'.

QuoteFeesResponseData

Full fee response returned by BorrowSDK.getQuoteFees(). Combines bridge fees with the borrow-side fee breakdown.

WithdrawToBitcoinRequest

Cross-chain withdrawal request to Bitcoin.

WithdrawToEVMRequest

Gasless EVM withdrawal request (sponsored gas).

WithdrawToEVMResponse

Response from EVM withdrawal.

WithdrawStatusResponse

Withdrawal status response.

Utility Types

Units

Type-safe Bitcoin unit conversion utilities with branded types.

Example


ResponseNormalizer

Utilities for handling various API response formats.

Example


BtcUtils (Deprecated)

Legacy Bitcoin utility class. Use Units instead for type-safe conversions.

Migration