forked from TrueCloudLab/neoneo-go
5c9c168ee5
And move their tests to native StdLib.
16 lines
403 B
Go
16 lines
403 B
Go
package binary
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop"
|
|
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
)
|
|
|
|
// Serialize serializes top stack item into a ByteArray.
|
|
func Serialize(ic *interop.Context) error {
|
|
return vm.RuntimeSerialize(ic.VM)
|
|
}
|
|
|
|
// Deserialize deserializes ByteArray from a stack into an item.
|
|
func Deserialize(ic *interop.Context) error {
|
|
return vm.RuntimeDeserialize(ic.VM)
|
|
}
|