338 Commits

Author SHA1 Message Date
Jakub Sztandera
9238d1a533 Verify that prefix is correct v0 prefix
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-11-11 20:00:31 +01:00
whyrusleeping
16bbe1cf14 Add a command to read a cid from an array of bytes 2019-11-10 22:17:41 -08:00
b5
c91a795815 docs(readme): remove reference to gx 2019-10-24 10:06:43 -04:00
Steven Allen
64acce09e1 Merge pull request #91 from ipfs/dependabot/go_modules/github.com/multiformats/go-multihash-0.0.8
Bump github.com/multiformats/go-multihash from 0.0.1 to 0.0.8
2019-09-24 16:11:26 -07:00
dependabot-preview[bot]
2a2f67d2c4 Bump github.com/multiformats/go-multihash from 0.0.1 to 0.0.8
Bumps [github.com/multiformats/go-multihash](https://github.com/multiformats/go-multihash) from 0.0.1 to 0.0.8.
- [Release notes](https://github.com/multiformats/go-multihash/releases)
- [Commits](https://github.com/multiformats/go-multihash/compare/v0.0.1...v0.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 23:01:51 +00:00
Steven Allen
86ca2a8300 Merge pull request #90 from ipfs/feat/lead-maintainer
doc: add a lead maintainer
2019-09-18 22:09:20 -07:00
Steven Allen
e0a778be45 doc: add a lead maintainer 2019-09-18 22:08:21 -07:00
Steven Allen
9bb7ea6920 Merge pull request #86 from lidel/feat/libp2p-key
Add support for libp2p-key multicodec to go-cid
v0.0.3
2019-05-27 16:46:10 -07:00
Marcin Rataj
3f1777738f Add libp2p-key multicodec
Context: https://github.com/multiformats/multicodec/issues/130

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2019-05-28 01:40:54 +02:00
Steven Allen
b1cc3e404d Merge pull request #85 from ipfs/feat/cidv1-default-base32
default cidv1 to base32
v0.0.2
2019-05-13 10:54:14 -07:00
Steven Allen
b16425b966 make CID in readme base32 2019-05-10 09:41:01 -07:00
Steven Allen
f04f9216e7 default cidv1 to base32 2019-05-06 16:22:17 -07:00
Jakub Sztandera
e7e67e08cf Add gomod and travis v0.0.1 2019-02-28 18:32:58 +01:00
Steven Allen
29a66d1820 gx publish 0.9.3 2019-02-20 20:12:25 -08:00
Steven Allen
08f30d213e Merge pull request #84 from ipfs/fix/83
fix inline CIDs generated by Prefix.Sum
2019-02-20 20:11:24 -08:00
Steven Allen
cf3b4efcaf fix inline CIDs generated by Prefix.Sum 2019-02-20 19:06:04 -08:00
Hector Sanjuan
ca991e8eb6 Merge pull request #82 from ipfs/gx/0.9.2
gx publish 0.9.2
2019-02-20 16:21:43 +00:00
Hector Sanjuan
8d327b2f4b gx publish 0.9.2 2019-02-20 16:21:01 +00:00
Hector Sanjuan
14b828acf5 Merge pull request #81 from ipfs/feat/binary-marshaler
Let Cid implement Binary[Un]Marshaler and Text[Un]Marshaler interfaces.
2019-02-20 16:20:09 +00:00
Hector Sanjuan
00439572fb Let Cid implement Binary[Un]Marshaler and Text[Un]Marshaler interfaces.
This makes Cid implement https://golang.org/pkg/encoding/#BinaryMarshaler
which is used by go-codec to decide if things know how to serialize themselves
(currently we need do manual wrapping for anything containing a CID).

Since I was at it, I did the TextMarshaling one too.
2019-02-19 16:41:30 +00:00
Jakub Sztandera
37bf2f9503 Merge pull request #80 from madper/fix_typo
fix typo in comment
2019-02-15 18:30:48 +01:00
Madper Xie
e6d04f280e fix typo in comment 2019-02-15 20:19:46 +08:00
Steven Allen
033594dcd6 gx publish 0.9.1 2018-11-02 16:51:23 -07:00
Steven Allen
c9e99b39db Merge pull request #78 from samli88/dash-codecs
add codecs for Dash blocks, tx
2018-10-23 05:29:30 +01:00
Samuel Li
3ec3578fe9 add dash to codecs table 2018-10-07 11:44:18 -07:00
Samuel Li
628ab3426c add codecs for Dash blocks, tx 2018-10-07 11:21:41 -07:00
Kevin Atkinson
6e296c5c49 gx publish 0.9.0 gx/v0.9.0 2018-09-11 19:18:20 -04:00
Kevin Atkinson
f0033600ca Gx update go-multibase. 2018-09-11 19:17:40 -04:00
Kevin Atkinson
dfc48d3ec4 Make sure we have a SHA2_256, length 32 hash when creating a CidV0. 2018-09-11 19:17:40 -04:00
Kevin Atkinson
46dd393ad1 Handel undefined Cid is JSON representation. 2018-09-07 14:03:03 -04:00
Kevin Atkinson
67a2bcf7e7 Change 'Nil' constant to 'Undef'. 2018-09-05 15:43:18 -04:00
Kevin Atkinson
643f78a8f9 Change 'IsNil' method to 'Defined'. 2018-09-05 03:26:26 -04:00
Kevin Atkinson
7b4617fa6e Eliminate unnecessary copy of Cid now that its an immutable string. 2018-09-01 00:09:38 -04:00
Kevin Atkinson
440a1c1a5a Removed description of layout of CID as it is not correct for CIDv0. 2018-08-31 00:35:55 -04:00
Kevin Atkinson
e0a5698af9 Add IsNil() method. 2018-08-31 00:35:54 -04:00
Kevin Atkinson
667c6a9418 Avoid allocating memory in Type() method. 2018-08-31 00:35:53 -04:00
Kevin Atkinson
426ebe9e55 Simplify assignment in UnmarshalJSON. 2018-08-31 00:35:52 -04:00
Kevin Atkinson
cad52160a4 Ensure we always have a valid Cid by hiding the type in a struct. 2018-08-31 00:35:51 -04:00
Kevin Atkinson
b5a08dcaaa Change EmptyCid to just Nil. 2018-08-31 00:35:51 -04:00
Kevin Atkinson
9831436a6f Change string representation to represent actual binary representation. 2018-08-31 00:35:47 -04:00
Kevin Atkinson
d7974d2277 Export version() method, various other code cleanups. 2018-08-31 00:34:19 -04:00
dignifiedquire
8009448a20 fix KeyString() 2018-08-31 00:34:03 -04:00
dignifiedquire
92496b5494 use string instead of []byte as underlying store 2018-08-31 00:34:02 -04:00
dignifiedquire
e153340e5a feat: use CIDs as their byte representation instead of a struct 2018-08-31 00:33:47 -04:00
Steven Allen
6ddb575a8d Merge pull request #60 from ipfs/kevina/cid-fmtb
Create a new Encode method that is like StringOfBase but never errors
2018-08-30 23:06:50 +00:00
Kevin Atkinson
b3d85b3dee Enhance documentation for Encode method. 2018-08-30 00:38:17 -04:00
Kevin Atkinson
bea727bbd1 Enhance tests. 2018-08-30 00:30:14 -04:00
Kevin Atkinson
9091e50b29 Rename Format method to Encode. 2018-08-30 00:30:14 -04:00
Kevin Atkinson
a0b3b11e63 Create a new Format method that is like StringOfBase but never errors 2018-08-30 00:30:14 -04:00
Steven Allen
1766ab0fcf Merge pull request #72 from ipfs/rsrch-cid-as-struct-wrapped-str
cid implementation variations++
2018-08-30 01:52:53 +00:00