1
+ < html >
2
+ < head >
3
+ < title > Create Permissioned Domain</ title >
4
+ < link href ='https://fonts.googleapis.com/css?family=Work Sans ' rel ='stylesheet '>
5
+ < link href ="modular-tutorials.css " rel ="stylesheet ">
6
+ < script src ='https://unpkg.com/xrpl@4.2.5/build/xrpl-latest.js '> </ script >
7
+ < script src ="account-support.js "> </ script >
8
+ < script src ='credential-manager.js '> </ script >
9
+ < script src ='permissioned-domain-manager.js '> </ script >
10
+ </ head >
11
+
12
+ <!-- ************************************************************** -->
13
+ <!-- ********************** The Form ****************************** -->
14
+ <!-- ************************************************************** -->
15
+
16
+ < body >
17
+ < h1 > Create Permissioned Domain</ h1 >
18
+ < form id ="theForm ">
19
+ < span class ="tooltip " tooltip-data ="Choose the XRPL host server for your account. ">
20
+ Choose your ledger instance:
21
+ </ span >
22
+
23
+ < input type ="radio " id ="dn " name ="server " value ="wss://s.devnet.rippletest.net:51233 " checked >
24
+ < label for ="dn "> Devnet</ label >
25
+
26
+ < input type ="radio " id ="tn " name ="server " value ="wss://s.altnet.rippletest.net:51233 ">
27
+ < label for ="tn "> Testnet</ label >
28
+ < br /> < br />
29
+ < table >
30
+ < tr >
31
+ < td >
32
+ < button type ="button " onClick ="getNewAccount1() "> Get New Account 1</ button >
33
+ </ td >
34
+ < td >
35
+ < button type ="button " onClick ="getAccountFromSeed1() "> Get Account 1 From Seed</ button >
36
+ </ td >
37
+ < td >
38
+ < button type ="button " onClick ="getNewAccount2() "> Get New Account 2</ button >
39
+ </ td >
40
+ < td >
41
+ < button type ="button " onClick ="getAccountFromSeed2() "> Get Account 2 From Seed</ button >
42
+ </ td >
43
+ </ tr >
44
+ < tr >
45
+ < td >
46
+ < span class ="tooltip " tooltip-data ="Arbitrary human-readable name for the account. "> < label for ="account1name "> Account 1 Name</ label >
47
+ </ span >
48
+ </ td >
49
+ < td >
50
+ < input type ="text " id ="account1name " size ="40 "> </ input >
51
+ </ td >
52
+ < td >
53
+ < span class ="tooltip " tooltip-data ="Arbitrary human-readable name for the account. ">
54
+ < label for ="account2name "> Account 2 Name</ label >
55
+ </ span >
56
+ </ td >
57
+ < td >
58
+ < input type ="text " id ="account2name " size ="40 "> </ input >
59
+ </ td >
60
+ </ tr >
61
+ < tr >
62
+ < td >
63
+ < span class ="tooltip " tooltip-data ="Identifying address for the account. ">
64
+ < label for ="account1address "> Account 1 Address</ label >
65
+ </ span >
66
+ </ td >
67
+ < td >
68
+ < input type ="text " id ="account1address " size ="40 "> </ input >
69
+ </ td >
70
+ < td >
71
+ < span class ="tooltip " tooltip-data ="Identifying address for the account. ">
72
+ < label for ="account2address "> Account 2 Address</ label >
73
+ </ span >
74
+ </ td >
75
+ < td >
76
+ < input type ="text " id ="account2address " size ="40 "> </ input >
77
+ </ td >
78
+ </ tr >
79
+ < tr >
80
+ < td >
81
+ < span class ="tooltip " tooltip-data ="Seed for deriving public and private keys for the account. ">
82
+ < label for ="account1seed "> Account 1 Seed</ label >
83
+ </ span >
84
+ </ td >
85
+ < td >
86
+ < input type ="text " id ="account1seed " size ="40 "> </ input >
87
+ </ td >
88
+ < td >
89
+ < span class ="tooltip " tooltip-data ="Seed for deriving public and private keys for the account. ">
90
+ < label for ="account2seed "> Account 2 Seed</ label >
91
+ </ span >
92
+ </ td >
93
+ < td >
94
+ < input type ="text " id ="account2seed " size ="40 "> </ input >
95
+ </ td >
96
+ </ tr >
97
+ </ table >
98
+ < hr />
99
+ < table >
100
+ < tr valign ="top ">
101
+ < td align ="right ">
102
+ < span class ="tooltip " tooltip-data ="Name of the currently selected account. ">
103
+ < label for ="accountNameField "> Account Name</ label >
104
+ </ span >
105
+ </ td >
106
+ < td >
107
+ < input type ="text " id ="accountNameField " size ="40 " readonly > </ input >
108
+ < input type ="radio " id ="account1 " name ="accounts " value ="account1 ">
109
+ < label for ="account1 "> Account 1</ label >
110
+ </ td >
111
+ </ tr >
112
+ < tr valign ="top ">
113
+ < td align ="right ">
114
+ < span class ="tooltip " tooltip-data ="Address of the currently selected account. ">
115
+ < label for ="accountAddressField "> Account Address</ label >
116
+ </ span >
117
+ </ td >
118
+ < td >
119
+ < input type ="text " id ="accountAddressField " size ="40 " readonly > </ input >
120
+ < input type ="radio " id ="account2 " name ="accounts " value ="account2 ">
121
+ < label for ="account2 "> Account 2</ label >
122
+ </ td >
123
+ </ tr >
124
+ < tr valign ="top ">
125
+ < td align ="right ">
126
+ < span class ="tooltip " tooltip-data ="Seed of the currently selected account. ">
127
+ < label for ="accountSeedField "> Account Seed</ label >
128
+ </ span >
129
+ </ td >
130
+ < td >
131
+ < input type ="text " id ="accountSeedField " size ="40 " readonly > </ input >
132
+ < br >
133
+ </ td >
134
+ </ tr >
135
+ < tr >
136
+ < td align ="right ">
137
+ < span class ="tooltip " tooltip-data ="XRP balance for the currently selected account. ">
138
+ < label for ="xrpBalanceField "> XRP Balance</ label >
139
+ </ span >
140
+ </ td >
141
+ < td >
142
+ < input type ="text " id ="xrpBalanceField " size ="40 " readonly > </ input >
143
+ </ td >
144
+ </ tr >
145
+ < tr >
146
+ < td align ="right ">
147
+ < span class ="tooltip " tooltip-data ="Account receiving the credential. ">
148
+ < label for ="subjectField "> Subject</ label >
149
+ </ span >
150
+ </ td >
151
+ < td >
152
+ < input type ="text " id ="subjectField " size ="40 "> </ input >
153
+ < br >
154
+ </ td >
155
+ < td align ="left " valign ="top ">
156
+ < button type ="button " onClick ="createCredential() "> Create Credential</ button >
157
+ </ td >
158
+ </ tr >
159
+ < tr >
160
+ < td align ="right ">
161
+ < span class ="tooltip " tooltip-data ="Arbitrary data defining the type of credential this entry represents. ">
162
+ < lable for ="credentialTypeField "> Credential Type</ lable >
163
+ </ span >
164
+ </ td >
165
+ < td >
166
+ < input type ="text " id ="credentialTypeField " size ="40 "> </ input >
167
+ < br >
168
+ </ td >
169
+ </ tr >
170
+ < tr >
171
+ < td align ="right ">
172
+ < span class ="tooltip " tooltip-data ="The ledger entry ID of an existing permissioned domain to modify. If omitted, creates a new permissioned domain. ">
173
+ < label for ="domainIDField "> Domain ID</ label >
174
+ </ span >
175
+ </ td >
176
+ < td >
177
+ < input type ="text " id ="domainIDField " size ="40 "> </ input >
178
+ < br >
179
+ </ td >
180
+ < td align ="left " valign ="top ">
181
+ < button type ="button " onClick ="createDomain() "> Create Permissioned Domain</ button >
182
+ < button type ="button " onClick ="deleteDomain() "> Delete Permissioned Domain</ button >
183
+ </ td >
184
+ </ tr >
185
+ < tr >
186
+ < td colspan ="2 ">
187
+ < p align ="right ">
188
+ < textarea id ="resultField " cols ="80 " rows ="20 "> </ textarea >
189
+ </ p >
190
+ </ td >
191
+ < td align ="left " valign ="top ">
192
+ < button type ="button " onClick ="gatherAccountInfo() "> Gather Account Info</ button > < br />
193
+ < button type ="button " onClick ="distributeAccountInfo() "> Distribute Account Info</ button >
194
+ </ td >
195
+ </ tr >
196
+ </ table >
197
+ </ form >
198
+ </ body >
199
+ < script >
200
+ const radioButtons = document . querySelectorAll ( 'input[type="radio"]' ) ;
201
+ radioButtons . forEach ( radio => {
202
+ radio . addEventListener ( 'change' , function ( ) {
203
+ if ( this . value === 'account1' ) {
204
+ populate1 ( )
205
+ } else if ( this . value === 'account2' ) {
206
+ populate2 ( )
207
+ }
208
+ } ) ;
209
+ } ) ;
210
+ </ script >
211
+ </ html >
0 commit comments