forked from TrueCloudLab/neoneo-go
31 lines
726 B
Go
31 lines
726 B
Go
package iterator
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop"
|
|
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
)
|
|
|
|
// Concat concatenates 2 iterators into a single one.
|
|
func Concat(ic *interop.Context) error {
|
|
return vm.IteratorConcat(ic.VM)
|
|
}
|
|
|
|
// Create creates an iterator from array-like or map stack item.
|
|
func Create(ic *interop.Context) error {
|
|
return vm.IteratorCreate(ic.VM)
|
|
}
|
|
|
|
// Key returns current iterator key.
|
|
func Key(ic *interop.Context) error {
|
|
return vm.IteratorKey(ic.VM)
|
|
}
|
|
|
|
// Keys returns keys of the iterator.
|
|
func Keys(ic *interop.Context) error {
|
|
return vm.IteratorKeys(ic.VM)
|
|
}
|
|
|
|
// Values returns values of the iterator.
|
|
func Values(ic *interop.Context) error {
|
|
return vm.IteratorValues(ic.VM)
|
|
}
|