
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@printr/sdk
Advanced tools
TypeScript SDK for the Printr API - create and manage tokens across EVM chains and Solana
TypeScript SDK for Printr — create and manage tokens across EVM chains and Solana.
npm install @printr/sdk
# or
bun add @printr/sdk
# or
yarn add @printr/sdk
import { createPrintrClient, buildToken } from '@printr/sdk';
const client = createPrintrClient({
apiKey: process.env.PRINTR_API_KEY!,
baseUrl: process.env.PRINTR_API_BASE_URL ?? 'https://api-preview.printr.money',
});
const result = await buildToken(
{
creator_accounts: ['eip155:8453:0xYourAddress'],
name: 'My Token',
symbol: 'TKN',
description: 'A cool token',
chains: ['eip155:8453'], // Base
initial_buy: { spend_usd: 10 },
},
client,
);
if (result.isOk()) {
console.log('Token created:', result.value.token_id);
}
import { signAndSubmitEvm } from '@printr/sdk/evm';
try {
const txResult = await signAndSubmitEvm(
result.value.deployments[0].payload,
process.env.EVM_WALLET_PRIVATE_KEY!,
'https://mainnet.base.org',
);
console.log('Transaction hash:', txResult.tx_hash);
} catch (error) {
console.error('Transaction failed:', error);
}
import { getEvmTokenBalance } from '@printr/sdk/balance';
const balance = await getEvmTokenBalance(
'eip155:8453',
'0xTokenAddress',
'0xWalletAddress',
'https://mainnet.base.org',
);
console.log(`Balance: ${balance.formatted} ${balance.symbol}`);
import { transferToken } from '@printr/sdk/transfer';
const transfer = await transferToken({
chain: 'eip155:8453',
tokenAddress: '0x...',
to: '0xRecipientAddress',
amount: '1.5',
privateKey: process.env.EVM_WALLET_PRIVATE_KEY!,
rpcUrl: 'https://mainnet.base.org',
});
The SDK is organized into focused modules that can be imported individually:
// Main exports
import { createPrintrClient, buildToken } from '@printr/sdk';
// Client utilities
import { createPrintrClient } from '@printr/sdk/client';
// Chain information
import { chains, getChainByCAIP } from '@printr/sdk/chains';
// EVM operations
import { signAndSubmitEvm, deriveEVMAddress } from '@printr/sdk/evm';
// Solana operations
import { signAndSubmitSvm, deriveSOLAddress } from '@printr/sdk/svm';
// Balance queries
import { getBalance } from '@printr/sdk/balance';
// Token transfers
import { transferToken } from '@printr/sdk/transfer';
// Encrypted keystore
import { createKeystore, saveKeystore, loadKeystore } from '@printr/sdk/keystore';
// Image generation
import { generateImage } from '@printr/sdk/image';
// Type schemas
import { BuildTokenInput, QuoteInput } from '@printr/sdk/schemas';
// CAIP utilities
import { parseCAIP, formatCAIP } from '@printr/sdk/caip';
| Variable | Description |
|---|---|
PRINTR_API_KEY | Optional API key. Defaults to public AI integration key |
PRINTR_API_BASE_URL | API base URL (default: https://api-preview.printr.money) |
OPENROUTER_API_KEY | For AI image generation |
OPENROUTER_IMAGE_MODEL | Image model override (default: google/gemini-2.5-flash-image) |
EVM_WALLET_PRIVATE_KEY | Default EVM private key for signing |
SVM_WALLET_PRIVATE_KEY | Default Solana keypair secret for signing |
PRINTR_DEPLOYMENT_PASSWORD | Master password for encrypted keystore (min 16 chars) |
The SDK uses AES-256-GCM encryption with scrypt key derivation to securely store wallet private keys:
import { createKeystore, saveKeystore, addWallet } from '@printr/sdk/keystore';
// Create encrypted keystore (stored at ~/.printr/wallets.json)
const keystore = createKeystore(password);
// Add wallets
const evmWallet = addWallet(keystore, {
label: 'my-evm-wallet',
chainType: 'evm',
privateKey: '0x...',
password,
});
const svmWallet = addWallet(keystore, {
label: 'my-sol-wallet',
chainType: 'svm',
privateKey: 'base58-secret',
password,
});
// Save to disk
saveKeystore(keystore);
eip155:1eip155:8453eip155:137eip155:42161eip155:10eip155:43114eip155:56solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpcreatePrintrClient(options?: {
apiKey?: string;
baseUrl?: string;
}): PrintrClient
buildToken(input: BuildTokenInput, client: PrintrClient): Promise<Result<BuildTokenOutput>>
getToken(tokenId: string, client: PrintrClient): Promise<Result<TokenDetails>>
quoteToken(input: QuoteInput, client: PrintrClient): Promise<Result<QuoteOutput>>
signAndSubmitEvm(params: {
chain: string;
payload: object;
privateKey: string;
rpcUrl: string;
}): Promise<Result<{ tx_hash: string }>>
signAndSubmitSvm(params: {
chain: string;
payload: object;
privateKey: string;
rpcUrl?: string;
}): Promise<Result<{ tx_hash: string }>>
import { generateImage } from '@printr/sdk/image';
const result = await generateImage({
prompt: 'A futuristic digital coin with purple glow',
apiKey: process.env.OPENROUTER_API_KEY!,
});
if (result.ok) {
console.log('Image URL:', result.value.url);
}
import { chains, getChainByCAIP } from '@printr/sdk/chains';
// List all supported chains
console.log(chains);
// Get specific chain info
const base = getChainByCAIP('eip155:8453');
console.log(base?.name); // "Base"
All operations return Result<T, E> types from neverthrow:
const result = await buildToken(input, client);
if (result.isOk()) {
console.log('Success:', result.value);
} else {
console.error('Error:', result.error);
}
// Or use match
result.match(
(value) => console.log('Success:', value),
(error) => console.error('Error:', error),
);
The SDK is written in TypeScript and exports all types:
import type {
BuildTokenInput,
BuildTokenOutput,
QuoteInput,
QuoteOutput,
TokenDetails,
Chain,
Keystore,
} from '@printr/sdk';
# Install dependencies
bun install
# Build
bun run build
# Test
bun test
# Type check
bun run typecheck
Apache-2.0
FAQs
TypeScript SDK for the Printr API - create and manage tokens across EVM chains and Solana
The npm package @printr/sdk receives a total of 21 weekly downloads. As such, @printr/sdk popularity was classified as not popular.
We found that @printr/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.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.