hubot-openassets

Hubot script for managing and sending assets based on the Open Assets protocol

Usage no npm install needed!

<script type="module">
  import hubotOpenassets from 'https://cdn.skypack.dev/hubot-openassets';
</script>

README

Hubot Open Assets

A hubot script for managing and sending assets based on the Open Assets protocol. Initially written for easily sending Kosmos Kredits to contributors of the Kosmos open source project.

The script contains addressbook functionality so you can send assets to a nickname instead of an address. For example, after adding an entry via kredits address add derbumi akDWac1wFCFtaF2omEZ5KLTPMMPS4C5s89H you can send kredits to that user using a simple kredits send 100 to derbumi.

Listing/showing assets and balances works without an additional server. Sending kredits is done via a Ruby/Rack app called openassets-sinatra, which is running together with bitcoind on a server.

Configuration

Key Description
OA_BOT_KEYWORD The keyword for issuing asset commands. Usually the asset name in lowercase, e.g. "kredits"
OA_ASSET_ID ID of the asset to be transferred
OA_ASSET_FROM_ADDRESS Sender's wallet open asset address
OA_DEFAULT_QUANTITY Quantity of assets that should be sent if not provided by the user
OA_SERVER_URL URL of the open assets server that does the actual transfer
OA_SERVER_USERNAME Username for server basic auth
OA_SERVER_PASSWORD Password for server basic auth
OA_MAX_QUANTITY (optional) Maximum quantity of assets that can be transferred
OA_PLUSPLUS_ROOMS (optional) comma seperated list of rooms that should have the ++ send feature enabled. (note: include the # for IRC)

Commands

Key Description
<keyword> address add <name> <address> ...
<keyword> address delete <name> ...
<keyword> address list ...
<keyword> show <name> ...
<keyword> list ...
<keyword> send [amount] to <name> ...
<name>++ Send the default amount to <name>. Disabled by default, see OA_PLUSPLUS_ROOMS config.