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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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