Skip to content
Logo

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 same transfer call.
  • 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 AdapterService interface. The SDK ships with a viem adapter.
  • Type-safe errors — every failure is surfaced as a typed ClientServiceError or AdapterServiceError.
  • Effect-TS native — the entire SDK is built on Effect-TS. Compose the client through ClientService.layer or use the Promise-based facade.

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Client    │────▶│   API v2    │────▶│  Mure API   │
└─────────────┘     └─────────────┘     └─────────────┘
       │
       ▼
┌─────────────┐
│   Adapter   │────▶  viem / ethers / custom
└─────────────┘

The SDK layers three concepts:

  1. Adapter — talks to the blockchain (signs and sends transactions).
  2. API Client — talks to the Mure REST API (@mure/api-v2).
  3. Client — orchestrates the two so you don't have to.

Installation

PageWhat you'll learn
Getting StartedInstall, configure, and run your first transfer, swap, or bridge.
ClientThe createClient factory, transfer and send methods, ClientService.layer, and Effect integration.
AdaptersThe 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.