-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
161 lines (156 loc) · 6.6 KB
/
index.html
File metadata and controls
161 lines (156 loc) · 6.6 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stackflow Console</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="/app/styles.css" />
</head>
<body>
<main class="layout">
<section class="card hero">
<h1>Stackflow Console</h1>
<p>Connect wallet, inspect watched pipes, generate signatures, and call Stackflow contract functions.</p>
</section>
<section class="card">
<h2>Connection</h2>
<div class="grid two">
<label>
Stackflow Node URL
<input id="stackflow-node-url" type="text" />
</label>
<label>
Stackflow Contract
<input id="contract-id" type="text" placeholder="ST....stackflow-0-6-0" />
</label>
<label>
Network
<select id="network">
<option value="devnet">devnet</option>
<option value="testnet">testnet</option>
<option value="mainnet">mainnet</option>
</select>
</label>
<label>
Contract Version
<input id="contract-version" type="text" value="0.6.0" />
</label>
</div>
<div class="actions">
<button id="connect-btn">Connect Wallet</button>
<button id="disconnect-btn" class="ghost">Disconnect</button>
<button id="refresh-pipes-btn" class="ghost">Refresh Pipes</button>
</div>
<p id="wallet-status" class="status">Wallet not connected.</p>
</section>
<section class="card">
<h2>Watched Pipes</h2>
<div id="pipes-body" class="pipes-list">
<article class="pipe-card pipe-card-empty">
<p>Connect wallet to load watched pipes.</p>
</article>
</div>
</section>
<section class="card">
<h2>Action</h2>
<p>Select one action. The form below will show only the relevant inputs.</p>
<div class="grid two">
<label class="wide">
Action Type
<select id="action-select">
<option value="fund-pipe">fund-pipe</option>
<option value="deposit">deposit</option>
<option value="withdraw">withdraw</option>
<option value="force-cancel">force-cancel</option>
<option value="close-pipe">close-pipe</option>
<option value="force-close">force-close</option>
<option value="finalize">finalize</option>
<option value="sign-transfer">sign-transfer</option>
<option value="sign-deposit">sign-deposit</option>
<option value="sign-withdrawal">sign-withdrawal</option>
<option value="sign-close">sign-close</option>
<option value="request-counterparty-transfer">request-counterparty-transfer</option>
<option value="request-counterparty-deposit">request-counterparty-deposit</option>
<option value="request-counterparty-withdrawal">request-counterparty-withdrawal</option>
<option value="request-counterparty-close">request-counterparty-close</option>
<option value="submit-signature-state">submit-signature-state</option>
</select>
</label>
<label id="field-sig-with">
Counterparty Principal
<input id="sig-with" type="text" placeholder="ST..." />
</label>
<label id="field-sig-token">
Token Contract Principal (optional)
<input id="sig-token" type="text" placeholder="ST....token-contract" />
</label>
<label id="field-sig-token-asset-name">
Token Asset Name (FT post-condition)
<input id="sig-token-asset-name" type="text" placeholder="token" />
</label>
<label id="field-call-fund-amount">
<span id="call-amount-label">fund-pipe Amount</span>
<input id="call-fund-amount" type="number" min="0" step="1" />
</label>
<label id="field-sig-nonce">
Nonce
<input id="sig-nonce" type="number" min="0" step="1" />
</label>
<label id="field-sig-my-balance">
My Balance
<input id="sig-my-balance" type="number" min="0" step="1" />
</label>
<label id="field-sig-their-balance">
Their Balance
<input id="sig-their-balance" type="number" min="0" step="1" />
</label>
<label id="field-sig-action">
Signed Action
<select id="sig-action">
<option value="0">Close</option>
<option value="1" selected>Transfer</option>
<option value="2">Deposit</option>
<option value="3">Withdrawal</option>
</select>
</label>
<label id="field-sig-actor">
Actor Principal
<input id="sig-actor" type="text" placeholder="Defaults to connected wallet" />
</label>
<label id="field-sig-valid-after">
Valid After Burn Height (optional)
<input id="sig-valid-after" type="number" min="0" step="1" />
</label>
<label id="field-sig-secret">
Secret Preimage Hex (optional 32 bytes, no hashing needed)
<input id="sig-secret" type="text" placeholder="64 hex chars" />
</label>
<label id="field-sig-my-signature" class="wide">
<span id="sig-my-signature-label">My Signature (RSV hex)</span>
<input id="sig-my-signature" type="text" placeholder="0x..." />
<small id="sig-my-signature-help" class="field-help">
Paste your signature, or switch to a sign-* action to generate it here.
</small>
</label>
<label id="field-sig-their-signature" class="wide">
Counterparty Signature (RSV hex)
<input id="sig-their-signature" type="text" placeholder="0x..." />
</label>
</div>
<div class="actions">
<button id="action-submit-btn">Submit</button>
</div>
<p id="action-help" class="status"></p>
<pre id="signature-payload" class="code"></pre>
<p id="tx-result" class="status"></p>
</section>
</main>
<script type="module" src="/app/main.js"></script>
</body>
</html>