Skip to content

Commit 6ffc354

Browse files
committed
bip-path-templates: Change chars for ranges from "[]" to "{}"
1 parent 2305c5b commit 6ffc354

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bip-path-templates.mediawiki

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Each section consists of ''index template'', optionally followed by the hardened
9898
Index template can be:
9999

100100
* An integer value from 0 to 2147483647 ("Unit index template")
101-
* The <nowiki>"["</nowiki> character, followed by a number of ''index ranges'' delimited by commas (","), followed by <nowiki>"]"</nowiki> character ("Ranged index template")
101+
* The <nowiki>"{"</nowiki> character, followed by a number of ''index ranges'' delimited by commas (","), followed by <nowiki>"}"</nowiki> character ("Ranged index template")
102102
103103
Implementations MAY limit the maximum number of index ranges within the Ranged index template.
104104

@@ -129,7 +129,7 @@ It may be desireable to have fully unambiguous encoding, where for each valid pa
129129

130130
To achieve this, two extra rules are needed:
131131

132-
* 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.
132+
* 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.
133133
134134
* Only one type of hardened marker should be allowed (either "h" or "'").
135135
@@ -193,7 +193,7 @@ At the moment, three implementations exist:
193193
194194
==Examples==
195195

196-
'''"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
196+
'''"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
197197

198198
Its representation after parsing can be (using Python syntax, ignoring full/partial distinction):
199199
[[(2147483692, 2147483692), (2147483697, 2147483697), (2147483732, 2147483732)),
@@ -202,7 +202,7 @@ Its representation after parsing can be (using Python syntax, ignoring full/part
202202
[(0, 1)],
203203
[(0, 50000)]]
204204

205-
'''"[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
205+
'''"{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
206206

207207
Its representation after parsing can be:
208208
[[(0, 2), (33, 33), (123, 123)], [(0, 2147483647)]]

0 commit comments

Comments
 (0)