dashevo / dapi Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED A decentralized API for the Dash network
License: MIT License
DEPRECATED A decentralized API for the Dash network
License: MIT License
This gRPC endpoint relies on Dash Core's germerkleblocks
RPC, which won't be introduced until Dash Core 0.15 is released. That makes this endpoint unusable on Evonet as long as it is continues to run on Dash Core v0.14.x.
The obscure error message returned is lacking sufficient detail to understand what is going on without looking into the DAPI logs:
ERROR:
Code: Internal
Message: Internal error
The DAPI logs show the following which led me to the culprit (https://github.com/dashevo/dapi/blob/v0.9-dev/lib/externalApis/dashcore/rpc.js#L189-L204.):
DashCoreRpcError: Method not found
at /usr/src/app/lib/externalApis/dashcore/rpc.js:199:14
at newCallback (/node_modules/@dashevo/dashd-rpc/lib/index.js:51:16)
at IncomingMessage.<anonymous> (/node_modules/@dashevo/dashd-rpc/lib/index.js:125:13)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Documenting this in case anyone else encounters the issue and ends up here.
README.md tells us
Install core. You can use the docker image (dashcore:evo) or clone code from the repository, switch to the evo branch, and build it by yourself. Note: you need to build image with ZMQ and wallet support. You can follow the build instructions located here
Is this still the case? I thought we are using the release version of Dash Core.
Woops !
We have a little issue, file: ../quorum_dash is a missing package on DAPI (cc: @pvrooyen )
RPC Commands are implemented https://github.com/dashevo/dapi/tree/v0.14-dev/lib/rpcServer/commands and are documented here https://github.com/dashevo/dapi/blob/v0.14-dev/doc/REFERENCE.md. However, two commands are missing. getAddressSummary
and getUTXO
Error: Error fetching UTXO yaf8J6Dw7KadZdvYCX3yX1NEc34RUnnCL6,yRvm75mwdxtUmNeg3StuZBboq7U1G8vbSa,ybkPy9jwr9EXyBqynCfZVBjTWD64ZqwPLe,yTV88rRYbSBcPm47Jeq7fqceVFw5NEPi7d,:{_from}:{_to} - max retries to connect to DAPI node reached
at fetchAndReturnUTXO (node_modules/@dashevo/wallet-lib/src/transporters/types/DAPIClientWrapper/methods/getUTXO.js:17:1)
at async DAPIClientWrapper.getUTXO (node_modules/@dashevo/wallet-lib/src/transporters/types/DAPIClientWrapper/methods/getUTXO.js:21:1)
at async DAPIClientWrapper.executor (node_modules/@dashevo/wallet-lib/src/transporters/types/DAPIClientWrapper/methods/subscribeToAddressesTransactions.js:29:1)
Nuxt, Webpack
Variables defined in the .env
file are used instead of defaults
For npm run tx-filter-stream
, the default values are used instead of the .env
provided ones.
Run npm run tx-filter-stream
with custom values defined in .env
Both Core and Platform gRPC endpoints work when running npm run api
.
Only Platform endpoints work.
Core gRPC endpoints do not work because the following code (from here in api.js) results in definitions
only including the last item (...getPlatformDefinition()
currently):
const definitions = {
...getCoreDefinition(),
...getPlatformDefinition(),
};
Log output:
{ definitions:
{ super_: [Function: Client],
service:
{ applyStateTransition: [Object],
getIdentity: [Object],
getDataContract: [Object],
getDocuments: [Object] } } }
Swapping the order to:
const definitions = {
...getPlatformDefinition(),
...getCoreDefinition(),
};
Results in:
{ definitions:
{ super_: [Function: Client],
service:
{ getStatus: [Object],
getBlock: [Object],
sendTransaction: [Object],
getTransaction: [Object],
getEstimatedTransactionFee: [Object],
subscribeToBlockHeadersWithChainLocks: [Object] } } }
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.