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
|
|
|
}
|
|
|
|
|
2023-04-03 10:34:24 +00:00
|
|
|
func (n *NotaryAssisted) toJSONMap(m map[string]any) {
|
2020-11-18 11:26:13 +00:00
|
|
|
m["nkeys"] = n.NKeys
|
|
|
|
}
|