convert

package
v0.31.14 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToRegisters added in v0.31.4

func BytesToRegisters(bb [][]byte) (flow.RegisterIDs, error)

BytesToRegisters converts a slice of byte slices into a slice of ledger registers.

func BytesToValues

func BytesToValues(bb [][]byte) []flow.RegisterValue

BytesToValues converts a slice of byte slices into a slice of ledger values.

func CommitToHash

func CommitToHash(commit flow.StateCommitment) []byte

CommitToHash converts a flow StateCommitment into a byte slice.

func IDToHash

func IDToHash(id flow.Identifier) []byte

IDToHash converts a flow Identifier into a byte slice.

func KeyToRegisterID added in v0.31.4

func KeyToRegisterID(key ledger.Key) (flow.RegisterID, error)

KeyToRegisterID converts a ledger key into a register ID.

func ParseCadenceArgument

func ParseCadenceArgument(param string) (cadence.Value, error)

ParseCadenceArgument parses strings that contain Cadence parameters into cadence values.

func RegistersToBytes added in v0.31.4

func RegistersToBytes(values flow.RegisterIDs) [][]byte

RegistersToBytes converts a slice of ledger registers into a slice of byte slices.

func RosettaTime

func RosettaTime(t time.Time) int64

RosettaTime converts a time into a Rosetta-compatible timestamp.

func StringsToTypes

func StringsToTypes(ss []string) []flow.EventType

StringsToTypes converts a slice of strings into a slice of flow event types.

func TypesToStrings

func TypesToStrings(types []flow.EventType) []string

TypesToStrings converts a slice of flow event types into a slice of strings.

func ValuesToBytes

func ValuesToBytes(values []flow.RegisterValue) [][]byte

ValuesToBytes converts a slice of ledger values into a slice of byte slices.

Types

This section is empty.

Jump to

Keyboard shortcuts

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