Methods
setPublicKey(publicKey)
Set the public publicKey.
This is the Ed25519 public key. It has to be provided as a buffer.
Parameters:
| Name | Type | Description | 
|---|---|---|
| publicKey | Buffer | Public Ed25519 publicKey | 
- Source:
setSignature(signature)
Set the signature.
Instead of using the private key to sign using the sign() method, we can also generate the signature elsewhere and pass it in.
Parameters:
| Name | Type | Description | 
|---|---|---|
| signature | Buffer | 64-byte signature. | 
- Source:
sign(message, privateKey)
Sign a message.
This method will take a message and an Ed25519 private key and store a corresponding signature in this fulfillment.
Parameters:
| Name | Type | Description | 
|---|---|---|
| message | Buffer | Message to sign. | 
| privateKey | String | Ed25519 private key. | 
- Source:
validate(message) → {Boolean}
Verify the signature of this Ed25519 fulfillment.
The signature of this Ed25519 fulfillment is verified against the provided message and public key.
Parameters:
| Name | Type | Description | 
|---|---|---|
| message | Buffer | Message to validate against. | 
- Source:
Returns:
Whether this fulfillment is valid.
- Type
- Boolean
