npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

client-demo-app

v1.0.1

Published

Demo application using Phantom Client and Crypto packages

Readme

Phantom Client Demo Apps

This directory contains demo applications showcasing Phantom Client functionality, including basic setup and advanced multi-authenticator features.

Available Scripts

1. Basic Setup Tool (yarn dev)

Sets up your Phantom wallet infrastructure by generating credentials and creating your organization:

  1. Generate a cryptographic Ed25519 key pair for your organization
  2. Save credentials to a secure JSON file
  3. Create your organization using the Phantom API
  4. Generate a test wallet to verify functionality
  5. Create comprehensive Server SDK documentation with your credentials

2. Multi-Authenticator Demo (yarn multi-auth)

Demonstrates the Phantom Client with multi-authenticator support:

  1. Generate multiple key pairs for different authenticators
  2. Create an organization with multiple authenticators (keypair, PKI, OIDC)
  3. Test methods: getOrganization, getWalletWithTag, createAuthenticator, deleteAuthenticator
  4. Show how different authenticators can access the same organization
  5. Demonstrate multi-authenticator functionality

Setup

  1. Install dependencies from the workspace root:
yarn install
  1. Run either script:
cd examples/client-demo-app

# Basic setup (original demo)
yarn dev

# Multi-authenticator demo (NEW)
yarn multi-auth

No environment variables needed - the tools generate everything for you!

What the scripts do

Basic Setup Script (yarn dev)

  • Generate a new Ed25519 key pair using @phantom/crypto
  • Save the key pair to demo-data.json
  • Initialize a Phantom client with the generated private key
  • Create your organization on Phantom's platform
  • Update demo-data.json with organization details
  • Create a test wallet with addresses for Solana, Ethereum, Bitcoin, and Sui
  • Generate SERVER_SDK_USAGE.md with complete integration instructions

Multi-Authenticator Demo (yarn multi-auth)

  • Generate multiple Ed25519 key pairs for different authenticators
  • Create an organization with multiple authenticator configurations
  • Demonstrate the new createOrganization method with authenticator array
  • Test getOrganization method to retrieve organization details
  • Test getWalletWithTag method for tagged wallet retrieval
  • Test createAuthenticator and deleteAuthenticator methods
  • Show multiple clients accessing the same organization with different authenticators
  • Generate MULTI_AUTH_DEMO_SUMMARY.md with comprehensive documentation

Output Files

Basic Setup Script Output

  • demo-data.json: Contains your organization credentials (keyPair, organization details)
  • SERVER_SDK_USAGE.md: Comprehensive Server SDK integration guide with your credentials

Multi-Authenticator Demo Output

The multi-authenticator demo runs all tests in memory without creating any files. All test results are displayed in the console output.

Phantom Client Features

The multi-authenticator demo showcases PhantomClient capabilities:

Multi-Authenticator Organization Creation

const org = await client.createOrganization(name, publicKey, [
  { authenticatorName: "Auth1", authenticatorKind: "keypair", publicKey: "...", algorithm: "Ed25519" },
  { authenticatorName: "Auth2", authenticatorKind: "oidc", jwksUrl: "...", idTokenClaims: {...} }
]);

Organization Management

const org = await client.getOrganization(organizationId);

Tagged Wallet Retrieval

const wallet = await client.getWalletWithTag({
  organizationId, tag: "demo-tag", derivationPaths: ["m/44'/501'/0'/0'"]
});

Authenticator Management

await client.createAuthenticator({
  organizationId, username, authenticatorName,
  authenticator: { publicKey: "base64url-string", authenticatorKind: "keypair", algorithm: "Ed25519" }
});

await client.deleteAuthenticator({
  organizationId, username, authenticatorId
});

OIDC Authenticator Support

{
  authenticatorKind: "oidc",
  jwksUrl: "https://issuer.com/.well-known/jwks.json",
  idTokenClaims: { sub: "user-id", iss: "issuer.com" }
}

Next Steps

After running this setup tool:

  1. Secure your credentials: Store the private key from demo-data.json securely
  2. Follow the Server SDK guide: Use the generated SERVER_SDK_USAGE.md for integration
  3. Build your application: Integrate wallet functionality using the Server SDK

Security

⚠️ Important: The generated private key is your organization's master key. Keep it secure and never commit it to version control.