Documentation ¶
Index ¶
- Constants
- func BytesToPrivateKey(keyBytes []byte) (*ecies.PrivateKey, error)
- func CreateEncClient(conn *gethrpc.Client, addressBytes []byte, privateKeyBytes []byte, ...) (*rpc.EncRPCClient, error)
- func PrivateKeyToCompressedPubKey(prvKey *ecies.PrivateKey) []byte
- type AccountDB
- type Config
- type RPCRequest
- type UserDB
Constants ¶
View Source
const ( Localhost = "127.0.0.1" JSONKeyAddress = "address" JSONKeyID = "id" JSONKeyMethod = "method" JSONKeyParams = "params" JSONKeyRPCVersion = "jsonrpc" JSONKeySignature = "signature" JSONKeyType = "type" JSONKeyEncryptionToken = "encryptionToken" JSONKeyFormats = "formats" )
View Source
const ( PathStatic = "/static/" PathReady = "/ready/" PathJoin = "/join/" PathGetMessage = "/getmessage/" PathAuthenticate = "/authenticate/" PathQuery = "/query/" PathRevoke = "/revoke/" PathHealth = "/health/" PathNetworkHealth = "/network-health/" PathNetworkConfig = "/network-config/" WSProtocol = "ws://" HTTPProtocol = "http://" EncryptedTokenQueryParameter = "token" AddressQueryParameter = "a" MessageUserIDLen = 40 MessageUserIDLenWithPrefix = 42 EthereumAddressLen = 42 SuccessMsg = "success" APIVersion1 = "/v1" PathVersion = "/version/" DeduplicationBufferSize = 20 DefaultGatewayAuthMessageType = "EIP712" )
Variables ¶
This section is empty.
Functions ¶
func BytesToPrivateKey ¶
func BytesToPrivateKey(keyBytes []byte) (*ecies.PrivateKey, error)
BytesToPrivateKey converts []bytes to *ecies.PrivateKey
func CreateEncClient ¶
func CreateEncClient( conn *gethrpc.Client, addressBytes []byte, privateKeyBytes []byte, signature []byte, signatureType viewingkey.SignatureType, logger gethlog.Logger, ) (*rpc.EncRPCClient, error)
func PrivateKeyToCompressedPubKey ¶
func PrivateKeyToCompressedPubKey(prvKey *ecies.PrivateKey) []byte
PrivateKeyToCompressedPubKey converts *ecies.PrivateKey to compressed PubKey ([]byte with length 33)
Types ¶
type Config ¶ added in v0.24.0
type Config struct { WalletExtensionHost string WalletExtensionPortHTTP int WalletExtensionPortWS int NodeRPCHTTPAddress string NodeRPCWebsocketAddress string LogPath string DBPathOverride string // Overrides the database file location. Used in tests. VerboseFlag bool DBType string DBConnectionURL string TenChainID int StoreIncomingTxs bool RateLimitUserComputeTime time.Duration RateLimitWindow time.Duration RateLimitMaxConcurrentRequests int }
Config contains the configuration required by the WalletExtension.
type RPCRequest ¶
type RPCRequest struct { ID json.RawMessage Method string Params []interface{} }
func (*RPCRequest) Clone ¶
func (r *RPCRequest) Clone() *RPCRequest
Clone returns a new instance of the *RPCRequest
Click to show internal directories.
Click to hide internal directories.