convert

package
v0.38.0-preview.0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCadenceValue added in v0.30.5

func DecodeCadenceValue[From cadence.Value, Into any](
	location string,
	value cadence.Value,
	decodeInner func(From) (Into, error),
) (Into, error)

func ServiceEvent

func ServiceEvent(chainID flow.ChainID, event flow.Event) (*flow.ServiceEvent, error)

ServiceEvent converts a service event encoded as the generic flow.Event type to a flow.ServiceEvent type for use within protocol software and protocol state. This acts as the conversion from the Cadence type to the flow-go type. CAUTION: This function must only be used for input events computed locally, by an Execution or Verification Node; it is not resilient to malicious inputs. No errors are expected during normal operation.

func VersionBoundary added in v0.37.20

func VersionBoundary(value cadence.Value) (
	flow.VersionBoundary,
	error,
)

VersionBoundary decodes a single version boundary from the given Cadence value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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