Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
cardano-decodes-wallet-api
Advanced tools
Local server for decoding strings used in Cardano wallets based on CIP-0030.
This package works from the command line! So it is necessary to install globally via NPM.
npm i -g cardano-decodes-wallet-api
To start the service I use PM2 but you can do it any way you need.
pm2 start cardano-decodes-wallet-api
You may want to set the port where the service will start.
By default it starts on port 4002.
pm2 start cardano-decodes-wallet-api -- --port 4004
Otherwise you can start the service however you like by running command:
cardano-decodes-wallet-api
Or defining a port:
cardano-decodes-wallet-api --port 4004
Return balance through data collected in wallet.getBalance method from wallets compatible with CIP-0030.
/decodes/balance/code_from_wallet_getBalance
Response
{
"locked": {
"decimal": 1.48148,
"lovelace": 1481480
},
"total": {
"decimal": 7.017871,
"lovelace": 7017871
},
"total_free": {
"decimal": 5.536391,
"lovelace": 5536391
}
}
Return all NFTs through data collected in wallet.getBalance method from CIP-0030 compliant wallets.
/decodes/nfts/code_from_wallet_getBalance
Response
{
"data": [{
"token": "aec5a6dac10ec781df9f337d33ef7d55b9b48535668b8038affa326c4c696c476f61743036343236",
"asset_hex": "4c696c476f61743036343236",
"asset_name": "LilGoat06426",
"policy_id": "aec5a6dac10ec781df9f337d33ef7d55b9b48535668b8038affa326c",
"qty": 1
}],
"total": 1
}
Return all human-readable addresses through data collected in wallet.getUsedAddresses, wallet.getUnusedAddresses, wallet.getChangeAddress, wallet.getRewardAddresses methods of CIP-0030 compliant wallets.
/decodes/address/code_from_wallet
Response Address
[
"addr_test1qphl6y5cgjq4tquv9kngd959z9hexze7vlcrg504aql7dh47ec4mkh9pe4f33rhgtp7twaufavmza8ju7dwl9y5zm3yq28cxvn"
]
Response Stake Adress
[
"stake1uxjq7qun5w4dk79a49s04ker42d486j4zmqhl8hzk46a88ctdjwc7"
]
Search for NFTs through data collected in the wallet.getBalance method of wallets compatible with CIP-0030.
TYPE: all columns that can be fetched
QUERY: data to fetch, if TYPE is policy_id, then query is the policyID to find.
/decodes/nfts/search/QUERY/TYPE/code_from_wallet_getBalance
In QUERY when used an @ before the word it searches for any part of an item, similar to what SQL LIKE does.
/decodes/nfts/search/@QUERY/TYPE/code_from_wallet_getBalance
I recommend and, if necessary, that the index.js file be analyzed for a better understanding.
If you are going to use this package in production, consider using it as a local service and being consumed internally by an application.
npm install
Copyright (c) 2022 Gercil Junio
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Local server for decoding strings used in Cardano wallets based on CIP-0030.
The npm package cardano-decodes-wallet-api receives a total of 0 weekly downloads. As such, cardano-decodes-wallet-api popularity was classified as not popular.
We found that cardano-decodes-wallet-api 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.