
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.
@0xsequence/anypay-sdk
Advanced tools
Anypay SDK for sending any token from any chain.
⚠️ This is a work in progress!
npm install @0xsequence/anypay-sdk
The easiest way to integrate Anypay is using our pre-built React widget:
import { AnyPayWidget } from '@0xsequence/anypay-sdk/widget'
export const App = () => {
const sequenceApiKey = import.meta.env.VITE_SEQUENCE_API_KEY
return (
<AnyPayWidget
sequenceApiKey={sequenceApiKey}
/>
)
}
If you need more control, you can use the low-level APIs directly:
import { prepareSend } from '@0xsequence/anypay-sdk'
import { createWalletClient, custom } from 'viem'
// Initialize a wallet client
const client = createWalletClient({
account,
chain: getChainConfig(chainId),
transport: custom(window.ethereum),
})
// Prepare and send a transaction
const options = {
account,
originTokenAddress: '0x0000000000000000000000000000000000000000', // ETH
originChainId: 42161, // Arbitrum
originTokenAmount: '1000000000000000',
destinationChainId: 8453, // Base
recipient: '0xYourRecipientAddress',
destinationTokenAddress: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // USDC on Base
destinationTokenAmount: '300003', // Amount in USDC decimals (6)
sequenceApiKey: 'your-api-key',
fee: '5600000000000',
client,
}
const { intentAddress, send } = await prepareSend(options)
console.log('Intent address:', intentAddress.toString())
// Send the transaction
await send()
import {
getAPIClient,
getRelayer,
getIntentCallsPayloads,
calculateIntentAddress,
commitIntentConfig,
sendOriginTransaction,
getERC20TransferData,
} from '@0xsequence/anypay-sdk'
import { createWalletClient, http } from 'viem'
import { arbitrum } from 'viem/chains'
async function sendCrossChainToken() {
// Initialize clients
const apiClient = getAPIClient('http://localhost:4422', process.env.SEQUENCE_API_KEY)
const originRelayer = getRelayer({ env: 'local' }, originChainId)
const destinationRelayer = getRelayer({ env: 'local' }, destinationChainId)
// Create intent
const args = {
userAddress: account.address,
originChainId: 42161,
originTokenAddress: '0x0000000000000000000000000000000000000000',
originTokenAmount: '1000000000000000',
destinationChainId: 8453,
destinationToAddress: destinationTokenAddress,
destinationTokenAddress: destinationTokenAddress,
destinationTokenAmount: destinationTokenAmount,
destinationCallData: getERC20TransferData(recipient, BigInt(destinationTokenAmount)),
destinationCallValue: '0',
}
const intent = await getIntentCallsPayloads(apiClient, args)
// Calculate and commit intent
const intentAddress = calculateIntentAddress(account.address, intent.calls, intent.lifiInfos)
await commitIntentConfig(apiClient, account.address, intent.calls, intent.preconditions, intent.lifiInfos)
// Monitor transaction status
const status = await getMetaTxStatus(relayer, metaTxId, chainId)
console.log('Transaction status:', status)
}
# Install dependencies
pnpm install
# Build the package
pnpm run build
# Run tests
pnpm test
MIT License
FAQs
SDK for Anypay functionality
The npm package @0xsequence/anypay-sdk receives a total of 2 weekly downloads. As such, @0xsequence/anypay-sdk popularity was classified as not popular.
We found that @0xsequence/anypay-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.