From 919e9183db7008784bee3f07b5e4702698601e91 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Mon, 8 Jul 2019 10:14:27 +0200 Subject: [PATCH] docs: add validate function to readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index c333d797bc..f6074de8ff 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,19 @@ class PubsubImplementation extends Pubsub { } ``` +### Validate + +Validates the signature of a message. + +#### `pubsub.validate(message, callback)` + +##### Parameters + +| Name | Type | Description | +|------|------|-------------| +| message | `Message` | a pubsub message | +| callback | `function(Error, Boolean)` | calls back with true if the message is valid | + ## Implementations using this base protocol You can use the following implementations as examples for building your own pubsub implementation.