General purpose Ravencoin address detection and translation.
Supports all major Ravencoin address formats.
Currently:
Supports all major Ravencoin address formats.
Currently:
- Legacy format
- Rvnaddr format
- Source:
Classes
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 Ravencoin 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 Ravencoin 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 Ravencoin address in any format. |
- Source:
Throws:
InvalidAddressError
Returns:
- Type
- string
Parameters:
Name | Type | Description |
---|---|---|
address |
string | A valid Ravencoin address in any format. |
- Source:
Throws:
InvalidAddressError
Returns:
- Type
- boolean
(static) isRvnAddress(address) → {boolean}
Returns a boolean indicating whether the address is in rvnaddr format.
Parameters:
Name | Type | Description |
---|---|---|
address |
string | A valid Ravencoin 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 Ravencoin 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 Ravencoin 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 Ravencoin 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 Ravencoin 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 Ravencoin address in any format. |
- Source:
Throws:
InvalidAddressError
Returns:
- Type
- boolean
Parameters:
Name | Type | Description |
---|---|---|
address |
string | A valid Ravencoin address in any format. |
- Source:
Throws:
InvalidAddressError
Returns:
- Type
- string
(static) toRvnAddress(address) → {string}
Translates the given address into rvnaddr format.
Parameters:
Name | Type | Description |
---|---|---|
address |
string | A valid Ravencoin 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 Ravencoin address in any format. |
- Source:
Throws:
InvalidAddressError
Returns:
- Type
- string