PTK-001 PWRC Token-2022 · PPAY-001 PowerPay · Solana devnet tooling · Web and faucet applications
1.0.0-rc.0 · Apache-2.0 · Node 24.14.0 · pnpm 11.20.0
This monorepo contains the reference implementation and developer tooling for the PowerChain PWRC native-token profile and PowerPay settlement program. It keeps application code, reusable TypeScript packages, Solana programs, canonical IDLs, metadata, environment profiles, validation scripts, and generated release artifacts in explicit boundaries.
The workspace does not claim a mainnet deployment, independent audit, active DEX listing, or configured production authority unless corresponding evidence is present.
apps/
├── web/ Next.js wallet, token, payments, programs, and developer UI
└── faucet/ Standalone devnet SOL and tPWRC faucet service
packages/
├── native-token-client/ Token-2022, RPC, account, DEX, and program client APIs
├── standards/ PTK-001 and related machine-readable profiles
└── token-metadata/ Metadata generation and validation
├── client/ Higher-level PowerChain integration client
utils/ Dependency-light Node utilities
programs/
├── native-token/ PTK-001 Rust program source and canonical IDL
├── powerpay/ PPAY-001 Rust program source
└── mainnet-program/ Evidence-gated deployment profile
scripts/ Validation, recovery, attestation, and release tooling
target/ Generated Cargo, SBF, IDL, checksum, and release output
Generated output belongs under target/; program-local target/ directories and legacy root app/, faucets/, components/, or idl/ trees are rejected by validation.
| Asset | Decimals | Program | Status |
|---|---|---|---|
| SOL | 9 | System Program | Native Solana asset |
| USDC | 6 | SPL Token Program | Canonical mainnet mint profile |
| PWRC | 9 | SPL Token-2022 | Canonical mint profile |
| tPWRC | 9 | SPL Token-2022 | Separate devnet-only profile |
PWRC maximum and genesis supply is fixed at 18,446,000,000 PWRC. The informational initial reference price is $0.000002 USD; it is not an oracle or guaranteed market price.
- Node.js
24.14.0 - pnpm
11.20.0 - Rust through
rustupfor program tests - Solana or Agave CLI for
cargo build-sbf
corepack enable
corepack prepare pnpm@11.20.0 --activateAlways install from the repository root:
cd /workspaces/token
pnpm install:repair
pnpm preflightinstall:repair restores .nvmrc, removes only safe empty legacy directories, clears stale incremental state, and performs a forced workspace installation using the committed pnpm layout.
pnpm dev:web # http://localhost:3005
pnpm dev:faucet # http://localhost:3015
pnpm dev:faucet:debug # development-only faucet diagnosticsUseful diagnostics:
pnpm dev:doctor
pnpm workspace:status
pnpm workspace:status:json
pnpm dev:resetWhen Node reports uv_cwd, open a new terminal or cd into an existing repository path before running any Node or pnpm command.
pnpm typecheck
pnpm build
pnpm test
pnpm check:quick
pnpm check:allDeterministic structural validation:
pnpm validate:workspace
pnpm validate:layout
pnpm validate:routing
pnpm validate:packages
pnpm validate:workspace-manifest
pnpm workspace:commandspnpm env:bootstrap:devnet
pnpm check:devnet-token
pnpm verify:onchain:devnet
pnpm attest:supply:devnetSupply attestation requires a real deployed devnet Token-2022 mint in .env.devnet:
POWERCHAIN_PWRC_MINT=<DEVNET_MINT_ADDRESS>Attestations are written under target/supply/. The scripts use finalized commitment, exact base-unit strings, and a hashed RPC-origin fingerprint.
pnpm programs:doctor
pnpm test:program:rust
pnpm build:program:sbf
pnpm test:powerpay
pnpm build:powerpayCargo and SBF output is centralized under target/cargo/ and target/deploy/.
The web app includes:
/token— canonical PWRC profile and mint verification/payments— PowerPay, SOL, USDC, PWRC, DEX, and Solana Pay surfaces/faucet— wallet-authenticated devnet faucet interface/standard— PTK-001 and profile documentation/programs— native-token and PowerPay testing console/tools/terminal— safe command catalog without browser-side shell execution/developers,/status,/about, and/legals/*
The standalone faucet exposes /, /health, /api/v1, /standard/, and development-only debug routes when explicitly enabled.
- Mainnet program IDs and authorities remain
TBAuntil verified deployment evidence exists. - Faucet execution is devnet-only and does not expose treasury or production keys.
- Wallet authentication is domain, URI, chain, wallet, nonce, request ID, and expiry bound.
- Production release gating fails closed without audit, governance, build, hosting, and on-chain evidence.
.env.productionandenv/.env.productionare ignored and deployment-managed.- DEX quotes remain off-chain observations; execution requires a separate wallet signature.
pnpm metadata:check
pnpm prepare:release
pnpm release:status
pnpm release:gaterelease:gate is intentionally strict and may remain blocked until independent evidence is supplied.
CHANGELOG.mdDISCLAIMER.mdscripts/README.mdapps/README.mdpackages/README.mdprograms/README.mdtarget/README.md
Run pnpm scripts:list for the maintained command catalog.
Apache License 2.0. See repository license metadata and individual third-party dependency licenses.
When a Codespaces restore or extracted archive leaves package links incomplete, run:
cd /workspaces/token
pnpm install:clean
pnpm validate:web-toolchain
pnpm typecheck
pnpm buildThis is the supported recovery path for missing React, Next.js, Solana SDK, wallet-adapter, or JSX type declarations.
For a fresh checkout or restored Codespace, run:
pnpm bootstrapDiagnose package resolution without starting applications:
pnpm deps:doctor
pnpm dev:faucet:doctor
pnpm check:dependenciesRepair a partially linked pnpm workspace:
pnpm deps:repairProduction environment files are deployment-managed and intentionally excluded from the repository. Create them from .env.example only in the deployment environment.
The Next.js application uses the repository root as its Turbopack root. During local development, @powerchain/standards and @powerchain/native-token-client resolve directly to their TypeScript source entry points, so the web app does not depend on stale dist/ output or package-local pnpm links.
cd /workspaces/token
pnpm workspace:repair
pnpm install
pnpm dev:webIf a terminal reports uv_cwd, that terminal is still attached to a directory that was moved or quarantined. Open a new terminal or change to /workspaces/token before running Node or pnpm.
The web route /standard presents the machine-readable PTK-001 and PPAY-001 profiles. The /programs route presents source validation, security boundaries, commands, and evidence-driven deployment status.
The web application exposes a documented /api/v1 boundary. OpenAPI is available at /api/v1/swagger.yaml, with the canonical source retained in docs/api/v1/swagger.yaml. Web configuration is centralized under apps/web/config/, reusable client hooks under apps/web/hooks/, and typed route registries under apps/web/lib/routes.ts.