← 返回
AI智能 中文

Niftyagents

A cryptographic protocol for AI agents to mint, sign, verify, and transfer SVG digital assets without a blockchain.
一种供AI智能体在无区块链环境下铸造、签名、验证及转移SVG数字资产的密码学协议。
obekt
AI智能 clawhub v1.0.3 1 版本 100000 Key: 无需
★ 0
Stars
📥 530
下载
💾 8
安装
1
版本
#latest

概述

💎 Nifty Agent SVG Protocol (NASP) - Agent Skill Manual

NASP is a cryptographic protocol for creating, signing, and trading SVGs with verifiable provenance—without a blockchain.

🎯 Objective

Use this skill to mint "Nifty" digital assets, verify their ownership, and securely transfer them to other agents using did:key identities.

🛠 Setup & Imports

To use this skill in your environment:

import { 
  generateIdentity, 
  signSVG, 
  verifySVG, 
  transferSVG 
} from './index.js';

📋 Data Structures

AgentIdentity

{
  did: string;        // e.g. "did:key:z6Mk..."
  publicKey: Uint8Array;
  secretKey: Uint8Array;
}

VerificationResult

{
  isValid: boolean;     // Cryptographic integrity check
  creator: string;      // DID of the original minter
  currentOwner: string; // DID of the latest owner in the chain
  chain: string[];      // Array of DIDs representing the full history
}

🕹 Usage Guide

1. Generate an Identity

Call this once to create your agent's cryptographic persona. Store the secretKey securely.

const myIdentity = generateIdentity();

2. Mint & Sign a New SVG

Takes a raw SVG string and returns a "Nifty" SVG with embedded NASP metadata.

const rawSVG = `<svg>...</svg>`;
const signedSVG = await signSVG(rawSVG, myIdentity);

3. Verify an Asset

Always verify an SVG before accepting a trade or performing an action.

const audit = await verifySVG(receivedSVG);
if (audit.isValid) {
  console.log(`Current Owner: ${audit.currentOwner}`);
}

4. Transfer Ownership

Appends a new signed grant to the metadata. This function throws an error if:

  • The SVG is invalid/tampered.
  • You (the signer) are not the currentOwner of the asset.
  • const updatedSVG = await transferSVG(currentSVG, myIdentity, targetAgentDID);
    

🛡 Security Protocol for Agents

  1. Canonicalization: The library automatically handles canonicalization using svgo. Do not manually edit the SVG content after signing, or the signature will break.
  2. Private Keys: Never log, share, or expose your secretKey. Treat it as your agent's "soul."
  3. Audit First: Never assume an SVG is valid based on its filename. Always run verifySVG().
  4. Double Spend Detection: In decentralized environments, if you are presented with two different valid chains for the same asset, the one with the longest chain or the latest timestamp is typically preferred.

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-03-30 03:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Numerai Tournament

obekt
自主参与Numerai竞赛——训练模型、提交预测并赚取NMR加密货币。
★ 0 📥 702
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 710 📥 243,597
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,352 📥 317,829