new Address(optsnullable)
Create a new Bitmessage address object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
Object |
<nullable> |
Address options |
- Source:
Methods
(static) decode(str) → {Address}
Parse Bitmessage address into address object.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | Address string (with or without |
- Source:
Returns:
Decoded address object.
- Type
- Address
(static) fromPassphrase(optsnullable) → {Address}
Create new Bitmessage address from passphrase.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
Object |
<nullable> |
Address options |
- Source:
Returns:
Generated address object.
- Type
- Address
(static) fromRandom(optsnullable) → {Address}
Create new Bitmessage address from random encryption and signing private keys.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
Object |
<nullable> |
Address options |
- Source:
Returns:
Generated address object.
- Type
- Address
(static) isAddress(obj) → {boolean}
Test if given object is an Address instance.
NOTE: Implementation is just simple instanceof
but it improves
readability and consistent with isArray
, isBuffer
, etc.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Given object |
- Source:
Returns:
- Type
- boolean
clone() → {Address}
Create a copy of the address object.
- Source:
Returns:
Cloned address.
- Type
- Address
encode() → {string}
Encode Bitmessage address object into address string.
- Source:
Returns:
Address string.
- Type
- string
getBroadcastPrivateKey() → {Buffer}
Calculate the encryption key used to encrypt/decrypt broadcast objects.
- Source:
Returns:
A 32-byte private key.
- Type
- Buffer
getBroadcastPublicKey() → {Buffer}
Calculate the corresponding public key for encryption key used to encrypt/decrypt broadcast objects.
- Source:
Returns:
A 65-byte public key.
- Type
- Buffer
getPubkeyPrivateKey() → {Buffer}
Calculate the encryption key used to encrypt/decrypt pubkey objects.
- Source:
Returns:
A 32-byte private key.
- Type
- Buffer
getPubkeyPublicKey() → {Buffer}
Calculate the corresponding public key for encryption key used to encrypt/decrypt pubkey objects.
- Source:
Returns:
A 65-byte public key.
- Type
- Buffer
getShortRipe() → {Buffer}
Get the ripe hash of the address without prefix zeroes.
- Source:
Returns:
A short ripe hash.
- Type
- Buffer
getTag() → {Buffer}
Calculate the address tag.
- Source:
Returns:
A 32-byte address tag.
- Type
- Buffer