This library allows the verification and parsing of TLS-N proofs. This version supports proofs with chunk-level granularity signed by a TLS certificate using secp256r1. The TLS-N Utility Library makes use of solidity-bytesutils to parse the proofs.
bytes memory proof = '\x20\x00\x10....
bool res = tlsnutils.verifyProof(proof);
bytes memory proof = '\x20\x00\x10....
bytes memory response = tlsnutils.getResponse(proof);
bytes memory proof = '\x20\x00\x10....
bytes memory url = tlsnutils.getHTTPRequestURL(proof);
bytes memory proof = '\x20\x00\x10....
bytes memory body = tlsnutils.getHTTPBody(proof);
For a full example of the library in action, please see BTCPriceFeed.
The tlsnutils library is deployed on Ropsten (Ethereum's test network) at address 0x92522f31816307715736bf49062f6edd80187bbf.