From 78c9f045cb79ed7587ec8ed889dc2d90e4b486f4 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 13 Sep 2022 13:20:58 +0200 Subject: [PATCH] ipns: best practices for extending IpnsEntry.data https://github.com/ipfs/specs/pull/319#discussion_r967753270 --- IPNS.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/IPNS.md b/IPNS.md index f899571a3..6d178e380 100644 --- a/IPNS.md +++ b/IPNS.md @@ -145,9 +145,12 @@ A logical IPNS record is a data structure containing the following fields: - Extensible record data in [DAG-CBOR](https://ipld.io/specs/codecs/dag-cbor/spec/) format. - The default set of fields can be augmented with additional information. - Implementations are free to leverage this, or simply ignore unexpected fields. - - A good practice is to prefix custom field names with `_` to avoid - collisions with any new mandatory fields that may be added in a future - version of this specification. + - A good practice is to: + - prefix custom field names with `_` to avoid collisions with any new + mandatory fields that may be added in a future version of this + specification. + - and/or create own namespace by setting value to DAG-CBOR: + `IpnsEntry.data[_namespace][customfield]`. IPNS records are stored locally, as well as spread across the network, in order to be accessible to everyone.