1
+ < html >
2
+ < head >
3
+ < title > Token Test Harness</ title >
4
+ < link href ='https://fonts.googleapis.com/css?family=Work Sans ' rel ='stylesheet '>
5
+ < style >
6
+ body {font-family : "Work Sans" , sans-serif;padding : 20px ;background : # fafafa ;}
7
+ h1 {font-weight : bold;}
8
+ input , button {padding : 6px ;margin-bottom : 8px ;}
9
+ button {font-weight : bold;font-family : "Work Sans" , sans-serif;}
10
+ td {vertical-align : middle;}
11
+ </ style >
12
+ < script src ='https://unpkg.com/xrpl@2.7.0/build/xrpl-latest-min.js '> </ script >
13
+ < script src ='ripplex2-send-currency.js '> </ script >
14
+ < script src ='ripplex3a-create-offers.js '> </ script >
15
+ < script src ='ripplex3b-NameFieldSupport.js '> </ script >
16
+ < script >
17
+ if ( typeof module !== "undefined" ) {
18
+ const xrpl = require ( 'xrpl' )
19
+ }
20
+ </ script >
21
+ </ head >
22
+ <!-- ************************************************************** -->
23
+ <!-- ********************** The Form ****************************** -->
24
+ <!-- ************************************************************** -->
25
+ < body >
26
+ < h1 > Token Test Harness</ h1 >
27
+ < form id ="theForm ">
28
+ Choose your ledger instance:
29
+
30
+ < input type ="radio " id ="tn " name ="server "
31
+ value ="wss://s.altnet.rippletest.net:51233 " checked >
32
+ < label for ="testnet "> Testnet</ label >
33
+
34
+ < input type ="radio " id ="dn " name ="server "
35
+ value ="wss://s.devnet.rippletest.net:51233 ">
36
+ < label for ="devnet "> Devnet</ label >
37
+ < br /> < br />
38
+ < button type ="button " onClick ="getAccountsFromSeeds() "> Get Accounts From Seeds</ button >
39
+ < br />
40
+ < textarea id ="seeds " cols ="55 " rows = "4 "> </ textarea >
41
+ < table >
42
+ < tr valign ="top ">
43
+ < td >
44
+ < table >
45
+ < tr valign ="top ">
46
+ < td >
47
+ < button type ="button " onClick ="getAccount('standby') "> Get New Account</ button >
48
+ < table >
49
+ < tr valign ="top ">
50
+ < td align ="right ">
51
+ Account Name
52
+ </ td >
53
+ < td >
54
+ < input type ="text " id ="standbyNameField " size ="40 "> </ input >
55
+ < br >
56
+ </ td >
57
+ </ tr >
58
+ < tr valign ="top ">
59
+ < td align ="right ">
60
+ Account
61
+ </ td >
62
+ < td >
63
+ < input type ="text " id ="standbyAccountField " size ="40 "> </ input >
64
+ < br >
65
+ </ td >
66
+ </ tr >
67
+ < tr >
68
+ < td align ="right ">
69
+ Seed
70
+ </ td >
71
+ < td >
72
+ < input type ="text " id ="standbySeedField " size ="40 "> </ input >
73
+ < br >
74
+ </ td >
75
+ </ tr >
76
+ < tr >
77
+ < td align ="right ">
78
+ XRP Balance
79
+ </ td >
80
+ < td >
81
+ < input type ="text " id ="standbyBalanceField " size ="40 "> </ input >
82
+ < br >
83
+ </ td >
84
+ </ tr >
85
+ < tr >
86
+ < td align ="right ">
87
+ Amount
88
+ </ td >
89
+ < td >
90
+ < input type ="text " id ="standbyAmountField " size ="40 "> </ input >
91
+ < br >
92
+ </ td >
93
+ </ tr >
94
+ < tr >
95
+ < td align ="right ">
96
+ Destination
97
+ </ td >
98
+ < td >
99
+ < input type ="text " id ="standbyDestinationField " size ="40 "> </ input >
100
+ < br >
101
+ </ td >
102
+ </ tr >
103
+ < tr valign ="top ">
104
+ < td > < button type ="button " onClick ="configureAccount('standby',document.querySelector('#standbyDefault').checked) "> Configure Account</ button > </ td >
105
+ < td >
106
+ < input type ="checkbox " id ="standbyDefault " checked ="false "/>
107
+ < label for ="standbyDefault "> Allow Rippling</ label >
108
+ </ td >
109
+ </ tr >
110
+ < tr >
111
+ < td align ="right ">
112
+ Currency
113
+ </ td >
114
+ < td >
115
+ < input type ="text " id ="standbyCurrencyField " size ="40 " value ="USD "> </ input >
116
+ </ td >
117
+ </ tr >
118
+ < tr >
119
+ < td align ="right ">
120
+ Offer Sequence
121
+ </ td >
122
+ < td >
123
+ < input type ="text " id ="standbyOfferSequenceField " size ="10 "> </ input >
124
+ </ td >
125
+ </ tr >
126
+ </ td >
127
+ </ tr >
128
+ </ table >
129
+ </ td >
130
+ </ tr >
131
+ < tr >
132
+ < td >
133
+ < table >
134
+ < tr >
135
+ < td >
136
+ Taker Pays:< br />
137
+ Currency: < input type ="text " id ="standbyTakerPaysCurrencyField " size ="10 "> </ input > < br />
138
+ Issuer: < input type ="text " id ="standbyTakerPaysIssuerField " size ="35 "> </ input > < br />
139
+ Value: < input type ="text " id ="standbyTakerPaysValueField " size ="10 "> </ input >
140
+ </ td >
141
+ < td >
142
+ Taker Gets:< br />
143
+ Currency: < input type ="text " id ="standbyTakerGetsCurrencyField " size ="10 "> </ input > < br />
144
+ Issuer: < input type ="text " id ="standbyTakerGetsIssuerField " size ="35 "> </ input > < br />
145
+ Value: < input type ="text " id ="standbyTakerGetsValueField " size ="10 "> </ input > < br />
146
+ </ td >
147
+ </ tr >
148
+ </ table >
149
+ < p align ="left ">
150
+ < textarea id ="standbyResultField " cols ="80 " rows ="20 " > </ textarea >
151
+ </ p >
152
+ </ td >
153
+ </ tr >
154
+ </ table >
155
+ </ td >
156
+ <!-- Standby Buttons, Column 2 -->
157
+ < td >
158
+ < table >
159
+ < tr valign ="top ">
160
+ < td align ="center " valign ="top ">
161
+ < button type ="button " onClick ="sendXRP() "> Send XRP></ button >
162
+ < br />
163
+ < button type ="button " onClick ="createTrustline() "> Create Trust Line</ button >
164
+ < br />
165
+ < button type ="button " onClick ="getTrustLines() "> Get Trust Lines</ button >
166
+ < br />
167
+ < button type ="button " onClick ="sendCurrency() "> Send Currency</ button >
168
+ < br />
169
+ < button type ="button " onClick ="getBalances() "> Get Balances</ button >
170
+ < br /> < br />
171
+ < button type ="button " onClick ="createOffer() "> Create Offer</ button >
172
+ < br />
173
+ < button type ="button " onClick ="getOffers() "> Get Offers</ button >
174
+ < br />
175
+ < button type ="button " onClick ="cancelOffer() "> Cancel Offer</ button >
176
+ </ td >
177
+ </ tr >
178
+ </ table >
179
+ </ td >
180
+ <!-- Operational Buttons, Column 3 -->
181
+ < td >
182
+ < table >
183
+ < tr valign ="bottom ">
184
+ < td align ="center " valign ="middle ">
185
+ < button type ="button " onClick ="oPsendXRP() "> < Send XRP</ button >
186
+ < br />
187
+ < button type ="button " onClick ="oPcreateTrustline() "> Create Trust Line</ button >
188
+ < br />
189
+ < button type ="button " onClick ="oPgetTrustLines() "> Get Trust Lines</ button >
190
+ < br />
191
+ < button type ="button " onClick ="oPsendCurrency() "> Send Currency</ button >
192
+ < br />
193
+ < button type ="button " onClick ="getBalances() "> Get Balances</ button >
194
+ < br /> < br />
195
+ < button type ="button " onClick ="oPcreateOffer() "> Create Offer</ button >
196
+ < br />
197
+ < button type ="button " onClick ="oPgetOffers() "> Get Offers</ button >
198
+ < br />
199
+ < button type ="button " onClick ="oPcancelOffer() "> Cancel Offer</ button >
200
+ </ td >
201
+ </ tr >
202
+ </ table >
203
+ </ td >
204
+
205
+ <!-- Operational fields, Column 4 -->
206
+
207
+ < td valign ="top " align ="right ">
208
+ < button type ="button " onClick ="getAccount('operational') "> Get New Account</ button >
209
+ < table >
210
+ < tr valign ="top ">
211
+ < td align ="left ">
212
+ Account Name
213
+ </ td >
214
+ < td align ="left ">
215
+ < input type ="text " id ="operationalNameField " size ="40 "> </ input >
216
+ < br >
217
+ </ td >
218
+ </ tr >
219
+ < tr valign ="top ">
220
+ < td align ="right ">
221
+ Account
222
+ </ td >
223
+ < td >
224
+ < input type ="text " id ="operationalAccountField " size ="40 "> </ input >
225
+ < br >
226
+ </ td >
227
+ </ tr >
228
+ < tr >
229
+ < td align ="right ">
230
+ Seed
231
+ </ td >
232
+ < td >
233
+ < input type ="text " id ="operationalSeedField " size ="40 "> </ input >
234
+ < br >
235
+ </ td >
236
+ </ tr >
237
+ < tr >
238
+ < td align ="right ">
239
+ XRP Balance
240
+ </ td >
241
+ < td >
242
+ < input type ="text " id ="operationalBalanceField " size ="40 "> </ input >
243
+ < br >
244
+ </ td >
245
+ </ tr >
246
+ < tr >
247
+ < td align ="right ">
248
+ Amount
249
+ </ td >
250
+ < td >
251
+ < input type ="text " id ="operationalAmountField " size ="40 "> </ input >
252
+ < br >
253
+ </ td >
254
+ </ tr >
255
+ < tr >
256
+ < td align ="right ">
257
+ Destination
258
+ </ td >
259
+ < td >
260
+ < input type ="text " id ="operationalDestinationField " size ="40 "> </ input >
261
+ < br >
262
+ </ td >
263
+ </ tr >
264
+ < tr >
265
+ < td > </ td >
266
+ < td align ="right ">
267
+ < input type ="checkbox " id ="operationalDefault " checked ="false "/>
268
+ < label for ="operationalDefault "> Allow Rippling</ label >
269
+ < button type ="button " onClick ="configureAccount('operational',document.querySelector('#operationalDefault').checked) "> Configure Account</ button >
270
+ </ td >
271
+ </ tr >
272
+ < tr >
273
+ < td align ="right ">
274
+ Currency
275
+ </ td >
276
+ < td >
277
+ < input type ="text " id ="operationalCurrencyField " size ="40 " value ="USD "> </ input >
278
+ </ td >
279
+ </ tr >
280
+ < tr >
281
+ < td align ="right ">
282
+ Offer Sequence
283
+ </ td >
284
+ < td >
285
+ < input type ="text " id ="operationalOfferSequenceField " size ="10 "> </ input >
286
+ </ td >
287
+ </ tr >
288
+ </ table >
289
+ < table >
290
+ < tr >
291
+ < td >
292
+ Taker Pays:< br />
293
+ Currency: < input type ="text " id ="operationalTakerPaysCurrencyField " size ="10 "> </ input > < br />
294
+ Issuer: < input type ="text " id ="operationalTakerPaysIssuerField " size ="35 "> </ input > < br />
295
+ Value: < input type ="text " id ="operationalTakerPaysValueField " size ="10 "> </ input >
296
+ </ td >
297
+ < td >
298
+ Taker Gets:< br />
299
+ Currency: < input type ="text " id ="operationalTakerGetsCurrencyField " size ="10 "> </ input > < br />
300
+ Issuer: < input type ="text " id ="operationalTakerGetsIssuerField " size ="35 "> </ input > < br />
301
+ Value: < input type ="text " id ="operationalTakerGetsValueField " size ="10 "> </ input > < br />
302
+ </ td >
303
+ </ tr >
304
+ </ table >
305
+ < p align ="right ">
306
+ < textarea id ="operationalResultField " cols ="80 " rows ="20 " > </ textarea >
307
+ </ p >
308
+ </ td >
309
+ </ tr >
310
+ </ table >
311
+ </ form >
312
+ </ body >
313
+ </ html >
0 commit comments