From 64d26b112e0bc6c535737840900da49e602c68b1 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 16 Sep 2019 16:31:01 -0700 Subject: [PATCH] Demo examples --- index.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/index.html b/index.html index 6eff89d..9b13edb 100644 --- a/index.html +++ b/index.html @@ -33,6 +33,7 @@ function htmlEscape(str) { em_miniscript_compile = Module.cwrap('miniscript_compile', 'none', ['string', 'number', 'number', 'number', 'number', 'number', 'number']); em_miniscript_analyze = Module.cwrap('miniscript_analyze', 'none', ['string', 'number', 'number', 'number', 'number']); + function miniscript_compile() { document.getElementById("out").innerHTML = "Compiling..."; window.setTimeout(function() { @@ -53,6 +54,11 @@ function miniscript_compile() { }); } +function load_policy(pol) { + document.getElementById("source").value = pol; + miniscript_compile(); +} + function miniscript_analyze() { document.getElementById("analyze_out").innerHTML = "Analyzing..."; window.setTimeout(function() { @@ -131,6 +137,17 @@ Links: + Fill field with: +