@@ -21,58 +21,58 @@ import "./main.css";
21
21
const signInBtn = document . getElementById ( "signinBtn" ) as HTMLButtonElement ;
22
22
const whoamiBtn = document . getElementById ( "whoamiBtn" ) as HTMLButtonElement ;
23
23
const updateAlternativeOriginsBtn = document . getElementById (
24
- "updateNewAlternativeOrigins"
24
+ "updateNewAlternativeOrigins" ,
25
25
) as HTMLButtonElement ;
26
26
const openIiWindowBtn = document . getElementById (
27
- "openIiWindowBtn"
27
+ "openIiWindowBtn" ,
28
28
) as HTMLButtonElement ;
29
29
const closeIiWindowBtn = document . getElementById (
30
- "closeIIWindowBtn"
30
+ "closeIIWindowBtn" ,
31
31
) as HTMLButtonElement ;
32
32
const invalidDataBtn = document . getElementById (
33
- "invalidDataBtn"
33
+ "invalidDataBtn" ,
34
34
) as HTMLButtonElement ;
35
35
const incompleteMessageBtn = document . getElementById (
36
- "incompleteMessageBtn"
36
+ "incompleteMessageBtn" ,
37
37
) as HTMLButtonElement ;
38
38
const validMessageBtn = document . getElementById (
39
- "validMessageBtn"
39
+ "validMessageBtn" ,
40
40
) as HTMLButtonElement ;
41
41
const customMessageEl = document . getElementById (
42
- "customMessage"
42
+ "customMessage" ,
43
43
) as HTMLInputElement ;
44
44
const customMessageBtn = document . getElementById (
45
- "customMessageBtn"
45
+ "customMessageBtn" ,
46
46
) as HTMLButtonElement ;
47
47
const messagesEl = document . getElementById ( "messages" ) as HTMLElement ;
48
48
const hostUrlEl = document . getElementById ( "hostUrl" ) as HTMLInputElement ;
49
49
const whoAmIResponseEl = document . getElementById (
50
- "whoamiResponse"
50
+ "whoamiResponse" ,
51
51
) as HTMLDivElement ;
52
52
const alternativeOriginsEl = document . getElementById (
53
- "alternativeOrigins"
53
+ "alternativeOrigins" ,
54
54
) as HTMLDivElement ;
55
55
const newAlternativeOriginsEl = document . getElementById (
56
- "newAlternativeOrigins"
56
+ "newAlternativeOrigins" ,
57
57
) as HTMLInputElement ;
58
58
const principalEl = document . getElementById ( "principal" ) as HTMLDivElement ;
59
59
const authnMethodEl = document . querySelector (
60
- '[data-role="authn-method"]'
60
+ '[data-role="authn-method"]' ,
61
61
) as HTMLDivElement ;
62
62
const delegationEl = document . getElementById ( "delegation" ) as HTMLPreElement ;
63
63
const expirationEl = document . getElementById ( "expiration" ) as HTMLDivElement ;
64
64
const iiUrlEl = document . getElementById ( "iiUrl" ) as HTMLInputElement ;
65
65
const maxTimeToLiveEl = document . getElementById (
66
- "maxTimeToLive"
66
+ "maxTimeToLive" ,
67
67
) as HTMLInputElement ;
68
68
const derivationOriginEl = document . getElementById (
69
- "derivationOrigin"
69
+ "derivationOrigin" ,
70
70
) as HTMLInputElement ;
71
71
const autoSelectionPrincipalEl = document . getElementById (
72
- "autoSelectionPrincipal"
72
+ "autoSelectionPrincipal" ,
73
73
) as HTMLInputElement ;
74
74
const allowPinAuthenticationEl = document . getElementById (
75
- "allowPinAuthentication"
75
+ "allowPinAuthentication" ,
76
76
) as HTMLInputElement ;
77
77
78
78
let iiProtocolTestWindow : Window | undefined ;
@@ -112,7 +112,7 @@ const idlFactory = ({ IDL }: { IDL: any }) => {
112
112
update_alternative_origins : IDL . Func (
113
113
[ IDL . Text , AlternativeOriginsMode ] ,
114
114
[ ] ,
115
- [ ]
115
+ [ ] ,
116
116
) ,
117
117
whoami : IDL . Func ( [ ] , [ IDL . Principal ] , [ "query" ] ) ,
118
118
} ) ;
@@ -135,7 +135,7 @@ const updateDelegationView = ({
135
135
delegationEl . innerText = JSON . stringify (
136
136
identity . getDelegation ( ) . toJSON ( ) ,
137
137
undefined ,
138
- 2
138
+ 2 ,
139
139
) ;
140
140
141
141
// cannot use Math.min, as we deal with bigint here
@@ -171,7 +171,7 @@ function addMessageElement({
171
171
messageTitle . classList . add ( "postMessage-title" ) ;
172
172
const messageContent = document . createElement ( "div" ) ;
173
173
messageContent . innerText = JSON . stringify ( message , ( _ , v ) =>
174
- typeof v === "bigint" ? v . toString ( ) : v
174
+ typeof v === "bigint" ? v . toString ( ) : v ,
175
175
) ;
176
176
if ( ty === "received" ) {
177
177
messageTitle . innerText = "Message Received" ;
@@ -199,12 +199,12 @@ window.addEventListener("message", (event) => {
199
199
const delegations = event . data . delegations . map ( extractDelegation ) ;
200
200
const delegationChain = DelegationChain . fromDelegations (
201
201
delegations ,
202
- event . data . userPublicKey . buffer
202
+ event . data . userPublicKey . buffer ,
203
203
) ;
204
204
updateDelegationView ( {
205
205
identity : DelegationIdentity . fromDelegation (
206
206
getLocalIdentity ( ) ,
207
- delegationChain
207
+ delegationChain ,
208
208
) ,
209
209
} ) ;
210
210
} ) ;
@@ -301,7 +301,7 @@ const init = async () => {
301
301
const validMessage = {
302
302
kind : "authorize-client" ,
303
303
sessionPublicKey : new Uint8Array (
304
- getLocalIdentity ( ) . getPublicKey ( ) . toDer ( )
304
+ getLocalIdentity ( ) . getPublicKey ( ) . toDer ( ) ,
305
305
) ,
306
306
derivationOrigin,
307
307
maxTimeToLive,
@@ -330,7 +330,7 @@ const init = async () => {
330
330
} ) ;
331
331
const modeSelection = (
332
332
document . querySelector (
333
- 'input[name="alternativeOriginsMode"]:checked'
333
+ 'input[name="alternativeOriginsMode"]:checked' ,
334
334
) as HTMLInputElement
335
335
) . value ;
336
336
let mode :
@@ -430,7 +430,7 @@ function handleFlowReady(evnt: MessageEvent) {
430
430
431
431
if ( opts === undefined ) {
432
432
return showError (
433
- "Unexpected: received OK from IDP but this test app is not ready"
433
+ "Unexpected: received OK from IDP but this test app is not ready" ,
434
434
) ;
435
435
}
436
436
@@ -491,7 +491,7 @@ function handleFlowFinished(evnt: MessageEvent) {
491
491
const ver = decodeJwt ( verifiablePresentation ) as any ;
492
492
const creds = ver . vp . verifiableCredential ;
493
493
const [ alias , credential ] = creds . map ( ( cred : string ) =>
494
- JSON . stringify ( decodeJwt ( cred ) , null , 2 )
494
+ JSON . stringify ( decodeJwt ( cred ) , null , 2 ) ,
495
495
) ;
496
496
497
497
setLatestPresentation ( { alias, credential } ) ;
@@ -504,7 +504,7 @@ function handleFlowFinished(evnt: MessageEvent) {
504
504
const App = ( ) => {
505
505
// The URL used for connecting to the issuer
506
506
const [ issuerUrl , setIssuerUrl ] = useState < string > (
507
- "http://issuer.localhost:5173"
507
+ "http://issuer.localhost:5173" ,
508
508
) ;
509
509
510
510
const [ issuerCanisterId , setIssuerCanisterId ] = useState < string > ( "" ) ;
@@ -607,5 +607,5 @@ const App = () => {
607
607
ReactDOM . createRoot ( document . getElementById ( "root-vc-flow" ) ! ) . render (
608
608
< React . StrictMode >
609
609
< App />
610
- </ React . StrictMode >
610
+ </ React . StrictMode > ,
611
611
) ;
0 commit comments