
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@0xmetropolis/metal-sdk
Advanced tools
A flexible Node SDK for interacting with the Metal API. This SDK provides a clean interface for all Metal API endpoints with separate configurations for client-side and server-side usage.
For more information on the Metal API, please refer to the Metal API Docs.
For public endpoints that don't require secret keys, use the public client:
import { Metal } from "@0xmetropolis/metal-sdk";
// Initialize with public key
const metal = Metal.createPublicClient("your_public_key");
// Examples of client-safe operations:
// Get holder details
const holder = await metal.holder.getHolder("user123");
// Get token balance
const balance = await metal.holder.getTokenBalance(
"user123",
"tokenAddress"
);
For protected endpoints that require authentication, use the secret client:
import { Metal } from "@0xmetropolis/metal-sdk";
// Initialize with secret key
const metal = Metal.createSecretClient("your_secret_key");
// Examples of server-side operations:
// Create a new token
const tokenJob = await metal.createToken({
name: "My Token",
symbol: "MTK",
});
// Distribute tokens
const distribution = await metal.distribute("tokenAddress", {
sendToAddress: "holderAddress",
amount: "100",
});
// Get or create holder
const holder = await metal.getOrCreateHolder("user123");
🚨 Note: Never expose your secret key in client-side code. The secret client should only be used in secure server environments.
Implement changes, add features, etc.
Bump the version in package.json
npm install && npm run build. Ensure the build passes.
npm login (if not already logged in)
npm publish.
FAQs
A Node.js SDK for metal.build
We found that @0xmetropolis/metal-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.