@alayanetwork/address-transform
v0.2.1
Published
package for switch Alaya(atp)/Platon(lat)/Ethereum(0x) address.
Downloads
14
Readme
Address transform
package for switch Alaya(atp)/Platon(lat)/Ethereum(0x) address.
if you want more function or Code Implementation please visit @alayanetwork/web3-utils
Usages
import { decodeBech32Address, toBech32Address } from './lib.js'
const adr = '0x8415F5C7D2a88BA4B12b675347305D37AACefDD7'
const hrp = 'lat'
const bech = 'lat1ss2lt37j4z96fvftvaf5wvzax74valwhply0ul'
console.log(toBech32Address(hrp, adr))
console.log(decodeBech32Address(bech))