Class: PrivateKeyProvider
Class that represents a secp256k1 key provider.
Hierarchy
PrivateKeyProvider
Constructors
constructor
• new PrivateKeyProvider(): PrivateKeyProvider
Returns
Properties
keyProviderStatus
• Protected
keyProviderStatus: PrivateKeyProviderStatus
= PrivateKeyProviderStatus.NotConnected
Defined in
packages/core/src/signers/privatekey.ts:53
observerManager
• Private
observerManager: ObserverManager
<PrivateKeyProviderStatus
>
Defined in
packages/core/src/signers/privatekey.ts:50
Accessors
status
• get
status(): PrivateKeyProviderStatus
Returns
Defined in
packages/core/src/signers/privatekey.ts:75
Methods
addStatusListener
▸ addStatusListener(observer
): void
Parameters
Name | Type |
---|---|
observer | Observer <PrivateKeyProviderStatus > |
Returns
void
Defined in
packages/core/src/signers/privatekey.ts:56
assertConnected
▸ assertConnected(): void
Returns
void
Defined in
packages/core/src/signers/privatekey.ts:69
connect
▸ connect(): Promise
<void
>
Connects to the Secp256k1 key provider.
Returns
Promise
<void
>
Defined in
packages/core/src/signers/privatekey.ts:82
disconnect
▸ disconnect(): Promise
<void
>
Disconnects from the Secp256k1 key provider.
Returns
Promise
<void
>
Defined in
packages/core/src/signers/privatekey.ts:87
getPrivateKey
▸ getPrivateKey(): Promise
<PrivateKey
>
Gets the Secp256k1 private key. If the key provider is not connected this function should throw an error.
Returns
Promise
<PrivateKey
>
Defined in
packages/core/src/signers/privatekey.ts:93
removeStatusListener
▸ removeStatusListener(observer
): void
Parameters
Name | Type |
---|---|
observer | Observer <PrivateKeyProviderStatus > |
Returns
void
Defined in
packages/core/src/signers/privatekey.ts:60
updateStatus
▸ updateStatus(newStatus
): void
Parameters
Name | Type |
---|---|
newStatus | PrivateKeyProviderStatus |
Returns
void