-
Notifications
You must be signed in to change notification settings - Fork 0
/
secondExample.html
47 lines (40 loc) · 1.13 KB
/
secondExample.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
<html>
<head>
<script src="https://www.moneybutton.com/moneybutton.js"></script>
<script type="text/javascript" src="https://unpkg.com/bsv@0.21.5/bsv.min.js"></script>
<style>
body {
padding: 50px;
font-family: arial;
font-size: 12px;
}
div {
width: 500px;
margin: 0 auto;
padding: 10px 0;
}
</style>
<script>
inp = ['bitjournal', 'Eve Adams', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum', 'How Bitcoin SV took over the crypto space while nobody noticed', 'The abstract']
let hex = 'OP_RETURN';
for(i in inp){
hex += ' ' + bsv.Script.buildDataOut(inp[i]).toASM().split(" ")[1];
}
</script>
</head>
<body>
<div id="my-money-button"></div>
></div>
</body>
<script>
const div = document.getElementById('my-money-button')
moneyButton.render(div, {
outputs: [{
type: 'SCRIPT',
script: hex,
amount: '0.05',
currency: 'USD'
}]
})
</script>
</html>