Modal & source wallets
Use the same entry point for a prepared action or an existing account.
On this page
Open options
| Option | Behavior |
|---|---|
| action | Prepares a standard app action for review. |
| tab: account | app | Chooses the initial modal tab. |
| creditId | Opens an existing facility. |
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.
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.