convert

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToPaths

func BytesToPaths(bb [][]byte) ([]ledger.Path, error)

BytesToPaths converts a slice of byte slices into a slice of ledger paths.

func BytesToValues

func BytesToValues(bb [][]byte) []ledger.Value

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

func CommitToHash added in v1.1.0

func CommitToHash(commit flow.StateCommitment) []byte

CommitToHash converts a flow StateCommitment into a byte slice.

func IDToHash added in v1.1.0

func IDToHash(id flow.Identifier) []byte

IDToHash converts a flow Identifier into a byte slice.

func ParseCadenceArgument

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

ParseCadenceArgument parses strings that contain Cadence parameters into cadence values.

func PathsToBytes

func PathsToBytes(paths []ledger.Path) [][]byte

PathsToBytes converts a slice of ledger paths 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 []ledger.Value) [][]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