
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
JavaScript library for the creation, scanning and sending of DAPS privacy coins
NodeJS library for making DAPS privacy transactions
API Call List:
| Request | Response | ||||
| Descriptions | Verb | URI Prefix | Method | Params | |
| Requests API to scan for utxos and return them | post | wallet | scan | viewkey:${viewkey} spendpub:${pubspenkey} sinceblock: ${sinceblock} filterspents: true/false => true means only return unspent utxos | "scanning": false, "scannedheight": 477302, "utxos": [keyimage],"txes": { "keyimage": { "vin": [], "vout": [], "blockindex": 476098, "blocktime": 1592551400, "txfee": 1.496, "ringsize": 13, "_id": "5eec67d9824cf9f9a0195dd8", "txid": "keyimage", "__v": 0, "blockhash": "36540454e15e8a4fc20311feff8e4084e14fb532a855a70a43cbb2beeaca5e76", "type": "standard" } }, |
| Requests the last scanned height for the key pair | post | wallet | getscannedheight | viewkey:${viewkey} spendpub:${pubspenkey} | |
| get | api | keyimages | ${keyimages} | {"spents":[],"unspents":["13a3caf5416c349f362735b70b6a2f63c2f94fca9ce2bbfb70848d3f102cb054"]} | |
| Get the latest API block height | get | api | blockcount | ||
| Get decoys from the API | get | api | decoys | $(number) | |
| Generates the bulletproof for the given params | get | api | bulletproofs | ${bpinputSerializedHex} | |
| Broadcasts the raw transaction | post | api | broadcasttx | ${rawSignedTx} | |
| server public key for encrypting view key and spend public key | get | api | getencryptionkey | ||
| Allows utxo's to be added to the API | post | wallet | addutxos | viewkey:${viewkey} spendpub:${pubspenkey} scannedheight: ${scannedheight} utxos: string in format txid-index:txid-index... | |
| Marks the given utxos as spent in the API | Post | wallet | markspents | viewkey:${viewkey} spendpub:${pubspenkey} spents: string in format txid-index:txid-index... |
Note: You must obtain API info and Server Encryption Key from the DAPS team to be able to access the API. These are placed in the src/dapslib/config.js.
const Wallet = require('dapsjs').Wallet;
const config = require('dapsjs').Constants;
var walletObject = new Wallet({mnemonics: mnemonics.mnemonics}, config.DAPS_SERVER, config.DAPSCHAIN, "Bitcoin seed");
Once wallet object created, then it will automatically send requests to the RPC server to scan for all transactions belonging to the wallet.
function getBalance(wl) {
if (wl.isScanning) return 'wallet is scanning';
return {spendable: wl.spendable, immature: wl.immature, pending: wl.pending}
}
Note that wl.isScanning should be always false, except if the user is logging-in the wallet, which might take from 5 second to 1 minute to finishn scanning, depending whether the user log-in the wallet previously or not.
Wallet will periodically send request to the server every minute to scan for new wallet transactions.
For third-party integration, nothing needs to be done except initialize the wallet object and uses it to show information on the apps of the third-parties.
wl.currentBlockHeight
walletObject.sendTo(destination, amount, function(ret) {
if (ret.success) {
state.txCreateResult = {success: true, message: "Successfully create transaction " + ret.txid + " sending " + input.amount + " to " + input.destination};
} else {
state.txCreateResult = {success: false, message: "Error:" + ret.reason};
}
walletObject.recomputeBalance();
})
** destination: the receiver address
** amount: amount to send. Amount should be in decimal string
It is worth noting that the wallet object will manage and recompute balances so that third-parties only need to inject the wallet object in their app.
If it’s a new wallet, you would only need to set sinceBlock = the currentBlock height => done!
Note: r in the request sent to server is R in the formulae
Statuses have been added to keep the user up to date as to what the wallet is currently doing. Each status also has a corresponding currentStatusVal integer that can be accessed as well.
Get the current Status:
wl.currentStatus
Get the current StatusVal:
wl.currentStatusValue
npm installsrc/dapslib/config.js with the required informationnpm run testsFAQs
JavaScript library for the creation, scanning and sending of DAPS privacy coins
We found that dapsjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.