A collection of Software Development Kits to ease interactions with the Morpho protocol and Morpho Vaults.
⭐ @morpho-org/morpho-sdk — the recommended entry point
Start here. @morpho-org/morpho-sdk is the abstraction layer that simplifies the Morpho protocol: it builds ready-to-send transactions for VaultV1 (MetaMorpho), VaultV2, and Blue (Morpho Blue) on any EVM-compatible chain.
The packages below are lower-level building blocks. Use them only if @morpho-org/morpho-sdk does not cover your use case. @morpho-org/morpho-sdk is the single recommended entry point for all integrations, including read-only ones — it covers both reads and transaction building, and long term is the package we converge on (with tree-shaking and dedicated export paths so read-only consumers don't pay for the transaction-building surface).
@morpho-org/blue-sdk-viem: Viem-based augmentation of@morpho-org/blue-sdkthat exports (and optionally injects) viem-based fetch methods@morpho-org/liquidity-sdk-viem: Viem-based package that helps seamlessly calculate the liquidity available through the PublicAllocator@morpho-org/midnight-sdk: Viem-based package for Morpho Midnight that exports protocol utilities, fetch helpers, and Midnight API utilities
@morpho-org/wdk-protocol-lending-morpho-evm(Apache-2.0): WDK lending module that bridges WDK EVM accounts (@tetherto/wdk-wallet-evm,@tetherto/wdk-wallet-evm-erc-4337) to@morpho-org/morpho-sdk, exposing vault and market flows (supply,withdraw,borrow,repay, collateral) with matchingquote*/get*Requirements. Ships a Bare runtime entry alongside Node.
-
@morpho-org/morpho-ts: TypeScript package to handle all things time & format-related -
@morpho-org/blue-sdk: Framework-agnostic package that defines Morpho-related entity classes (such asMarket,Token,Vault) -
@morpho-org/evm-simulation: EVM simulation engine for Morpho transactions, with Tenderly RPC andeth_simulateV1backends, signature authorization handling, and bundler retention checks
-
@morpho-org/test: Viem-based package that exports utilities to build Vitest & Playwright fixtures that spawn anvil forks as child processes -
@morpho-org/morpho-test: Framework-agnostic extension of@morpho-org/blue-sdkthat exports test fixtures useful for E2E tests on forks
- Install
lcov:sudo apt install lcov - Generate coverage info:
pnpm test:coverage - Generate hierarchical coverage report:
pnpm coverage:report
See CONTRIBUTING.md for setup, contribution workflow, and the inline checklist for listing a new chain to support.
See SECURITY.md for vulnerability reporting and supported security scope.
Here's a tutorial on how to link a specific package to debug at runtime:
- From the repository in which you want to link the package:
pnpm link ../your/relative/path/to/sdks/packages/blue-sdk
- "@morpho-org/blue-sdk": "5.0.0",
+ "@morpho-org/blue-sdk": "link:../../../sdks/packages/blue-sdk",- Modify
blue-sdkpackage.json to use js main & js files:
- "main": "src/index.ts",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts"- In a separate process, start:
pnpm --dir packages/blue-sdk build --watch
- @rubilmax (rubilmax.eth, Twitter)
- @Foulks-Plb (Twitter)
- @0xbulma
- @oumar-fall
- @julien-devatom
- @jinsuk
MIT — see LICENSE.
Exception: packages/wdk-protocol-lending-morpho-evm ships under Apache-2.0 (see its LICENSE).
