# README
go-client
A comprehensive gRPC client library for querying and interacting with zenrockd
, the Zenrock blockchain daemon.
While the Cosmos SDK provides auto-generated protobuf clients, this package aims to be more ergonomic and developer-friendly by providing:
- Strongly typed interfaces for all operations
- Simplified transaction handling
- Built-in retries and error handling
- Convenient helper methods for common operations
Key Components
Core Client Files
raw_tx_client.go
: Base client implementation that handles:- Transaction building and signing
- Gas estimation and fee calculation
- Broadcasting and confirmation
- Identity and key management
Module-Specific Clients
-
tx_treasury.go
: Treasury module operations including:- Key Request Management
- Creating new key requests (standard and ZrSign)
- Fulfilling key requests with public keys
- Tracking request status
- Signature Request Operations
- Creating signature requests for transactions
- Managing ZrSign signature requests
- Fulfilling requests with signatures
- Rejecting invalid requests
- Authorization
- Generating and verifying party signatures
- Managing request permissions
- Key Request Management
-
tx_zenbtc.go
: Bitcoin bridge functionality:- Deposit Verification
- Validating Bitcoin transaction inclusion
- Merkle proof verification
- Amount and address validation
- Cross-chain Transaction Management
- Initiating Bitcoin transactions
- Tracking transaction status
- Managing Bitcoin addresses
- Deposit Verification
Usage
The clients are designed to be used together, with the specialized clients (TreasuryTxClient
, ZenBTCTxClient
) wrapping the base RawTxClient
to provide domain-specific functionality while handling common operations like transaction building, signing and broadcasting automatically.
See individual client documentation for detailed usage examples and API references.
# Functions
NewAuthQueryClient returns a new AuthQueryClient with the supplied GRPC client connection.
NewClientConn establishes a new gRPC connection to the specified endpoint.
NewIdentityFromSeed creates a new Identity from a BIP39 seed phrase and derivation path.
NewPolicyQueryClient returns a new PolicyQueryClient with the supplied GRPC client connection.
NewQueryClient creates a new QueryClient instance by establishing a gRPC connection to the specified Zenrock node endpoint.
NewQueryClientWithConn creates a new QueryClient using an existing gRPC connection.
No description provided by the author
NewTreasuryQueryClient returns a new TreasuryQueryClient with the supplied GRPC client connection.
NewTreasuryTxClient creates a new instance of TreasuryTxClient.
NewTxClient creates a new transaction client instance with all necessary sub-clients initialized.
NewValidationQueryClient returns a new ValidationQueryClient with the supplied GRPC client connection.
NewZenBTCQueryClient returns a new ZenBTCQueryClient with the supplied GRPC client connection.
NewZenBTCTxClient returns a new ZenBTCTxClient instance.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AuthQueryClient stores a query client for the zenrock auth module.
Identity represents an account on Zenrock.
PolicyQueryClient provides a client interface for interacting with the policy module.
QueryClient is the main client interface that aggregates all module-specific query clients.
RawTxClient is the client used for sending new transactions to the chain.
TreasuryQueryClient provides a client interface for interacting with the treasury module.
TreasuryTxClient provides methods for interacting with the treasury module.
TxClient provides a unified interface for sending transactions to the Zenrock blockchain.
ValidationQueryClient provides a client interface for interacting with the validation module.
ZenBTCQueryClient provides a client interface for interacting with the zenbtc module.
ZenBTCTxClient provides a client interface for interacting with the ZenBTC module.
# Interfaces
No description provided by the author
# Type aliases
PageRequest is an alias for the Cosmos SDK query.PageRequest type Used for pagination in queries that return multiple items.