Skip to main content
The Provider API is the low-level interface the dApp SDK is built on. It follows the EIP-1193 request/event pattern and implements CIP-103.
Most dApps should use the high-level SDK. Use the Provider API directly only when building lower-level infrastructure or adapting an existing provider-based integration.

OpenRPC specifications

The dApp API is specified in machine-readable OpenRPC documents:

Getting a provider

After connecting, obtain the active CIP-103 provider from the SDK:

Methods

Every operation is a request({ method, params }) call. The methods mirror the SDK functions one-to-one.

Events

Subscribe with on and clean up with removeListener.
The provider emits statusChanged, accountsChanged, and txChanged. The Async API also emits connected and messageSignature. For payload shapes, see Events.

Sync and Async APIs

The dApp API comes in two variants for different wallet deployments:
  • Sync API targets wallets with direct access, such as browser extensions or desktop apps. Methods run in a standard request-response fashion.
  • Async API targets server-side or remote wallets, where operations that need user interaction cannot block. Those methods return a userUrl for the user to complete the action (for example login or transaction approval), and the result arrives later as an event.
Key differences in the Async API:
  • connect returns { ...ConnectResult, userUrl } when no session exists; a connected event is emitted after login.
  • prepareExecute returns { userUrl }; a txChanged event is emitted after the prepare phase.
The dApp SDK implements the Sync API interface and relays to an Async API server internally, so dApp code written against the SDK works with both wallet types without changes.

Provider interface

Both variants are accessed through a Provider interface, following EIP-1193:

SDK vs Provider API

  • SDK Methods — The high-level equivalents of these request methods.
  • Errors — Standard error codes returned by the API.