@cardinal/creator-standard

中文文档
3.0.2发布于 2023/02/14AGPL-3.0ESM + CJS近 30 天下载 2674

SDK为主要创造者标准

中文使用文档
文档目录3 节
  1. 读取 Git 书
  2. 规则
  3. Mint 管理器

红衣主教创建者标准

读取 Git 书

包含包括背景、拟议解决方案、定价和技术整合实例的整个端到端建议.

背景情况

"创建者标准"(Creator Standard)是解决特许使用费规避问题的智能合同级解决方案,允许创建者在不牺牲基本的钱包到Wallet传输的情况下,决定自己的NFT可以与哪些程序互动.

协议是建立在 SPL 令牌程序之上的,有选择地允许令牌传输来实现这一点. 每个信使都有一个相关的"薄荷经理"账户,该账户拥有冻结和薄荷的授权. 每个薄荷管理器都指定了一套规则,它只是一套"规则"(allowlist/denylist),规定哪些程序可以与NFT互动并进行传输. 规则由NFT的创作者指定,可以自行修改.

NFT 基础

NFT 有附加规则

NFT 规则集程序交互

规则可以是 1: 有很多NFT

规则可以扩展其他规则

方案状态

程序使用两种程序衍生账户.

规则

QQ 允许转让由该符号的创建者指定的符号的一套规则
let mut seeds = ['ruleset'.as_bytes(), name.as_bytes()];
pub struct Ruleset {
    // account discriminator
    pub account_type: u8,
    // version for potential future versioning
    pub version: u8,
    // authority who can update this ruleset
    pub authority: Pubkey,
    // name for this ruleset (also used to derive ruleset address)
    pub name: String,
    // vector of allowed programs that can interact with this nft
    pub allowed_programs: Vec<Pubkey>,
    // vector of disallowed addresses that cannot interact with this nft
    pub disallowed_addresses: Vec<Pubkey>,
}

Mint 管理器

一对一关系, 执行CCS的代币薄荷有各自的薄荷经理,拥有薄荷并被冻结的权力. 已经存在的一个托克可以通过交出上述权力来执行CSS.
let mut seeds = ['mint-manager'.as_bytes(), mint.as_ref()];
pub struct MintManager {
  // account discriminator
  pub account_type: u8,
  // version for potential future versioning
  pub version: u8,
  // mint address of this NFT that this mint-manager corresponds to
  pub mint: Pubkey,
  // authority who can update the ruleset of this mint-manager
  pub authority: Pubkey,
  // ruleset to be checked when transferring
  pub ruleset: Pubkey,
  // optional address currently using this NFT meaning it cannot be transferred while in-use
  pub in_use_by: Option<Pubkey>,
}

当薄荷管理器为薄荷所创建时,薄荷管理器将薄荷永久地冻结. 每个薄荷管理器都有规则,其中具体规定了一套规则

大多数字段不言自明,但 in_use_by 领域需要一些基本背景,将在下文讨论.

版本与发布记录

@cardinal/creator-standard 共发布 50 个版本,首次发布于 2022/11/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.0.2latest2023/02/143 年前
3.0.12023/02/143 年前
3.0.02023/02/143 年前
2.4.02023/02/103 年前
2.4.0-beta.2beta2023/02/093 年前
2.4.0-beta.12023/02/093 年前

关于 @cardinal/creator-standard 的常见问题

@cardinal/creator-standard 是什么?

SDK为主要创造者标准

如何安装 @cardinal/creator-standard?

在项目目录运行 npm install @cardinal/creator-standard,或使用 pnpm add / yarn add / bun add。

@cardinal/creator-standard 支持 TypeScript 吗?

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

@cardinal/creator-standard 支持 ESM 还是 CommonJS?

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

@cardinal/creator-standard 可以商用吗?

@cardinal/creator-standard 使用 AGPL-3.0 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@cardinal/creator-standard 的下载量有多少?

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

@cardinal/creator-standard 还在维护吗?

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