
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@thinkalpha/fix-client
Advanced tools
import { Instant } from '@js-joda/core';
import { Subject } from 'rxjs';
import { createFixClient, FIX42, FixEncoderMeta, FIX_TYPE } from '../';
// extend message type existing message will be extended and FIX42.AllMessages will hold updated interface
declare module '../' {
namespace FIX42 {
export interface Heartbeat extends FIX42.FixMessage {
MyTag1: string;
}
}
}
// add custom tag so Encode/Decode know what to do with a new tag
const coderExtension: Partial<FixEncoderMeta> = {
name2Field: {
MyTag1: {
type: FIX_TYPE.STRING,
number: '10001',
},
},
};
// new tag is required
const msg: FIX42.Heartbeat = {
MsgType: FIX42.MsgTypeEnum.HEARTBEAT,
MyTag1: 'test', // if you comment this error will be triggered
};
// header is also typed
const header = {
SenderCompID: 'sender',
TargetCompID: 'traget', // if you don't provide required field error will be triggered in client.send call
SendingTime: Instant.parse('2024-01-01T10:00:00.000Z'),
};
const clientConfig = {
endpoints: [
{
host: 'localhost',
port: 1234,
},
],
timeout: 10,
pause$: new Subject<boolean>(),
};
// improved way to create a FixClient (less template parameters, more typesafety)
const client = createFixClient<FIX42.AllMessages, FIX42.MessageHeader, FIX42.MessageTrailer>(
clientConfig,
'FIX.4.2-custom', // begin string
FIX42.coderMeta, // defaults provided by generated code
coderExtension, // extensions to make new fields work
);
client.start();
client.send(1, msg, header).catch((e) => console.error(e));
client.messages$.subscribe((msg) => {
console.log(FIX42.coderMeta.msgType2msgName[msg.MsgType]);
if (msg.MsgType === FIX42.MsgTypeEnum.HEARTBEAT) {
console.log(msg.MyTag1);
}
});
FAQs
FIX client
We found that @thinkalpha/fix-client demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.