Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5 from ipld/feat/isCID
Browse files Browse the repository at this point in the history
feat: new method: isLink
  • Loading branch information
daviddias authored Mar 13, 2017
2 parents aca26c3 + 3476bae commit 7126d92
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
21 changes: 0 additions & 21 deletions MIT-LICENSE

This file was deleted.

15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The primary goal of this module is to define an interface that IPLD formats can
- [JavaScript ipld-dag-pb](https://github.com/ipld/js-ipld-dag-pb)
- [JavaScript ipld-dag-cbor](https://github.com/ipld/js-ipld-dag-cbor)
- [JavaScript ipld-eth-block](https://github.com/ipld/js-ipld-eth-block)
- [JavaScript ipld-eth-tx](https://github.com/ipld/js-ipld-eth-tx)
- [JavaScript ipld-bencode](https://github.com/ipld/js-ipld-bencode)

Send in a PR if you find or write one!

Expand Down Expand Up @@ -70,7 +72,6 @@ A valid (read: that follows this interface) IPLD format implementation the follo
`callback` must have the signature `function (err, dagNode)`, where `err` is an Error if the function fails and `dagNode` is the dagNode that got deserialized in the process.


#### `util.cid(dagNode, callback)`

> get the CID of the dagNode
Expand Down Expand Up @@ -98,6 +99,18 @@ Options include:

`callback` must have the signature `function (err, result)`, where `err` is an Error if the function fails and `result` is an array of objects containing `path:value` tuples, such as: `[ { '/foo': 'bar' } ...]`

#### `resolver.isLink(binaryBlob, path, callback)`

> returns an IPLD Link of a given path, if it is a valid link, false otherwise.
`callback` must have the signature `function (err, link)`, where `err` is an Error if the function fails and `link` is the CID that was in a given path. `link` follows the format:

```JavaScript
{
'/': <cid>
}
```

## Maintainers

Captain: [@diasdavid](https://github.com/diasdavid).
Expand Down
12 changes: 12 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
machine:
node:
version: stable

dependencies:
pre:
- google-chrome --version
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get --only-upgrade install google-chrome-stable
- google-chrome --version

0 comments on commit 7126d92

Please sign in to comment.