{"modulePath":"github.com/livepeer/node","version":"v1.0.10","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package eth\n\nPorted from livepeer/go-livepeer at 0ff08af1bb4cb268f428d619cc968b5eaee0d093. Original implementation by Yondon Fu and Rafal Leszko; MIT notice in LICENSE.\n\nAdapted from livepeer/go-livepeer eth/watchers/timewatcher.go and eth/blockwatch/block\\_watcher.go at 597f882cb9f4d42ad8430b0f592afd5929af4a6b: Nico Vergauwen (b4605f705, 3aec3aa16), Yondon Fu (0acd88bbd), and Rafał Leszko (4b6ede31f, 8c7ec0155). Immutable pinned observations and age refusal also adapt Mike Zupper's BlueClawNetwork/livepeer-node eth/chainview.go (2d95d40b8, 74f41b11f). Copyright (c) 2017 Livepeer; MIT notice in LICENSE.\n\nSender-key event invalidation and pinned recovery adapt livepeer/go-livepeer eth/watchers/senderwatcher.go (341b39a0c, 57e288706), by Nico Vergauwen. Immutable results, idle eviction and shared cold reads adapt Mike Zupper's BlueClawNetwork/livepeer-node eth/chainview.go (898977754, 5f20cab0f). Copyright (c) 2017 Livepeer; MIT notice in LICENSE.\n\nPorted from livepeer/go-livepeer at 0ff08af1bb4cb268f428d619cc968b5eaee0d093. Original implementation by Yondon Fu and Rafal Leszko; MIT notice in LICENSE.\n\nVoting APIs follow livepeer/go-livepeer/eth/client.go: poll voting by Nico Vergauwen (994f4c0e5a755717f47feab1a397c74307cef8ef) and proposal voting by Rick Staa (89d9ebc7fff0004aab11bbb733035327da7b2e1b).\n\n## Variables\n\n```go\nvar ErrObservationUnavailable = errors.New(\"chain observation unavailable\")\n```\n\n```go\nvar ErrReceiptUnavailable = errors.New(\"transaction inclusion could not be checked\")\n```\nA failed live receipt check cannot establish that an inclusion timed out. Durable callers retain the monitoring cursor and try the check again.\n\n```go\nvar ErrRedeemerIsOrchestrator = errors.New(\"redeemer wallet is registered or active as an orchestrator\")\n```\n\n```go\nvar ErrReplacingMinedTx = errors.New(\"cannot replace a mined transaction\")\n```\n\n```go\nvar ErrTicketCreationRound = errors.New(\"ticket creationRound does not have a block hash\")\n```\n\n```go\nvar ErrUneconomicalRedemption = errors.New(\"ticket face value does not cover redemption cost\")\n```\n\n## Functions\n\n```go\nfunc CreateAccount(dir string, password *string, passwordFile string) (ethcommon.Address, error)\n```\nCreateAccount saves a fresh account in the shared keystore directory.\n\n```go\nfunc CreateKeystore(keystorePath string, password *string, passwordPath string) (ethcommon.Address, error)\n```\nCreateKeystore generates an account and writes an owner-only encrypted geth keystore. The parent directory must exist; an existing path is never replaced. Password sources follow the same exact-byte rules as OpenKeystore.\n\n```go\nfunc DecimalUnits(value *big.Int, places int) string\n```\nDecimalUnits formats integer units exactly, without floating-point arithmetic.\n\n```go\nfunc HexSignature(sig []byte) string\n```\n\n```go\nfunc SelectKeystore(dir, explicit string, account *ethcommon.Address) (string, ethcommon.Address, error)\n```\nSelectKeystore selects metadata without unlocking a key. An explicit file bypasses directory discovery; its address is checked again after decryption.\n\n```go\nfunc ValidAddress(address string) bool\n```\n\n```go\nfunc WithRPCWork(ctx context.Context, work string) context.Context\n```\nWithRPCWork distinguishes request-induced work from scheduled chain work.\n\n## Types\n\n```go\ntype AccountInspection struct {\n\tBlockSnapshot\n\tAddress      common.Address `json:\"address\"`\n\tBalanceWei   string         `json:\"balance_wei\"`\n\tLPTBalance   string         `json:\"lpt_balance_base_units\"`\n\tPendingNonce uint64         `json:\"pending_nonce\"`\n}\n```\n\n```go\ntype BlockSnapshot struct {\n\tBlockNumber string      `json:\"block_number\"`\n\tBlockHash   common.Hash `json:\"block_hash\"`\n}\n```\n\n```go\ntype ChainSnapshot struct {\n\tBlock                *big.Int // Protocol L1 block, including on Arbitrum.\n\tNumber               *big.Int // Execution-chain height, distinct from the L1 clock.\n\tBlockHash            ethcommon.Hash\n\tRound                *big.Int // Last initialized round.\n\tRoundHash            ethcommon.Hash\n\tTicketValidityPeriod *big.Int // TicketBroker validity period at this block.\n\tCurrentRound         *big.Int // Protocol round; may exceed the initialized Round.\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (s ChainSnapshot) ObservedAt() time.Time\n```\n\n```go\nfunc (s ChainSnapshot) TicketExpired(creation int64) bool\n```\n\n```go\nfunc (s ChainSnapshot) ValidTicketRound(creation int64) bool\n```\n\n```go\nfunc (s ChainSnapshot) Validate() error\n```\nValidate also rejects snapshots retained across an invalidation or shutdown. Direct reads and injected test chains retain their existing behavior.\n\n```go\ntype Confirmation struct {\n\tHash     common.Hash   `json:\"transaction_hash\"`\n\tBlock    uint64        `json:\"confirmed_block\"`\n\tAttempts []common.Hash `json:\"attempt_hashes\"`\n}\n```\n\n```go\ntype Contracts struct {\n\tBeforeBroadcast     func(context.Context, *types.Transaction) error // Optional application policy, installed before workers start.\n\tCheckRedemptionCost bool\n\tRPC                 *RPC\n\tController          ethcommon.Address\n\n\tMaxFeePerGas *big.Int // Optional ceiling in wei per gas.\n\t// contains filtered or unexported fields\n}\n```\nContracts adapts upstream bindings to explicit transaction planning and canonical payment snapshots. Protocol addresses come from the Controller; Poll and price-feed addresses are explicit caller inputs.\n\n```go\nfunc NewContracts(rpc *RPC, controller ethcommon.Address) (*Contracts, error)\n```\n\n```go\nfunc OpenContracts(rpc *RPC, controller string) (*Contracts, error)\n```\n\n```go\nfunc (c *Contracts) Broadcast(ctx context.Context, tx SignedTransaction) error\n```\nBroadcast sends these exact signed bytes once. Always retain the local hash: any transport error can occur after the node has accepted the transaction.\n\n```go\nfunc (c *Contracts) Call(ctx context.Context, name string, address ethcommon.Address, method string, args ...any) ([]any, error)\n```\n\n```go\nfunc (c *Contracts) CallAt(ctx context.Context, block any, name string, address ethcommon.Address, method string, args ...any) ([]any, error)\n```\n\n```go\nfunc (c *Contracts) ChangeDelegate(ctx context.Context, from, to common.Address) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) ChangeDelegateWithOptions(ctx context.Context, from, to common.Address, options FeeOptions) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) Fees(ctx context.Context, initialTip *big.Int) (FeeInspection, error)\n```\n\n```go\nfunc (c *Contracts) GetRewardCaller(ctx context.Context, target common.Address) (common.Address, error)\n```\n\n```go\nfunc (c *Contracts) Inspect(ctx context.Context) (*Inspection, error)\n```\n\n```go\nfunc (c *Contracts) InspectFees(ctx context.Context, initialTip *big.Int) (FeeInspection, error)\n```\nInspectFees also reports the RPC suggestion when an explicit tip is selected.\n\n```go\nfunc (c *Contracts) Pack(name, method string, args ...any) ([]byte, error)\n```\n\n```go\nfunc (c *Contracts) PlanContract(ctx context.Context, from common.Address, name, method string, value *big.Int, args ...any) (TransactionPlan, error)\n```\nPlanContract simulates and estimates a retained operation without signing or broadcasting. Staking operations reuse upstream pool-position preparation.\n\n```go\nfunc (c *Contracts) PlanContractWithOptions(ctx context.Context, from common.Address, name, method string, value *big.Int, options FeeOptions, args ...any) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) PlanTransaction(ctx context.Context, from, to ethcommon.Address, data []byte, value *big.Int) (TransactionPlan, error)\n```\nPlanTransaction simulates a state change and estimates gas before any signing.\n\n```go\nfunc (c *Contracts) PlanTransactionWithOptions(ctx context.Context, from, to ethcommon.Address, data []byte, value *big.Int, options FeeOptions) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) Prepare(ctx context.Context, plan TransactionPlan, key *Key, chainID *big.Int) (SignedTransaction, error)\n```\nPrepare performs reads and signing only; callers can durably save the identity before the first possible broadcast.\n\n```go\nfunc (c *Contracts) PrepareAndStore(ctx context.Context, plan TransactionPlan, key *Key, chainID *big.Int, save func(SignedTransaction) error) (SignedTransaction, error)\n```\nPrepareAndStore holds the transaction account's nonce reservation through persistence. Save must durably store the identity without broadcasting it or calling back into this client's nonce methods. A failed save does not consume a nonce.\n\n```go\nfunc (c *Contracts) ProposalVote(ctx context.Context, from common.Address, proposal *big.Int, choice lpTypes.ProposalVoteChoice) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) ProposalVoteWithReason(ctx context.Context, from common.Address, proposal *big.Int, choice lpTypes.ProposalVoteChoice, reason string) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) Resolve(ctx context.Context, name string) (ethcommon.Address, error)\n```\n\n```go\nfunc (c *Contracts) ResolveAt(ctx context.Context, block any, name string) (ethcommon.Address, error)\n```\n\n```go\nfunc (c *Contracts) RewardForTranscoder(ctx context.Context, from, target common.Address) (TransactionPlan, error)\n```\n\n```go\nfunc (c *Contracts) SetNonceFloor(address ethcommon.Address, floor uint64)\n```\nSetNonceFloor includes identities already durably saved by a caller. Local reservations cannot coordinate another process using the same signing key.\n\n```go\nfunc (c *Contracts) SetRewardCaller(ctx context.Context, from, caller common.Address) (TransactionPlan, error)\n```\nReward-caller APIs follow Rick Staa's go-livepeer/eth/client.go LIP-118 support (a31522e08b3e7c953a3bba51e7be6d79b4bf5c8c).\n\n```go\nfunc (c *Contracts) Submit(ctx context.Context, plan TransactionPlan, key *Key, chainID *big.Int) (ethcommon.Hash, error)\n```\n\n```go\nfunc (c *Contracts) Vote(ctx context.Context, from, poll common.Address, choice lpTypes.VoteChoice) (TransactionPlan, error)\n```\nVote plans a vote on the explicitly selected Poll contract.\n\n```go\nfunc (c *Contracts) WaitConfirmation(ctx context.Context, first SignedTransaction, key *Key, options WaitOptions, beforeBroadcast func(SignedTransaction, TransactionPlan) error) (Confirmation, error)\n```\nWaitConfirmation retains the signed identity and watches every attempt. The callback runs before each replacement broadcast, allowing callers to report its hash and resolved fees even if a send has an uncertain outcome.\n\n```go\nfunc (c *Contracts) WaitReceipt(ctx context.Context, hash ethcommon.Hash) (uint64, error)\n```\nWaitReceipt waits for one confirmed receipt and reports reverted transactions.\n\n```go\nfunc (c *Contracts) WeiPerUSD(ctx context.Context, feed ethcommon.Address, maxAge time.Duration) (*big.Rat, time.Time, error)\n```\nWeiPerUSD reads an operator-selected Chainlink-compatible ETH/USD feed. It returns the last instant at which that observation may price new sessions. Feed access follows Victor Elias's go-livepeer/eth/pricefeed.go (ef5d78922e08d8b815814df419d03e0561c1e974); canonical reads and freshness checks are implemented here.\n\n```go\ntype ContractsInspection struct {\n\tBlockSnapshot\n\tAddresses map[string]common.Address `json:\"addresses\"`\n}\n```\n\n```go\ntype FeeInspection struct {\n\tBlockSnapshot\n\tBaseFeeWei      string  `json:\"base_fee_per_gas_wei\"`\n\tSuggestedTipWei *string `json:\"suggested_priority_fee_per_gas_wei\"`\n\tTipCapWei       string  `json:\"max_priority_fee_per_gas_wei\"`\n\tFeeCapWei       string  `json:\"calculated_fee_cap_wei\"`\n\tCeilingWei      *string `json:\"fee_ceiling_wei\"`\n}\n```\n\n```go\ntype FeeOptions struct {\n\tGasLimit    uint64\n\tPriorityFee *big.Int\n}\n```\nFeeOptions applies to one transaction. A zero gas limit requests estimation.\n\n```go\ntype Inspection struct {\n\tBlockNumber string      `json:\"block_number\"`\n\tBlockHash   common.Hash `json:\"block_hash\"`\n\t// contains filtered or unexported fields\n}\n```\nInspection pins all state and Controller lookups to one canonical block hash. Pending nonces are deliberately read from the transaction pool.\n\n```go\nfunc (s *Inspection) Account(ctx context.Context, address common.Address) (AccountInspection, error)\n```\n\n```go\nfunc (s *Inspection) Addresses(ctx context.Context) (ContractsInspection, error)\n```\n\n```go\nfunc (s *Inspection) Call(ctx context.Context, name, method string, args ...any) ([]any, error)\n```\n\n```go\nfunc (s *Inspection) Locks(ctx context.Context, address common.Address, query LockQuery) (LocksInspection, error)\n```\n\n```go\nfunc (s *Inspection) Orchestrator(ctx context.Context, address common.Address) (OrchestratorInspection, error)\n```\n\n```go\nfunc (s *Inspection) Pool(ctx context.Context, activeOnly bool) (PoolInspection, error)\n```\n\n```go\nfunc (s *Inspection) Protocol(ctx context.Context) (ProtocolInspection, error)\n```\n\n```go\nfunc (s *Inspection) Resolve(ctx context.Context, name string) (common.Address, error)\n```\n\n```go\nfunc (s *Inspection) Round(ctx context.Context) (RoundInspection, error)\n```\n\n```go\nfunc (s *Inspection) Snapshot() BlockSnapshot\n```\n\n```go\nfunc (s *Inspection) Stake(ctx context.Context, address common.Address) (StakeInspection, error)\n```\n\n```go\nfunc (s *Inspection) TicketBroker(ctx context.Context, address common.Address) (TicketBrokerInspection, error)\n```\n\n```go\ntype Key struct {\n\t// contains filtered or unexported fields\n}\n```\nKey is a local Ethereum signer. The key material never crosses the JSON-RPC boundary and is not included in command output or errors.\n\n```go\nfunc OpenAccount(dir, path string, password *string, passwordFile string, account *ethcommon.Address) (*Key, error)\n```\nOpenAccount discovers an account and verifies its metadata against the decrypted key.\n\n```go\nfunc OpenKeystore(keystorePath string, password *string, passwordPath string) (key *Key, err error)\n```\nOpenKeystore unlocks an encrypted geth account using password, or passwordPath if password is nil. Any supplied password file must be owner-only.\n\n```go\nfunc OpenKeystoreFile(keystorePath, passwordPath string) (*Key, error)\n```\nOpenKeystoreFile unlocks one encrypted geth account file. Password files use exact bytes, including whitespace; neither input is included in diagnostics.\n\n```go\nfunc (k *Key) Address() ethcommon.Address\n```\n\n```go\nfunc (k *Key) SignHash(hash []byte) ([]byte, error)\n```\nHash signing follows Yondon Fu's go-livepeer/eth/accountmanager.go signHash (97a014cb692a736a853f7ebb396e9cbada5408a6).\n\n```go\nfunc (k *Key) SignMessage(message []byte) ([]byte, error)\n```\nEthereum message signing and the 27/28 convention follow Yondon Fu's go-livepeer/eth/accountmanager.go (3b52399fc7b9177460864207a68eb9f3d2f4ee57).\n\n```go\nfunc (k *Key) SignTx(tx *types.Transaction) (*types.Transaction, error)\n```\nSignTx adapts the local key to the ported go-livepeer transaction signer.\n\n```go\nfunc (k *Key) SignTxForChain(tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)\n```\nSignTxForChain retains upstream accountManager's chain binding when an unsigned legacy replacement does not yet encode its original chain ID.\n\n```go\ntype LockInspection struct {\n\tID            string `json:\"id\"`\n\tAmount        string `json:\"amount_base_units\"`\n\tWithdrawRound string `json:\"withdraw_round\"`\n\tWithdrawable  bool   `json:\"withdrawable\"`\n}\n```\n\n```go\ntype LockQuery struct {\n\tFromID               *big.Int\n\tLimit                uint64\n\tWithdrawable, Locked bool\n}\n```\n\n```go\ntype LocksInspection struct {\n\tBlockSnapshot\n\tAddress    common.Address   `json:\"address\"`\n\tLocks      []LockInspection `json:\"locks\"`\n\tNextFromID *string          `json:\"next_from_id\"`\n}\n```\n\n```go\ntype NonceManager struct {\n\t// contains filtered or unexported fields\n}\n```\nNonceManager manages transaction nonces for multiple ETH addresses\n\n```go\nfunc NewNonceManager(remoteReader RemoteNonceReader) *NonceManager\n```\nNewNonceManager creates an instance of a NonceManager\n\n```go\nfunc (m *NonceManager) Lock(addr ethcommon.Address)\n```\nLock locks the provided address. The caller should always call Lock before calling Next or Update\n\n```go\nfunc (m *NonceManager) Next(addr ethcommon.Address) (uint64, error)\n```\nNext returns the next transaction nonce to be used for the provided address\n\n```go\nfunc (m *NonceManager) NextContext(ctx context.Context, addr ethcommon.Address) (uint64, error)\n```\nNextContext adapts upstream Next to the service/RPC cancellation boundary.\n\n```go\nfunc (m *NonceManager) Restore(addr ethcommon.Address, next uint64)\n```\nRestore includes acknowledged durable sends when a redemption worker restarts. It cannot lower the upstream cursor when an older transaction is rebroadcast.\n\n```go\nfunc (m *NonceManager) Unlock(addr ethcommon.Address)\n```\nUnlock unlocks the provided address. The caller should always call Unlock after finishing calls to Next or Update\n\n```go\nfunc (m *NonceManager) Update(addr ethcommon.Address, lastNonce uint64)\n```\nUpdate uses the last nonce for the provided address to update the next transaction nonce\n\n```go\ntype ObserverStatus struct {\n\tObservedAt, ContactAt, HeadProgressAt, L1ProgressAt time.Time\n\tHealthy, RecipientActive                            bool\n\tRecipientTracked, RecipientFailed                   bool\n\tRecipientRejection                                  string\n\tPayerEntries, PayerReads, PayerFailures             int\n}\n```\nObserverStatus separates successful contact from accepted state and progress. A single provider cannot establish an absolute bound on protocol L1 lag.\n\n```go\ntype OrchestratorInspection struct {\n\tBlockSnapshot\n\tAddress         common.Address `json:\"address\"`\n\tRegistered      bool           `json:\"registered\"`\n\tActive          bool           `json:\"active\"`\n\tDelegatedStake  string         `json:\"delegated_stake_base_units\"`\n\tRewardCut       string         `json:\"reward_cut_percent\"`\n\tFeeCut          string         `json:\"fee_cut_percent\"`\n\tServiceURI      string         `json:\"service_uri\"`\n\tLastRewardRound string         `json:\"last_reward_round\"`\n\tRewardCaller    common.Address `json:\"reward_caller\"`\n}\n```\n\n```go\ntype PaymentChain struct {\n\tContracts *Contracts\n\tObserver  *PaymentObserver // Nil for direct transaction/redemption reads.\n}\n```\nPaymentChain adapts the retained Livepeer contracts to pm's narrow chain interface. Ethereum contract reads and redemption stay in eth.\n\n```go\nfunc (c PaymentChain) CheckRedeemerWallet(ctx context.Context, account common.Address) error\n```\nCheckRedeemerWallet is policy, not an atomic restriction in TicketBroker.\n\n```go\nfunc (c PaymentChain) FinalizedNonce(ctx context.Context, address ethcommon.Address) (uint64, error)\n```\nFinalizedNonce pins account state to the same canonical finalized reference used for ticket-use settlement. A missing/malformed count is not evidence.\n\n```go\nfunc (c PaymentChain) FinalizedReceipt(ctx context.Context, hash ethcommon.Hash) (*types.Receipt, error)\n```\nFinalizedReceipt retains canonical inclusion evidence for durable collateral admission.\n\n```go\nfunc (c PaymentChain) InclusionReceipt(ctx context.Context, hash ethcommon.Hash) (*types.Receipt, error)\n```\nInclusionReceipt retains node's canonical-block check without treating an unfinalized inclusion as settled. The ported manager only waits for inclusion.\n\n```go\nfunc (c PaymentChain) IsActive(ctx context.Context, recipient ethcommon.Address) (bool, error)\n```\n\n```go\nfunc (c PaymentChain) IsActiveAt(ctx context.Context, recipient ethcommon.Address, snapshot ChainSnapshot) (bool, error)\n```\n\n```go\nfunc (c PaymentChain) PayerFunds(ctx context.Context, sender, recipient ethcommon.Address) (SenderInfo, error)\n```\n\n```go\nfunc (c PaymentChain) PrepareRedemption(ctx context.Context, redeemer *Key, chainID *big.Int, t RedeemTicket) (SignedTransaction, error)\n```\n\n```go\nfunc (c PaymentChain) Redeem(ctx context.Context, redeemer *Key, chainID *big.Int, t RedeemTicket) (ethcommon.Hash, error)\n```\n\n```go\nfunc (c PaymentChain) RedemptionSnapshot(ctx context.Context, tag string) (ChainSnapshot, error)\n```\nRedemptionSnapshot pins eligibility and expiry to one execution-chain block. Block remains the protocol L1 clock, which is distinct on Arbitrum.\n\n```go\nfunc (c PaymentChain) RoundHashAt(ctx context.Context, round int64, s ChainSnapshot) (common.Hash, error)\n```\n\n```go\nfunc (c PaymentChain) Snapshot(ctx context.Context) (ChainSnapshot, error)\n```\n\n```go\nfunc (c PaymentChain) SubmitRedemption(ctx context.Context, nonces *NonceManager, manager *TransactionManager, redeemer *Key, chainID *big.Int, t RedeemTicket, save func(SignedTransaction) error) error\n```\nSubmitRedemption ports go-livepeer/eth/backend.go's Next/send/Update sequence. Persistence happens before send, but only an acknowledged send advances Next.\n\n```go\nfunc (c PaymentChain) TicketUse(ctx context.Context, hash ethcommon.Hash, block string) (bool, ChainSnapshot, error)\n```\nTicketUse adapts go-livepeer/eth/client\\_ticketbroker.go's IsUsedTicket. It returns the pinned finalized identity alongside ticket-use evidence.\n\n```go\nfunc (c PaymentChain) TicketUseAt(ctx context.Context, hash common.Hash, s ChainSnapshot) (bool, error)\n```\n\n```go\ntype PaymentObserver struct {\n\tOnRefresh func(time.Duration, error) // Install before Run; called serially.\n\t// contains filtered or unexported fields\n}\n```\nPaymentObserver publishes complete canonical observations. Gaps and reorgs rebuild state at the new hash instead of replaying uncertain event history.\n\n```go\nfunc NewPaymentObserver(chain PaymentChain, requireL1 bool, recipient common.Address) *PaymentObserver\n```\n\n```go\nfunc (o *PaymentObserver) Run(ctx context.Context)\n```\nRun has one service-owned caller. Every RPC inherits the service lifetime.\n\n```go\nfunc (o *PaymentObserver) Snapshot(ctx context.Context) (ChainSnapshot, error)\n```\n\n```go\nfunc (o *PaymentObserver) Status() ObserverStatus\n```\n\n```go\ntype PoolInspection struct {\n\tBlockSnapshot\n\tOrchestrators []OrchestratorInspection `json:\"orchestrators\"`\n}\n```\n\n```go\ntype ProtocolInspection struct {\n\tBlockSnapshot\n\tPaused            bool   `json:\"paused\"`\n\tPoolLimit         string `json:\"pool_limit\"`\n\tRoundLength       string `json:\"round_length\"`\n\tRoundLockAmount   string `json:\"round_lock_amount\"`\n\tUnbondingPeriod   string `json:\"unbonding_period\"`\n\tInflation         string `json:\"inflation\"`\n\tInflationChange   string `json:\"inflation_change\"`\n\tTargetBondingRate string `json:\"target_bonding_rate\"`\n\tSupply            string `json:\"supply_base_units\"`\n\tTotalBonded       string `json:\"total_bonded_base_units\"`\n\tParticipationRate string `json:\"participation_rate_percent\"`\n}\n```\n\n```go\ntype RPC struct {\n\t// contains filtered or unexported fields\n}\n```\nRPC applies bounded HTTP transport and error redaction to geth's client.\n\n```go\nfunc NewRPC(endpoint *url.URL, transport http.RoundTripper) (*RPC, error)\n```\nNewRPC opens a bounded RPC client using the supplied transport. A nil transport uses the system HTTP transport, including normal TLS verification.\n\n```go\nfunc OpenRPC(endpoint string) (*RPC, error)\n```\n\n```go\nfunc (r *RPC) BalanceAt(ctx context.Context, address ethcommon.Address, number *big.Int) (*big.Int, error)\n```\n\n```go\nfunc (r *RPC) BlockNumber(ctx context.Context) (uint64, error)\n```\n\n```go\nfunc (r *RPC) ChainID(ctx context.Context) (*big.Int, error)\n```\nChainID uses ethclient's standard call and quantity decoding.\n\n```go\nfunc (r *RPC) CheckChainID(ctx context.Context, expected *big.Int) error\n```\nCheckChainID validates the RPC chain ID, optionally pinning it to expected.\n\n```go\nfunc (r *RPC) Close()\n```\n\n```go\nfunc (r *RPC) CodeAt(ctx context.Context, address ethcommon.Address, number *big.Int) ([]byte, error)\n```\n\n```go\nfunc (r *RPC) PendingNonceAt(ctx context.Context, address ethcommon.Address) (uint64, error)\n```\n\n```go\nfunc (r *RPC) SetObserver(observer func(RPCObservation))\n```\nSetObserver installs a hook before the client is used. Observations contain allowlisted methods and redacted errors, never RPC payloads or URLs.\n\n```go\nfunc (r *RPC) TransactionByHash(ctx context.Context, hash ethcommon.Hash) (*types.Transaction, bool, error)\n```\n\n```go\nfunc (r *RPC) TransactionReceipt(ctx context.Context, hash ethcommon.Hash) (*types.Receipt, error)\n```\n\n```go\ntype RPCObservation struct {\n\tMethod, Work, Contract, Function string\n\tElapsed                          time.Duration\n\tErr                              error\n}\n```\nRPCObservation contains fixed labels and redacted errors, never RPC payloads.\n\n```go\ntype RedeemTicket struct {\n\tRecipient         ethcommon.Address\n\tSender            ethcommon.Address\n\tFaceValue         *big.Int\n\tWinProb           *big.Int\n\tSenderNonce       uint32\n\tRecipientRandHash ethcommon.Hash\n\tAuxData           []byte\n\tSignature         []byte\n\tRecipientRand     *big.Int\n}\n```\nThe redemption tuple follows Yondon Fu's go-livepeer/eth/client\\_ticketbroker.go RedeemWinningTicket (ffcefd6341d14696e2718c1a42875428cd2cc953).\n\n```go\ntype RemoteNonceReader interface {\n\tPendingNonceAt(ctx context.Context, addr ethcommon.Address) (uint64, error)\n}\n```\nRemoteNonceReader is an interface that describes an object capable of reading transaction nonces for ETH address from a remote source\n\n```go\ntype RoundInspection struct {\n\tBlockSnapshot\n\tCurrentRound         string `json:\"current_round\"`\n\tLastInitializedRound string `json:\"last_initialized_round\"`\n\tInitialized          bool   `json:\"initialized\"`\n\tLocked               bool   `json:\"locked\"`\n}\n```\n\n```go\ntype SenderInfo struct {\n\tSnapshot                        ChainSnapshot\n\tDeposit, Reserve, WithdrawRound *big.Int\n}\n```\nSenderInfo is a coherent view of a sender's collateral and the amount of reserve this particular recipient can claim in the initialized round. A zero recipient requests total remaining reserve, for sender readiness. Sender/reserve semantics follow go-livepeer/eth/client\\_ticketbroker.go, originally by Yondon Fu and Nico Vergauwen, with L1-round handling by Rafał Leszko (4b6ede31f040a084ff9e55bd798a0d6fffee1e1b).\n\n```go\ntype SignedTransaction struct {\n\tHash  ethcommon.Hash\n\tRaw   []byte\n\tNonce uint64\n\tFrom  ethcommon.Address\n}\n```\n\n```go\ntype StakeInspection struct {\n\tBlockSnapshot\n\tAddress         common.Address `json:\"address\"`\n\tStatus          string         `json:\"status\"`\n\tBondedStake     string         `json:\"bonded_stake_base_units\"`\n\tPendingStake    string         `json:\"pending_stake_base_units\"`\n\tCollectedFees   string         `json:\"collected_fees_wei\"`\n\tPendingFees     string         `json:\"pending_fees_wei\"`\n\tDelegate        common.Address `json:\"delegate\"`\n\tDelegatedAmount string         `json:\"delegated_amount_base_units\"`\n\tStartRound      string         `json:\"start_round\"`\n\tLastClaimRound  string         `json:\"last_claim_round\"`\n\tNextLockID      string         `json:\"next_lock_id\"`\n}\n```\n\n```go\ntype TicketBrokerInspection struct {\n\tBlockSnapshot\n\tAddress                common.Address `json:\"address\"`\n\tDeposit                string         `json:\"deposit_wei\"`\n\tReserve                string         `json:\"reserve_wei\"`\n\tWithdrawRound          string         `json:\"withdraw_round\"`\n\tUnlockPeriod           string         `json:\"unlock_period\"`\n\tFundingStatus          string         `json:\"funding_status\"`\n\tProjectedWithdrawRound *string        `json:\"projected_withdraw_round\"`\n}\n```\n\n```go\ntype TransactionManager struct {\n\n\t// Persistence adapters run before any replacement can reach the network.\n\tRestore           func(context.Context, *types.Transaction) (TransactionRecovery, error)\n\tBeforeReplacement func(context.Context, *types.Transaction, *types.Transaction) error\n\tCompleted         func(context.Context, *transactionReceipt)\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewTransactionManager(eth transactionSenderReader, gpm feeCeiling, signer transactionSigner, txTimeout time.Duration, maxReplacements int) *TransactionManager\n```\n\n```go\nfunc (tm *TransactionManager) Context() context.Context\n```\n\n```go\nfunc (tm *TransactionManager) SendTransaction(ctx context.Context, tx *types.Transaction) error\n```\n\n```go\nfunc (tm *TransactionManager) Start()\n```\n\n```go\nfunc (tm *TransactionManager) Stop()\n```\n\n```go\nfunc (tm *TransactionManager) Track(tx *types.Transaction)\n```\nTrack resumes an identity already durably submitted, without broadcasting.\n\n```go\ntype TransactionPlan struct {\n\tTo        ethcommon.Address `json:\"to\"`\n\tFrom      ethcommon.Address `json:\"from\"`\n\tData      string            `json:\"data\"`\n\tValueWei  string            `json:\"value_wei\"`\n\tGasLimit  uint64            `json:\"gas_limit\"`\n\tFeeCapWei string            `json:\"max_fee_per_gas_wei\"`\n\tTipCapWei string            `json:\"max_priority_fee_per_gas_wei\"`\n}\n```\n\n```go\ntype TransactionReceipt = transactionReceipt\n```\n\n```go\ntype TransactionRecovery struct {\n\tOriginHash   ethcommon.Hash\n\tTransaction  *types.Transaction\n\tHashes       []ethcommon.Hash\n\tSentAt       time.Time\n\tReplacements int\n}\n```\nTransactionRecovery is the persisted upstream inclusion/replacement cursor.\n\n```go\ntype WaitOptions struct {\n\tTimeout         time.Duration\n\tMaxReplacements uint64\n}\n```\nWaitOptions controls CLI inclusion waiting. Payment finality and durable recovery do not use this API. Timeout applies to every attempt, including last.\n\n","path":"github.com/livepeer/node/eth","name":"eth","synopsis":"Ported from livepeer/go-livepeer at 0ff08af1bb4cb268f428d619cc968b5eaee0d093.","isRedistributable":true}
