
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@ton-api/ton-adapter
Advanced tools
@ton-api/ton-adapter is an adapter that enables integration between
TonApi client and the
@ton/ton and
@ton/core libraries. This adapter allows developers to
use TonApi's functionality while maintaining compatibility with existing TON blockchain development
tools.
@ton-api/client@ton/ton and @ton/core contract wrappersInstall the package and its peer dependency using npm, yarn, or pnpm:
npm install @ton-api/client @ton-api/ton-adapter
# or
yarn add @ton-api/client @ton-api/ton-adapter
# or
pnpm add @ton-api/client @ton-api/ton-adapter
Here's a basic example to get you started:
import { SendMode, WalletContractV5R1, internal } from '@ton/ton';
import { mnemonicNew, mnemonicToPrivateKey } from '@ton/crypto';
import { TonApiClient } from '@ton-api/client';
import { ContractAdapter } from '@ton-api/ton-adapter';
// Initialize TonApi client
const ta = new TonApiClient({
baseUrl: 'https://tonapi.io',
apiKey: 'YOUR_API_KEY'
});
// Create an adapter
const adapter = new ContractAdapter(ta);
// Create and use a wallet contract
async function main() {
const mnemonics = await mnemonicNew();
const keyPair = await mnemonicToPrivateKey(mnemonics);
const wallet = WalletContractV5R1.create({ workchain: 0, publicKey: keyPair.publicKey });
// Open the contract using the adapter
const contract = adapter.open(wallet);
// Get balance
const balance = await contract.getBalance();
console.log('Balance:', balance.toString());
// Send a transfer
const seqno = await contract.getSeqno();
await contract.sendTransfer({
seqno,
secretKey: keyPair.secretKey,
sendMode: SendMode.PAY_GAS_SEPARATELY + SendMode.IGNORE_ERRORS,
messages: [
internal({
value: '0.001',
to: 'EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N',
body: 'Hello world'
})
]
});
}
main().catch(console.error);
ContractAdapter with the TonApi client.open method of the adapter to work with any @ton/ton or @ton/core compatible smart
contract wrapper.MIT
FAQs
TonApi adapter for @ton/ton
We found that @ton-api/ton-adapter 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.