
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
@100pay-hq/100pay.js
Advanced tools
100Pay.js is the official Nodejs API wrapper SDK that lets you easily verify crypto payments, run bulk payout, transfer assets and many more.
A TypeScript library for integrating with the 100Pay payment platform, enabling developers to easily accept cryptocurrency payments and manage transactions.
npm install @100pay-hq/100pay.js
Or using yarn:
yarn add @100pay-hq/100pay.js
import { Pay100 } from '@100pay-hq/100pay.js';
// Initialize the 100Pay client
const client = new Pay100({
publicKey: 'your_public_key',
secretKey: 'your_secret_key' // Required for server-side operations
});
// Verify a transaction
async function verifyTransaction(transactionId) {
try {
const result = await client.verify(transactionId);
if (result.status === 'success') {
console.log('Transaction verified:', result.data);
return result.data;
} else {
console.error('Verification failed:', result.message);
return null;
}
} catch (error) {
console.error('Error:', error.message);
throw error;
}
}
const client = new Pay100({
publicKey: string, // Your 100Pay public API key (required)
secretKey?: string, // Your 100Pay secret API key (required for server-side operations)
baseUrl?: string // Optional custom API base URL (defaults to https://api.100pay.co)
});
// Verify a crypto payment transaction
const result = await client.verify(transactionId);
Parameters:
Parameter | Type | Description |
---|---|---|
transactionId | string | The unique ID of the transaction to verify |
Returns:
interface IVerifyResponse {
status: "success" | "error";
data: ITransactionData | Record<string, never>;
message?: string;
}
Example:
try {
const result = await client.verify("tx_123456789");
if (result.status === 'success') {
// Payment is valid
const { amount, currency, status } = result.data;
// Process order fulfillment
} else {
// Payment verification failed
console.error(result.message);
}
} catch (error) {
// Handle verification error
if (error instanceof PaymentVerificationError) {
console.error(`Payment verification failed: ${error.message}`);
}
}
Subaccounts allow you to create and manage separate accounts under your main account.
// Create a subaccount
const subaccount = await client.subaccounts.create({
symbols: ["BTC", "ETH", "USDT"],
networks: ["ETHEREUM", "BSC"],
owner: {
name: "Partner Store",
email: "partner@example.com",
phone: "+1234567890"
},
metadata: {
storeId: "store-123",
region: "US"
}
});
Parameters:
interface CreateSubAccountData {
symbols: string[]; // List of supported cryptocurrencies
networks: string[]; // List of supported blockchain networks
owner: {
name: string; // Owner's name
email: string; // Owner's email
phone: string; // Owner's phone number
};
metadata: Record<string, unknown>; // Custom metadata for the subaccount
}
Returns:
interface CreateSubAccountResponse {
message: string;
accounts: Account[];
}
interface Account {
balance: {
available: number | null;
locked: number | null;
};
accountType: string; // e.g. "subaccount"
walletType: string; // e.g. "crypto"
status: string; // e.g. "active"
_id: string;
name: string; // e.g. "Tether USDT"
symbol: string; // e.g. "USDT"
decimals: string; // e.g. "18"
account: AccountDetails;
contractAddress: string;
logo: string;
userId: string;
appId: string;
network: string;
ownerId: string;
parentWallet: string;
__v: number;
}
interface AccountDetails {
address: string;
key: Key;
network: string;
}
interface Key {
version: number;
id: string;
address: string;
crypto: Crypto;
}
interface Crypto {
ciphertext: string;
cipherparams: {
iv: string;
};
cipher: string;
kdf: string;
kdfparams: {
dklen: number;
salt: string;
n: number;
r: number;
p: number;
};
mac: string;
}
Example:
try {
const result = await client.subaccounts.create({
symbols: ["USDT", "BTC"],
networks: ["ETHEREUM"],
owner: {
name: "Merchant Store",
email: "merchant@example.com",
phone: "+1234567890"
},
metadata: {
businessType: "ecommerce"
}
});
console.log(`Created ${result.accounts.length} accounts for the subaccount`);
// Store wallet addresses for each account
result.accounts.forEach(account => {
console.log(`${account.symbol} wallet: ${account.account.address}`);
});
} catch (error) {
console.error(`Failed to create subaccount: ${error.message}`);
}
Preview currency conversion rates and fees:
// Preview a currency conversion
const conversion = await client.conversion.preview({
amount: 100,
fromSymbol: "BTC",
toSymbol: "USDT",
appId: "your_app_id" // Optional
});
Parameters:
interface CurrencyConversionPayload {
amount: number; // Amount to convert
fromSymbol: string; // Source currency symbol
toSymbol: string; // Target currency symbol
appId?: string; // Optional application ID
}
Returns:
interface CurrencyConversionResult {
convertedAmount: number; // Final amount after conversion
totalAmount: number; // Total amount including fees
feeInUSD: number; // Fee amount in USD
feeInToCurrency: number; // Fee amount in target currency
feeInfromSymbol: number; // Fee amount in source currency
conversionFeeInUSD: number; // Conversion fee in USD
conversionFeeInToCurrency: number; // Conversion fee in target currency
conversionFeeInfromSymbol: number; // Conversion fee in source currency
fromRate: number; // Exchange rate for source currency
toRate: number; // Exchange rate for target currency
intermediateUSDAmount: number; // Intermediate amount in USD
}
Example:
try {
const preview = await client.conversion.preview({
amount: 0.5,
fromSymbol: "BTC",
toSymbol: "USDT"
});
console.log(`Converting 0.5 BTC to USDT:`);
console.log(`You will receive: ${preview.convertedAmount} USDT`);
console.log(`Exchange rate: 1 BTC = ${preview.toRate / preview.fromRate} USDT`);
console.log(`Total fees: ${preview.feeInUSD} USD (${preview.feeInfromSymbol} BTC)`);
} catch (error) {
console.error(`Conversion preview failed: ${error.message}`);
}
The SDK provides a generic request
method for making any API call to the 100Pay API:
const response = await client.request<ResponseType>(
method, // 'GET', 'POST', 'PUT', or 'DELETE'
endpoint, // API endpoint path
data // Request payload
);
Example:
// Get user balance
const balance = await client.request<BalanceResponse>(
'GET',
'/api/v1/user/balance'
);
The SDK provides typed error handling:
try {
const result = await client.verify(transactionId);
// Process result
} catch (error) {
if (error instanceof PaymentVerificationError) {
// Handle payment verification specific error
console.error(`Payment verification failed: ${error.message}`);
} else if (error instanceof Error) {
// Handle general error
console.error(`API error: ${error.message}`);
}
}
This SDK implements secure authentication with 100Pay using API keys and request signing for server-to-server communications:
Client-side operations can use public key only, while server-side operations require both public and secret keys.
This package is built with TypeScript and includes full type definitions. The main types are exported for your convenience:
import {
Pay100,
PaymentVerificationError,
CreateSubAccountData,
CurrencyConversionPayload,
CurrencyConversionResult,
Account,
AccountDetails
} from '@100pay-hq/100pay.js';
verify
method to confirm the transactionconst subaccount = await client.subaccounts.create({
symbols: ["BTC", "ETH", "USDT"],
networks: ["ETHEREUM"],
owner: {
name: "Partner Name",
email: "partner@example.com",
phone: "+1234567890"
},
metadata: {
partnerId: "partner-123"
}
});
// Save the subaccount information for future use
console.log(`Created subaccount with ${subaccount.accounts.length} wallets`);
subaccount.accounts.forEach(account => {
console.log(`${account.symbol} wallet: ${account.account.address}`);
});
// Get conversion rates before executing a trade
const preview = await client.conversion.preview({
amount: 1000,
fromSymbol: "USDT",
toSymbol: "BTC"
});
// Show user the conversion details
console.log(`You will receive approximately ${preview.convertedAmount} BTC`);
console.log(`Exchange rate: 1 USDT = ${preview.toRate / preview.fromRate} BTC`);
console.log(`Fee: ${preview.feeInfromSymbol} USDT (${preview.feeInUSD} USD)`);
# Clone the repository
git clone https://github.com/shop100global/100pay.js.git
cd 100pay.js
# Install dependencies
npm install
# Build the project
npm run build
npm run build
- Build the TypeScript codenpm run build:clean
- Clean the dist directory and buildnpm run test
- Run testsnpm run lint
- Lint the codenpm run lint:fix
- Lint and fix codeFAQs
100Pay.js is the official Nodejs API wrapper SDK that lets you easily verify crypto payments, run bulk payout, transfer assets and many more.
We found that @100pay-hq/100pay.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.