Documentation ¶
Index ¶
- func CreateGrpcConnection(cfg types.Config) (*grpc.ClientConn, error)
- func GetHeightRequestHeader(height int64) grpc.CallOption
- func MustCreateGrpcConnection(cfg types.Config) *grpc.ClientConn
- type Contracts
- type Proxy
- func (cp *Proxy) Block(height int64) (*flow.Block, error)
- func (cp *Proxy) Client() *client.Client
- func (cp *Proxy) Collections(block *flow.Block) []types.Collection
- func (cp *Proxy) Contract() Contracts
- func (cp *Proxy) Ctx() context.Context
- func (cp *Proxy) Events(transactionID string, height int) ([]types.Event, error)
- func (cp *Proxy) EventsInBlock(block *flow.Block) ([]types.Event, error)
- func (cp *Proxy) EventsInTransaction(tx types.Tx) ([]types.Event, error)
- func (cp *Proxy) GetChainID() string
- func (cp *Proxy) GetGenesisHeight() uint64
- func (cp *Proxy) GetTransaction(hash string) (*flow.Transaction, error)
- func (cp *Proxy) LatestHeight() (int64, error)
- func (cp *Proxy) Stop()
- func (cp *Proxy) TransactionResult(transactionIds []flow.Identifier) ([]types.TransactionResult, error)
- func (cp *Proxy) Txs(block *flow.Block) (types.Txs, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGrpcConnection ¶
func CreateGrpcConnection(cfg types.Config) (*grpc.ClientConn, error)
CreateGrpcConnection creates a new gRPC client connection from the given configuration
func GetHeightRequestHeader ¶
func GetHeightRequestHeader(height int64) grpc.CallOption
GetHeightRequestHeader returns the grpc.CallOption to query the state at a given height
func MustCreateGrpcConnection ¶
func MustCreateGrpcConnection(cfg types.Config) *grpc.ClientConn
MustCreateGrpcConnection creates a new gRPC connection using the provided configuration and panics on error
Types ¶
type Contracts ¶
type Contracts struct { FungibleToken string FlowToken string FlowFee string StakingTable string LockedTokens string NonFungibleToken string StakingProxy string ChainID string }
func MainnetContracts ¶
func MainnetContracts() Contracts
func TestnetContracts ¶
func TestnetContracts() Contracts
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy implements a wrapper around both a Tendermint RPC client and a Cosmos Sdk REST client that allows for essential data queries.
func NewClientProxy ¶
NewClientProxy allows to build a new Proxy instance
func (*Proxy) Collections ¶
func (cp *Proxy) Collections(block *flow.Block) []types.Collection
Collections get all the collection from block
func (*Proxy) EventsInBlock ¶
func (*Proxy) EventsInTransaction ¶
func (*Proxy) GetChainID ¶
func (*Proxy) GetGenesisHeight ¶
GetGeneisisBlock parse the specific block as genesis block
func (*Proxy) GetTransaction ¶
GetTransaction queries for a transaction by hash. An error is returned if the query fails.
func (*Proxy) LatestHeight ¶
LatestHeight returns the latest block height on the active chain. An error is returned if the query fails.
func (*Proxy) TransactionResult ¶
func (cp *Proxy) TransactionResult(transactionIds []flow.Identifier) ([]types.TransactionResult, error)