GithubHelp home page GithubHelp logo

bitcoind-rpc's Introduction

bitcoind-rpc's People

Contributors

andcoisqu avatar bitjson avatar braydonf avatar carnesen avatar cmgustavo avatar dabura667 avatar fanatid avatar gasteve avatar jguthrie7 avatar jsfour avatar kajoseph avatar kleetus avatar lolieatcat avatar lpinca avatar maraoz avatar matiu avatar nitsujlangston avatar olalonde avatar pnagurny avatar simon-utocat avatar unusualbob avatar yemel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoind-rpc's Issues

TypeError: Cannot read property 'toString' of undefined

Getting type error in lib file.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Error</title>
    </head>
    <body>
        <pre>TypeError: Cannot read property &#39;toString&#39; of undefined
            <br> &nbsp; &nbsp;at Array.str (/home/ubuntu/swap-node/node_modules/bitcoind-rpc/lib/index.js:260:18)
            <br> &nbsp; &nbsp;at RpcClient.&lt;anonymous&gt; (/home/ubuntu/swap-node/node_modules/bitcoind-rpc/lib/index.js:236:35)
            <br> &nbsp; &nbsp;at Bitcoin.sendTransaction (/home/ubuntu/swap-node/node_modules/bitcore-node/lib/services/bitcoind.js:1804:15)
            <br> &nbsp; &nbsp;at Node.self.(anonymous function) [as sendTransaction] (/home/ubuntu/swap-node/node_modules/bitcore-node/lib/node.js:223:27)
            <br> &nbsp; &nbsp;at TxController.send (/home/ubuntu/swap-node/node_modules/insight-api/lib/transactions.js:303:13)
            <br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/ubuntu/swap-node/node_modules/express/lib/router/layer.js:95:5)
            <br> &nbsp; &nbsp;at next (/home/ubuntu/swap-node/node_modules/express/lib/router/route.js:137:13)
            <br> &nbsp; &nbsp;at Route.dispatch (/home/ubuntu/swap-node/node_modules/express/lib/router/route.js:112:3)
            <br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/ubuntu/swap-node/node_modules/express/lib/router/layer.js:95:5)
            <br> &nbsp; &nbsp;at /home/ubuntu/swap-node/node_modules/express/lib/router/index.js:281:22
        </pre>
    </body>
</html>

Has this repo been abandoned?

Hello BitPay, Repo Watchers,

It's been 14 months since the last commit was merged to master on this repo. Even trivial PRs like #26 have not been merged. Am I correct in stating that this repo has been abandoned by its original maintainers? If so, could I take over maintenance of this project? By way of background, I'm a professional full-stack JavaScript software engineer and long-time bitcoiner. I've attached my resume to this comment. I'm very familiar with bitcoind's RPC interface. In addition to writing my own Node.js library (long since abandoned), I (re)wrote the description of the interface on bitcoin.org https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs bitcoin-dot-org/Bitcoin.org#1030
Chris_Arnesen.pdf

Regards,
Chris Arnesen

Batch interface suggestion

Now batch call look like:

rpc.batch(function() { /* add some request to rpc */ }, function() { /* request callback */ })

I think it's not good, why I must write yet one function for filling rpc.batchedCalls?

And what really important, what happened if we get an exception in first function? When we try make new request (getInfo for example), batchedCalls not be null and rpc instance will be considered that we fill batch request... so, it's broke all rpc instance!

I suggest replaced batch request by something like this:

rpc.createBatch() // create copy of rpc instance and set batchedCalls as empty array
  .getRawTransaction(txid1) // put request to batchedCalls
  .getRawTransaction(txid2) // put request to batchedCalls
  .call(function() { /* request callback */ }) // make request

I'm not sure about createBatch, call and hope somebody offer more suitable names.

listen blocks

Hi, how can real time listen blocks with listening mempool transactions ?

Can we get promise support?

I am having to wrap everything I use in promises to work with es6 style code, it would be great if we could get bitcoind-rpc to return promises

Update callspec

Some functions are not in call spec. Example: getrawchangeaddress

RangeError: Invalid string length

Got this error logged, any idea how to avoid such error?

/mynode/node_modules/bitcoind-rpc/lib/index.js:70
     buf += data;
            ^

RangeError: Invalid string length
   at IncomingMessage.<anonymous> (/mynode/node_modules/bitcoind-rpc/lib/index.js:70:14)
   at emitOne (events.js:77:13)
   at IncomingMessage.emit (events.js:169:7)
   at readableAddChunk (_stream_readable.js:153:18)
   at IncomingMessage.Readable.push (_stream_readable.js:111:10)
   at HTTPParser.parserOnBody (_http_common.js:124:22)
   at Socket.socketOnData (_http_client.js:320:20)
   at emitOne (events.js:77:13)
   at Socket.emit (events.js:169:7)
   at readableAddChunk (_stream_readable.js:153:18)
   at Socket.Readable.push (_stream_readable.js:111:10)
   at TCP.onread (net.js:536:20)

Capture exception when trying to establish a connection

Greetings, thank you for your help.
in my code I have a list of servers and I am trying to establish a connection with some of that list, but I have not managed to capture any error or exception if the attempt to connect to the server fails, until now I have not managed to know the mecanisco to find out that the connection was not established, so you can try to connect to another server in the list.

captura de pantalla 2019-01-19 a la s 1 07 10 p m

captura de pantalla 2019-01-19 a la s 1 07 03 p m

Improved Docs

  • Include better description of parameters, for example "rejectUnauthorized" translates into "strict ssl cert checking" and "secure" translates into "https" or "http"
  • Full description of parameters, "getnewaddress" does not have any parameters and thus the first argument is a callback, however in other situations it is the second argument. possibly consider improving the api, so that this can be discovered easily and is more intuitive
  • Document common methods such as "sendrawtransaction"
  • Add better jsdocs
  • Add link to list of api methods, such as: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.