Documentation ¶
Index ¶
- Variables
- func AccountKeyToMessage(a flow.AccountPublicKey) (*entities.AccountKey, error)
- func AccountToMessage(a *flow.Account) (*entities.Account, error)
- func Address(rawAddress []byte, chain flow.Chain) (flow.Address, error)
- func BlockHeaderToMessage(h *flow.Header) (*entities.BlockHeader, error)
- func BlockID(blockID []byte) (flow.Identifier, error)
- func BlockIDs(blockIDs [][]byte) ([]flow.Identifier, error)
- func BlockToMessage(h *flow.Block) (*entities.Block, error)
- func BytesToInmemSnapshot(bytes []byte) (*inmem.Snapshot, error)
- func CollectionID(collectionID []byte) (flow.Identifier, error)
- func CollectionToMessage(c *flow.Collection) (*entities.Collection, error)
- func EventToMessage(e flow.Event) *entities.Event
- func EventType(eventType string) (string, error)
- func EventsToMessages(flowEvents []flow.Event) []*entities.Event
- func IdentifierToMessage(i flow.Identifier) []byte
- func IdentifiersToMessages(l []flow.Identifier) [][]byte
- func LightCollectionToMessage(c *flow.LightCollection) (*entities.Collection, error)
- func MessageToAccount(m *entities.Account) (*flow.Account, error)
- func MessageToAccountKey(m *entities.AccountKey) (*flow.AccountPublicKey, error)
- func MessageToEvent(m *entities.Event) flow.Event
- func MessageToIdentifier(b []byte) flow.Identifier
- func MessageToStateCommitment(bytes []byte) (sc flow.StateCommitment, err error)
- func MessageToTransaction(m *entities.Transaction, chain flow.Chain) (flow.TransactionBody, error)
- func MessagesToEvents(l []*entities.Event) []flow.Event
- func MessagesToIdentifiers(l [][]byte) []flow.Identifier
- func SnapshotToBytes(snapshot protocol.Snapshot) ([]byte, error)
- func StateCommitmentToMessage(s flow.StateCommitment) []byte
- func TransactionID(txID []byte) (flow.Identifier, error)
- func TransactionToMessage(tb flow.TransactionBody) *entities.Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyMessage = errors.New("protobuf message is empty")
Functions ¶
func AccountKeyToMessage ¶
func AccountKeyToMessage(a flow.AccountPublicKey) (*entities.AccountKey, error)
func Address ¶
Address validates the input address and returns a Flow address if valid and error otherwise
func BlockHeaderToMessage ¶
func BlockHeaderToMessage(h *flow.Header) (*entities.BlockHeader, error)
func BytesToInmemSnapshot ¶ added in v0.15.0
BytesToInmemSnapshot converts an array of bytes to `inmem.Snapshot`
func CollectionID ¶
func CollectionID(collectionID []byte) (flow.Identifier, error)
func CollectionToMessage ¶
func CollectionToMessage(c *flow.Collection) (*entities.Collection, error)
func IdentifierToMessage ¶
func IdentifierToMessage(i flow.Identifier) []byte
func IdentifiersToMessages ¶
func IdentifiersToMessages(l []flow.Identifier) [][]byte
func LightCollectionToMessage ¶
func LightCollectionToMessage(c *flow.LightCollection) (*entities.Collection, error)
func MessageToAccountKey ¶
func MessageToAccountKey(m *entities.AccountKey) (*flow.AccountPublicKey, error)
func MessageToIdentifier ¶
func MessageToIdentifier(b []byte) flow.Identifier
func MessageToStateCommitment ¶ added in v0.21.0
func MessageToStateCommitment(bytes []byte) (sc flow.StateCommitment, err error)
func MessageToTransaction ¶
func MessageToTransaction(m *entities.Transaction, chain flow.Chain) (flow.TransactionBody, error)
func MessagesToIdentifiers ¶
func MessagesToIdentifiers(l [][]byte) []flow.Identifier
func SnapshotToBytes ¶ added in v0.15.0
SnapshotToBytes converts a `protocol.Snapshot` to bytes, encoded as JSON
func StateCommitmentToMessage ¶ added in v0.21.0
func StateCommitmentToMessage(s flow.StateCommitment) []byte
func TransactionID ¶
func TransactionID(txID []byte) (flow.Identifier, error)
func TransactionToMessage ¶
func TransactionToMessage(tb flow.TransactionBody) *entities.Transaction
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.