Skip to main content

Cryptographic integrity for stateful events — hash, chain, verify.

Project description

snapchore-core

Cryptographic integrity for stateful events — hash, chain, verify.

SnapChore Core is the local hashing library for the SmartBlocks protocol. It provides deterministic, content-addressed block creation with zero network dependencies.

Install

pip install snapchore-core

Optional extras:

pip install snapchore-core[image]   # Pillow for image metadata extraction
pip install snapchore-core[device]  # Device capture utilities

Quick start

from snapchore import SmartBlock, SnapChoreChain

# Seal a single event
block = SmartBlock(domain="ai.inference", payload={"tokens": 1500})
block.seal()
assert block.verify()

# Chain multiple events into a tamper-evident ledger
chain = SnapChoreChain()
chain.append(block)

block2 = SmartBlock(domain="ai.inference", payload={"tokens": 2300})
block2.seal()
chain.append(block2)
assert chain.verify()

Lower-level API

from snapchore import snapchore_capture, snapchore_verify

data = {"model": "gpt-4", "tokens": 1500}
h = snapchore_capture(data)
assert snapchore_verify(data, h)

What it does

  • Canonical serialization — deterministic JSON surface with float quantization and stable timestamps
  • SmartBlock — content-addressed container with domain tagging and metadata
  • SnapChoreChain — linked hash ledger for tamper-evident event sequences
  • Capture / Verify — convenience functions for one-shot hashing and verification

Relationship to sbn-sdk

snapchore-core handles local computation (hashing, chaining, verification) with no network calls. To submit blocks to the SmartBlocks Network, use the sbn-sdk which includes a SnapChoreClient for server-side sealing, discovery, and chain management.

License

Apache-2.0

Project details


Download files

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

Source Distribution

snapchore_core-0.1.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

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

snapchore_core-0.1.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

File details

Details for the file snapchore_core-0.1.0.tar.gz.

File metadata

  • Download URL: snapchore_core-0.1.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for snapchore_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bea457f9632aba82115232078d614ccbfec223cb95f367a2ea848a1b0effd8fb
MD5 649511853df1f688aa481893f52136f3
BLAKE2b-256 137c089472b73eeb9aec2d2fe020f4dd06c6d14f0437965e4738d89a5d17a540

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for snapchore_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 551ebac4acc1c6f0e204d6bf2d6fdceaf77bcc9e577509c0023ab9d47342687e
MD5 6541bde097f4879953de70942a18bf88
BLAKE2b-256 3f337b15fa7c7bc5c8ee92eea4e65bc5c6b47c69a784a44564f18efa893e45bb

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