refactor(mpc): migrate to simple enclaves
This commit is contained in:
@@ -408,13 +408,7 @@
|
||||
<div id="log-load" class="log"></div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="border-color: var(--warning);">
|
||||
<h3>test_mpc() <span class="badge" style="background: var(--warning); color: #000;">debug</span></h3>
|
||||
<div class="btn-row">
|
||||
<button class="btn" style="background: var(--warning); color: #000;" onclick="testMPC()">Test MPC Generation</button>
|
||||
</div>
|
||||
<div id="log-mpc" class="log"></div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="section-explorer" class="tab-content">
|
||||
|
||||
@@ -147,30 +147,6 @@ window.testPing = async function() {
|
||||
}
|
||||
};
|
||||
|
||||
window.testMPC = async function() {
|
||||
if (!enclave) return log('mpc', 'err', 'Plugin not loaded');
|
||||
|
||||
log('mpc', 'info', 'Testing MPC key generation...');
|
||||
|
||||
try {
|
||||
const result = await enclave.plugin.call('test_mpc', '{}');
|
||||
if (!result) {
|
||||
log('mpc', 'err', 'No response from plugin');
|
||||
return;
|
||||
}
|
||||
const output = result.json();
|
||||
if (output.result?.startsWith('SUCCESS')) {
|
||||
log('mpc', 'ok', output.result);
|
||||
} else if (output.result?.startsWith('PANIC')) {
|
||||
log('mpc', 'err', output.result);
|
||||
} else {
|
||||
log('mpc', 'err', output.result || 'Unknown error');
|
||||
}
|
||||
} catch (err) {
|
||||
log('mpc', 'err', `Exception: ${err?.message || JSON.stringify(err)}`);
|
||||
}
|
||||
};
|
||||
|
||||
window.testGenerate = async function() {
|
||||
if (!enclave) return log('generate', 'err', 'Plugin not loaded');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user