Skip to main content

Dyson Sphere - Blockchain metadata schema, signing & anchoring

Project description

dyson-meta

Dyson Sphere — 区块链元数据标准化工具包。

用途

将 Dyson 节点的资产、签名、锚定元数据格式化为标准 Python 包, 任何新节点 pip install dyson-meta 即可对接区块链锚定。

快速开始

from dyson_meta import Metadata, AssetMeta, sign, format_bcy

# 创建元数据信封
meta = Metadata(node_id="node_xxxx", node_secret_id="sk-xxx")
meta.add_asset(AssetMeta(
    name="dyson-gossip-bridge",
    version="1.0.0",
    content_hash="abc123...",
    node_id="node_xxxx",
))

# 计算哈希 + 签名
meta.compute_hash()
sig = sign(meta.envelope_json(), key="<hex-key>")

# 格式化为 BCY OP_RETURN 载荷
op_return = format_bcy(meta)

CLI

# 生成示例信封
dyson-meta gen --node-id node_xxxx --assets capsule-a capsule-b > envelope.json

# 签名
dyson-meta sign envelope.json --key <hex-key>

# 格式化为链上载荷
dyson-meta format envelope.json --chain bcy

安装

pip install dyson-meta

组件

模块 功能
schema.py Metadata / AssetMeta / AnchorRecord 数据类
signature.py HMAC-SHA256 + ECDSA secp256k1 签名
anchor.py BCY OP_RETURN / ETH calldata 格式化
cli.py 命令行工具

License

MIT — vSlogen · mino³ 信使

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dyson_meta-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file dyson_meta-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dyson_meta-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for dyson_meta-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8deff3387f3981ef1ff3e6913a19421b5a6026afe91f0c0558ae082cd9c8e5b5
MD5 196a334203408005340a48689ee2605e
BLAKE2b-256 aa8dfef54f16d6a1bb14dee7b47e6b9627e4ada2dd18098bd59c734310b3a3c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page