Versions in this module Expand all Collapse all v0 v0.1.0 Oct 11, 2024 Changes in this version + const ConfigDigestPrefixStarknet + var ConfigSetEventSelector = "9a144bf4a6a8fd083c93211e163e59221578efcc86b93f8c97c620e7b9608a" + var MaxObservers = 31 + var NewTransmissionEventSelector = "019e22f866f4c5aead2809bf160d2b29e921e335d899979732101c6f3c38ff81" + func NewConfigProvider(chainID string, contractAddress string, basereader starknet.Reader, cfg Config, ...) (*configProvider, error) + func NewContractCache(cfg Config, reader Reader, lggr logger.Logger) *contractCache + func NewContractTransmitter(reader *transmissionsCache, contractAddress string, senderAddress string, ...) *contractTransmitter + func NewMedianProvider(chainID string, contractAddress string, senderAddress string, ...) (*medianProvider, error) + func NewOffchainConfigDigester(chainID, contract string) offchainConfigDigester + func NewTransmissionsCache(cfg Config, reader Reader, lggr logger.Logger) *transmissionsCache + func ParseConfigSetEvent(event starknetrpc.EmittedEvent) (types.ContractConfig, error) + func XXXMustBytesToConfigDigest(b []byte) types.ConfigDigest + type BillingDetails struct + ObservationPaymentGJuels uint64 + TransmissionPaymentGJuels uint64 + func NewBillingDetails(observationPaymentGJuels *big.Int, transmissionPaymentGJuels *big.Int) (bd BillingDetails, err error) + type Client struct + func NewClient(reader starknet.Reader, lggr logger.Logger) (*Client, error) + func (c *Client) BaseReader() starknet.Reader + func (c *Client) BillingDetails(ctx context.Context, address *felt.Felt) (bd BillingDetails, err error) + func (c *Client) ConfigFromEventAt(ctx context.Context, address *felt.Felt, blockNum uint64) (cc ContractConfig, err error) + func (c *Client) LatestConfigDetails(ctx context.Context, address *felt.Felt) (ccd ContractConfigDetails, err error) + func (c *Client) LatestRoundData(ctx context.Context, address *felt.Felt) (round RoundData, err error) + func (c *Client) LatestTransmissionDetails(ctx context.Context, address *felt.Felt) (td TransmissionDetails, err error) + func (c *Client) LinkAvailableForPayment(ctx context.Context, address *felt.Felt) (*big.Int, error) + func (c *Client) NewTransmissionsFromEventsAt(ctx context.Context, address *felt.Felt, blockNum uint64) (events []NewTransmissionEvent, err error) + type Config interface + OCR2CachePollPeriod func() time.Duration + OCR2CacheTTL func() time.Duration + type ContractConfig struct + Config types.ContractConfig + ConfigBlock uint64 + type ContractConfigDetails struct + Block uint64 + Digest types.ConfigDigest + func NewContractConfigDetails(blockNum *big.Int, digest [32]byte) (ccd ContractConfigDetails, err error) + type NewTransmissionEvent struct + ConfigDigest types.ConfigDigest + Epoch uint32 + GasPrice *big.Int + JuelsPerFeeCoin *big.Int + LatestAnswer *big.Int + LatestTimestamp time.Time + Observations []*big.Int + ObservationsLen uint32 + Observers []uint8 + Reimbursement *big.Int + Round uint8 + RoundId uint32 + Transmitter *felt.Felt + func ParseNewTransmissionEvent(event starknetrpc.EmittedEvent) (NewTransmissionEvent, error) + type OCR2Reader interface + BaseReader func() starknet.Reader + BillingDetails func(context.Context, *felt.Felt) (BillingDetails, error) + ConfigFromEventAt func(context.Context, *felt.Felt, uint64) (ContractConfig, error) + LatestConfigDetails func(context.Context, *felt.Felt) (ContractConfigDetails, error) + LatestRoundData func(context.Context, *felt.Felt) (RoundData, error) + LatestTransmissionDetails func(context.Context, *felt.Felt) (TransmissionDetails, error) + LinkAvailableForPayment func(context.Context, *felt.Felt) (*big.Int, error) + NewTransmissionsFromEventsAt func(context.Context, *felt.Felt, uint64) ([]NewTransmissionEvent, error) + type Reader interface + func NewContractReader(address string, reader OCR2Reader, lggr logger.Logger) Reader + type RoundData struct + Answer *big.Int + BlockNumber uint64 + RoundID uint32 + StartedAt time.Time + UpdatedAt time.Time + func NewRoundData(felts []*felt.Felt) (data RoundData, err error) + type Tracker interface + Close func() error + Start func() error + type TransmissionDetails struct + Digest types.ConfigDigest + Epoch uint32 + LatestAnswer *big.Int + LatestTimestamp time.Time + Round uint8 v0.0.1-beta-test Jun 14, 2023