@breeztech/breez-sdk-spark-react-native

中文文档
0.28.0发布于 2026/11/05MITTypeScriptESM + CJS近 30 天下载 4194

React Native bindings for the Breez SDK

原始使用文档
文档目录9 节
  1. Overview
  2. What is the Breez SDK?
  3. Installation
  4. For React Native Apps
  5. For Expo Managed Workflow
  6. Usage
  7. Pricing
  8. Support
  9. Information for Maintainers and Contributors

Breez SDK

Overview

The Breez SDK provides developers with an end-to-end solution for integrating instant, non-custodial bitcoin and stablecoins into their apps and services. It eliminates the need for third parties, simplifies the complexities of Bitcoin and Lightning, and enables seamless onboarding for billions of users to the future of value transfer.

What is the Breez SDK?

It’s a nodeless integration that offers a non-custodial, end-to-end solution for integrating bitcoin and stablecoins, utilizing the Bitcoin-native Layer 2 Lightning & Spark, with on-chain interoperability and third-party fiat on-ramps.

Installation

For React Native Apps

To install the package:

npm install @breeztech/breez-sdk-spark-react-native

For Expo Managed Workflow

To install the package in an Expo project:

npx expo install @breeztech/breez-sdk-spark-react-native

Then add the plugin to your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      "@breeztech/breez-sdk-spark-react-native"
    ]
  }
}

Plugin Options

To enable Passkey support, set enablePasskey to true. This adds webcredentials:keys.breez.technology to the iOS Associated Domains entitlement:

{
  "expo": {
    "plugins": [
      ["@breeztech/breez-sdk-spark-react-native", {
        "enablePasskey": true
      }]
    ]
  }
}

After adding the plugin, rebuild your app:

npx expo prebuild
npx expo run:ios
npx expo run:android

Note: This package contains native code and requires a custom development build. It will not work with Expo Go.

Usage

Head over to the Breez SDK documentation to start implementing instant bitcoin and stablecoins in your app or service.

import { connect, defaultConfig } from '@breeztech/breez-sdk-spark-react-native';
import RNFS from 'react-native-fs';

// ...

const mnemonic = 
  'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about';

let config = defaultConfig(Network.Mainnet);
config.apiKey = apiKey;

const sdk = await connect({
  config,
  mnemonic,
  storageDir: `${RNFS.DocumentDirectoryPath}/breezSdkSpark`,
});

Pricing

The Breez SDK is free for developers.

Support

Have a question for the team? Join us on Telegram or email us at [email protected].

Information for Maintainers and Contributors

This repository is used to publish a NPM package providing React Native bindings to the Breez SDK's underlying Rust implementation. The React Native bindings are generated using UniFFi Bindgen React Native.

Any changes to Breez SDK, the React Native bindings, and the configuration of this React Native package must be made via the spark-sdk repository.

版本与发布记录

@breeztech/breez-sdk-spark-react-native 共发布 124 个版本,首次发布于 2025/09/17;过去 12 个月发布了 99 个版本。

版本发布日期距今
0.28.0latest2026/11/053 天前
0.27.3-dev2026/11/053 天前
0.27.22026/10/2316 天前
0.27.12026/10/2316 天前
0.26.12026/10/021 个月前
0.27.0-dev22026/10/021 个月前

关于 @breeztech/breez-sdk-spark-react-native 的常见问题

@breeztech/breez-sdk-spark-react-native 是什么?

React Native bindings for the Breez SDK

如何安装 @breeztech/breez-sdk-spark-react-native?

在项目目录运行 npm install @breeztech/breez-sdk-spark-react-native,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-native(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@breeztech/breez-sdk-spark-react-native 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@breeztech/breez-sdk-spark-react-native 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@breeztech/breez-sdk-spark-react-native 可以商用吗?

@breeztech/breez-sdk-spark-react-native 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@breeztech/breez-sdk-spark-react-native 的下载量有多少?

根据 npm 官方下载统计,@breeztech/breez-sdk-spark-react-native 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,194 次,日均约 140 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@breeztech/breez-sdk-spark-react-native 还在维护吗?

最新版本 0.28.0 发布于 2026/11/05(3 天前);至今共发布 124 个版本,其中过去 12 个月发布了 99 个;首次发布于 2025/09/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。