@abcpros/xaddress 中文文档教程
xaddress: The Lotus address format for Node.js and web browsers.
Lotus 的新 XAddr 地址格式的 JavaScript 实现。
符合 xaddress 规范
Installation
Using NPM
$ npm install --save @abcpros/xaddress
Usage
In Node.js
const xaddress = require('xaddress');
const address = 'lotus_16PSJLk9W86KAZp26x3uM176w6N9vUU8YNQQnQTHN';
const { prefix, type, payload, network } = XAddress.decode(address);
console.log(prefix); // 'lotus'
console.log(network); // MAIN
console.log(type); // ScriptPubKey (0)
console.log(payload); // Buffer [ 118, 160, ..., 115 ] (full script payload)
xaddress: The Lotus address format for Node.js and web browsers.
JavaScript implementation for the new XAddr address format for Lotus.
Compliant with the xaddress specification
Installation
Using NPM
$ npm install --save @abcpros/xaddress
Usage
In Node.js
const xaddress = require('xaddress');
const address = 'lotus_16PSJLk9W86KAZp26x3uM176w6N9vUU8YNQQnQTHN';
const { prefix, type, payload, network } = XAddress.decode(address);
console.log(prefix); // 'lotus'
console.log(network); // MAIN
console.log(type); // ScriptPubKey (0)
console.log(payload); // Buffer [ 118, 160, ..., 115 ] (full script payload)