Giter Club home page Giter Club logo

dapi-grpc's Introduction

dapi-grpc's People

Contributors

10xcryptodev avatar alex-werner avatar antouhou avatar jawid-h avatar markin-io avatar shumkov avatar strophy avatar thephez avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dapi-grpc's Issues

sendTransaction not recognising valid transaction

Expected Behavior

sendTransaction should broadcast a valid transaction

Current Behavior

A raw transaction (created with Dash Core) is not recognized as valid when attempting to send via sendTransaction

Possible Solution

Steps to Reproduce (for bugs)

  1. Run this command in the dapi-grpc folder:
grpcurl -plaintext -proto protos/core.proto   -d '{
    "transaction": "03000000014f83880b387e1d4a639f8dd59083ab68f464516a060e4725cc1530a0ee2c3d41000000006b483045022100e7ea589971130f6221ec129b66696ecdd359576b7421e8ee5ab0c7e8c4dc3c460220075c25bd0384148de5636af8bc16f4cc271156d20a3eae26e6b590bfc84033d2012103a65caff6ca4c0415a3ac182dfc2a6d3a4dceb98e8b831e71501df38aa156f2c1ffffffff02204e0000000000001976a91409cf4b155dd5ca22979c1390df14aaaa1009bbee88ac44701a3d050000001976a91416b93a3b9168a20605cc3cda62f6135a3baa531a88ac00000000"
    }'   seed.evonet.networks.dash.org:3010   org.dash.platform.dapi.v0.Core/sendTransaction

The error response returned:

ERROR:
  Code: InvalidArgument
  Message: invalid transaction: Invalid state: Invalid length while reading varlength buffer. Expected to read: 211 and read 47

Context

Your Environment

  • Version used: v0.13.0
  • Operating System and version (desktop, server, or mobile): Linux Mint 19

getDocuments does not return the expected number of results when using `limit`

Expected Behavior

The getDocuments endpoint should return a set of documents equal to the number passed in limit if the number of available document is equal to or greater than the limit.

Current Behavior

The endpoint response contains limit - 1 documents.

Possible Solution

Unknown

Steps to Reproduce (for bugs)

  1. Use limit in a document query (via dapi-client, dash sdk, etc.) where limit is => the number of documents available (e.g. client.platform.getDocuments(contractId, docType, { limit: 2 }))
  2. Check response and see that the number of documents returns is 1 less than the limit

Context

Your Environment

ClientReadableStream's response has no getData() method

When trying to implement subscribeToTransactionsWithProofs as described in the documentation, I end up with this error :
TypeError: response.getData is not a function at ClientReadableStream.<anonymous>

Reproductible case :

const DAPIClient = require('@dashevo/dapi-client');
const {BloomFilter} = require('@dashevo/dashcore-lib');
const client = new DAPIClient({seeds: [{service: 'seed.evonet.networks.dash.org'}]});
const addresses = ['yWNrA4srrAjC9DT6UCu8NgpcqwQWa35dFX', 'ycyFFyWCPSWbXLZBeYppJqgvBF7bnu8BWQ'];
const bloomfilter = BloomFilter.create(addresses.length, 0.01);
addresses.forEach((address) => {
  bloomfilter.insert(Buffer.from(address));
})

client.subscribeToTransactionsWithProofs(
    bloomfilter,
    {fromBlockHeight: 0, count: 10}
)
    .then((stream) => {
      stream.on('data', function (response) {
        console.log(response.getData());
      });
    })

If I just do a console.log of the response, I will get this array (notice the first two element of the array are empty, and the third contains (sometimes) another array on which I miss the usage doc ):

image

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.