
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
@pythnetwork/express-relay-evm-js
Advanced tools
Utilities for interacting with the express relay protocol
Utility library for interacting with the Pyth Express Relay API.
$ npm install --save @pythnetwork/express-relay-evm-js
$ yarn add @pythnetwork/express-relay-evm-js
To generate the latest type declarations from the server openapi schema, run:
npm run generate-api-types
import {
Client,
OpportunityParams,
BidParams,
} from "@pythnetwork/express-relay-evm-js";
function calculateOpportunityBid(opportunity: Opportunity): BidParams | null {
// searcher implementation here
// if the opportunity is not suitable for the searcher, return null
}
async function bidStatusCallback(bidStatus: BidStatusUpdate) {
console.log(`Bid status for bid ${bidStatus.id}: ${bidStatus.status.status}`);
}
async function opportunityCallback(opportunity: Opportunity) {
const bidParams = calculateOpportunityBid(opportunity);
if (bidParams === null) return;
const opportunityBid = await client.signOpportunityBid(
opportunity,
bidParams,
privateKey // searcher private key with appropriate permissions and assets
);
await client.submitOpportunityBid(opportunityBid);
}
const client = new Client(
{ baseUrl: "https://per-staging.dourolabs.app/" },
bidStatusCallback,
opportunityCallback
);
await client.subscribeChains([chain_id]); // chain id you want to subscribe to
There is an example searcher in examples directory.
This example fetches OpportunityParams
from the specified endpoint,
creates a fixed bid on each opportunity and signs them with the provided private key, and finally submits them back to the server. You can run it with
npm run simple-searcher
. A full command looks like this:
npm run simple-searcher -- \
--endpoint https://per-staging.dourolabs.app/ \
--chain-id op_sepolia \
--private-key <YOUR-PRIVATE-KEY>
Note that if you are using a localhost server at http://127.0.0.1
, you should specify --endpoint http://127.0.0.1:{PORT}
rather than http://localhost:{PORT}
, as Typescript maps localhost
to ::1
in line with IPv6 rather than to 127.0.0.1
as with IPv4.
FAQs
Utilities for interacting with the express relay protocol
The npm package @pythnetwork/express-relay-evm-js receives a total of 126 weekly downloads. As such, @pythnetwork/express-relay-evm-js popularity was classified as not popular.
We found that @pythnetwork/express-relay-evm-js demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.