Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

StoopidWallet

Jason Anton edited this page Aug 1, 2018 · 1 revision

StoopidWallet

A single endpoint to use any wallet or coin or network.

Kind: global class

new StoopidWallet()

Creates the wallet and crypto globals.

stoopidWallet.setCrypto(crypto) ⇒ String

Sets the active crypto for use.

Kind: instance method of StoopidWallet Returns: String - - Confirmation of the set crypto type.

Param Type Description
crypto String The type of coin we're going to work.

stoopidWallet.getCrypto() ⇒ String

Gets the active crypto or wallet type.

Kind: instance method of StoopidWallet Returns: String - - The active crypto being used.

stoopidWallet.getAllWallets() ⇒ Object

Gets all available wallets and returns them.

Kind: instance method of StoopidWallet Returns: Object - - The full wallet object.

stoopidWallet.getWallet() ⇒ Object

Gets the active wallet.

Kind: instance method of StoopidWallet Returns: Object - - The active wallet object.

stoopidWallet.getBalance() ⇒ Promise.<Number>

Gets the active wallet.

Kind: instance method of StoopidWallet Returns: Promise.<Number> - - The balance of the active wallet

stoopidWallet.createWallet(network, key) ⇒ Promise.<Object>

Creates or re-creates a wallet for the active crypto

Kind: instance method of StoopidWallet Returns: Promise.<Object> - - The active wallet object.

Param Type Default Description
network String The network for the wallet.
key String 0 The private key for an existing wallet.

stoopidWallet.sendCoin(amount, toAddr) ⇒ Promise.<String>

Creates and sends a transaction for the current active crypto.

Kind: instance method of StoopidWallet Returns: Promise.<String> - - The transaction hash.

Param Type Description
amount Number The amount to send.
toAddr String The address to send crypto too.