Official SDKs for Numbers Protocol Capture API. Register digital assets with blockchain-backed provenance.
Available in two languages:
- TypeScript/JavaScript - For Node.js and browser
- Python - For Python 3.14+
npm install @numbersprotocol/capture-sdkpip install numbersprotocol-capture-sdkimport { Capture } from '@numbersprotocol/capture-sdk'
const capture = new Capture({ token: 'YOUR_TOKEN' })
// Register an asset
const asset = await capture.register('./photo.jpg', { caption: 'My photo' })
// Get provenance data
const tree = await capture.getAssetTree(asset.nid)from numbersprotocol_capture import Capture
capture = Capture(token='YOUR_TOKEN')
# Register an asset
asset = capture.register('./photo.jpg', caption='My photo')
# Get provenance data
tree = capture.get_asset_tree(asset.nid)| Method | TypeScript | Python |
|---|---|---|
| Register asset | register(file, options?) |
register(file, **options) |
| Update metadata | update(nid, options) |
update(nid, **options) |
| Get asset | get(nid) |
get(nid) |
| Get history | getHistory(nid) |
get_history(nid) |
| Get provenance | getAssetTree(nid) |
get_asset_tree(nid) |
- TypeScript SDK - Full API reference and examples
- Python SDK - Full API reference and examples
- Contributing Guide - How to contribute and maintain both SDKs
- TypeScript: Node.js 18+ or modern browser
- Python: Python 3.14+
- API Token: Get from Capture Dashboard
capture-sdk/
├── ts/ # TypeScript SDK
│ ├── src/ # Source code
│ ├── package.json # npm package config
│ └── README.md
├── python/ # Python SDK
│ ├── numbersprotocol_capture/ # Source code
│ ├── pyproject.toml # PyPI package config
│ └── README.md
├── scripts/ # Maintenance tools
│ ├── sync-versions.py # Version sync tool
│ └── check-feature-parity.py
└── .github/workflows/ # CI/CD
├── ci.yml # Test & lint
└── release.yml # Publish to npm/PyPI
Both SDKs maintain the same version number. To release:
# Bump version in both SDKs
python scripts/sync-versions.py --bump minor
# Create and push tag
git tag v0.2.0
git push origin v0.2.0CI automatically publishes to npm and PyPI when a tag is pushed.
MIT