Documentation ¶
Index ¶
- func ToCallArg(msg ethereum.CallMsg) interface{}
- type AuthObsClient
- func (ac *AuthObsClient) Address() gethcommon.Address
- func (ac *AuthObsClient) BalanceAt(ctx context.Context, blockNumber *big.Int) (*big.Int, error)
- func (ac *AuthObsClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (ac *AuthObsClient) EstimateGas(ctx context.Context, msg *ethereum.CallMsg) (uint64, error)
- func (ac *AuthObsClient) EstimateGasAndGasPrice(txData types.TxData) types.TxData
- func (ac *AuthObsClient) GetLogs(ctx context.Context, filterCriteria common.FilterCriteriaJSON) ([]*types.Log, error)
- func (ac *AuthObsClient) GetReceiptsByAddress(ctx context.Context, address *gethcommon.Address) (types.Receipts, error)
- func (ac *AuthObsClient) NonceAt(ctx context.Context, blockNumber *big.Int) (uint64, error)
- func (ac *AuthObsClient) SendTransaction(ctx context.Context, signedTx *types.Transaction) error
- func (ac *AuthObsClient) SubscribeFilterLogs(ctx context.Context, filterCriteria filters.FilterCriteria, ...) (ethereum.Subscription, error)
- func (ac *AuthObsClient) TransactionByHash(ctx context.Context, hash gethcommon.Hash) (*types.Transaction, bool, error)
- func (ac *AuthObsClient) TransactionReceipt(ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error)
- type ObsClient
- func (oc *ObsClient) BatchByHash(hash gethcommon.Hash) (*common.ExtBatch, error)
- func (oc *ObsClient) BatchHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
- func (oc *ObsClient) BatchHeaderByNumber(number *big.Int) (*common.BatchHeader, error)
- func (oc *ObsClient) BatchNumber() (uint64, error)
- func (oc *ObsClient) ChainID() (*big.Int, error)
- func (oc *ObsClient) Close()
- func (oc *ObsClient) GetBatchesListing(pagination *common.QueryPagination) (*common.BatchListingResponse, error)
- func (oc *ObsClient) GetBlockListing(pagination *common.QueryPagination) (*common.BlockListingResponse, error)
- func (oc *ObsClient) GetConfig() (*common.ObscuroNetworkInfo, error)
- func (oc *ObsClient) GetLatestRollupHeader() (*common.RollupHeader, error)
- func (oc *ObsClient) GetPublicTxListing(pagination *common.QueryPagination) (*common.TransactionListingResponse, error)
- func (oc *ObsClient) GetTotalContractCount() (int, error)
- func (oc *ObsClient) GetTotalTransactionCount() (int, error)
- func (oc *ObsClient) Health() (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthObsClient ¶
type AuthObsClient struct { ObsClient // contains filtered or unexported fields }
AuthObsClient extends the functionality of the ObsClient for all methods that require encryption when communicating with the enclave It is created with an EncRPCClient rather than basic RPC client so encryption/decryption is supported
The methods in this client are analogous to the methods in geth's EthClient and should behave the same unless noted otherwise.
func DialWithAuth ¶
DialWithAuth will generate and sign a viewing key for given wallet, then initiate a connection with the RPC node and
register the viewing key
func NewAuthObsClient ¶
func NewAuthObsClient(client *rpc.EncRPCClient) *AuthObsClient
NewAuthObsClient constructs an AuthObsClient for sensitive communication with an enclave.
It requires an EncRPCClient specifically even though the AuthObsClient uses a Client interface in its struct because the Client interface makes testing easy but an EncRPCClient is required for the actual encrypted communication
func (*AuthObsClient) Address ¶
func (ac *AuthObsClient) Address() gethcommon.Address
func (*AuthObsClient) BalanceAt ¶
BalanceAt retrieves the native balance for the account registered on this client (due to obscuro privacy restrictions, balance cannot be requested for other accounts)
func (*AuthObsClient) CallContract ¶
func (*AuthObsClient) EstimateGas ¶ added in v0.7.0
func (ac *AuthObsClient) EstimateGas(ctx context.Context, msg *ethereum.CallMsg) (uint64, error)
func (*AuthObsClient) EstimateGasAndGasPrice ¶ added in v0.8.0
func (ac *AuthObsClient) EstimateGasAndGasPrice(txData types.TxData) types.TxData
func (*AuthObsClient) GetLogs ¶ added in v0.5.0
func (ac *AuthObsClient) GetLogs(ctx context.Context, filterCriteria common.FilterCriteriaJSON) ([]*types.Log, error)
func (*AuthObsClient) GetReceiptsByAddress ¶ added in v0.14.0
func (ac *AuthObsClient) GetReceiptsByAddress(ctx context.Context, address *gethcommon.Address) (types.Receipts, error)
GetReceiptsByAddress retrieves the receipts for the account registered on this client (due to obscuro privacy restrictions, balance cannot be requested for other accounts)
func (*AuthObsClient) NonceAt ¶
NonceAt retrieves the nonce for the account registered on this client (due to obscuro privacy restrictions, nonce cannot be requested for other accounts)
func (*AuthObsClient) SendTransaction ¶
func (ac *AuthObsClient) SendTransaction(ctx context.Context, signedTx *types.Transaction) error
func (*AuthObsClient) SubscribeFilterLogs ¶ added in v0.4.0
func (ac *AuthObsClient) SubscribeFilterLogs(ctx context.Context, filterCriteria filters.FilterCriteria, ch chan common.IDAndLog) (ethereum.Subscription, error)
func (*AuthObsClient) TransactionByHash ¶
func (ac *AuthObsClient) TransactionByHash(ctx context.Context, hash gethcommon.Hash) (*types.Transaction, bool, error)
TransactionByHash returns transaction (if found), isPending (always false currently as we don't search the mempool), error
func (*AuthObsClient) TransactionReceipt ¶
func (ac *AuthObsClient) TransactionReceipt(ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error)
type ObsClient ¶
type ObsClient struct {
// contains filtered or unexported fields
}
ObsClient provides access to general Obscuro functionality that doesn't require viewing keys.
The methods in this client are analogous to the methods in geth's EthClient and should behave the same unless noted otherwise.
func NewObsClient ¶
func (*ObsClient) BatchByHash ¶ added in v0.16.0
BatchByHash returns the batch with the given hash.
func (*ObsClient) BatchHeaderByHash ¶ added in v0.14.0
func (oc *ObsClient) BatchHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
BatchHeaderByHash returns the block header with the given hash.
func (*ObsClient) BatchHeaderByNumber ¶ added in v0.14.0
BatchHeaderByNumber returns the header of the rollup with the given number
func (*ObsClient) BatchNumber ¶ added in v0.14.0
BatchNumber returns the height of the head rollup
func (*ObsClient) ChainID ¶
ChainID retrieves the current chain ID for transaction replay protection.
func (*ObsClient) GetBatchesListing ¶ added in v0.15.0
func (oc *ObsClient) GetBatchesListing(pagination *common.QueryPagination) (*common.BatchListingResponse, error)
GetBatchesListing returns a list of batches
func (*ObsClient) GetBlockListing ¶ added in v0.15.0
func (oc *ObsClient) GetBlockListing(pagination *common.QueryPagination) (*common.BlockListingResponse, error)
GetBlockListing returns a list of block headers
func (*ObsClient) GetConfig ¶ added in v0.17.0
func (oc *ObsClient) GetConfig() (*common.ObscuroNetworkInfo, error)
GetConfig returns the network config for obscuro
func (*ObsClient) GetLatestRollupHeader ¶ added in v0.14.0
func (oc *ObsClient) GetLatestRollupHeader() (*common.RollupHeader, error)
GetLatestRollupHeader returns the header of the rollup at tip
func (*ObsClient) GetPublicTxListing ¶ added in v0.15.0
func (oc *ObsClient) GetPublicTxListing(pagination *common.QueryPagination) (*common.TransactionListingResponse, error)
GetPublicTxListing returns a list of public transactions
func (*ObsClient) GetTotalContractCount ¶ added in v0.14.0
GetTotalContractCount returns the total count of created contracts
func (*ObsClient) GetTotalTransactionCount ¶ added in v0.14.0
GetTotalTransactionCount returns the total count of executed transactions