Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@dashevo/dapi-client
Advanced tools
Client library used to access Dash DAPI endpoints
This library enables HTTP-based interaction with the Dash blockchain and Dash Platform via the decentralized API (DAPI) hosted on Dash masternodes.
DAPI-Client
provides automatic server (masternode) discovery using either a default seed node or a user-supplied oneDAPI-Client
maps to DAPI's RPC and gRPC endpointsnpm install @dashevo/dapi-client
const DAPIClient = require('@dashevo/dapi-client');
const client = new DAPIClient();
client.core.getStatus().then((coreStatus) => {
console.dir(coreStatus);
});
Custom seed nodes are necessary for connecting the client to devnets since the client library is unaware of them otherwise.
const DAPIClient = require('@dashevo/dapi-client');
var client = new DAPIClient({
seeds: [{
host: 'seed-1.evonet.networks.dash.org',
port: 443,
}],
});
client.core.getBestBlockHash().then((r) => {
console.log(r);
});
Note: The seed node shown above (seed-1.evonet.networks.dash.org
) is for the Dash Evonet testing network.
Custom addresses may be directly specified in cases where it is beneficial to know exactly what node(s) are being accessed (e.g. debugging, local development, etc.).
const DAPIClient = require('@dashevo/dapi-client');
var client = new DAPIClient({
dapiAddresses: [
'127.0.0.1:443',
'127.0.0.2:443',
],
});
client.core.getBestBlockHash().then((r) => {
console.log(r);
});
DAPI Client options can be passed directly to any command to override any predefined client options and modify the client's behavior for that specific call.
const DAPIClient = require('@dashevo/dapi-client');
// Set options to direct the request to a specific address and disable retries
const options = {
dapiAddresses: ['127.0.0.1'],
retries: 0,
};
client.core.getBestBlockHash(options).then((r) => {
console.log(r);
});
More extensive documentation available at https://dashpay.github.io/platform/DAPI-Client/.
Feel free to dive in! Open an issue or submit PRs.
MIT © Dash Core Group, Inc.
FAQs
Client library used to access Dash DAPI endpoints
The npm package @dashevo/dapi-client receives a total of 202 weekly downloads. As such, @dashevo/dapi-client popularity was classified as not popular.
We found that @dashevo/dapi-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.