@telaro/dapp-adapter-core
v0.1.0
Published
Shared monkey-patch wrapper for Telaro DApp adapters (Kamino/Drift/MarginFi). Used internally by `@telaro/{kamino,drift,marginfi}`.
Maintainers
Readme
@telaro/dapp-adapter-core
Internal. Shared monkey-patch wrapper used by Telaro DApp adapters:
@telaro/kamino,@telaro/drift,@telaro/marginfi. You probably want one of those, not this.
What it does
Provides the policy gate primitive that DApp adapters wrap around their
SDK’s capital-handling methods (deposit / borrow / open-position /
delegate). Calls view_bond either via on-chain CPI (when the
DApp's program has bonded-agents as a dep) or via the read-only API
(when running purely off-chain).
┌─────────────────────────────────┐
│ DApp adapter (kamino / drift) │
│ - patches kamino.deposit(...) │
│ - calls policyGate(agent) │
│ ↓ │
│ @telaro/dapp-adapter-core│ ← you are here
│ - api or CPI gate │
│ ↓ │
│ @telaro/sdk │
└─────────────────────────────────┘When to use this directly
If you’re building a new DApp adapter (e.g. Solend, Raydium) that
isn’t in our packages tree yet. See @telaro/kamino's source
for the canonical pattern.
