Constructors
constructor
-
Parameters
Properties
basic
basic: string
raw
raw: string
Accessors
basicHex
-
Returns string
bech32
-
Returns string
bech32TestNet
- get bech32TestNet(): string
-
Returns string
checksum
-
Returns string
Methods
Private getBasic
- getBasic(addr: string): string
-
Parameters
Returns string
Static isValidBasic
- isValidBasic(str: string): boolean
-
Parameters
Returns boolean
Static isValidBech32
- isValidBech32(str: string): boolean
-
Parameters
Returns boolean
Static isValidBech32TestNet
- isValidBech32TestNet(str: string): boolean
-
Parameters
Returns boolean
Static isValidChecksum
- isValidChecksum(str: string): boolean
-
Parameters
Returns boolean
How to use it?
// Step 1: import the class const { HarmonyAddress } = require('@harmony-js/crypto'); // Step 2: call functions const addr = 'one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7' const res = HarmonyAddress.isValidBech32(addr); console.log(res);