Module: rpgaddr

General purpose Rpgcoin address detection and translation.
Supports all major Rpgcoin address formats.
Currently:
  • Legacy format
  • Rpgaddr format
Source:

Classes

InvalidAddressError

Members

(static) Format

Source:

(static) Network

Source:

(static) Type

Source:

Methods

(static) detectAddressFormat(address) → {string}

Detects what is the given address' format.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string

(static) detectAddressNetwork(address) → {string}

Detects what is the given address' network.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string

(static) detectAddressType(address) → {string}

Detects what is the given address' type.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isRpgAddress(address) → {boolean}

Returns a boolean indicating whether the address is in rpgaddr format.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isLegacyAddress(address) → {boolean}

Returns a boolean indicating whether the address is in legacy format.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isMainnetAddress(address) → {boolean}

Returns a boolean indicating whether the address is a mainnet address.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isP2PKHAddress(address) → {boolean}

Returns a boolean indicating whether the address is a p2pkh address.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isP2SHAddress(address) → {boolean}

Returns a boolean indicating whether the address is a p2sh address.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean

(static) isTestnetAddress(address) → {boolean}

Returns a boolean indicating whether the address is a testnet address.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
boolean
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string

(static) toRpgAddress(address) → {string}

Translates the given address into rpgaddr format.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string

(static) toLegacyAddress(address) → {string}

Translates the given address into legacy format.
Parameters:
Name Type Description
address string A valid Rpgcoin address in any format.
Source:
Throws:
InvalidAddressError
Returns:
Type
string