2020-11-18 11:26:13 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NotaryAssisted represents attribute for notary service transactions.
|
|
|
|
type NotaryAssisted struct {
|
|
|
|
NKeys uint8 `json:"nkeys"`
|
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// DecodeBinary implements the io.Serializable interface.
|
2020-11-18 11:26:13 +00:00
|
|
|
func (n *NotaryAssisted) DecodeBinary(br *io.BinReader) {
|
2022-06-01 11:25:30 +00:00
|
|
|
n.NKeys = br.ReadB()
|
2020-11-18 11:26:13 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// EncodeBinary implements the io.Serializable interface.
|
2020-11-18 11:26:13 +00:00
|
|
|
func (n *NotaryAssisted) EncodeBinary(w *io.BinWriter) {
|
2022-06-01 11:25:30 +00:00
|
|
|
w.WriteB(n.NKeys)
|
2020-11-18 11:26:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (n *NotaryAssisted) toJSONMap(m map[string]interface{}) {
|
|
|
|
m["nkeys"] = n.NKeys
|
|
|
|
}
|