Documentation ¶
Index ¶
- type DummyAPI
- func (api *DummyAPI) AddViewingKey([]byte, []byte) error
- func (api *DummyAPI) Call(_ context.Context, encryptedParams common.EncryptedParamsCall) (string, error)
- func (api *DummyAPI) ChainId() (*hexutil.Big, error)
- func (api *DummyAPI) EstimateGas(_ context.Context, encryptedParams common.EncryptedParamsEstimateGas, ...) (*string, error)
- func (api *DummyAPI) GetBalance(_ context.Context, encryptedParams common.EncryptedParamsGetBalance) (string, error)
- func (api *DummyAPI) GetLogs(_ context.Context, encryptedParams common.EncryptedParamsGetLogs) (*string, error)
- func (api *DummyAPI) GetTransactionByHash(_ context.Context, encryptedParams common.EncryptedParamsGetTxByHash) (*string, error)
- func (api *DummyAPI) GetTransactionCount(_ context.Context, encryptedParams common.EncryptedParamsGetTxCount) (string, error)
- func (api *DummyAPI) GetTransactionReceipt(_ context.Context, encryptedParams common.EncryptedParamsGetTxReceipt) (*string, error)
- func (api *DummyAPI) Logs(ctx context.Context, encryptedParams common.EncryptedParamsLogSubscription) (*rpc.Subscription, error)
- func (api *DummyAPI) SendRawTransaction(_ context.Context, encryptedParams common.EncryptedParamsSendRawTx) (string, error)
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) EstimateGas ¶
func (api *DummyAPI) EstimateGas(_ context.Context, encryptedParams common.EncryptedParamsEstimateGas, _ *rpc.BlockNumberOrHash) (*string, error)
func (*DummyAPI) GetBalance ¶
func (*DummyAPI) GetTransactionByHash ¶
func (*DummyAPI) GetTransactionCount ¶
func (*DummyAPI) GetTransactionReceipt ¶
func (*DummyAPI) Logs ¶
func (api *DummyAPI) Logs(ctx context.Context, encryptedParams common.EncryptedParamsLogSubscription) (*rpc.Subscription, error)
func (*DummyAPI) SendRawTransaction ¶
Click to show internal directories.
Click to hide internal directories.