test

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: AGPL-3.0 Imports: 31 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) AddViewingKey

func (api *DummyAPI) AddViewingKey([]byte, []byte) error

func (*DummyAPI) Call

func (api *DummyAPI) Call(_ context.Context, encryptedParams common.EncryptedParamsCall) (string, error)

func (*DummyAPI) ChainId

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

func (*DummyAPI) EstimateGas

func (api *DummyAPI) EstimateGas(_ context.Context, encryptedParams common.EncryptedParamsEstimateGas, _ *rpc.BlockNumberOrHash) (*string, error)

func (*DummyAPI) GetBalance

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

func (*DummyAPI) GetLogs added in v0.5.0

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

func (*DummyAPI) GetTransactionByHash

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

func (*DummyAPI) GetTransactionCount

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

func (*DummyAPI) GetTransactionReceipt

func (api *DummyAPI) GetTransactionReceipt(_ context.Context, encryptedParams common.EncryptedParamsGetTxReceipt) (*string, 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) (string, error)

Jump to

Keyboard shortcuts

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