@dojoengine/create-burner

中文文档
2.0.0发布于 2026/07/11MITTypeScriptES Module构建来源已验证近 30 天下载 2687

dojo: Useful hooks and functions to create a Starknet burner wallet

原始使用文档
文档目录10 节
  1. Features:
  2. Table of Contents
  3. Installation
  4. In the wild:
  5. Usage
  6. With React
  7. Vanilla JavaScript
  8. API
  9. Contribute
  10. License
Dojo logo
Dojo logo

discord Telegram Chat

Note: Starknet Burner Accounts are currently in pre-alpha. Expect breaking changes frequently.

Warning: You should provide your users with warning explaning that these Accounts are not secure and should not be used for storing large amounts of funds. The keypair is stored in local storage and can be exploited by malicious actors.

Create Starknet Burner Accounts

Easily manage, create, and interact with burner accounts on Starknets using this library.

Features:

  • Initialize and manage burner accounts.
  • Abstracts away intricacies related to creating, fetching, and setting active burner accounts.
  • Easily integrate with React apps using the provided hook.
  • Vanilla JS support.

Table of Contents

Installation

You can install create-burner using yarn, pnpm, or npm:

yarn add @dojoengine/create-burner starknet

In the wild:

Usage

With React

After installation, you can easily integrate it into your React app:

import { useBurner } from "@dojoengine/create-burner";

const YourComponent = () => {
    const { get, list, select, create, account } = useBurner(options);

    // Rest of your component
};

Vanilla JavaScript

For non-React apps, initialize and manage burners using the BurnerManager class:

import { BurnerManager } from "@dojoengine/create-burner";

const manager = new BurnerManager(options);
manager.init();
const activeAccount = manager.getActiveAccount();

API

  • useBurner: A React hook that provides functionalities like creating burners, selecting them, and more.

    • get(address: string): Get a burner account based on its address.
    • list(): List all burners.
    • select(address: string): Set a burner as the active account.
    • create(): Create a new burner.
    • account: The active burner account.
    • isDeploying: A boolean that indicates whether a burner is being deployed.
    • listConnectors(): List all available wallets that can be passed to Starknet Start as extraWallets.
  • BurnerManager: A class for vanilla JS that offers methods to manage burner accounts.

    • init(): Initializes the manager.
    • getActiveAccount(): Retrieves the active burner account.
    • get(address: string): Get a burner account based on its address.
    • list(): List all burners.
    • select(address: string): Set a burner as the active account.
    • create(): Create a new burner.
    • account: The active burner account.
    • isDeploying: A boolean that indicates whether a burner is being deployed.

Contribute

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/my-new-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License.

版本与发布记录

@dojoengine/create-burner 共发布 228 个版本,首次发布于 2023/08/08;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.0.0latest2026/07/114 个月前
1.8.102026/01/149 个月前
1.8.92026/01/139 个月前
1.8.72025/11/2611 个月前
1.8.62025/11/131 年前
1.8.52025/11/131 年前

其他发布通道:next → 0.0.27,beta → 1.6.0-beta.5,preview → 1.7.0-preview.3,1.7-rc → 1.7.0-1.7-rc.4。

关于 @dojoengine/create-burner 的常见问题

@dojoengine/create-burner 是什么?

dojo: Useful hooks and functions to create a Starknet burner wallet

如何安装 @dojoengine/create-burner?

在项目目录运行 npm install @dojoengine/create-burner,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、react-dom(^18.0.0 || ^19.0.0)、starknet(10.0.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dojoengine/create-burner 支持 TypeScript 吗?

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

@dojoengine/create-burner 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dojoengine/create-burner 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dojoengine/create-burner 可以商用吗?

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

@dojoengine/create-burner 的下载量有多少?

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

@dojoengine/create-burner 还在维护吗?

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