neoneo-go/pkg/core/transaction/reserved.go
Anna Shaleva 6b21ad9922 *: replace interface{} with any keyword
Everywhere including examples, external interop APIs, bindings generators
code and in other valuable places. A couple of `interface{}` usages are
intentionally left in the CHANGELOG.md, documentation and tests.
2023-04-04 13:22:42 +03:00

24 lines
535 B
Go

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
}
// DecodeBinary implements the io.Serializable interface.
func (e *Reserved) DecodeBinary(br *io.BinReader) {
e.Value = br.ReadVarBytes()
}
// EncodeBinary implements the io.Serializable interface.
func (e *Reserved) EncodeBinary(w *io.BinWriter) {
w.WriteVarBytes(e.Value)
}
func (e *Reserved) toJSONMap(m map[string]any) {
m["value"] = e.Value
}