Documentation ¶
Index ¶
- Variables
- func UFix64ToFloat64(u cadence.UFix64) float64
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetCollectionGuarantees() []*CollectionGuarantee
- func (x *Block) GetHeight() uint64
- func (x *Block) GetId() []byte
- func (x *Block) GetParentID() []byte
- func (x *Block) GetSeals() []*BlockSeal
- func (x *Block) GetTs() *timestamppb.Timestamp
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type BlockSeal
- func (*BlockSeal) Descriptor() ([]byte, []int)deprecated
- func (x *BlockSeal) GetBlockID() []byte
- func (x *BlockSeal) GetExecutionReceiptID() []byte
- func (*BlockSeal) ProtoMessage()
- func (x *BlockSeal) ProtoReflect() protoreflect.Message
- func (x *BlockSeal) Reset()
- func (x *BlockSeal) String() string
- type CollectionGuarantee
- func (*CollectionGuarantee) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionGuarantee) GetCollectionID() []byte
- func (*CollectionGuarantee) ProtoMessage()
- func (x *CollectionGuarantee) ProtoReflect() protoreflect.Message
- func (x *CollectionGuarantee) Reset()
- func (x *CollectionGuarantee) String() string
- type Config
- type Connector
- type ContractID
- type EventType
- type ISmartContract
- type Log
- type ProposalKey
- func (*ProposalKey) Descriptor() ([]byte, []int)deprecated
- func (x *ProposalKey) GetAddress() []byte
- func (x *ProposalKey) GetKeyIndex() int64
- func (x *ProposalKey) GetSequenceNumber() uint64
- func (*ProposalKey) ProtoMessage()
- func (x *ProposalKey) ProtoReflect() protoreflect.Message
- func (x *ProposalKey) Reset()
- func (x *ProposalKey) String() string
- type Repository
- type Subscription
- func (s *Subscription) Blocks() <-chan *Block
- func (s *Subscription) Done() <-chan struct{}
- func (s *Subscription) Err() <-chan error
- func (s *Subscription) HistoricalBlocks() <-chan *Block
- func (s *Subscription) HistoricalLogs() <-chan *Log
- func (s *Subscription) HistoricalTransactions() <-chan *Transaction
- func (s *Subscription) Logs() <-chan *Log
- func (s *Subscription) Transactions() <-chan *Transaction
- func (s *Subscription) Unsubscribe()
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetArguments() [][]byte
- func (x *Transaction) GetAuthorizers() [][]byte
- func (x *Transaction) GetBlockID() []byte
- func (x *Transaction) GetBlockNumber() uint64
- func (x *Transaction) GetCollectionID() []byte
- func (x *Transaction) GetEnvelopeSignatures() []*TransactionSignature
- func (x *Transaction) GetGasLimit() uint64
- func (x *Transaction) GetId() []byte
- func (x *Transaction) GetPayer() []byte
- func (x *Transaction) GetPayloadSignatures() []*TransactionSignature
- func (x *Transaction) GetProposalKey() *ProposalKey
- func (x *Transaction) GetReferenceBlockID() []byte
- func (x *Transaction) GetScript() []byte
- func (x *Transaction) GetTs() *timestamppb.Timestamp
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionSignature
- func (*TransactionSignature) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionSignature) GetAddress() []byte
- func (x *TransactionSignature) GetKeyIndex() int64
- func (x *TransactionSignature) GetSignature() []byte
- func (x *TransactionSignature) GetSignerIndex() int64
- func (*TransactionSignature) ProtoMessage()
- func (x *TransactionSignature) ProtoReflect() protoreflect.Message
- func (x *TransactionSignature) Reset()
- func (x *TransactionSignature) String() string
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
View Source
var File_flow_proto protoreflect.FileDescriptor
Functions ¶
func UFix64ToFloat64 ¶
Types ¶
type Block ¶
type Block struct { Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` ParentID []byte `protobuf:"bytes,3,opt,name=parentID,proto3" json:"parentID,omitempty"` Height uint64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` CollectionGuarantees []*CollectionGuarantee `protobuf:"bytes,5,rep,name=collectionGuarantees,proto3" json:"collectionGuarantees,omitempty"` Seals []*BlockSeal `protobuf:"bytes,6,rep,name=seals,proto3" json:"seals,omitempty"` // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) GetCollectionGuarantees ¶
func (x *Block) GetCollectionGuarantees() []*CollectionGuarantee
func (*Block) GetParentID ¶
func (*Block) GetTs ¶
func (x *Block) GetTs() *timestamppb.Timestamp
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type BlockSeal ¶
type BlockSeal struct { BlockID []byte `protobuf:"bytes,1,opt,name=blockID,proto3" json:"blockID,omitempty"` ExecutionReceiptID []byte `protobuf:"bytes,2,opt,name=executionReceiptID,proto3" json:"executionReceiptID,omitempty"` // contains filtered or unexported fields }
func (*BlockSeal) Descriptor
deprecated
func (*BlockSeal) GetBlockID ¶
func (*BlockSeal) GetExecutionReceiptID ¶
func (*BlockSeal) ProtoMessage ¶
func (*BlockSeal) ProtoMessage()
func (*BlockSeal) ProtoReflect ¶
func (x *BlockSeal) ProtoReflect() protoreflect.Message
type CollectionGuarantee ¶
type CollectionGuarantee struct { CollectionID []byte `protobuf:"bytes,1,opt,name=collectionID,proto3" json:"collectionID,omitempty"` // contains filtered or unexported fields }
func (*CollectionGuarantee) Descriptor
deprecated
func (*CollectionGuarantee) Descriptor() ([]byte, []int)
Deprecated: Use CollectionGuarantee.ProtoReflect.Descriptor instead.
func (*CollectionGuarantee) GetCollectionID ¶
func (x *CollectionGuarantee) GetCollectionID() []byte
func (*CollectionGuarantee) ProtoMessage ¶
func (*CollectionGuarantee) ProtoMessage()
func (*CollectionGuarantee) ProtoReflect ¶
func (x *CollectionGuarantee) ProtoReflect() protoreflect.Message
func (*CollectionGuarantee) Reset ¶
func (x *CollectionGuarantee) Reset()
func (*CollectionGuarantee) String ¶
func (x *CollectionGuarantee) String() string
type Connector ¶
func (*Connector) AddContract ¶
func (c *Connector) AddContract(sc ISmartContract)
func (*Connector) GetContract ¶
func (c *Connector) GetContract(addr string, name string) ISmartContract
type ContractID ¶
type ISmartContract ¶
type Log ¶
type Log struct { BlockID flow.Identifier Height uint64 Timestamp time.Time // Type is the qualified event type. Type EventType // TransactionID is the ID of the transaction this event was emitted from. TransactionID flow.Identifier // TransactionIndex is the index of the transaction this event was emitted from, within its containing block. TransactionIndex int // EventIndex is the index of the event within the transaction it was emitted from. EventIndex int // Value contains the event data. Value cadence.Event // Bytes representing event data. Payload []byte }
type ProposalKey ¶
type ProposalKey struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` KeyIndex int64 `protobuf:"varint,2,opt,name=keyIndex,proto3" json:"keyIndex,omitempty"` SequenceNumber uint64 `protobuf:"varint,3,opt,name=sequenceNumber,proto3" json:"sequenceNumber,omitempty"` // contains filtered or unexported fields }
func (*ProposalKey) Descriptor
deprecated
func (*ProposalKey) Descriptor() ([]byte, []int)
Deprecated: Use ProposalKey.ProtoReflect.Descriptor instead.
func (*ProposalKey) GetAddress ¶
func (x *ProposalKey) GetAddress() []byte
func (*ProposalKey) GetKeyIndex ¶
func (x *ProposalKey) GetKeyIndex() int64
func (*ProposalKey) GetSequenceNumber ¶
func (x *ProposalKey) GetSequenceNumber() uint64
func (*ProposalKey) ProtoMessage ¶
func (*ProposalKey) ProtoMessage()
func (*ProposalKey) ProtoReflect ¶
func (x *ProposalKey) ProtoReflect() protoreflect.Message
func (*ProposalKey) Reset ¶
func (x *ProposalKey) Reset()
func (*ProposalKey) String ¶
func (x *ProposalKey) String() string
type Repository ¶
type Repository interface { GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, error) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, error) GetCollection(ctx context.Context, colID flow.Identifier) (*flow.Collection, error) GetTransaction(ctx context.Context, txID flow.Identifier) (*flow.Transaction, error) GetEventsForBlockIDs(ctx context.Context, eventType string, blockIDs []flow.Identifier) ([]flow.BlockEvents, error) GetEventsForHeightRange(ctx context.Context, eventType string, startHeight uint64, endHeight uint64) ([]flow.BlockEvents, error) }
func NewRepository ¶
func NewRepository(ctx context.Context, config *Config) (Repository, error)
type Subscription ¶
type Subscription struct { *Config // contains filtered or unexported fields }
func NewSubscription ¶
func (*Subscription) Blocks ¶
func (s *Subscription) Blocks() <-chan *Block
func (*Subscription) Done ¶
func (s *Subscription) Done() <-chan struct{}
func (*Subscription) Err ¶
func (s *Subscription) Err() <-chan error
func (*Subscription) HistoricalBlocks ¶
func (s *Subscription) HistoricalBlocks() <-chan *Block
func (*Subscription) HistoricalLogs ¶
func (s *Subscription) HistoricalLogs() <-chan *Log
func (*Subscription) HistoricalTransactions ¶
func (s *Subscription) HistoricalTransactions() <-chan *Transaction
func (*Subscription) Logs ¶
func (s *Subscription) Logs() <-chan *Log
func (*Subscription) Transactions ¶
func (s *Subscription) Transactions() <-chan *Transaction
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe()
type Transaction ¶
type Transaction struct { Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` BlockID []byte `protobuf:"bytes,3,opt,name=blockID,proto3" json:"blockID,omitempty"` CollectionID []byte `protobuf:"bytes,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"` Script []byte `protobuf:"bytes,5,opt,name=script,proto3" json:"script,omitempty"` Arguments [][]byte `protobuf:"bytes,6,rep,name=arguments,proto3" json:"arguments,omitempty"` ReferenceBlockID []byte `protobuf:"bytes,7,opt,name=referenceBlockID,proto3" json:"referenceBlockID,omitempty"` GasLimit uint64 `protobuf:"varint,8,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` ProposalKey *ProposalKey `protobuf:"bytes,9,opt,name=proposalKey,proto3" json:"proposalKey,omitempty"` Payer []byte `protobuf:"bytes,10,opt,name=payer,proto3" json:"payer,omitempty"` Authorizers [][]byte `protobuf:"bytes,11,rep,name=authorizers,proto3" json:"authorizers,omitempty"` PayloadSignatures []*TransactionSignature `protobuf:"bytes,12,rep,name=payloadSignatures,proto3" json:"payloadSignatures,omitempty"` EnvelopeSignatures []*TransactionSignature `protobuf:"bytes,13,rep,name=envelopeSignatures,proto3" json:"envelopeSignatures,omitempty"` BlockNumber uint64 `protobuf:"varint,14,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetArguments ¶
func (x *Transaction) GetArguments() [][]byte
func (*Transaction) GetAuthorizers ¶
func (x *Transaction) GetAuthorizers() [][]byte
func (*Transaction) GetBlockID ¶
func (x *Transaction) GetBlockID() []byte
func (*Transaction) GetBlockNumber ¶
func (x *Transaction) GetBlockNumber() uint64
func (*Transaction) GetCollectionID ¶
func (x *Transaction) GetCollectionID() []byte
func (*Transaction) GetEnvelopeSignatures ¶
func (x *Transaction) GetEnvelopeSignatures() []*TransactionSignature
func (*Transaction) GetGasLimit ¶
func (x *Transaction) GetGasLimit() uint64
func (*Transaction) GetId ¶
func (x *Transaction) GetId() []byte
func (*Transaction) GetPayer ¶
func (x *Transaction) GetPayer() []byte
func (*Transaction) GetPayloadSignatures ¶
func (x *Transaction) GetPayloadSignatures() []*TransactionSignature
func (*Transaction) GetProposalKey ¶
func (x *Transaction) GetProposalKey() *ProposalKey
func (*Transaction) GetReferenceBlockID ¶
func (x *Transaction) GetReferenceBlockID() []byte
func (*Transaction) GetScript ¶
func (x *Transaction) GetScript() []byte
func (*Transaction) GetTs ¶
func (x *Transaction) GetTs() *timestamppb.Timestamp
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TransactionSignature ¶
type TransactionSignature struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` SignerIndex int64 `protobuf:"varint,2,opt,name=signerIndex,proto3" json:"signerIndex,omitempty"` KeyIndex int64 `protobuf:"varint,3,opt,name=keyIndex,proto3" json:"keyIndex,omitempty"` Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*TransactionSignature) Descriptor
deprecated
func (*TransactionSignature) Descriptor() ([]byte, []int)
Deprecated: Use TransactionSignature.ProtoReflect.Descriptor instead.
func (*TransactionSignature) GetAddress ¶
func (x *TransactionSignature) GetAddress() []byte
func (*TransactionSignature) GetKeyIndex ¶
func (x *TransactionSignature) GetKeyIndex() int64
func (*TransactionSignature) GetSignature ¶
func (x *TransactionSignature) GetSignature() []byte
func (*TransactionSignature) GetSignerIndex ¶
func (x *TransactionSignature) GetSignerIndex() int64
func (*TransactionSignature) ProtoMessage ¶
func (*TransactionSignature) ProtoMessage()
func (*TransactionSignature) ProtoReflect ¶
func (x *TransactionSignature) ProtoReflect() protoreflect.Message
func (*TransactionSignature) Reset ¶
func (x *TransactionSignature) Reset()
func (*TransactionSignature) String ¶
func (x *TransactionSignature) String() string
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool(size int) *WorkerPool
func (*WorkerPool) Run ¶
func (p *WorkerPool) Run(task func())
func (*WorkerPool) Wait ¶
func (p *WorkerPool) Wait()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.