forked from elocremarc/abstractii
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidationAbstractii.html
64 lines (61 loc) · 1.75 KB
/
validationAbstractii.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Abstractii Validation</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
background-color: white;
overflow: auto;
}
h1,
h2,
h3 {
margin-bottom: 10px;
}
code {
font-family: monospace;
background-color: #f0f0f0;
padding: 2px 4px;
border-radius: 3px;
}
pre {
background-color: #f0f0f0;
padding: 10px;
border-radius: 3px;
overflow-x: auto;
}
</style>
</head>
<body>
<h1>Abastractii Validation</h1>
<p>The following describes what is a valid Abstractii inscription</p>
<p>An Abstractii must be inscribed before the block 783098.</p>
<p>The sha256 hash of the Abstractii inscription content must be:</p>
<pre><code>eaa87520ad421aa7bc40c43fd30d0beb8dd490cc4080a8945c86c715e7db2406</code></pre>
<h2>Example</h2>
<pre><code>
const crypto = require('crypto');
// run the ord explorer locally with command
// `ord server --http-port 8080`
const explorer = 'http://0.0.0.0:8080';
const inscriptionId = 'INSCRIPTION_ID';
const url = `${explorer}/content/${inscriptionId}`;
const abstractiiHash =
'eaa87520ad421aa7bc40c43fd30d0beb8dd490cc4080a8945c86c715e7db2406';
fetch(url)
.then((res) => res.text())
.then((text) => {
const hash = crypto.createHash('sha256').update(text).digest('hex');
console.log(hash === abstractiiHash);
})
.catch((err) => console.error('error:' + err));
</code></pre>
</body>
</html>