Logs

-

Example

Include widget injector in your page

<script async src="https://cdn.eosdt.com/widget/inject.js"></script>

In your JS you can init widget

// When client is initialized 'equilibrium:ready' event is fired
window.addEventListener('equilibrium:ready'), () => {
  window.Equilibrium.Widgets.Position(
    /* target HTMLElement */ document.querySelector("#widget")
  );
});

if (!window.Equilibrium) {
  window.addEventListener('equilibrium:loaded', () => {
    window.Equilibrium.init(userName, "https://api.eosn.io",function(tx, opt) {
      console.log({ tx, opt });
      document
        .querySelector("#log-widget span")
        .innerHTML = JSON.stringify({ tx, opt });
    });
  })
} else {
  window.Equilibrium.init(userName, "https://api.eosn.io",function(tx, opt) {
    console.log({ tx, opt });
    document
      .querySelector("#log-widget span")
      .innerHTML = JSON.stringify({ tx, opt });
  });
}