C++ SDK
The C++ SDK provides payload hash verification and on-chain anchor checks. Signature verification is planned.
Example
ExpectedAnchor expected{
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"0xa52094c663b57018c5cdc2084026c4b5bc16c72d9e040aed163e68750dc3cf70",
"0xc72a5198e7e10c034ec16ab75c9ee049cdf0f712e06398fa02bf301dcc74cd92",
1700000000,
1700000600,
"0x458519ac7f8531c1b661fef583b421cdec31181f61f951ba95dc9891e41830cb"
};
bool ok = verify_payload_hash(payloadBytes, expectedHash);
bool anchorOk = verify_anchor(
"http://localhost:8545",
"0x000000000000000000000000000000000000aaaa",
"0x8e466e6bb8feb3522eec2d274eb6dde6bb1cc0218195379934c021ae324f241f",
expected
);
Notes
- Signature verification is not implemented yet.
- Requires
cprandnlohmann/jsonfor HTTP and JSON. - 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.