test

package
v0.23.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyAPI

type DummyAPI struct {
	// contains filtered or unexported fields
}

DummyAPI provides dummies for the RPC operations defined in the `eth_` namespace. For each sensitive RPC operation, it decrypts the parameters using the enclave's private key, then echoes them back to the caller encrypted with the viewing key set using the `setViewingKey` method, mimicking the privacy behaviour of the host.

func NewDummyAPI

func NewDummyAPI() *DummyAPI

func (*DummyAPI) Call

func (*DummyAPI) ChainId

func (api *DummyAPI) ChainId() (*hexutil.Big, error)

func (*DummyAPI) EstimateGas

func (*DummyAPI) GetBalance

func (api *DummyAPI) GetBalance(_ context.Context, encryptedParams common.EncryptedParamsGetBalance) (*responses.EnclaveResponse, error)

func (*DummyAPI) GetLogs

func (api *DummyAPI) GetLogs(_ context.Context, encryptedParams common.EncryptedParamsGetLogs) (*responses.EnclaveResponse, error)

func (*DummyAPI) GetStorageAt

func (api *DummyAPI) GetStorageAt(_ context.Context, encryptedParams common.EncryptedParamsSendRawTx) (*responses.EnclaveResponse, error)

func (*DummyAPI) GetTransactionByHash

func (api *DummyAPI) GetTransactionByHash(_ context.Context, encryptedParams common.EncryptedParamsGetTxByHash) (*responses.EnclaveResponse, error)

func (*DummyAPI) GetTransactionCount

func (api *DummyAPI) GetTransactionCount(_ context.Context, encryptedParams common.EncryptedParamsGetTxCount) (*responses.EnclaveResponse, error)

func (*DummyAPI) GetTransactionReceipt

func (api *DummyAPI) GetTransactionReceipt(_ context.Context, encryptedParams common.EncryptedParamsGetTxReceipt) (*responses.EnclaveResponse, error)

func (*DummyAPI) Logs

func (api *DummyAPI) Logs(ctx context.Context, encryptedParams common.EncryptedParamsLogSubscription) (*rpc.Subscription, error)

func (*DummyAPI) SendRawTransaction

func (api *DummyAPI) SendRawTransaction(_ context.Context, encryptedParams common.EncryptedParamsSendRawTx) (*responses.EnclaveResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL