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) GasPrice(ctx context.Context) (*big.Int, error)
- func (ac *AuthObsClient) GetLogs(ctx context.Context, filterCriteria common.FilterCriteria) ([]*types.Log, error)
- func (ac *AuthObsClient) GetPrivateTransactions(ctx context.Context, address *gethcommon.Address, ...) (types.Receipts, uint64, 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 common.FilterCriteria, ch chan types.Log) (ethereum.Subscription, error)
- func (ac *AuthObsClient) TransactionByHash(ctx context.Context, hash gethcommon.Hash) (tx *types.Transaction, isPending bool, err error)
- func (ac *AuthObsClient) TransactionReceipt(ctx context.Context, txHash gethcommon.Hash) (*types.Receipt, error)
- type ObsClient
- func (oc *ObsClient) BatchNumber() (uint64, error)
- func (oc *ObsClient) ChainID() (*big.Int, error)
- func (oc *ObsClient) Close()
- func (oc *ObsClient) GetBatchByHash(hash gethcommon.Hash) (*common.ExtBatch, error)
- func (oc *ObsClient) GetBatchByHeight(height *big.Int) (*common.PublicBatch, error)
- func (oc *ObsClient) GetBatchHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
- func (oc *ObsClient) GetBatchHeaderByNumber(number *big.Int) (*common.BatchHeader, error)
- func (oc *ObsClient) GetBatchTransactions(hash gethcommon.Hash) (*common.TransactionListingResponse, error)
- func (oc *ObsClient) GetBatchesListing(pagination *common.QueryPagination) (*common.BatchListingResponse, error)
- func (oc *ObsClient) GetBatchesListingDeprecated(pagination *common.QueryPagination) (*common.BatchListingResponseDeprecated, error)
- func (oc *ObsClient) GetBlockListing(pagination *common.QueryPagination) (*common.BlockListingResponse, error)
- func (oc *ObsClient) GetConfig() (*common.ObscuroNetworkInfo, error)
- func (oc *ObsClient) GetLatestBatch() (*common.BatchHeader, error)
- func (oc *ObsClient) GetLatestRollupHeader() (*common.RollupHeader, error)
- func (oc *ObsClient) GetPublicTxListing(pagination *common.QueryPagination) (*common.TransactionListingResponse, error)
- func (oc *ObsClient) GetRollupBatches(hash gethcommon.Hash) (*common.BatchListingResponse, error)
- func (oc *ObsClient) GetRollupByHash(hash gethcommon.Hash) (*common.PublicRollup, error)
- func (oc *ObsClient) GetRollupBySeqNo(seqNo uint64) (*common.PublicRollup, error)
- func (oc *ObsClient) GetRollupListing(pagination *common.QueryPagination) (*common.RollupListingResponse, error)
- func (oc *ObsClient) GetTotalContractCount() (int, error)
- func (oc *ObsClient) GetTotalTransactionCount() (int, error)
- func (oc *ObsClient) GetTransaction(hash gethcommon.Hash) (*common.PublicTransaction, 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 ¶
func (ac *AuthObsClient) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
func (*AuthObsClient) EstimateGasAndGasPrice ¶
func (ac *AuthObsClient) EstimateGasAndGasPrice(txData types.TxData) types.TxData
func (*AuthObsClient) GetLogs ¶
func (ac *AuthObsClient) GetLogs(ctx context.Context, filterCriteria common.FilterCriteria) ([]*types.Log, error)
func (*AuthObsClient) GetPrivateTransactions ¶ added in v0.25.0
func (ac *AuthObsClient) GetPrivateTransactions(ctx context.Context, address *gethcommon.Address, pagination common.QueryPagination) (types.Receipts, uint64, error)
GetPrivateTransactions retrieves the receipts for the specified account (must be registered on this client), returns requested range of receipts and the total number of receipts for that acc
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 ¶
func (ac *AuthObsClient) SubscribeFilterLogs(ctx context.Context, filterCriteria common.FilterCriteria, ch chan types.Log) (ethereum.Subscription, error)
func (*AuthObsClient) TransactionByHash ¶
func (ac *AuthObsClient) TransactionByHash(ctx context.Context, hash gethcommon.Hash) (tx *types.Transaction, isPending bool, err 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) BatchNumber ¶
BatchNumber returns the height of the head rollup
func (*ObsClient) ChainID ¶
ChainID retrieves the current chain ID for transaction replay protection.
func (*ObsClient) GetBatchByHash ¶ added in v0.24.1
GetBatchByHash returns the batch with the given hash.
func (*ObsClient) GetBatchByHeight ¶ added in v0.24.1
GetBatchByHeight returns the batch with the given height.
func (*ObsClient) GetBatchHeaderByHash ¶ added in v0.24.1
func (oc *ObsClient) GetBatchHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
GetBatchHeaderByHash returns the block header with the given hash.
func (*ObsClient) GetBatchHeaderByNumber ¶ added in v0.24.1
GetBatchHeaderByNumber returns the header of the rollup with the given number
func (*ObsClient) GetBatchTransactions ¶ added in v0.24.1
func (oc *ObsClient) GetBatchTransactions(hash gethcommon.Hash) (*common.TransactionListingResponse, error)
GetBatchTransactions returns a list of public transaction data within a given batch has
func (*ObsClient) GetBatchesListing ¶
func (oc *ObsClient) GetBatchesListing(pagination *common.QueryPagination) (*common.BatchListingResponse, error)
GetBatchesListing returns a list of batches
func (*ObsClient) GetBatchesListingDeprecated ¶ added in v0.24.0
func (oc *ObsClient) GetBatchesListingDeprecated(pagination *common.QueryPagination) (*common.BatchListingResponseDeprecated, error)
GetBatchesListingDeprecated returns a list of batches
func (*ObsClient) GetBlockListing ¶
func (oc *ObsClient) GetBlockListing(pagination *common.QueryPagination) (*common.BlockListingResponse, error)
GetBlockListing returns a list of block headers
func (*ObsClient) GetConfig ¶
func (oc *ObsClient) GetConfig() (*common.ObscuroNetworkInfo, error)
GetConfig returns the network config for obscuro
func (*ObsClient) GetLatestBatch ¶ added in v0.24.0
func (oc *ObsClient) GetLatestBatch() (*common.BatchHeader, error)
GetLatestBatch returns the header of the latest rollup at tip
func (*ObsClient) GetLatestRollupHeader ¶
func (oc *ObsClient) GetLatestRollupHeader() (*common.RollupHeader, error)
GetLatestRollupHeader returns the header of the latest rollup
func (*ObsClient) GetPublicTxListing ¶
func (oc *ObsClient) GetPublicTxListing(pagination *common.QueryPagination) (*common.TransactionListingResponse, error)
GetPublicTxListing returns a list of public transactions
func (*ObsClient) GetRollupBatches ¶ added in v0.24.1
func (oc *ObsClient) GetRollupBatches(hash gethcommon.Hash) (*common.BatchListingResponse, error)
GetRollupBatches returns a list of public batch data within a given rollup hash
func (*ObsClient) GetRollupByHash ¶ added in v0.24.1
func (oc *ObsClient) GetRollupByHash(hash gethcommon.Hash) (*common.PublicRollup, error)
GetRollupByHash returns the public rollup data given its hash
func (*ObsClient) GetRollupBySeqNo ¶ added in v0.24.1
func (oc *ObsClient) GetRollupBySeqNo(seqNo uint64) (*common.PublicRollup, error)
GetRollupBySeqNo returns the batch with the given height.
func (*ObsClient) GetRollupListing ¶ added in v0.24.0
func (oc *ObsClient) GetRollupListing(pagination *common.QueryPagination) (*common.RollupListingResponse, error)
GetRollupListing returns a list of Rollups
func (*ObsClient) GetTotalContractCount ¶
GetTotalContractCount returns the total count of created contracts
func (*ObsClient) GetTotalTransactionCount ¶
GetTotalTransactionCount returns the total count of executed transactions
func (*ObsClient) GetTransaction ¶ added in v0.24.1
func (oc *ObsClient) GetTransaction(hash gethcommon.Hash) (*common.PublicTransaction, error)
GetTransaction returns the transaction.