<script src="taler-wallet-lib.js"></script>
<script>
  taler.offerContractFrom("https://shop/generate-contract/42", (err) => {
    alert("Error while offering contract");
  });
</script>