
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@axelarjs/cosmos
Advanced tools
type-safe clients for axelar's cosmos node
pnpm add @axelarjs/cosmos
Simulate a link
transaction
import { AXELAR_RPC_URLS } from "@axelarjs/core";
import { STANDARD_FEE } from "@axelarjs/cosmos/constants";
import { createAxelarSigningClient } from "@axelarjs/cosmos/constants/stargateClient";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { toAccAddress } from "@cosmjs/stargate/build/queryclient/utils";
const offlineSigner = await DirectSecp256k1HdWallet.fromMnemonic(
process.env["COSMOS_WALLET_MNEMONIC"] as string,
{ prefix: "axelar" }
);
const client = await createAxelarSigningClient(
AXELAR_RPC_URLS.testnet,
offlineSigner
);
const [accData] = await offlineSigner.getAccounts();
if (!accData) {
throw new Error("Invalid response from offlineSigner.getAccounts()");
}
const estimateGas = await client.tx.evm.link.simulate(accData.address, {
sender: toAccAddress(String(accData.address)),
recipientAddr: "0xB8Cd93C83A974649D76B1c19f311f639e62272BC",
recipientChain: "avalanche",
asset: "wavax-wei",
chain: "fantom",
});
console.log({ estimateGas });
Broadcast a link
transaction
import { AXELAR_RPC_URLS } from "@axelarjs/core";
import { STANDARD_FEE } from "@axelarjs/cosmos/constants";
import { createAxelarSigningClient } from "@axelarjs/cosmos/constants/stargateClient";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { toAccAddress } from "@cosmjs/stargate/build/queryclient/utils";
const offlineSigner = await DirectSecp256k1HdWallet.fromMnemonic(
process.env["COSMOS_WALLET_MNEMONIC"] as string,
{ prefix: "axelar" }
);
const client = await createAxelarSigningClient(
AXELAR_RPC_URLS.testnet,
offlineSigner
);
const [accData] = await offlineSigner.getAccounts();
if (!accData) {
throw new Error("Invalid response from offlineSigner.getAccounts()");
}
const txResponse = await client.tx.evm.link.signAndBroadcast(
accData.address,
{
sender: toAccAddress(String(accData?.address)),
recipientAddr: "0xB8Cd93C83A974649D76B1c19f311f639e62272BC",
recipientChain: "avalanche",
asset: "wavax-wei",
chain: "fantom",
},
STANDARD_FEE
);
console.log({ txResponse });
FAQs
Cosmos SDK for Axelar Network
The npm package @axelarjs/cosmos receives a total of 1,155 weekly downloads. As such, @axelarjs/cosmos popularity was classified as popular.
We found that @axelarjs/cosmos 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.