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
KeyPairIdentity
Constructors
new EthereumKeyPairIdentity()
new EthereumKeyPairIdentity(
privateKey
,address
?):EthereumKeyPairIdentity
Parameters
privateKey
string
address?
string
Returns
Overrides
KeyPairIdentity.constructor
Properties
privateKey
readonly
privateKey:Uint8Array
Inherited from
KeyPairIdentity.privateKey
publicKey
readonly
publicKey:UserIDRaw
Inherited from
KeyPairIdentity.publicKey
publicKeyString
readonly
publicKeyString:UserID
Inherited from
KeyPairIdentity.publicKeyString
Methods
assertKeyPairIsValid()
assertKeyPairIsValid():
void
Should throw if the publicKey and privateKey don't match each other
Returns
void
Overrides
KeyPairIdentity.assertKeyPairIsValid
createMessageSignature()
createMessageSignature(
payload
):Promise
<Uint8Array
<ArrayBufferLike
>>
Parameters
payload
Uint8Array
Returns
Promise
<Uint8Array
<ArrayBufferLike
>>
Overrides
KeyPairIdentity.createMessageSignature
getExpectedPrivateKeyLength()
getExpectedPrivateKeyLength():
number
Returns
number
Overrides
KeyPairIdentity.getExpectedPrivateKeyLength
getExpectedPublicKeyLength()
getExpectedPublicKeyLength():
number
Returns
number
Overrides
KeyPairIdentity.getExpectedPublicKeyLength
getPrivateKey()
getPrivateKey():
Promise
<Uint8Array
<ArrayBufferLike
>>
Returns
Promise
<Uint8Array
<ArrayBufferLike
>>
Inherited from
KeyPairIdentity.getPrivateKey
getSignatureType()
getSignatureType():
SignatureType
Returns
Overrides
KeyPairIdentity.getSignatureType
getTransactionSigner()
getTransactionSigner(
rpcProviderSource
):Promise
<SignerWithProvider
>
Parameters
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
fromConfig()
static
fromConfig(config
):EthereumKeyPairIdentity
Parameters
config
Pick
<StrictStreamrClientConfig
, "auth"
>
Returns
generate()
static
generate():EthereumKeyPairIdentity
Returns
getKeyPairFromConfig()
static
getKeyPairFromConfig(config
):KeyPairIdentityConfig
Parameters
config
Pick
<StrictStreamrClientConfig
, "auth"
>
Returns
Inherited from
KeyPairIdentity.getKeyPairFromConfig