百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nit

> 编程语言
开源

Web3 资产的 Git

4.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Web3 资产的 Git

Nit

Nit is git for web3 digital asset and helps user to commit an asset's activities (chronicle) to blockchain. Please note, this repository is for nit open-source tools. If you are looking for accessing nit via API services, please visit here for more details.

Why Nit

To make digital assets trustworthy and traceable, Nit leverages web3 technologies and Git core concepts. Everyone can chronicle their assets by creating on-chain records so that we can productively debate, narrate, and analyse. All asset histories are written on chain and are searchable by asset CID. A sample transaction can be found here.

Case study

  1. A crypto-based dossier could help prove Russia committed war crimes, CNN
  2. Starling Lab and Hala Systems file Cryptographic Submission of Evidence of War Crimes in Ukraine to the International Criminal Court, CAGR

Commit & Asset Tree

nit adopt similar design as git.

  • When there is an update to the asset, such as updating creator information or updating content itself to create a child asset, there should be a new commit attach the asset itself.

  • Every asset has a Tree file in IPFS to describe the property of the asset, including creator, creation time, license, etc. The asset tree CID is included in the on-chain message. Here is the example of the asset tree.

The db diagram can be found here. In this diagram, you will find tables of commit and assetTree with the explanation of each data field

Installation

yarn global add @numbersprotocol/nit

Example: Initial Registration

If it's your first time to run nit, initialize Nit with default configuration:

nit init

and provide personal information. The details of the Nit configuration format is in the Configuration section below.

nit config -e

The default integrity register (smart contract) is running on Avalanche Fuji (Testnet) and will migrate to Numbers mainnet in the future. You need to get some testing tokens from the Fuji faucet for paying transaction fee.

Create a working directory for the targeting asset:

mkdir ~/temp && cd ~/temp

Create the Asset Tree of the targeting asset. Example:

nit add <asset-filepath> -m "First registration."

To access the file of the CID, you can use browser to open the URL: https://<cid>.ipfs.dweb.link

Double check the Commit information meets your expectation:

nit status

Register the Commit on blockchain:

nit commit -m "commit description"

You can check the Commit on blockchain by following the explorer URL returned by Nit.

Get On-Chain Information

Get on-chain block numbers of an Asset

nit log <asset-cid> --blocks

Example command of the mockup Asset

nit log aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --blocks

Commit block numbers and indices

Total Commit number: 74
Index: 0, Block number: 7236185
Index: 1, Block number: 7236445
...
Index: 71, Block number: 10849040
Index: 72, Block number: 10849133
Index: 73, Block number: 11040035

Get Commits of an Asset

You can specify the starting and ending indices of block numbers:

nit log <asset-cid> --from-index 3 --to-index 5

You will get the Commits from the block numbers associated to index 3 & 4.

Example command of the mockup Asset

nit log aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --from-index 71 --to-index 73
Commits in block 71 & 72 (exclude block 73)
…

Get difference of Commits and Asset Trees of an Asset

nit diff <asset-cid> --from-index 3 --to-index 5

Example command of the mockup Asset

nit diff aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --from-index 71 --to-index 73
Diff of Commits and Asset Trees in block 71 & 72 (exclude block 73)
…

Configuration

The Nit configuration mimics the Hardhat configuration with additional fields.

The Nit configuration is at ~/.nitconfig.json. Linux users can open the default editor by the command below:

nit config -e
Example of a Nit configuration:
…

Verification

Verify the integrity of an Asset Tree

nit verify --integrity-hash <assetTreeSha256> --signature <assetTreeSignature>

Example

nit verify --integrity-hash 6f9db0339205c0686e318dcdb2337230ba6a6e014bd3ec9644b73c33bdc2bc9d --signature 0xef547e124a9904dbdb5a418022ad03c621201b74111a3b4c5fac61b1d82350170766cef8a27737d21ca9b1bd4e04f7cdea460706b68b14e0ed17f2a3de83f9131b

Verification result

Signer address: 0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5

If the signer address is different from the Committer's wallet address, you can treat this Commit as not trustworthy.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •TypeScript
  • •erc-7053
  • •nit

> 标签

TypeScripterc-7053nit

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言