Skip to content

Commit db929cc

Browse files
authored
fix: support cbor.ByteString when decoding (#100)
Signed-off-by: Aurora Gaffney <[email protected]>
1 parent 11f08fc commit db929cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

data/decode.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,13 @@ func decodeRaw(v any) (PlutusData, error) {
9797
}
9898

9999
return NewMap(pairs), nil
100+
100101
case []byte:
101102
return NewByteString(x), nil
102103

104+
case cbor.ByteString:
105+
return NewByteString(x.Bytes()), nil
106+
103107
case int64:
104108
return NewInteger(big.NewInt(x)), nil
105109

0 commit comments

Comments
 (0)