summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Petukhov <dp@simplexum.com>2021-05-11 13:55:09 +0500
committerDmitry Petukhov <dp@simplexum.com>2021-05-15 11:24:37 +0500
commit6ffc3542f8b8a36b3452f77f67bd8e289b86772a (patch)
tree36e63e0ece7a86b64f8d264c8a946dba45e5ad59
parent2305c5bda6a2a7cbcb948eb6c5838f39db4fe4fc (diff)
downloadbips-6ffc3542f8b8a36b3452f77f67bd8e289b86772a.tar.xz
bip-path-templates: Change chars for ranges from "[]" to "{}"
-rw-r--r--bip-path-templates.mediawiki8
1 files changed, 4 insertions, 4 deletions
diff --git a/bip-path-templates.mediawiki b/bip-path-templates.mediawiki
index 143186e..b828a2e 100644
--- a/bip-path-templates.mediawiki
+++ b/bip-path-templates.mediawiki
@@ -98,7 +98,7 @@ Each section consists of ''index template'', optionally followed by the hardened
Index template can be:
* An integer value from 0 to 2147483647 ("Unit index template")
-* The <nowiki>"["</nowiki> character, followed by a number of ''index ranges'' delimited by commas (","), followed by <nowiki>"]"</nowiki> character ("Ranged index template")
+* The <nowiki>"{"</nowiki> character, followed by a number of ''index ranges'' delimited by commas (","), followed by <nowiki>"}"</nowiki> character ("Ranged index template")
Implementations MAY limit the maximum number of index ranges within the Ranged index template.
@@ -129,7 +129,7 @@ It may be desireable to have fully unambiguous encoding, where for each valid pa
To achieve this, two extra rules are needed:
-* Within Ranged index template, subsequent range MUST NOT start with the value that is equal to the end of the previous range plus one. Thus, <nowiki>"[1,2,3-5]"</nowiki> is not allowed, and should be specified as <nowiki>"[1-5]"</nowiki> instead. This rule might make templates less convenient for frequent edits, though.
+* Within Ranged index template, subsequent range MUST NOT start with the value that is equal to the end of the previous range plus one. Thus, <nowiki>"{1,2,3-5}"</nowiki> is not allowed, and should be specified as <nowiki>"{1-5}"</nowiki> instead. This rule might make templates less convenient for frequent edits, though.
* Only one type of hardened marker should be allowed (either "h" or "'").
@@ -193,7 +193,7 @@ At the moment, three implementations exist:
==Examples==
-'''"m/[44,49,84]'/0'/0'/[0-1]/[0-50000]"''' specifies a full template that matches both external and internal chains of BIP44, BIP49 and BIP84 paths, with a constraint that the address index cannot be larger than 50000
+'''"m/{44,49,84}'/0'/0'/{0-1}/{0-50000}"''' specifies a full template that matches both external and internal chains of BIP44, BIP49 and BIP84 paths, with a constraint that the address index cannot be larger than 50000
Its representation after parsing can be (using Python syntax, ignoring full/partial distinction):
[[(2147483692, 2147483692), (2147483697, 2147483697), (2147483732, 2147483732)),
@@ -202,7 +202,7 @@ Its representation after parsing can be (using Python syntax, ignoring full/part
[(0, 1)],
[(0, 50000)]]
-'''"[0-2,33,123]/*"''' specifies a partial template that matches non-hardened values 0, 1, 2, 33, 123 as first index, and any non-hardened value at second index
+'''"{0-2,33,123}/*"''' specifies a partial template that matches non-hardened values 0, 1, 2, 33, 123 as first index, and any non-hardened value at second index
Its representation after parsing can be:
[[(0, 2), (33, 33), (123, 123)], [(0, 2147483647)]]