code golfing, here's a12-line javascript module that gives a promise-based API to make RPC calls to bitcoin core. it handles positional or named params. https://github.com/coinos/rpc