-
Notifications
You must be signed in to change notification settings - Fork 0
StoopidWallet
A single endpoint to use any wallet or coin or network.
Kind: global class
-
StoopidWallet
- new StoopidWallet()
-
.setCrypto(crypto) ⇒
String
-
.getCrypto() ⇒
String
-
.getAllWallets() ⇒
Object
-
.getWallet() ⇒
Object
-
.getBalance() ⇒
Promise.<Number>
-
.createWallet(network, key) ⇒
Promise.<Object>
-
.sendCoin(amount, toAddr) ⇒
Promise.<String>
Creates the wallet and crypto globals.
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. |
Gets the active crypto or wallet type.
Kind: instance method of StoopidWallet
Returns: String
- - The active crypto being used.
Gets all available wallets and returns them.
Kind: instance method of StoopidWallet
Returns: Object
- - The full wallet object.
Gets the active wallet.
Kind: instance method of StoopidWallet
Returns: Object
- - The active wallet object.
Gets the active wallet.
Kind: instance method of StoopidWallet
Returns: Promise.<Number>
- - The balance of the active wallet
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. |
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. |