SDK Overview
The @mure/sdk is a TypeScript library that combines the Mure API with blockchain adapters into one interface for executing on-chain intents.
What the SDK Provides
- One-call transfers — create a transfer intent via the API and submit it on-chain in a single
await client.transfer(...)call. - Swaps and bridges — express same-chain swaps with an
{ in, out }asset shape, or move value across chains through the sametransfercall. - Raw transaction broadcast — submit one or more prepared transactions with
client.send, including EIP-5792 batch calls. - Wallet abstraction — plug in any adapter that implements the
AdapterServiceinterface. The SDK ships with a viem adapter. - Type-safe errors — every failure is surfaced as a typed
ClientServiceErrororAdapterServiceError. - Effect-TS native — the entire SDK is built on Effect-TS. Compose the client through
ClientService.layeror use the Promise-based facade.
Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Client │────▶│ API v2 │────▶│ Mure API │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
│ Adapter │────▶ viem / ethers / custom
└─────────────┘
The SDK layers three concepts:
- Adapter — talks to the blockchain (signs and sends transactions).
- API Client — talks to the Mure REST API (
@mure/api-v2). - Client — orchestrates the two so you don't have to.
Installation
Quick Links
| Page | What you'll learn |
|---|---|
| Getting Started | Install, configure, and run your first transfer, swap, or bridge. |
| Client | The createClient factory, transfer and send methods, ClientService.layer, and Effect integration. |
| Adapters | The adapter pattern, ViemAdapter, sendTransactions, and how to bring your own wallet. |
When to Use the SDK
Use the SDK when you want:
- A Promise-based API that hides Effect complexity.
- Automatic transaction submission after the API returns a transfer intent.
- A single dependency that handles both the API and the blockchain.
If you only need raw HTTP access to the Mure API, consider using @mure/api-v2 directly.