-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathexplorer-api-overwrite-default.html
47 lines (42 loc) · 1.43 KB
/
explorer-api-overwrite-default.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>blockcerts-verifier demo</title>
<script src="./@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="./index.js"></script>
<script>
// HACK(keanulee): The Redux package assumes `process` exists - mock it here before
// the module is loaded.
window.process = {
env: {
NODE_ENV: 'development'
}
};
// other properties could be overwritten
const explorerAPI = {
serviceName: 'etherscan',
key: 'a-key',
keyPropertyName: 'apikey'
};
document.addEventListener('DOMContentLoaded', function () {
const verifierElement = document.querySelectorAll('blockcerts-verifier')[0];
verifierElement.explorerAPIs = [explorerAPI];
});
</script>
<style>
.main {
max-width: 700px;
margin: 0 auto;
width: 100%;
}
</style>
</head>
<body>
<div class="main">
<h3>Basic blockcerts-verifier demo - Explorer API</h3>
<blockcerts-verifier></blockcerts-verifier>
</div>
</body>
</html>