hubot-dogecoin
v0.0.6
Published
Hubot script for tipping with Dogecoin.
Downloads
7
Readme
hubot-dogecoin
A hubot script for tipping with Dogecoin.
API
<user> +<n> doge
- tip dogecoin (user by mention name)doge register
- get your dogecoin addressdoge address
- get your dogecoin addressdoge balance
- get your dogecoin balancesend <n|all> doge to <addr>
- withdraw or all doge to a dogecoin address
You can swap the doge keyword for one of such, much, so, very, or dogecoin. I.e. such address
.
Requirements
- Hubot brain
- A dogecoind instance running either locally or on another box with the JSON RPC port open (default: 22555).
- Some dogecoin to give.
Installation
Add hubot-dogecoin
as a dependency in your Hubot package.json
.
"dependencies": {
"hubot": "*",
"hubot-dogecoin": "~0.0.1"
}
Run the following to install the package and its dependencies.
$ npm install
Add hubot-dogecoin
to the array in external-scripts.json
, you may need to create this file.
['hubot-dogecoin']
Configure the following environment variables in bin/hubot
.
export HUBOT_DOGECOIND_USER="dogecoindrpcuser"
export HUBOT_DOGECOIND_PASS="dogecoindrpcpass"
export HUBOT_DOGECOIND_HOST="localhost" # optional, default: localhost
export HUBOT_DOGECOIND_PORT=22555 # Optional, default: 22555
Events
The following event hooks are emitted on successful dogecoind command executions.
@robot.emit 'dogecoin.getAddress', { user: user, address: result }
@robot.emit 'dogecoin.getBalance', { user: user, balance: result }
@robot.emit 'dogecoin.move', {
sender: sender
recipient: recipient
amount: amount
}
@robot.emit 'dogecoin.sendFrom', {
user: user
address: address
amount: amount
txid: result
}
Note: user
is the entire user object from @robot.brain
and result
is
the result of the corresponding dogecoind command.