Skip to main content

C# SDK

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

Example

var ok = Verifier.VerifyPayloadHash(payloadBytes, expectedHashHex);

var expected = new ExpectedAnchor
{
Provider = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
SourceProvider = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
SchemaId = "0xa52094c663b57018c5cdc2084026c4b5bc16c72d9e040aed163e68750dc3cf70",
DataTypeHash = "0xc72a5198e7e10c034ec16ab75c9ee049cdf0f712e06398fa02bf301dcc74cd92",
WindowStart = 1700000000,
WindowEnd = 1700000600,
PayloadHash = "0x458519ac7f8531c1b661fef583b421cdec31181f61f951ba95dc9891e41830cb"
};

var anchorOk = await Verifier.VerifyAnchorAsync(
"http://localhost:8545",
"0x000000000000000000000000000000000000aaaa",
"0x8e466e6bb8feb3522eec2d274eb6dde6bb1cc0218195379934c021ae324f241f",
expected
);

Notes

  • Signature verification is not implemented yet.
  • Uses Nethereum for RPC and Keccak.

Disclaimers

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