convert

package
v1.0.0-preview.50 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyMessage = errors.New("protobuf message is empty")

Functions

func AccountKeyToMessage

func AccountKeyToMessage(a *flow.AccountKey) *entities.AccountKey

func AccountToMessage

func AccountToMessage(a flow.Account) *entities.Account

func BlockExecutionDataToMessage

func BlockExecutionDataToMessage(
	execData *flow.ExecutionData,
) (*entities.BlockExecutionData, error)

func BlockHeaderToMessage

func BlockHeaderToMessage(b flow.BlockHeader) (*entities.BlockHeader, error)

func BlockSealToMessage

func BlockSealToMessage(g flow.BlockSeal) *entities.BlockSeal

func BlockSealsToMessages

func BlockSealsToMessages(l []*flow.BlockSeal) []*entities.BlockSeal

func BlockToMessage

func BlockToMessage(b flow.Block) (*entities.Block, error)

func CadenceValueToMessage

func CadenceValueToMessage(value cadence.Value, encodingVersion flow.EventEncodingVersion) ([]byte, error)

func CadenceValuesToMessages

func CadenceValuesToMessages(values []cadence.Value, encodingVersion flow.EventEncodingVersion) ([][]byte, error)

func ChunkExecutionDataToMessage

func ChunkExecutionDataToMessage(
	chunk *flow.ChunkExecutionData,
) (*entities.ChunkExecutionData, error)

func CollectionGuaranteeToMessage

func CollectionGuaranteeToMessage(g flow.CollectionGuarantee) *entities.CollectionGuarantee

func CollectionGuaranteesToMessages

func CollectionGuaranteesToMessages(l []*flow.CollectionGuarantee) []*entities.CollectionGuarantee

func CollectionToMessage

func CollectionToMessage(c flow.Collection) *entities.Collection

func EventToMessage

func EventToMessage(e flow.Event, encodingVersion flow.EventEncodingVersion) (*entities.Event, error)

func ExecutionDataCollectionToMessage

func ExecutionDataCollectionToMessage(
	txs []*flow.Transaction,
) (*entities.ExecutionDataCollection, error)

func IdentifierToMessage

func IdentifierToMessage(i flow.Identifier) []byte

func IdentifiersToMessages

func IdentifiersToMessages(l []flow.Identifier) [][]byte

func LightTransactionResultToMessage

func LightTransactionResultToMessage(
	result *flow.LightTransactionResult,
) *entities.ExecutionDataTransactionResult

func MessageToAccount

func MessageToAccount(m *entities.Account) (flow.Account, error)

func MessageToAccountKey

func MessageToAccountKey(m *entities.AccountKey) (*flow.AccountKey, error)

func MessageToBlock

func MessageToBlock(m *entities.Block) (flow.Block, error)

func MessageToBlockExecutionData

func MessageToBlockExecutionData(
	m *entities.BlockExecutionData,
) (*flow.ExecutionData, error)

func MessageToBlockHeader

func MessageToBlockHeader(m *entities.BlockHeader) (flow.BlockHeader, error)

func MessageToBlockSeal

func MessageToBlockSeal(m *entities.BlockSeal) (flow.BlockSeal, error)

func MessageToCadenceValue

func MessageToCadenceValue(m []byte, options []jsoncdc.Option) (cadence.Value, error)

func MessageToChunkExecutionData

func MessageToChunkExecutionData(
	m *entities.ChunkExecutionData,
) (*flow.ChunkExecutionData, error)

func MessageToCollection

func MessageToCollection(m *entities.Collection) (flow.Collection, error)

func MessageToCollectionGuarantee

func MessageToCollectionGuarantee(m *entities.CollectionGuarantee) (flow.CollectionGuarantee, error)

func MessageToEvent

func MessageToEvent(m *entities.Event, options []jsoncdc.Option) (flow.Event, error)

func MessageToExecutionDataCollection

func MessageToExecutionDataCollection(
	m *entities.ExecutionDataCollection,
) ([]*flow.Transaction, error)

func MessageToIdentifier

func MessageToIdentifier(b []byte) flow.Identifier

func MessageToLightTransactionResult

func MessageToLightTransactionResult(
	m *entities.ExecutionDataTransactionResult,
) flow.LightTransactionResult

func MessageToTransaction

func MessageToTransaction(m *entities.Transaction) (flow.Transaction, error)

func MessageToTransactionResult

func MessageToTransactionResult(m *access.TransactionResultResponse, options []jsoncdc.Option) (flow.TransactionResult, error)

func MessageToTrieUpdate

func MessageToTrieUpdate(
	m *entities.TrieUpdate,
) (*flow.TrieUpdate, error)

func MessagesToBlockSeals

func MessagesToBlockSeals(l []*entities.BlockSeal) ([]*flow.BlockSeal, error)

func MessagesToCollectionGuarantees

func MessagesToCollectionGuarantees(l []*entities.CollectionGuarantee) ([]*flow.CollectionGuarantee, error)

func MessagesToEvents

func MessagesToEvents(m []*entities.Event, options []jsoncdc.Option) ([]flow.Event, error)

func MessagesToIdentifiers

func MessagesToIdentifiers(l [][]byte) []flow.Identifier

func TransactionResultToMessage

func TransactionResultToMessage(result flow.TransactionResult, encodingVersion flow.EventEncodingVersion) (*access.TransactionResultResponse, error)

func TransactionToMessage

func TransactionToMessage(t flow.Transaction) (*entities.Transaction, error)

func TrieUpdateToMessage

func TrieUpdateToMessage(
	update *flow.TrieUpdate,
) (*entities.TrieUpdate, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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