Class: Signer
signer.Signer
General signing interface, can be used for in memory signing, RPC singing, external wallet, HSM, etc.
Hierarchy
Signer
Constructors
constructor
new Signer()
Methods
createKey
Abstract
createKey(accountId
, networkId?
): Promise
<PublicKey
>
Creates new key and returns public key.
Parameters
Name | Type |
---|---|
accountId | string |
networkId? | string |
Returns
Promise
<PublicKey
>
Defined in
getPublicKey
Abstract
getPublicKey(accountId?
, networkId?
): Promise
<PublicKey
>
Returns public key for given account / network.
Parameters
Name | Type | Description |
---|---|---|
accountId? | string | accountId to retrieve from. |
networkId? | string | The targeted network. (ex. default, betanet, etc…) |
Returns
Promise
<PublicKey
>
Defined in
signMessage
Abstract
signMessage(message
, accountId?
, networkId?
): Promise
<Signature
>
Signs given message, by first hashing with sha256.
Parameters
Name | Type | Description |
---|---|---|
message | Uint8Array | message to sign. |
accountId? | string | accountId to use for signing. |
networkId? | string | The targeted network. (ex. default, betanet, etc…) |
Returns
Promise
<Signature
>