Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
adamant-api
Advanced tools
Changelog
[2.3.0] - 2024-03-01
transformTransactionQuery
function:
const transformed = transformTransactionQuery({
fromHeight: 7585271,
and: {
toHeight: 7586280,
},
or: {
senderId: 'U18132012621449491414',
},
});
/**
* {
* and:fromHeight: 7585271,
* and:toHeight: 7586280,
* or:senderId: 'U18132012621449491414'
* }
*/
console.log(transformed);
TypeScript: id
should have string
type in the methods: api.getTransaction()
, api.getQueuedTransaction()
, api.getUnconfirmedTransaction()
Global installation of packages that use adamant-api
as its dependency
Transaction query methods:
const blocks = await api.getTransactions({
fromHeight: 7585271,
and: {
toHeight: 7586280,
},
or: {
senderId: 'U18132012621449491414',
},
});
Readme
ADAMANT JavaScript API is a library intended to interact with ADAMANT blockchain for JavaScript developers. Also ADAMANT Console and ADAMANT node Direct API are available.
Features:
JS API shows decentralization in action—if a network node cannot fulfill your request, the library will redirect it to another node, and so on several times. You will get the result and you do not need to think about processing the request.
Health Check system pings all nodes in the list using /status
endpoint, and connects to a node with actual height. When the library unable to process request with current node, it forces to re-initialize Health Check.
Install library from npm:
npm i adamant-api
Initialize the library:
const { AdamantApi } = require('adamant-api')
const nodes = [
"http://localhost:36666",
"https://endless.adamant.im",
"https://clown.adamant.im",
"http://23.226.231.225:36666",
"http://88.198.156.44:36666",
"https://lake.adamant.im"
];
const api = new AdamantApi({
nodes,
});
Request example:
const response = await api.getBlocks()
console.log(response.data)
See Wiki for documentation and usage.
FAQs
JavaScript API library for the ADAMANT Blockchain
The npm package adamant-api receives a total of 31 weekly downloads. As such, adamant-api popularity was classified as not popular.
We found that adamant-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.