Repository navigation
Expand file tree
/
Copy pathframe-fields.generated.ts
More file actions
165 lines (161 loc) · 2.47 KB
/
Copy pathframe-fields.generated.ts
File metadata and controls
165 lines (161 loc) · 2.47 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// SPDX-License-Identifier: Apache-2.0
// Generated by scripts/generate-frame-fields.mjs from schema/tclk1-frames.schema.json.
// Do not edit by hand.
export const FRAME_FIELDS = {
"offer": {
"allowed": [
"type",
"from",
"role",
"amount",
"asset",
"lock",
"rails",
"claimByMs",
"refundAfterMs",
"expiresMs",
"paymentKey",
"job",
"nonce",
"id"
],
"required": [
"type",
"from",
"role",
"amount",
"asset",
"lock",
"rails",
"claimByMs",
"refundAfterMs",
"expiresMs",
"nonce",
"id"
]
},
"accept": {
"allowed": [
"type",
"from",
"ref",
"statement",
"contract",
"paymentKey",
"nonce"
],
"required": [
"type",
"from",
"ref",
"statement",
"contract",
"nonce"
]
},
"lock": {
"allowed": [
"type",
"from",
"contract",
"rail",
"ref",
"presig"
],
"required": [
"type",
"from",
"contract",
"rail",
"ref"
]
},
"reveal": {
"allowed": [
"type",
"from",
"contract",
"ref",
"secret"
],
"required": [
"type",
"from",
"contract",
"secret"
]
},
"refund": {
"allowed": [
"type",
"from",
"contract",
"ref",
"reason"
],
"required": [
"type",
"from",
"contract"
]
},
"cancel": {
"allowed": [
"type",
"from",
"contract",
"reason"
],
"required": [
"type",
"from",
"contract"
]
},
"receipt": {
"allowed": [
"type",
"from",
"contract",
"outcome",
"rail",
"ref"
],
"required": [
"type",
"from",
"contract",
"outcome"
]
},
"heartbeat": {
"allowed": [
"type",
"from",
"contract",
"nonce",
"note"
],
"required": [
"type",
"from",
"contract",
"nonce"
]
}
} as const;
export const TCLK1_RAIL_PATTERN = "^(?:[a-z0-9][a-z0-9._-]{0,63}|PaperRail)$";
export const CANONICAL_RAIL_ID_PATTERN = "^[a-z0-9]+(?:-[a-z0-9]+)*$";
export const CANONICAL_RAIL_IDS = [
"btc-htlc",
"evm-htlc",
"flop-htlc",
"memory",
"near-htlc",
"paper",
"x402"
] as const;
export const RAIL_ID_ALIASES = {
"paperrail": "paper",
"paper-rail": "paper"
} as const;