@buildonspark/spark-frost-bare-addon

中文文档
0.0.13发布于 2026/11/04Apache-2.0CommonJS零依赖近 30 天下载 5085

Example Bare addon

原始使用文档
文档目录4 节
  1. Build
  2. Installing bare and using the addon
  3. Publishing
  4. Advanced build options

Bare addon for Spark SDK

This package provides Spark frost signer bindings for use in Bare runtime. This adds support for more platforms since the WASM bindings (used for Node.js and browsers) in spark-sdk are not supported in bare in e.g. < iOS 18.4.

Build

yarn build

# Test the addon
yarn bare index.js

Installing bare and using the addon

If running from the Spark JS workspaces running bare with yarn bare and yarn bare-make is recommended to use the common version installed. Alternatively you can install globally with npm:

npm i -g bare bare-make

From the Spark JS workspaces you can test running spark-sdk in bare from our spark-bare-app example scripts or install it in your project and import from the @buildonspark/bare package:

import { SparkWallet, BareSparkSigner } from "@buildonspark/bare" with {
  imports: "./imports.json",
};

let { wallet, mnemonic } = await SparkWallet.initialize({
  signer: new BareSparkSigner(),
});
const balance = await wallet.getBalance();

Publishing

The committed package includes prebuilds for every tier 1 platform listed in the Bare documentation. The SDK bindings workflow rebuilds and commits all of them when the addon or one of its declared dependencies changes. Its manifest and package-content checks must pass before publishing; prepublishOnly also rejects stale or missing prebuilds. Publish from the committed package after the SDK bindings gate is green rather than downloading a separate workflow artifact.

Advanced build options

On MacOS be sure to prioritize the system toolchain instead of homebrew, otherwise you'll encounter errors for bare-make commands:

export PATH="/usr/bin:$PATH"

As mentioned in the bare addon guide run the following:

yarn

cd spark-frost-bare-addon

# By default bare-make will target and build for your current platform
yarn bare-make generate && yarn bare-make build && yarn bare-make install

# Test the addon
yarn bare index.js

# To build for spark-bare-expo-react-native-app
yarn bare-make generate --platform ios --arch arm64 --simulator && yarn bare-make build && yarn bare-make install
# This seems to be necessary to build/install an additional target, otherwise it reuses the previous target:
rm -rf build

yarn bare-make generate --platform ios --arch arm64 && yarn bare-make build && yarn bare-make install
rm -rf build

yarn bare-make generate --platform ios --arch x64 && yarn bare-make build && yarn bare-make install
rm -rf build

版本与发布记录

@buildonspark/spark-frost-bare-addon 共发布 13 个版本,首次发布于 2025/08/09;过去 12 个月发布了 9 个版本。

版本发布日期距今
0.0.13latest2026/11/044 天前
0.0.122026/05/096 个月前
0.0.112026/04/077 个月前
0.0.102026/04/017 个月前
0.0.92026/02/258 个月前
0.0.82026/02/248 个月前

关于 @buildonspark/spark-frost-bare-addon 的常见问题

@buildonspark/spark-frost-bare-addon 是什么?

Example Bare addon

如何安装 @buildonspark/spark-frost-bare-addon?

在项目目录运行 npm install @buildonspark/spark-frost-bare-addon,或使用 pnpm add / yarn add / bun add。

@buildonspark/spark-frost-bare-addon 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/buildonspark__spark-frost-bare-addon 是否存在。

@buildonspark/spark-frost-bare-addon 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@buildonspark/spark-frost-bare-addon 可以商用吗?

@buildonspark/spark-frost-bare-addon 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@buildonspark/spark-frost-bare-addon 的下载量有多少?

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

@buildonspark/spark-frost-bare-addon 还在维护吗?

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