{"modulePath":"github.com/onflow/flow-archive","version":"v0.31.9-decrease-wait-interval","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package invoker\n\n## Functions\n\n```go\nfunc WithCacheSize(size uint64) func(*Config)\n```\nWithCacheSize specifies the size of the cache the invoker uses.\n\n## Types\n\n```go\ntype Cache interface {\n\tGet(key interface{}) (interface{}, bool)\n\tSet(key, value interface{}, cost int64) bool\n}\n```\nCache represents a key/value store to use as a cache.\n\n```go\ntype Config struct {\n\tCacheSize uint64\n}\n```\nConfig is the configuration for an invoker.\n\n```go\ntype Invoker struct {\n\t// contains filtered or unexported fields\n}\n```\nInvoker retrieves account information from and executes Cadence scripts against the Flow virtual machine.\n\n```go\nfunc New(index archive.Reader, options ...func(*Config)) (*Invoker, error)\n```\nNew returns a new Invoker with the given configuration.\n\n```go\nfunc (i *Invoker) Account(height uint64, address flow.Address) (*flow.Account, error)\n```\nAccount returns the account with the given address.\n\n```go\nfunc (i *Invoker) ByHeightFrom(height uint64, header *flow.Header) (*flow.Header, error)\n```\nByHeightFrom implements the fvm/env/blocks interface\n\n```go\nfunc (i *Invoker) Key(height uint64, address flow.Address, index int) (*flow.AccountPublicKey, error)\n```\nKey returns the public key of the account with the given address.\n\n```go\nfunc (i *Invoker) Script(height uint64, script []byte, arguments []cadence.Value) (cadence.Value, error)\n```\nScript executes the given Cadence script and returns its result.\n\n","path":"github.com/onflow/flow-archive/service/invoker","name":"invoker","synopsis":"","isRedistributable":true}
