-
Notifications
You must be signed in to change notification settings - Fork 209
Expand file tree
/
Copy pathengines.go
More file actions
21 lines (15 loc) · 872 Bytes
/
engines.go
File metadata and controls
21 lines (15 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package execution
import (
"context"
"github.com/onflow/flow-go/model/flow"
)
// ScriptExecutor represents the RPC calls that the execution script engine exposes to support the Access Node API calls
type ScriptExecutor interface {
// ExecuteScriptAtBlockID executes a script at the given Block id
// it returns the value, the computation used and the error (if any)
ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, blockID flow.Identifier) ([]byte, uint64, error)
// GetAccount returns the Account details at the given Block id
GetAccount(ctx context.Context, address flow.Address, blockID flow.Identifier) (*flow.Account, error)
// GetRegisterAtBlockID returns the value of a register at the given Block id (if available)
GetRegisterAtBlockID(ctx context.Context, owner, key []byte, blockID flow.Identifier) ([]byte, error)
}