1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-03-04 03:03:53 +01:00

bip-path-templates: describe Wildcard index range

This commit is contained in:
Dmitry Petukhov 2021-05-11 17:10:09 +05:00
parent 6ffc3542f8
commit c90c76bc1b
No known key found for this signature in database
GPG key ID: 2301D26BDC15160D

View file

@ -98,6 +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")
* A single "*" character, which denotes any value from 0 to 2147483647 ("Wildcard 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.
@ -113,11 +114,16 @@ For Non-unit range, value on the left side of the "-" character is the range_sta
For Unit range, we say that range_start is equal to range_end, even though there is no start/end in the Unit range.
Unit index template contains a single index range, which is the Unit range
Wildcard index template contains a single index range, and we say that its range_start is set to 0 and its range_end is set to 2147483647
Constraints:
# To avoid ambiguity, whitespace MUST NOT appear within the path template.
# Commas within the Ranged index template MUST only appear in between index ranges.
# To avoid ambiguity, an index range that matches a single value MUST be specified as Unit range.
# To avoid ambiguity, an index template that matches any value from 0 to 2147483647 MUST be specified as Wildcard index template
# For Non-unit range, range_end MUST be larger than range_start.
# If there is more than one index range within the Ranged index template, range_start of the second and any subsequent range MUST be larger than the range_end of the preceeding range.
# To avoid ambiguity, all representations of integer values larger than 0 MUST NOT start with character "0" (no leading zeroes allowed).