neo3.contracts.nef
Neo Executable Format.
MethodToken
— An interface like class supporting NEO's network serialization protocol.NEF
— Neo Executable Format container.
neo3.contracts.nef.
MethodToken
(
hash
, method
, parameters_count
, has_return_value
, call_flags
)
An interface like class supporting NEO's network serialization protocol.
__len__
(
)
— Return the length of the object in number of bytes.deserialize
(
reader
)
— Deserialize the object from a binary stream.serialize
(
writer
)
— Serialize the object into a binary stream.to_array
(
)
(bytes) — Serialize the object into a bytearray.to_json
(
)
(dict) — Convert object into JSON representation.deserialize_from_bytes
(
data
)
(ISerializable_T) — Parse data into an object instance.from_json
(
json
)
— Create object from JSON
__len__
(
)
Return the length of the object in number of bytes.
deserialize
(
reader
)
Deserialize the object from a binary stream.
reader
(BinaryReader) — instance.
from_json
(
json
)
Create object from JSON
serialize
(
writer
)
Serialize the object into a binary stream.
writer
(BinaryWriter) — instance.
to_json
(
)
→ dict
Convert object into JSON representation.
deserialize_from_bytes
(
data
)
Parse data into an object instance.
data
(bytes | bytearray) — hex escaped bytes.
a deserialized instance of the class.
to_array
(
)
→ bytes
Serialize the object into a bytearray.
neo3.contracts.nef.
NEF
(
compiler_name=None
, script=None
, tokens=None
, source=None
, _magic=860243278
)
Neo Executable Format container.
checksum
(int) — Data integrity value.
__len__
(
)
— Return the length of the object in number of bytes.compute_checksum
(
)
(int) — Compute the checksum of the NEF file.deserialize
(
reader
)
— Deserialize the object from a binary stream.serialize
(
writer
)
— Serialize the object into a binary stream.to_array
(
)
(bytes) — Serialize the object into a bytearray.to_json
(
)
(dict) — Convert object into JSON representation.deserialize_from_bytes
(
data
)
(ISerializable_T) — Parse data into an object instance.from_file
(
path
)
— Create object from a file.from_json
(
json
)
— Create object from JSON.
__len__
(
)
Return the length of the object in number of bytes.
compute_checksum
(
)
→ int
Compute the checksum of the NEF file.
deserialize
(
reader
)
Deserialize the object from a binary stream.
reader
(BinaryReader) — instance.
from_file
(
path
)
Create object from a file.
path
(str) — location of the file.
FileNotFoundError
— if the path is invalid.ValueError
— if the file is not a valid NEF.
from_json
(
json
)
Create object from JSON.
serialize
(
writer
)
Serialize the object into a binary stream.
writer
(BinaryWriter) — instance.
to_json
(
)
→ dict
Convert object into JSON representation.
deserialize_from_bytes
(
data
)
Parse data into an object instance.
data
(bytes | bytearray) — hex escaped bytes.
a deserialized instance of the class.
to_array
(
)
→ bytes
Serialize the object into a bytearray.