2023-11-07 10:57:30 +00:00
|
|
|
package commonclient
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/google/uuid"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/neorpc/result"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/invoker"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Invoker is a subset of methods provided by struct invoker.Invoker. The subset contains only those
|
|
|
|
// methods that are used by ActorWrapper and clients of the contracts.
|
|
|
|
type Invoker interface {
|
2023-12-18 13:13:36 +00:00
|
|
|
Run([]byte) (*result.Invoke, error)
|
2023-11-07 10:57:30 +00:00
|
|
|
Call(contract util.Uint160, method string, params ...any) (*result.Invoke, error)
|
|
|
|
TraverseIterator(sessionID uuid.UUID, iterator *result.Iterator, num int) ([]stackitem.Item, error)
|
|
|
|
TerminateSession(sessionID uuid.UUID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Ensure the interface is compatible with the invoker.Invoker struct.
|
|
|
|
var _ Invoker = (*invoker.Invoker)(nil)
|