Skip to content

Solidity Library for parsing and verifying TLS-N proofs.

License

Notifications You must be signed in to change notification settings

tls-n/tlsnutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLS-N Utility Library

Overview

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.

Examples

Verifying a proof

	bytes memory proof = '\x20\x00\x10....
	bool res = tlsnutils.verifyProof(proof);

Getting the generator's response

    bytes memory proof = '\x20\x00\x10....
	bytes memory response = tlsnutils.getResponse(proof);

Getting the requested URL in case of HTTP

    bytes memory proof = '\x20\x00\x10....
	bytes memory url = tlsnutils.getHTTPRequestURL(proof);

Getting the generator's HTTP body (the HTTP response) in case of HTTP

    bytes memory proof = '\x20\x00\x10....
    bytes memory body = tlsnutils.getHTTPBody(proof);

Full Example

For a full example of the library in action, please see BTCPriceFeed.

Ropsten Deployment

The tlsnutils library is deployed on Ropsten (Ethereum's test network) at address 0x92522f31816307715736bf49062f6edd80187bbf.

About

Solidity Library for parsing and verifying TLS-N proofs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published