|
@@ -119,7 +119,15 @@ Layer-1 account checkum must be the following number:
|
|
|
|
|
|
These strings are used to denote an account names and conform to the following rules.
|
|
|
- By definition, they must **not** start with a digit.
|
|
|
-- String length must between 3..64 inclusive.
|
|
|
+
|
|
|
+### Account Name validation
|
|
|
+
|
|
|
+Account names in PascalCoin must be 3..64 characters in length. This validation rule is applied at the processing-tier level and not enforced by the EPASA grammar where a Pascal64 string is unbounded in size.
|
|
|
+
|
|
|
+### New Account validation
|
|
|
+
|
|
|
+EPASA is used to encode addresses for new accounts. An E-PASA of the form
|
|
|
+"@[1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2]" is used to denote a "Pay to Key" style transaction where payments are sent to a "new account" containing the key encoded in the payload.
|
|
|
|
|
|
#### Extended Checksum
|
|
|
|
|
@@ -323,6 +331,8 @@ The below cases are only example E-PASA without valid checksums.
|
|
|
<th>Description</th>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
+ <tr><td>@[1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2]</td><td>Pay To Key style transaction with Base58 encoded public key <b>without</b> checksum protection</td></tr>
|
|
|
+ <tr><td>@[1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2]:a054</td><td>Pay To Key style transaction with Base58 encoded public key <b>with</b> checksum protection</td></tr>
|
|
|
<tr><td>77-44[1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2]</td><td>Account 77-44 with unencrypted (public) Base58 payload (bitcoin address) <b>without</b> checksum protection</td></tr>
|
|
|
<tr><td>77-44[1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2]:10cb</td><td>Checksum protected</td></tr>
|
|
|
<tr><td>77-44(1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2):7ba2</td><td>ECIES encrypted using <b>recipients</b> public key</td></tr>
|
|
@@ -378,7 +388,7 @@ For Layer-2 applications the ability for a receiver to auto-decode the E-PASA vi
|
|
|
|
|
|
The following regex parses an e-pasa:
|
|
|
```
|
|
|
-((?<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edChecksumDelim>:)(?<ExtendedChecksum>[0-9a-f]{2}[0-9a-f]{2}))?
|
|
|
```
|
|
|
|
|
|
After matching with the above regex, the named groups need to be extracted and validated as the below snippet shows
|