Metadata-Version: 2.1
Name: dyson-meta
Version: 0.1.0
Summary: Dyson Sphere - Blockchain metadata schema, signing & anchoring
Author-email: vSlogen · mino³ 信使 <messenger@mino.hk>
License: MIT
Project-URL: Homepage, https://gitcode.com/vslogen/dysonsphere
Project-URL: Source, https://gitcode.com/vslogen/dysonsphere
Project-URL: Documentation, https://github.com/vslogen/dyson-meta
Keywords: blockchain,metadata,anchoring,dyson,web3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=41.0

# dyson-meta

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

## 用途

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

## 快速开始

```python
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

```bash
# 生成示例信封
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
```

## 安装

```bash
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³ 信使
