flow_helpers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package flow_helpers provides convience functions for Flow blockchain interaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAddress

func FormatAddress(address flow.Address) string

func HexString

func HexString(str string) string

func LatestBlockId

func LatestBlockId(ctx context.Context, c *client.Client) (*flow.Identifier, error)

LatestBlockId retuns the flow.Identifier for the latest block in the chain.

func SendAndWait added in v0.6.0

func SendAndWait(ctx context.Context, c *client.Client, tx flow.Transaction, timeout time.Duration) (*flow.TransactionResult, error)

SendAndWait sends the transaction and waits for the transaction to be sealed

func ValidateAddress

func ValidateAddress(address string, chainId flow.ChainID) (string, error)

func ValidateTransactionId

func ValidateTransactionId(id string) error

func WaitForSeal

func WaitForSeal(ctx context.Context, c *client.Client, id flow.Identifier, timeout time.Duration) (*flow.TransactionResult, error)

WaitForSeal blocks until - an error occurs while fetching the transaction result - the transaction gets an error status - the transaction gets a "TransactionStatusSealed" or "TransactionStatusExpired" status - timeout is reached

Types

This section is empty.

Jump to

Keyboard shortcuts

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