Skip to content
Termbook
Borrower SDK

Modal & source wallets

Use the same entry point for a prepared action or an existing account.

On this page

Open options

OptionBehavior
actionPrepares a standard app action for review.
tab: account | appChooses the initial modal tab.
creditIdOpens an existing facility.
Open account management
const modal = termbook.open({
  creditId: credit_id,
  tab: "account",
});
await modal.ready;

Without options, open lets the borrower choose setup or an existing facility. The Account tab exposes debt, health, collateral, repayment and closure. The App tab exposes admitted actions and current positions or pending activity.

Separate source wallets

A SOL-backed borrower connects a Monad EVM wallet for the loan and a Solana wallet for the collateral lock. These are separate identities bound by the setup. Ethereum collateral uses an EVM wallet on Sepolia or the admitted Ethereum network.

The SDK resolves the source market and connects a compatible browser wallet. sourceWalletResolver can supply an explicit SourceLockWallet for custom clients. It must sign on the source chain and preserve the bound source owner and recipient.

Optional custom resolver
const termbook = create_termbook({
  app_token,
  wallet,
  sourceWalletResolver: async (market) => {
    return source_wallet_for(market);
  },
});

Show real progress

  • Offer acceptance and reservation.
  • Source approval and collateral lock.
  • Required confirmations and proof acceptance.
  • Account readiness and action review.
  • Submitted, pending and final execution results.
  • Repayment, exit steps and confirmed collateral return.

Closing the modal does not undo confirmed transactions. Reopening resolves recorded identifiers and resumes required steps. Never show success simply because a wallet prompt was approved.

Documentation
8 results

Let’s talk

Tell us what you have in mind.

Supply liquidity