Wallet class¶
-
class
Wallet()¶ An object of this class is not created using the
newoperator, but is returned by the static factory methodnew_wallet().
Static methods¶
-
new_mnemonic_phrase()¶ Returns: A stringcontaining generated Mnemonic phrase.Generates a new mnemonic phrase.Example:var mnemonic_phrase = GetRes(Module.UnoSemuxWallet.new_mnemonic_pharase()); console.log("New mnemonic phrase '" + mnemonic_phrase + "'");
Class methods¶
-
add_hd_group(mnemonic, password)¶ Arguments: - mnemonic (String) – A mnemonic phrase to import from.
- password (String) – An optional password for mnemonic import.
Returns: sInt64a new Group ID.Further, the returned ID is used for operations with HD Address es.var semux_hdGroupId = GetRes(window.semux_wallet.add_hd_group(mnemonic, password)); console.log("New HD group ID = " + semux_hdGroupId);
-
generate_next_hd_address(groupID)¶ Arguments: - groupID (String) – The ID of the HD Group, that is used to get the next HD Address.
Returns: An
objectofAddr()class.Method for deriving the next HD Address for the HD Group by given groupID parameter.Example:var hdAddr = GetRes(window.semux_wallet.generate_next_hd_address(semux_hdGroupId));
-
delete_address(hexAddress)¶ Arguments: - hexAddress (String) – The Semux-address representation of Address to delete from the Wallet.
-
find_address(hexAddress)¶ Arguments: - hexAddress (String) – The Semux-address representation of Address to find in the Wallet.
Returns: An
objectofAddr()class.