Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Spv verify #15

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"env": {
"es6": true,
"node": true
"node": true,
"browser": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"parserOptions": {
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,27 @@ Example Return Value
]
```

### `spvVerifyProofs (proofs)`

#### Description
Same as `verifyProofs` above except it will verify btc anchor proofs (and only btc proofs)
against a bitcoin node. Since only the block headers are required to verify
a proof, an spv node is sufficient to verify. Only the [bcoin](https://bcoin.io)
API is currently supported, though this could be expanded in the future.

To make your target node's information available to the verification client, add a `bcoin.conf`
file in your `~/.chainpoint` directory with all relevant information (`host`, `port`, `api-key`, etc)
See [here](http://bcoin.io/api-docs/index.html#configuring-clients) for more information.
Environment variables (prefaced with `BCOIN_`) and command line args (prefaced with `--bcoin-`)
are also supported configuration options.

#### Arguments

The `proofs` argument accepts an Array of Strings or Objects.

#### Return Values
The return values are the same as with `verifyProofs` above

### `evaluateProofs (proofs)`

#### Description
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

111 changes: 110 additions & 1 deletion dist/bundle.web.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h3>verifyProofs()</h3>
<pre><code><span id="verifiedProofs"></span></code></pre>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="/dist/bundle.web.js"></script>
<script src="./dist/bundle.web.js"></script>
<script>
// sleep time milliseconds
function sleep(time) {
Expand Down
Loading