bns-client
is a javascript library to interact with all the BNS methods. It can help for creating client and server apps to connect with BNS.
Use this commands in the console:
npm install bns-client
or use <script></script>
to import
<script src="BNS.js"></script>
let BNS = require('bns/lib/BNS').default;
let bns = new BNS();
or
<script>
var BNS = require('BNS');
var bns = new BNS.default({
restURL: `https://mainnet.infura.io`,
});
bns.ENSRegistry.getOwner('facebook.eth').then(function(owner) {
document.getElementById("owner").innerHTML = owner;
});
</script>
Please check examples for more information.
See CONTRIBUTING.md for how to help out.
See LICENSE for details.