2020-11-24 13:50:56 +00:00
|
|
|
package blobovnicza
|
|
|
|
|
|
|
|
// ID represents Blobovnicza identifier.
|
2020-11-25 15:55:40 +00:00
|
|
|
type ID []byte
|
2020-11-24 13:50:56 +00:00
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
// NewIDFromBytes constructs an ID from a byte slice.
|
2020-11-25 15:55:40 +00:00
|
|
|
func NewIDFromBytes(v []byte) *ID {
|
|
|
|
return (*ID)(&v)
|
2020-11-24 13:50:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (id ID) String() string {
|
2020-11-30 00:18:06 +00:00
|
|
|
return string(id)
|
2020-11-24 13:50:56 +00:00
|
|
|
}
|
2022-07-06 14:09:50 +00:00
|
|
|
|
|
|
|
func (id ID) Bytes() []byte {
|
|
|
|
return id
|
|
|
|
}
|