Catalog npm
PACKAGE EXPLORERView in registry

@0xmetropolis/metal-sdk

npm

A Node.js SDK for metal.build

metalnodesdk
Versions collected2
Direct dependencies6From release 0.1.1
Last observed21 Oct, 09:08 UTC

README

Current package documentation

Metal SDK

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.

Frontend Setup (Client-side)

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"
);

Backend Setup (Server-side)

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.

Publishing

  1. Implement changes, add features, etc.

  2. Bump the version in package.json

  3. npm install && npm run build. Ensure the build passes.

  4. npm login (if not already logged in)

  5. npm publish.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1Registry latest1 Apr 20256
0.1.031 Mar 20256

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:68da1474bdd1d5fd738568b5870bee8943d3ed3d8725129b275992ecf74a68d4