-
Notifications
You must be signed in to change notification settings - Fork 10
p2p.json
p2p.json is a configuration file for PeerMessage and some other plugins in the future.
Here are available properties:
-
filter
(required) - a regular expression which is used to validate incoming messages. Before validation messages are json-encoded, so you can use^{}$
regular expression to test for empty object, and^"abc"$
to test for stringabc
. Pass.*
, which means "everything" to disable validation. -
freq_limit
(optional) - count of seconds that must pass between each message of a peer. So, if peer A sends a message and then another one in less thanfreq_limit
seconds, the message won't be handled by other peers, and they will be likely to ban peer A after more invalid messages. -
size_limit
(optional) - maximum message size (in bytes) after json-encoded -
cert_signers
(optional) - if set, when signing messages (see Tutorials ‐ Signatures) you'll also getcert
property, set to{cert_type}/{username}@{authprovider}
, e.g.web/[email protected]
. The object must look like:
{
"auth_provider": ["address1", "address2", ...],
...
}
For example:
{
"zeroid.bit": ["1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz"]
}
-
signed_only
(optional) - if set totrue
, only signed messages (i.e. those which were sent withprivatekey
property) will be handled. If this is a string, only messages signed bysigned_only
will be handled. If this is an array, only messages which are signed by someone insinged_only
list, will be handled.