BorrowApp composes the complete SatsTerminal borrowing journey into one framework-agnostic application. It includes loan creation, offer selection, workflow tracking, loan history, focused management views, repayment, collateral withdrawal, and platform-wallet EVM withdrawal.No application routes are required. Selecting, tracking, or creating a loan opens a focused view controlled by URL search parameters.
"use client";import { BorrowApp } from "@/components/borrow-app";export function BorrowPage() { return <BorrowApp apiKey={process.env.NEXT_PUBLIC_SATSTERMINAL_API_KEY!} />;}
BorrowApp includes a minimal UniSat connector, owns the BorrowProvider, restores the extension account and SDK session, and starts a fresh SDK session only when restoration is unavailable. No wallet package is required.Applications that already manage a wallet can pass their own SDK-compatible wallet prop; doing so bypasses the built-in UniSat connection screen.
BorrowApp starts on a dashboard containing the composer, offers, history, and wallet withdrawal. Creating a loan or selecting an existing loan switches to a focused transaction view instead of stacking management components below the dashboard.The selected view is stored in namespaced stBorrow* URL search parameters using the browser History API. Refreshing preserves the current transaction, browser Back returns to the dashboard, and the component remains framework-agnostic—no Next.js or React Router dependency is required.
Use the individual registry blocks instead when you need custom routing or a different layout. BorrowApp installs the same editable source components; it does not introduce a separate closed component system.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"SatsTerminal SDK","colors":{"primary":"#F97316","light":"#F8FAFC","dark":"#0F172A"},"favicon":"https://mintcdn.com/minervauniversity/Xyaoeauk6JbGwrxP/favicon.ico?fit=max\u0026auto=format\u0026n=Xyaoeauk6JbGwrxP\u0026q=85\u0026s=e3d9cb6a8810ff71594901ea6fd14256","logo":{"light":"https://mintcdn.com/minervauniversity/Xyaoeauk6JbGwrxP/logo-black.svg?fit=max\u0026auto=format\u0026n=Xyaoeauk6JbGwrxP\u0026q=85\u0026s=3e0a425769c59b52b402f39a18a63926","dark":"https://mintcdn.com/minervauniversity/Xyaoeauk6JbGwrxP/logo-white.svg?fit=max\u0026auto=format\u0026n=Xyaoeauk6JbGwrxP\u0026q=85\u0026s=4dee4303a415d004d9b1ed14944618f6"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"minervauniversity","hasAudioNarration":false,"actualSubdomain":"minervauniversity","customDomains":["developer.satsterminal.com"],"gitSource":{"type":"github","owner":"davicoscarelli","repo":"satsterminal-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a5aa6cb233db6e48b384573","collectionId":"3cd8c493-8925-46ab-aecb-774bc5f4891d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a5aa6cb233db6e48b384573"},"entitlements":{},"buildId":"6a5aa6cb233db6e48b384573:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"Borrow","count":26},{"language":"default","tag":"Bridge","count":12},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"UI Components","count":7},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"Spark Runes","count":4},{"language":"default","tag":"Spark Stables","count":4},{"language":"default","tag":"Swaps","count":4},{"language":"default","tag":"Overview","count":3}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"/* latin-ext */\n@font-face {\n font-family: 'DM Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTU7PB1QTsUX8KYthSQBLyM.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmmono/v16/aFTU7PB1QTsUX8KYthqQBA.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxRR232VGM.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/dmsans/v17/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxRSW32.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/JqzK5SSPQuCQF3t8uOwiUL-taUTtarVKQ9vZ6pJJWlMNxcYwRshvbFE.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/JqzK5SSPQuCQF3t8uOwiUL-taUTtarVKQ9vZ6pJJWlMNxcYwSMhv.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--brand-primary:#f97316;--brand-primary-soft:rgba(249, 115, 22, 0.05)}body{font-size:16px}h1,h2,h3,h4,h5,h6{font-family:\"Schibsted Grotesk\",\"DM Sans\",system-ui,sans-serif;font-weight:700;letter-spacing:-.03em;text-align:center}blockquote,body,code,h1,h2,h3,h4,h5,h6,kbd,li,p,pre{font-style:normal;line-height:1.35}blockquote,body,li,p{font-family:\"DM Sans\",system-ui,-apple-system,sans-serif;font-weight:500;letter-spacing:-.025em}code,kbd,pre{font-family:\"DM Mono\",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;font-weight:400;font-size:.95rem;letter-spacing:-.03em}.sidebar a.active,.sidebar a[data-active=true],.sidebar a[data-state=active],nav a[aria-current=page],nav a[aria-current=true]{background-color:var(--brand-primary-soft)!important;color:var(--brand-primary)!important;border-radius:8px}.sidebar a.active svg,.sidebar a[data-active=true] svg,.sidebar a[data-state=active] svg{color:var(--brand-primary)!important}.button,a,button{color:var(--brand-primary)}.button:hover,a:hover,button:hover{color:#c85c11}ol,ul{padding-left:1.1rem}.mermaid .svg-pan-zoom-control,.mermaid .svg-pan-zoom-control-background,.mermaid [aria-label*=Pan],.mermaid [aria-label*=Reset],.mermaid [aria-label*=Zoom],.mermaid [aria-label*=down],.mermaid [aria-label*=left],.mermaid [aria-label*=pan],.mermaid [aria-label*=reset],.mermaid [aria-label*=right],.mermaid [aria-label*=up],.mermaid [aria-label*=zoom],.mermaid [class*=control],.mermaid [class*=pan-zoom],.mermaid [class*=zoom-control],.mermaid [type=button],.mermaid button,.mermaid svg [class*=pan-zoom],.mermaid svg [class*=svg-pan-zoom],.mermaid svg+div,.mermaid svg~div{display:none!important}.mdx-content :has(.mermaid) [role=button],.mdx-content :has(.mermaid) button{display:none!important}html:not(.dark) .mermaid .activation0,html:not(.dark) .mermaid .activation1,html:not(.dark) .mermaid .actor,html:not(.dark) .mermaid .actor rect,html:not(.dark) .mermaid .node circle,html:not(.dark) .mermaid .node ellipse,html:not(.dark) .mermaid .node polygon,html:not(.dark) .mermaid .node rect,html:not(.dark) .mermaid .note{stroke:var(--brand-primary)!important;fill:var(--brand-primary-soft)!important}html:not(.dark) .mermaid .actor text,html:not(.dark) .mermaid .node text,html:not(.dark) .mermaid .note text{fill:#0f172a!important;font-weight:600}html:not(.dark) .mermaid .actor-line,html:not(.dark) .mermaid .loopLine,html:not(.dark) .mermaid .loopLine0,html:not(.dark) .mermaid .loopLine1,html:not(.dark) .mermaid .messageLine0,html:not(.dark) .mermaid .messageLine1,html:not(.dark) .mermaid .sequenceDiagram line{stroke:var(--brand-primary)!important}html:not(.dark) .mermaid .arrowheadPath{fill:var(--brand-primary)!important;stroke:var(--brand-primary)!important}html:not(.dark) .mermaid .sequenceDiagram text{fill:#0f172a!important}"}],"page":{"pagePath":"ui-components/borrow-app","slug":"/ui-components/borrow-app","pageMetadata":{"title":"Complete Borrow App","description":"Install a ready-made single-page borrowing experience with one registry command.","href":"/ui-components/borrow-app"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Install a ready-made single-page borrowing experience with one registry command.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`complete-borrow-app`,children:`Complete Borrow App`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`BorrowApp`}),` composes the complete SatsTerminal borrowing journey into one framework-agnostic application. It includes loan creation, offer selection, workflow tracking, loan history, focused management views, repayment, collateral withdrawal, and platform-wallet EVM withdrawal.`]}),`\n`,_jsx(_components.p,{children:`No application routes are required. Selecting, tracking, or creating a loan opens a focused view controlled by URL search parameters.`}),`\n`,_jsx(Heading,{level:`2`,id:`install`,children:`Install`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npx`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shadcn@latest`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://ui.satsterminal.com/r/borrow-app.json`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This single command installs every supporting SatsTerminal block and required shadcn primitive automatically.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`BorrowApp`}),` requires `,_jsx(_components.code,{children:`@satsterminal-sdk/borrow`}),` 1.7.3 or later.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`render`,children:`Render`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"use client\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BorrowApp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@/components/borrow-app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` BorrowPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`BorrowApp`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`NEXT_PUBLIC_SATSTERMINAL_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`BorrowApp`}),` includes a minimal UniSat connector, owns the `,_jsx(_components.code,{children:`BorrowProvider`}),`, restores the extension account and SDK session, and starts a fresh SDK session only when restoration is unavailable. No wallet package is required.`]}),`\n`,_jsxs(_components.p,{children:[`Applications that already manage a wallet can pass their own SDK-compatible `,_jsx(_components.code,{children:`wallet`}),` prop; doing so bypasses the built-in UniSat connection screen.`]}),`\n`,_jsx(Heading,{level:`2`,id:`included-flow`,children:`Included flow`}),`\n`,_jsx(_components.p,{children:`The installed app composes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LoanComposer`}),` and `,_jsx(_components.code,{children:`AvailableOffers`})]}),`\n`,_jsxs(_components.li,{children:[`Resumable `,_jsx(_components.code,{children:`BorrowFlow`})]}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`UserLoans`})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`LoanManagement`}),` for Deposit more and Borrow more`]}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`RepayLoan`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`WithdrawCollateral`})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`WalletWithdrawal`}),` for EVM platform-wallet transfers`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PlatformWalletAddress`}),` in the application header`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`focused-loan-pages`,children:`Focused loan pages`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`BorrowApp`}),` starts on a dashboard containing the composer, offers, history, and wallet withdrawal. Creating a loan or selecting an existing loan switches to a focused transaction view instead of stacking management components below the dashboard.`]}),`\n`,_jsxs(_components.p,{children:[`The selected view is stored in namespaced `,_jsx(_components.code,{children:`stBorrow*`}),` URL search parameters using the browser History API. Refreshing preserves the current transaction, browser Back returns to the dashboard, and the component remains framework-agnostic—no Next.js or React Router dependency is required.`]}),`\n`,_jsx(Heading,{level:`2`,id:`props`,children:`Props`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Prop`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apiKey`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[`Required SatsTerminal API key unless `,_jsx(_components.code,{children:`sdkOverride`}),` is supplied`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`WalletProvider`})}),_jsx(_components.td,{children:`Optional external Bitcoin adapter; bypasses built-in UniSat connection`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sdkConfig`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Omit\u003cBorrowSDKConfig, \"apiKey\" | \"wallet\">`})}),_jsx(_components.td,{children:`Optional overrides for the SDK configuration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sdkOverride`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BorrowSDK`})}),_jsx(_components.td,{children:`Alternative pre-built SDK instance for tests or advanced integrations`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`destinationAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Optional payout override passed to loan execution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`defaultBitcoinAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Default destination for collateral withdrawal`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`defaultEvmAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Default destination for platform-wallet withdrawal`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`autoRestore`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsxs(_components.td,{children:[`Restore persisted SDK sessions; defaults to `,_jsx(_components.code,{children:`true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`autoStart`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsxs(_components.td,{children:[`Initialize a session when restoration fails; defaults to `,_jsx(_components.code,{children:`true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`title`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Application header title`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accountLabel`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Connected-wallet label shown in the header`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onDisconnect`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`() => void`})}),_jsx(_components.td,{children:`Optional callback after built-in disconnect, or external disconnect action`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onLoanSelected`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(loan) => void`})}),_jsx(_components.td,{children:`Observe a loan being opened from history`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`atomic-components`,children:`Atomic components`}),`\n`,_jsxs(_components.p,{children:[`Use the individual registry blocks instead when you need custom routing or a different layout. `,_jsx(_components.code,{children:`BorrowApp`}),` installs the same editable source components; it does not introduce a separate closed component system.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Complete Borrow App","description":"Install a ready-made single-page borrowing experience with one registry command.","href":"/ui-components/borrow-app"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Complete Borrow App","slug":"complete-borrow-app","depth":1,"children":[]},{"title":"Install","slug":"install","depth":2,"children":[]},{"title":"Render","slug":"render","depth":2,"children":[]},{"title":"Included flow","slug":"included-flow","depth":2,"children":[]},{"title":"Focused loan pages","slug":"focused-loan-pages","depth":2,"children":[]},{"title":"Props","slug":"props","depth":2,"children":[]},{"title":"Atomic components","slug":"atomic-components","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"minervauniversity","siteName":"SatsTerminal SDK","title":"Complete Borrow App - SatsTerminal SDK","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-17T19:26:29.252Z","originalFileLocation":"ui-components/borrow-app.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Install a ready-made single-page borrowing experience with one registry command.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SatsTerminal SDK\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Complete Borrow App - SatsTerminal SDK\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install a ready-made single-page borrowing experience with one registry command.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SatsTerminal SDK\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.satsterminal.com/ui-components/borrow-app\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://minervauniversity.mintlify.app/_mintlify/api/og/v2?division=UI+Components\u0026amp;title=Complete+Borrow+App\u0026amp;description=Install+a+ready-made+single-page+borrowing+experience+with+one+registry+command.\u0026amp;theme=895f6e242af711e7670585c0\u0026amp;signature=e2642e12d971ffd449b59ff2dae5a6fdca76cc009614fda70fe059d583f43c3d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Complete Borrow App - SatsTerminal SDK\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install a ready-made single-page borrowing experience with one registry command.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://minervauniversity.mintlify.app/_mintlify/api/og/v2?division=UI+Components\u0026amp;title=Complete+Borrow+App\u0026amp;description=Install+a+ready-made+single-page+borrowing+experience+with+one+registry+command.\u0026amp;theme=895f6e242af711e7670585c0\u0026amp;signature=e2642e12d971ffd449b59ff2dae5a6fdca76cc009614fda70fe059d583f43c3d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/minervauniversity/05qZ4QLqeXx5EeH4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SatsTerminal SDK\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F97316\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.satsterminal.com/ui-components/borrow-app\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ui-components/borrow-app.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.satsterminal.com/#organization\",\"name\":\"SatsTerminal SDK\",\"url\":\"https://developer.satsterminal.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/minervauniversity/Xyaoeauk6JbGwrxP/logo-black.svg?fit=max\u0026auto=format\u0026n=Xyaoeauk6JbGwrxP\u0026q=85\u0026s=3e0a425769c59b52b402f39a18a63926\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.satsterminal.com#website\",\"name\":\"SatsTerminal SDK\",\"url\":\"https://developer.satsterminal.com\",\"publisher\":{\"@id\":\"https://developer.satsterminal.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.satsterminal.com/ui-components/borrow-app#webpage\",\"url\":\"https://developer.satsterminal.com/ui-components/borrow-app\",\"name\":\"Complete Borrow App\",\"description\":\"Install a ready-made single-page borrowing experience with one registry command.\",\"dateModified\":\"2026-07-17T19:26:29.252Z\",\"isPartOf\":{\"@id\":\"https://developer.satsterminal.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.satsterminal.com/ui-components/borrow-app#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.satsterminal.com/ui-components/borrow-app#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"UI Components\",\"item\":\"https://developer.satsterminal.com/ui-components/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Complete Borrow App\",\"item\":\"https://developer.satsterminal.com/ui-components/borrow-app\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developer.satsterminal.com/ui-components/borrow-app#article\",\"headline\":\"Complete Borrow App\",\"name\":\"Complete Borrow App\",\"description\":\"Install a ready-made single-page borrowing experience with one registry command.\",\"url\":\"https://developer.satsterminal.com/ui-components/borrow-app\",\"mainEntityOfPage\":{\"@id\":\"https://developer.satsterminal.com/ui-components/borrow-app#webpage\"},\"dateModified\":\"2026-07-17T19:26:29.252Z\",\"publisher\":{\"@id\":\"https://developer.satsterminal.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.satsterminal.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SatsTerminal SDK\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SatsTerminal SDK","nav":{"global":null,"groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/overview"},{"title":"Getting Started","href":"/getting-started"},{"title":"API Keys","href":"/api-keys"}]},{"group":"Suite","pages":[{"title":"Suite usage","href":"/suite/usage"}]},{"group":"UI Components","pages":[{"title":"UI Components","href":"/ui-components/overview"},{"title":"Install UI Components","description":"Configure shadcn and install components from the SatsTerminal UI registry.","href":"/ui-components/installation"},{"title":"Complete Borrow App","href":"/ui-components/borrow-app"},{"title":"Borrow UI Quickstart","description":"Compose an end-to-end borrowing interface from SatsTerminal registry components.","href":"/ui-components/borrow-quickstart"},{"title":"UI Component Reference","href":"/ui-components/component-reference"},{"title":"Platform Wallet Withdrawal","href":"/ui-components/wallet-withdrawal"},{"title":"Customize UI Components","href":"/ui-components/customization"}]},{"group":"Swaps","pages":[{"title":"Swaps Overview","href":"/swaps/overview"},{"title":"Quickstart","href":"/swaps/quickstart"},{"title":"API Reference","href":"/swaps/api"},{"title":"Examples","href":"/swaps/examples"}]},{"group":"Borrow","pages":[{"title":"Borrow Overview","href":"/borrow/overview"},{"group":"Getting Started","pages":[{"title":null,"href":"/borrow/getting-started/installation"},{"title":null,"href":"/borrow/getting-started/quick-start"},{"title":null,"href":"/borrow/getting-started/configuration"}]},{"group":"Core Concepts","pages":[{"title":null,"href":"/borrow/core-concepts/architecture"},{"title":null,"href":"/borrow/core-concepts/smart-wallets"},{"title":null,"href":"/borrow/core-concepts/sessions"},{"title":null,"href":"/borrow/core-concepts/workflows"}]},{"group":"Guides","pages":[{"title":null,"href":"/borrow/guides/getting-a-loan"},{"title":"Borrowing More","href":"/borrow/guides/borrowing-more"},{"title":"Depositing More Collateral","href":"/borrow/guides/depositing-more-collateral"},{"title":null,"href":"/borrow/guides/repaying-a-loan"},{"title":null,"href":"/borrow/guides/managing-collateral"},{"title":null,"href":"/borrow/guides/cross-chain-withdrawals"},{"title":null,"href":"/borrow/guides/portfolio-positions"},{"title":null,"href":"/borrow/guides/webhooks"},{"title":"Withdrawals","href":"/borrow/withdrawals"}]},{"group":"Examples","pages":[{"title":null,"href":"/borrow/examples/react-integration"},{"title":null,"href":"/borrow/examples/nodejs-usage"},{"title":null,"href":"/borrow/examples/complete-loan-flow"}]},{"group":"API Reference","pages":[{"title":null,"href":"/borrow/api-reference/borrow-sdk"},{"title":null,"href":"/borrow/api-reference/types"},{"title":null,"href":"/borrow/api-reference/errors"}]},{"group":"Resources","pages":[{"title":null,"href":"/borrow/resources/best-practices"},{"title":null,"href":"/borrow/resources/error-handling"},{"title":null,"href":"/borrow/resources/troubleshooting"}]}]},{"group":"Bridge","pages":[{"title":"Bridge Overview","href":"/bridge/overview"},{"group":"Getting Started","pages":[{"title":"Installation","href":"/bridge/getting-started/installation"},{"title":"Bridge Quickstarts","href":"/bridge/quickstart"}]},{"group":"Spark Runes","pages":[{"title":"Spark Runes Overview","href":"/bridge/spark-runes/overview"},{"title":"Spark Runes Quickstart","href":"/bridge/spark-runes/quickstart"},{"title":"Spark Runes Architecture","href":"/bridge/spark-runes/architecture"},{"title":"Spark Runes API","href":"/bridge/spark-runes/api"}]},{"group":"Spark Stables","pages":[{"title":"Spark Stables Overview","href":"/bridge/spark-stables/overview"},{"title":"Spark Stables Quickstart","href":"/bridge/spark-stables/quickstart"},{"title":"Spark Stables Architecture","href":"/bridge/spark-stables/architecture"},{"title":"Spark Stables API","href":"/bridge/spark-stables/api"}]},{"title":"Bridge API Overview","href":"/bridge/api"}]},{"group":"Earn","pages":[{"title":"Earn Overview","href":"/earn/overview"},{"title":"Earn Quickstart","href":"/earn/quickstart"},{"title":"Earn API Reference","href":"/earn/api"}]}]},"title":"Complete Borrow App - SatsTerminal SDK","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":[],"chunks":[]}