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 AggregatedSignaturesToMessages(a []flow.AggregatedSignature) []*entities.AggregatedSignature
- func BlockExecutionDataEventPayloadsToJson(m *entities.BlockExecutionData) error
- func BlockExecutionDataToMessage(data *execution_data.BlockExecutionData) (*entities.BlockExecutionData, error)
- func BlockHeaderToMessage(h *flow.Header, signerIDs flow.IdentifierList) (*entities.BlockHeader, error)
- func BlockID(blockID []byte) (flow.Identifier, error)
- func BlockIDs(blockIDs [][]byte) ([]flow.Identifier, error)
- func BlockSealToMessage(s *flow.Seal) *entities.BlockSeal
- func BlockSealsToMessages(b []*flow.Seal) []*entities.BlockSeal
- func BlockToMessage(h *flow.Block, signerIDs flow.IdentifierList) (*entities.Block, error)
- func BlockToMessageLight(h *flow.Block) *entities.Block
- func BytesToInmemSnapshot(bytes []byte) (*inmem.Snapshot, error)
- func CcfEventToJsonEvent(e flow.Event) (*flow.Event, error)
- func CcfPayloadToJsonPayload(p []byte) ([]byte, error)
- func ChunkExecutionDataToMessage(data *execution_data.ChunkExecutionData) (*entities.ChunkExecutionData, error)
- func ChunkToMessage(chunk *flow.Chunk) *entities.Chunk
- func CollectionGuaranteeToMessage(g *flow.CollectionGuarantee) *entities.CollectionGuarantee
- func CollectionGuaranteesToMessages(c []*flow.CollectionGuarantee) []*entities.CollectionGuarantee
- func CollectionID(collectionID []byte) (flow.Identifier, error)
- func CollectionToMessage(c *flow.Collection) (*entities.Collection, error)
- func EventToMessage(e flow.Event) *entities.Event
- func EventToMessageFromVersion(e flow.Event, version execproto.EventEncodingVersion) (*entities.Event, error)
- func EventType(eventType string) (string, error)
- func EventsToMessages(flowEvents []flow.Event) []*entities.Event
- func EventsToMessagesFromVersion(flowEvents []flow.Event, version execproto.EventEncodingVersion) ([]*entities.Event, error)
- func ExecutionResultMetaListToMessages(e flow.ExecutionReceiptMetaList) []*entities.ExecutionReceiptMeta
- func ExecutionResultToMessage(er *flow.ExecutionResult) (*entities.ExecutionResult, error)
- func ExecutionResultsToMessages(e []*flow.ExecutionResult) ([]*entities.ExecutionResult, error)
- 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 MessageToBlock(m *entities.Block) (*flow.Block, error)
- func MessageToBlockExecutionData(m *entities.BlockExecutionData, chain flow.Chain) (*execution_data.BlockExecutionData, error)
- func MessageToBlockHeader(m *entities.BlockHeader) (*flow.Header, error)
- func MessageToBlockSeal(m *entities.BlockSeal) (*flow.Seal, error)
- func MessageToChainId(m string) (*flow.ChainID, error)
- func MessageToChunk(m *entities.Chunk) (*flow.Chunk, error)
- func MessageToChunkExecutionData(m *entities.ChunkExecutionData, chain flow.Chain) (*execution_data.ChunkExecutionData, error)
- func MessageToCollectionGuarantee(m *entities.CollectionGuarantee) *flow.CollectionGuarantee
- func MessageToEvent(m *entities.Event) flow.Event
- func MessageToEventFromVersion(m *entities.Event, version execproto.EventEncodingVersion) (*flow.Event, error)
- func MessageToExecutionResult(m *entities.ExecutionResult) (*flow.ExecutionResult, error)
- func MessageToIdentifier(b []byte) flow.Identifier
- func MessageToServiceEvent(m *entities.ServiceEvent) (*flow.ServiceEvent, error)
- func MessageToSignature(m []byte) crypto.Signature
- func MessageToStateCommitment(bytes []byte) (sc flow.StateCommitment, err error)
- func MessageToTransaction(m *entities.Transaction, chain flow.Chain) (flow.TransactionBody, error)
- func MessageToTrieUpdate(m *entities.TrieUpdate) (*ledger.TrieUpdate, error)
- func MessagesToAggregatedSignatures(m []*entities.AggregatedSignature) []flow.AggregatedSignature
- func MessagesToBlockSeals(m []*entities.BlockSeal) ([]*flow.Seal, error)
- func MessagesToChunkList(m []*entities.Chunk) (flow.ChunkList, error)
- func MessagesToCollectionGuarantees(m []*entities.CollectionGuarantee) []*flow.CollectionGuarantee
- func MessagesToEvents(l []*entities.Event) []flow.Event
- func MessagesToEventsFromVersion(l []*entities.Event, version execproto.EventEncodingVersion) ([]flow.Event, error)
- func MessagesToExecutionResultMetaList(m []*entities.ExecutionReceiptMeta) flow.ExecutionReceiptMetaList
- func MessagesToExecutionResults(m []*entities.ExecutionResult) ([]*flow.ExecutionResult, error)
- func MessagesToIdentifiers(l [][]byte) []flow.Identifier
- func MessagesToServiceEventList(m []*entities.ServiceEvent) (flow.ServiceEventList, error)
- func MessagesToSignatures(m [][]byte) []crypto.Signature
- func PayloadFromMessage(m *entities.Block) (*flow.Payload, error)
- func ServiceEventToMessage(event flow.ServiceEvent) (*entities.ServiceEvent, error)
- func SignatureToMessage(s crypto.Signature) []byte
- func SignaturesToMessages(s []crypto.Signature) [][]byte
- 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
- func TransactionsToMessages(transactions []*flow.TransactionBody) []*entities.Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyMessage = errors.New("protobuf message is empty")
View Source
var ValidChainIds = map[string]bool{ flow.Mainnet.String(): true, flow.Testnet.String(): true, flow.Sandboxnet.String(): true, flow.Benchnet.String(): true, flow.Localnet.String(): true, flow.Emulator.String(): true, flow.BftTestnet.String(): true, flow.MonotonicEmulator.String(): true, }
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 AggregatedSignaturesToMessages ¶ added in v0.24.8
func AggregatedSignaturesToMessages(a []flow.AggregatedSignature) []*entities.AggregatedSignature
func BlockExecutionDataEventPayloadsToJson ¶ added in v0.31.11
func BlockExecutionDataEventPayloadsToJson(m *entities.BlockExecutionData) error
BlockExecutionDataEventPayloadsToJson converts all event payloads from CCF to JSON-CDC in place This is a temporary workaround until a more robust solution is implemented
func BlockExecutionDataToMessage ¶ added in v0.29.0
func BlockExecutionDataToMessage(data *execution_data.BlockExecutionData) ( *entities.BlockExecutionData, error, )
func BlockHeaderToMessage ¶
func BlockHeaderToMessage( h *flow.Header, signerIDs flow.IdentifierList, ) (*entities.BlockHeader, error)
func BlockSealToMessage ¶ added in v0.24.8
func BlockSealsToMessages ¶ added in v0.24.8
func BlockToMessage ¶
func BytesToInmemSnapshot ¶ added in v0.15.0
BytesToInmemSnapshot converts an array of bytes to `inmem.Snapshot`
func CcfEventToJsonEvent ¶ added in v0.31.0
func CcfPayloadToJsonPayload ¶ added in v0.31.0
func ChunkExecutionDataToMessage ¶ added in v0.29.0
func ChunkExecutionDataToMessage(data *execution_data.ChunkExecutionData) ( *entities.ChunkExecutionData, error, )
func CollectionGuaranteeToMessage ¶ added in v0.24.8
func CollectionGuaranteeToMessage(g *flow.CollectionGuarantee) *entities.CollectionGuarantee
func CollectionGuaranteesToMessages ¶ added in v0.24.8
func CollectionGuaranteesToMessages(c []*flow.CollectionGuarantee) []*entities.CollectionGuarantee
func CollectionID ¶
func CollectionID(collectionID []byte) (flow.Identifier, error)
func CollectionToMessage ¶
func CollectionToMessage(c *flow.Collection) (*entities.Collection, error)
func EventToMessageFromVersion ¶ added in v0.31.11
func EventsToMessagesFromVersion ¶ added in v0.31.11
func ExecutionResultMetaListToMessages ¶ added in v0.24.8
func ExecutionResultMetaListToMessages(e flow.ExecutionReceiptMetaList) []*entities.ExecutionReceiptMeta
func ExecutionResultToMessage ¶ added in v0.24.8
func ExecutionResultToMessage(er *flow.ExecutionResult) ( *entities.ExecutionResult, error, )
func ExecutionResultsToMessages ¶ added in v0.24.8
func ExecutionResultsToMessages(e []*flow.ExecutionResult) ( []*entities.ExecutionResult, 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 MessageToBlockExecutionData ¶ added in v0.29.0
func MessageToBlockExecutionData( m *entities.BlockExecutionData, chain flow.Chain, ) (*execution_data.BlockExecutionData, error)
func MessageToBlockHeader ¶ added in v0.24.8
func MessageToBlockHeader(m *entities.BlockHeader) (*flow.Header, error)
func MessageToBlockSeal ¶ added in v0.24.8
func MessageToChainId ¶ added in v0.24.8
MessageToChainId checks chainId from enumeration to prevent a panic on Chain() being called
func MessageToChunkExecutionData ¶ added in v0.29.0
func MessageToChunkExecutionData( m *entities.ChunkExecutionData, chain flow.Chain, ) (*execution_data.ChunkExecutionData, error)
func MessageToCollectionGuarantee ¶ added in v0.24.8
func MessageToCollectionGuarantee(m *entities.CollectionGuarantee) *flow.CollectionGuarantee
func MessageToEventFromVersion ¶ added in v0.31.0
func MessageToExecutionResult ¶ added in v0.24.8
func MessageToExecutionResult(m *entities.ExecutionResult) ( *flow.ExecutionResult, error, )
func MessageToIdentifier ¶
func MessageToIdentifier(b []byte) flow.Identifier
func MessageToServiceEvent ¶ added in v0.24.8
func MessageToServiceEvent(m *entities.ServiceEvent) (*flow.ServiceEvent, error)
func MessageToSignature ¶ added in v0.24.8
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 MessageToTrieUpdate ¶ added in v0.29.12
func MessageToTrieUpdate(m *entities.TrieUpdate) (*ledger.TrieUpdate, error)
func MessagesToAggregatedSignatures ¶ added in v0.24.8
func MessagesToAggregatedSignatures(m []*entities.AggregatedSignature) []flow.AggregatedSignature
func MessagesToBlockSeals ¶ added in v0.24.8
func MessagesToChunkList ¶ added in v0.24.8
func MessagesToCollectionGuarantees ¶ added in v0.24.8
func MessagesToCollectionGuarantees(m []*entities.CollectionGuarantee) []*flow.CollectionGuarantee
func MessagesToEventsFromVersion ¶ added in v0.31.0
func MessagesToExecutionResultMetaList ¶ added in v0.24.8
func MessagesToExecutionResultMetaList(m []*entities.ExecutionReceiptMeta) flow.ExecutionReceiptMetaList
func MessagesToExecutionResults ¶ added in v0.24.8
func MessagesToExecutionResults(m []*entities.ExecutionResult) ( []*flow.ExecutionResult, error, )
func MessagesToIdentifiers ¶
func MessagesToIdentifiers(l [][]byte) []flow.Identifier
func MessagesToServiceEventList ¶ added in v0.24.8
func MessagesToServiceEventList(m []*entities.ServiceEvent) ( flow.ServiceEventList, error, )
func MessagesToSignatures ¶ added in v0.24.8
func PayloadFromMessage ¶ added in v0.24.8
func ServiceEventToMessage ¶ added in v0.24.8
func ServiceEventToMessage(event flow.ServiceEvent) (*entities.ServiceEvent, error)
func SignatureToMessage ¶ added in v0.24.8
func SignaturesToMessages ¶ added in v0.24.8
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
func TransactionsToMessages ¶ added in v0.24.11
func TransactionsToMessages(transactions []*flow.TransactionBody) []*entities.Transaction
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.