{"modulePath":"github.com/pushchain/push-chain-node","version":"v0.0.49","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pushcore\n\nPackage pushcore provides a client for interacting with Push Chain gRPC endpoints. It implements a fan-out pattern that tries multiple endpoints in round-robin order to provide high availability and fault tolerance.\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient is a fan-out client that connects to multiple Push Chain gRPC endpoints. It implements round-robin failover, trying each endpoint in sequence until one succeeds.\n\n```go\nfunc New(urls []string, logger zerolog.Logger) (*Client, error)\n```\nNew creates a new Client by dialing the provided gRPC URLs. It attempts to connect to all endpoints and skips any that fail to dial. At least one endpoint must succeed, otherwise an error is returned.\n\n```go\nfunc (c *Client) BroadcastTx(ctx context.Context, txBytes []byte) (*tx.BroadcastTxResponse, error)\n```\nBroadcastTx broadcasts a signed transaction to the chain.\n\n```go\nfunc (c *Client) Close() error\n```\nClose gracefully closes all gRPC connections owned by the client. Returns the first error encountered, if any.\n\n```go\nfunc (c *Client) GetAccount(ctx context.Context, address string) (*authtypes.QueryAccountResponse, error)\n```\nGetAccount retrieves account information for a given address.\n\n```go\nfunc (c *Client) GetAllChainConfigs(ctx context.Context) ([]*uregistrytypes.ChainConfig, error)\n```\nGetAllChainConfigs retrieves all chain configurations from Push Chain.\n\n```go\nfunc (c *Client) GetAllPendingOutbounds(ctx context.Context) ([]*uexecutortypes.PendingOutboundEntry, []*uexecutortypes.OutboundTx, error)\n```\nGetAllPendingOutbounds retrieves pending outbound transactions from Push Chain, oldest first, so older work is signed before newer.\n\nWalked by offset rather than read as a single page. An outbound leaves the pending set only when a quorum vote terminalizes it, so rows that cannot reach one accumulate at the head of the list; without the walk they would hide every newer outbound behind them, on every chain, since this query is not chain scoped.\n\nThe walk stops at the first short page, so the ordinary case where the whole set fits in one page costs exactly one request.\n\n```go\nfunc (c *Client) GetAllPendingReadRequests(ctx context.Context) ([]*ucallbacktypes.ReadRequest, error)\n```\nGetAllPendingReadRequests retrieves up to the first 1000 pending external read requests from Push Chain. The query already withholds requests past their expiry height, so validators never take on work that can no longer be fulfilled in time.\n\n```go\nfunc (c *Client) GetAllUniversalValidators(ctx context.Context) ([]*uvalidatortypes.UniversalValidator, error)\n```\nGetAllUniversalValidators retrieves all universal validators from Push Chain.\n\n```go\nfunc (c *Client) GetCurrentKey(ctx context.Context) (*utsstypes.TssKey, error)\n```\nGetCurrentKey retrieves the current TSS key from Push Chain.\n\n```go\nfunc (c *Client) GetGasPrice(ctx context.Context, chainID string) (*big.Int, error)\n```\nGetGasPrice retrieves the median gas price for a specific chain from the on-chain oracle.\n\n```go\nfunc (c *Client) GetGranteeGrants(ctx context.Context, granteeAddr string) (*authz.QueryGranteeGrantsResponse, error)\n```\nGetGranteeGrants queries AuthZ grants for a grantee using round-robin logic.\n\n```go\nfunc (c *Client) GetKeyByID(ctx context.Context, keyID string) (*utsstypes.TssKey, error)\n```\nGetKeyByID retrieves a single TSS key from the on-chain key history. Returns an error if the key ID is not in the history.\n\n```go\nfunc (c *Client) GetLatestBlock(ctx context.Context) (uint64, error)\n```\nGetLatestBlock retrieves the latest block from Push Chain.\n\n```go\nfunc (c *Client) GetPendingFundMigrations(ctx context.Context) ([]*utsstypes.FundMigration, error)\n```\nGetPendingFundMigrations retrieves all pending fund migrations from Push Chain.\n\n```go\nfunc (c *Client) GetPendingTssEvents(ctx context.Context) ([]*utsstypes.TssEvent, error)\n```\nGetPendingTssEvents retrieves up to the first 1000 pending TSS events from Push Chain. Sorted by process\\_id ascending (oldest first).\n\n```go\nfunc (c *Client) GetTx(ctx context.Context, txHash string) (*tx.GetTxResponse, error)\n```\nGetTx queries for a transaction by its hash. Returns the response if found, or an error if the tx does not exist or the query fails.\n\n","path":"github.com/pushchain/push-chain-node/universalClient/pushcore","name":"pushcore","synopsis":"Package pushcore provides a client for interacting with Push Chain gRPC endpoints.","isRedistributable":true}
