21 lines
790 B
Go
21 lines
790 B
Go
|
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 {
|
||
|
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)
|