
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
Helper library to interact with xToken contracts written in Typescript with full typing support. It allows access to the low level API to directly interact with the contracts.
yarn add xtoken-js
At the moment, xtoken-js requires using xtoken-abis and ethers.js v5.0.30
yarn add xtoken-abis
yarn add ethers@5.0.30
GitHub pages: https://xtokenmarket.github.io/xtoken-js
import { ethers } from 'ethers'
import { X_KNC_A } from 'xtoken-abis'
import { XToken } from 'xtoken-js'
// Setup provider
const provider = new ethers.providers.InfuraProvider('homestead', '<API KEY>')
// Initialize XToken
const xToken = new XToken(provider)
// Calculate expected mint quantity for tokens
const expectedQty = await xToken.getExpectedQuantityOnMint(X_KNC_A, true, '1') // args: `symbol`, `tradeWithEth` & `amount`
typescript-eslint and Prettieryarn watch:build
yarn watch:test
In order to run a single test, you can use the name of the test or regex name to match the tests to be executed
yarn build && npx ava -m='*prices*'
To automatically fix eslint and prettier formatting issues, run:
yarn fix
To generate and view test coverage, run:
yarn cov
This will create an HTML report of test coverage – source-mapped back to Typescript – and open it in your default browser.
The src folder is analyzed and documentation is automatically generated using TypeDoc.
yarn doc
This command generates the library documentation in HTML format and opens it in a browser.
Since types are tracked by Typescript, there's no need to indicate types in JSDoc format. For more information, see the TypeDoc documentation.
To generate and publish documentation to GitHub Pages use the following command:
yarn doc:publish
Once published, documentation should be available at the GitHub Pages
Before publishing the package to NPM, prepare-release command builds, runs the tests, increases the package version automatically and publishes the docs to GitHub Pages.
yarn prepare-release
Once the above command runs successfully, you should then execute the below command which will tag the release version and publish the build to NPM.
Note: Before publishing the package, ensure that the package.json has the version field incremented and also the build folder has the compiled code.
git push --follow-tags origin main && npm publish
Created using typescript-starter
FAQs
JS helper library to interact with xToken contracts
We found that xtoken-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.