-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathInterledgerTypes.asn
51 lines (44 loc) · 1.36 KB
/
InterledgerTypes.asn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
InterledgerTypes
DEFINITIONS
AUTOMATIC TAGS ::=
BEGIN
IMPORTS
UInt64
FROM GenericTypes
;
-- Readable names for special characters that may appear in ILP addresses
hyphen IA5String ::= "-"
period IA5String ::= "."
underscore IA5String ::= "_"
tilde IA5String ::= "~"
-- A standard interledger address
Address ::= IA5String
(FROM
( hyphen
| period
| "0".."9"
| "A".."Z"
| underscore
| "a".."z"
| tilde )
)
(SIZE (0..1023))
-- --------------------------------------------------------------------------
-- We are using ISO 8601 and not POSIX time, because ISO 8601 increases
-- monotonically and never "travels back in time" which could cause issues
-- with transfer expiries. It is also one of the most widely supported and most
-- well-defined date formats as of 2017.
--
-- Our actual wire format leaves out any fixed/redundant characters, such as
-- hyphens, colons, the "T" separator, the decimal period and the "Z" timezone
-- indicator.
--
-- The wire format is four digits for the year, two digits for the month,
-- two digits for the day, two digits for the hour, two digits for the minutes,
-- two digits for the seconds and three digits for the milliseconds.
--
-- I.e. the wire format is: 'YYYYMMDDHHmmSSfff'
--
-- All times MUST be expressed in UTC time.
Timestamp ::= PrintableString (SIZE(17))
END