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) 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) ChainID() (*big.Int, error)
- func (oc *ObsClient) Close()
- func (oc *ObsClient) Health() (bool, error)
- func (oc *ObsClient) RollupHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
- func (oc *ObsClient) RollupHeaderByNumber(number *big.Int) (*common.BatchHeader, error)
- func (oc *ObsClient) RollupNumber() (uint64, 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 (*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) 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) ChainID ¶
ChainID retrieves the current chain ID for transaction replay protection.
func (*ObsClient) RollupHeaderByHash ¶ added in v0.7.0
func (oc *ObsClient) RollupHeaderByHash(hash gethcommon.Hash) (*common.BatchHeader, error)
RollupHeaderByHash returns the block header with the given hash.
func (*ObsClient) RollupHeaderByNumber ¶ added in v0.7.0
RollupHeaderByNumber returns the header of the rollup with the given number
func (*ObsClient) RollupNumber ¶ added in v0.7.0
RollupNumber returns the height of the head rollup