Skip to main content

Class: EthereumKeyPairIdentity

An Identity that derives an Ethereum address from a secp256k1 private key and uses that as the UserID instead of the actual public key.

Extends​

Constructors​

new EthereumKeyPairIdentity()​

new EthereumKeyPairIdentity(publicKey, privateKey): EthereumKeyPairIdentity

Parameters​

publicKey​

Uint8Array

privateKey​

Uint8Array

Returns​

EthereumKeyPairIdentity

Inherited from​

KeyPairIdentity.constructor

Methods​

assertValidKeyPair()​

assertValidKeyPair(): void

Returns​

void

Overrides​

KeyPairIdentity.assertValidKeyPair


createMessageSignature()​

createMessageSignature(payload): Promise<Uint8Array<ArrayBufferLike>>

Parameters​

payload​

Uint8Array

Returns​

Promise<Uint8Array<ArrayBufferLike>>

Overrides​

KeyPairIdentity.createMessageSignature


getPrivateKey()​

getPrivateKey(): Promise<Uint8Array<ArrayBufferLike>>

Returns​

Promise<Uint8Array<ArrayBufferLike>>

Inherited from​

KeyPairIdentity.getPrivateKey


getSignatureType()​

getSignatureType(): SignatureType

Returns​

SignatureType

Overrides​

KeyPairIdentity.getSignatureType


getTransactionSigner()​

getTransactionSigner(rpcProviderSource): Promise<SignerWithProvider>

Parameters​

rpcProviderSource​

RpcProviderSource

Returns​

Promise<SignerWithProvider>

Overrides​

KeyPairIdentity.getTransactionSigner


getUserId()​

getUserId(): Promise<UserID>

Returns​

Promise<UserID>

Inherited from​

KeyPairIdentity.getUserId


getUserIdRaw()​

getUserIdRaw(): Promise<UserIDRaw>

Returns​

Promise<UserIDRaw>

Inherited from​

KeyPairIdentity.getUserIdRaw


fromPrivateKey()​

static fromPrivateKey(privateKey, address?): EthereumKeyPairIdentity

Parameters​

privateKey​

string

address?​

string

Returns​

EthereumKeyPairIdentity


generate()​

static generate(): EthereumKeyPairIdentity

Returns​

EthereumKeyPairIdentity