
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@conduit-ucpi/sdk
Advanced tools
TypeScript SDK for Conduit UCPI escrow contracts on EVM-compatible blockchains.
npm install @conduit-ucpi/sdk
import { EscrowSDK, WalletProvider } from '@conduit-ucpi/sdk';
// Initialize SDK
const sdk = new EscrowSDK({
chainId: 43113, // Avalanche Fuji testnet
rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',
usdcContractAddress: '0x5425890298aed601595a70AB815c96711a31Bc65',
userServiceUrl: 'https://api.conduit-ucpi.com/user',
chainServiceUrl: 'https://api.conduit-ucpi.com/chain',
contractServiceUrl: 'https://api.conduit-ucpi.com/contracts'
});
// Connect wallet (implement WalletProvider for your wallet)
await sdk.connectWallet(yourWalletProvider);
// Check USDC balance
const balance = await sdk.getUSDCBalance();
console.log(`Balance: ${sdk.utils.formatUSDC(balance)}`);
// Create escrow contract via backend services
const contract = await sdk.services.contracts.createContract({
sellerEmail: 'seller@example.com',
buyerEmail: 'buyer@example.com',
sellerAddress: '0x...',
amount: '100.00', // Will be converted to microUSDC automatically
description: 'Service delivery escrow',
expiryTimestamp: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000) // 7 days
});
The SDK provides a unified interface for:
The SDK uses a wallet provider abstraction pattern:
interface WalletProvider {
connect(): Promise<void>;
disconnect(): Promise<void>;
getAddress(): Promise<string>;
signTransaction(transaction: any): Promise<string>;
// ... other wallet methods
}
// Implement for your specific wallet
class MyWalletProvider implements WalletProvider {
// Implementation specific to your wallet
}
The SDK maintains strict consistency for currency operations:
// All internal amounts are in microUSDC (1 USDC = 1,000,000 microUSDC)
const amount = sdk.utils.toMicroUSDC('1.50'); // 1500000
const display = sdk.utils.fromMicroUSDC(1500000); // 1.5
const formatted = sdk.utils.formatUSDC(1500000); // "1.5000 USDC"
All timestamps are normalized to milliseconds internally:
// All internal timestamps are Unix milliseconds
const timestamp = sdk.utils.normalizeTimestamp(1700000000); // Converts seconds to ms
const formatted = sdk.utils.formatDateTimeWithTZ(timestamp); // "2023-11-14T22:13:20-05:00"
// Login with Web3Auth token
const auth = await sdk.services.user.login({
idToken: 'web3auth-token',
walletAddress: await sdk.getWalletAddress()
});
// Get user's contracts
const contracts = await sdk.services.contracts.getUserContracts(
userAddress,
'address'
);
// Query contracts with filters
const activeContracts = await sdk.services.contracts.getContracts({
status: 'active',
startDate: new Date('2024-01-01'),
limit: 10
});
// Submit USDC transfer
const transfer = await sdk.services.chain.submitUSDCTransfer({
to: recipientAddress,
amount: '10.00', // Automatically converted to microUSDC
signedTransaction: signedTx
});
// Create escrow contract on-chain
const escrow = await sdk.services.chain.createEscrowContract({
buyer: buyerAddress,
seller: sellerAddress,
amount: '100.00',
expiryTimestamp: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
description: 'Service delivery'
});
The SDK provides consistent error handling:
import { SDKError, SDKErrorCode } from '@conduit-ucpi/sdk';
try {
await sdk.connectWallet(provider);
} catch (error) {
if (error instanceof SDKError) {
switch (error.code) {
case SDKErrorCode.WALLET_NOT_CONNECTED:
console.log('Please connect your wallet');
break;
case SDKErrorCode.INVALID_ADDRESS:
console.log('Invalid wallet address');
break;
default:
console.log(`SDK Error: ${error.message}`);
}
}
}
// Avalanche Mainnet
const mainnetConfig = {
chainId: 43114,
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',
usdcContractAddress: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
};
// Avalanche Fuji Testnet
const testnetConfig = {
chainId: 43113,
rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc',
usdcContractAddress: '0x5425890298aed601595a70AB815c96711a31Bc65'
};
const config = {
// ... network config
userServiceUrl: 'https://api.conduit-ucpi.com/user',
chainServiceUrl: 'https://api.conduit-ucpi.com/chain',
contractServiceUrl: 'https://api.conduit-ucpi.com/contracts'
};
Main SDK class providing unified access to all functionality.
UserServiceClient - Authentication and user managementChainServiceClient - Blockchain operations and gas managementContractServiceClient - Escrow contract CRUD operationsvalidation - Address, amount, email validation functionsformatting - Currency, timestamp, display formatting functionsconstants - Network configurations and known contract addressesnpm installnpm testnpm run buildMIT
FAQs
TypeScript SDK for Conduit UCPI escrow contracts on EVM
The npm package @conduit-ucpi/sdk receives a total of 5 weekly downloads. As such, @conduit-ucpi/sdk popularity was classified as not popular.
We found that @conduit-ucpi/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.