kenji-otsuka/chainpoint

This is package to use Chainpoint API.

0.0.1 2018-07-26 11:38 UTC

This package is not auto-updated.

Last update: 2024-05-12 03:35:40 UTC


README

This is not actively developed (2020-12-31).

This is PHP package for request to Tierion Chainpoint. For Chainpoint, look at Chainpoint Node HTTP API.

Composer Package

How to Use

First, write use statement.

use KenjiOtsuka\Chainpoint;

Create Instance

$c = new Chainpoint();

Submit Hash

Post sha256 hash.

$c->submit('0xXXXXXX...');

Or post text, which is internally converted to hash.

$c->submitData("text");

Get Proof

Get hash id node from submit result and post it. This method execution may have to be called for the same Chainpoint instanece as submit called for.

$c->getProof($hashIdNode);

Verify

Verify with proof, which is get from above request, getProof, result.

// 2 ways are available.
$c->verify($proof);
Chainpoint::verify($proof);

Other