2020-10-15 10:06:22 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reserved represents an attribute for experimental or private usage.
|
|
|
|
type Reserved struct {
|
|
|
|
Value []byte
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// DecodeBinary implements the io.Serializable interface.
|
2020-10-15 10:06:22 +00:00
|
|
|
func (e *Reserved) DecodeBinary(br *io.BinReader) {
|
|
|
|
e.Value = br.ReadVarBytes()
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// EncodeBinary implements the io.Serializable interface.
|
2020-10-15 10:06:22 +00:00
|
|
|
func (e *Reserved) EncodeBinary(w *io.BinWriter) {
|
|
|
|
w.WriteVarBytes(e.Value)
|
|
|
|
}
|
|
|
|
|
2023-04-03 10:34:24 +00:00
|
|
|
func (e *Reserved) toJSONMap(m map[string]any) {
|
2020-10-15 10:06:22 +00:00
|
|
|
m["value"] = e.Value
|
|
|
|
}
|
2024-04-27 17:16:05 +00:00
|
|
|
|
|
|
|
// Copy implements the AttrValue interface.
|
|
|
|
func (e *Reserved) Copy() AttrValue {
|
|
|
|
return &Reserved{
|
|
|
|
Value: e.Value,
|
|
|
|
}
|
|
|
|
}
|