Skip to main content

Python SDK

The Python SDK provides payload hash verification and on-chain anchor checks. Signature verification is planned.

Example

from olymp_verifier import verify_payload_hash, verify_anchor

ok = verify_payload_hash(payload_bytes, expected_hash_hex)

expected = {
"provider": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"sourceProvider": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"schemaId": "0xa52094c663b57018c5cdc2084026c4b5bc16c72d9e040aed163e68750dc3cf70",
"dataTypeHash": "0xc72a5198e7e10c034ec16ab75c9ee049cdf0f712e06398fa02bf301dcc74cd92",
"windowStart": 1700000000,
"windowEnd": 1700000600,
"payloadHash": "0x458519ac7f8531c1b661fef583b421cdec31181f61f951ba95dc9891e41830cb",
}

anchor_ok = verify_anchor(
"http://localhost:8545",
"0x000000000000000000000000000000000000aaaa",
"0x8e466e6bb8feb3522eec2d274eb6dde6bb1cc0218195379934c021ae324f241f",
expected,
)

Notes

  • Signature verification is not implemented yet.
  • Use test vectors in test-vectors/ for payload and anchor inputs.

Disclaimers

Verification outcomes are variable and depend on on-chain state and payload integrity. No guarantees. Not investment advice.