Constructor
new Identity(settingsopt) → {Identity}
Create an instance of an Identity.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object |
<optional> |
Settings for the Identity.
Properties
|
- Source:
Returns:
Instance of the identity.
- Type
- Identity
Methods
sign(data) → {Signature}
Sign a buffer of data using BIP 340: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer | Buffer of data to sign. |
- Source:
Returns:
Resulting signature (64 bytes).
- Type
- Signature
toString() → {String}
Retrieve the bech32m-encoded identity.
- Source:
Returns:
Public identity.
- Type
- String