rpc

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

README

All communication to and from Ten is encrypted. This package handles the encryption logic between end users communicating via RPC with the Ten enclave.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTx

func ExtractTx(txBinary string) (*common.L2Tx, error)

ExtractTx returns the common.L2Tx from the params of an eth_sendRawTransaction request.

func GetSender

func GetSender(tx *common.L2Tx) (gethcommon.Address, error)

GetSender returns the address whose viewing key should be used to encrypt the response, given a transaction.

Types

type EncryptionManager

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

EncryptionManager manages the decryption and encryption of enclave comms.

func NewEncryptionManager

func NewEncryptionManager(enclavePrivateKeyECIES *ecies.PrivateKey) EncryptionManager

func (*EncryptionManager) DecryptBytes

func (rpc *EncryptionManager) DecryptBytes(encryptedBytes []byte) ([]byte, error)

DecryptBytes decrypts the bytes with the enclave's private key.

Jump to

Keyboard shortcuts

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