Skip to content

Commit 20004b3

Browse files
authored
Merge pull request #389 from blinklabs-io/feat/cbor-tag-wrapped-cbor
feat: support for CBOR tag 24 (wrapped CBOR)
2 parents 759464f + 63541e3 commit 20004b3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cbor/cbor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
CBOR_MAX_UINT_SIMPLE uint8 = 0x17
3333

3434
// Useful tag numbers
35+
CborTagCbor = 24
3536
CborTagRational = 30
3637
CborTagSet = 258
3738
CborTagMap = 259

cbor/value.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ func (v *Value) UnmarshalCBOR(data []byte) error {
6060
return err
6161
}
6262
switch tmpTag.Number {
63+
case CborTagCbor:
64+
v.value = tmpTag.Content
6365
case CborTagRational:
6466
var tmpRat []int64
6567
if _, err := Decode(tmpTag.Content, &tmpRat); err != nil {

0 commit comments

Comments
 (0)