integration

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandSendTransaction     = "cadence.server.flow.sendTransaction"
	CommandExecuteScript       = "cadence.server.flow.executeScript"
	CommandDeployContract      = "cadence.server.flow.deployContract"
	CommandCreateAccount       = "cadence.server.flow.createAccount"
	CommandSwitchActiveAccount = "cadence.server.flow.switchActiveAccount"
	CommandGetAccounts         = "cadence.server.flow.getAccounts"
	CommandReloadConfig        = "cadence.server.flow.reloadConfiguration"
)

Variables

View Source
var SignersRegexp = regexp.MustCompile(`[\w-]+`)

Functions

func FVMStandardLibraryValues added in v1.0.0

func FVMStandardLibraryValues() []stdlib.StandardLibraryValue

FVMStandardLibraryValues returns the standard library values which are provided by the FVM these are not part of the Cadence standard library

Types

type Argument

type Argument struct {
	cadence.Value
}

func (Argument) MarshalJSON

func (a Argument) MarshalJSON() ([]byte, error)

type ConfigManager added in v1.6.0

type ConfigManager struct {
	// contains filtered or unexported fields
}

ConfigManager manages multiple Flow config instances concurrently and resolves the appropriate config/state/client for a given file based on the closest-ancestor flow.json.

func NewConfigManager added in v1.6.0

func NewConfigManager(loader flowkit.ReaderWriter, enableFlowClient bool, numberOfAccounts int, initConfigPath string) *ConfigManager

func (*ConfigManager) ConfigPathForProject added in v1.6.0

func (m *ConfigManager) ConfigPathForProject(projectID string) string

ConfigPathForProject normalizes a project ID (flow.json path) to an absolute config path

func (*ConfigManager) DefaultClient added in v1.6.0

func (m *ConfigManager) DefaultClient() flowClient

DefaultClient returns any initialized client if available (first encountered). Returns nil if no clients are initialized.

func (*ConfigManager) EnsureDirWatcher added in v1.6.0

func (m *ConfigManager) EnsureDirWatcher(dirPath string)

EnsureDirWatcher adds a watcher for the given directory to detect flow.json creation/removal.

func (*ConfigManager) GetContractSourceForProject added in v1.6.0

func (m *ConfigManager) GetContractSourceForProject(projectID string, name string) (string, error)

GetContractSourceForProject reads the project's flow.json and returns the code for the given contract name if mapped

func (*ConfigManager) IsPathInProject added in v1.6.0

func (m *ConfigManager) IsPathInProject(projectID string, absPath string) bool

IsPathInProject reports whether absPath is inside the project root directory of projectID

func (*ConfigManager) IsSameProject added in v1.6.0

func (m *ConfigManager) IsSameProject(projectID string, absPath string) bool

IsSameProject reports whether absPath resolves to the same flow.json as projectID

func (*ConfigManager) LastLoadError added in v1.6.0

func (m *ConfigManager) LastLoadError(projectID string) string

LastLoadError returns the last captured load/reload error for a given projectID (flow.json path).

func (*ConfigManager) NearestConfigPath added in v1.6.0

func (m *ConfigManager) NearestConfigPath(filePath string) string

NearestConfigPath returns the closest ancestor flow.json for the given file path, or empty if none.

func (*ConfigManager) ReloadAll added in v1.6.0

func (m *ConfigManager) ReloadAll() error

ReloadAll reloads all known states/clients.

func (*ConfigManager) ResolveClientForChecker added in v1.6.0

func (m *ConfigManager) ResolveClientForChecker(checker *sema.Checker) (flowClient, error)

ResolveClientForChecker returns the client associated with the closest flow.json for the given checker.

func (*ConfigManager) ResolveClientForPath added in v1.6.0

func (m *ConfigManager) ResolveClientForPath(filePath string) (flowClient, error)

func (*ConfigManager) ResolveClientForProject added in v1.6.0

func (m *ConfigManager) ResolveClientForProject(projectID string) (flowClient, error)

ResolveClientForProject returns the Flow client for the given project ID (flow.json path)

func (*ConfigManager) ResolveStateForChecker added in v1.6.0

func (m *ConfigManager) ResolveStateForChecker(checker *sema.Checker) (flowState, error)

ResolveStateForChecker returns the state associated with the closest flow.json for the given checker.

func (*ConfigManager) ResolveStateForPath added in v1.6.0

func (m *ConfigManager) ResolveStateForPath(filePath string) (flowState, error)

Public wrappers for path-based resolution

func (*ConfigManager) ResolveStateForProject added in v1.6.0

func (m *ConfigManager) ResolveStateForProject(projectID string) (flowState, error)

ResolveStateForProject returns the state associated with the given project ID (flow.json path)

func (*ConfigManager) SetDefaultClientForPath added in v1.6.0

func (m *ConfigManager) SetDefaultClientForPath(cfgPath string, cl flowClient)

SetDefaultClientForPath seeds the manager with a ready client for the given config path. Useful to make a default client available before any resolution happens.

func (*ConfigManager) SetInitConfigPath added in v1.6.0

func (m *ConfigManager) SetInitConfigPath(cfgPath string)

SetInitConfigPath sets the init-config override used as the global default for commands that don't provide an explicit document path. Ensures a watcher exists for the override.

func (*ConfigManager) SetOnConfigReload added in v1.7.2

func (m *ConfigManager) SetOnConfigReload(callback func(configPath string))

SetOnConfigReload sets a callback that is invoked when a config is reloaded

type FlowIntegration

type FlowIntegration struct {
	// contains filtered or unexported fields
}

func NewFlowIntegration

func NewFlowIntegration(s *server.Server, enableFlowClient bool) (*FlowIntegration, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL