This repository moved to https://github.com/dashevo/platform/tree/master/packages/dapi-grpc
MIT © Dash Core Group, Inc.
DEPRECATED Decentralized API GRPC definition files and generated clients
License: MIT License
This repository moved to https://github.com/dashevo/platform/tree/master/packages/dapi-grpc
MIT © Dash Core Group, Inc.
sendTransaction
should broadcast a valid transaction
A raw transaction (created with Dash Core) is not recognized as valid when attempting to send via sendTransaction
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
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.
The endpoint response contains limit - 1
documents.
Unknown
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 })
)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 ):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.