Skip to content

Proof of Work Token#442

Open
ltardivo wants to merge 17 commits intostagingfrom
feat/pow
Open

Proof of Work Token#442
ltardivo wants to merge 17 commits intostagingfrom
feat/pow

Conversation

@ltardivo
Copy link
Collaborator

@ltardivo ltardivo commented Mar 3, 2026

Enables client-side PoW minting for tokens on UTXO-based chains (Bitcoin, Litecoin, Dogecoin, Pepecoin) inspired from Bitcoin's architecture. Key features include dynamic difficulty adjustment, heaviest-chain consensus for fork resolution, and fungible token operations (transfer, merge, burn).

Key Changes

  • Smart Contract Core (src/pow.ts): Added Pow class extending Contract for token minting with PoW validation.
  • Integrated pure-JS Sha256 class (bit-identical to OpenSSL/Node.js crypto) for on-chain hash verification.
  • Added isValid() for post-transfer validation via root revision sync.
  • Miner Implementation (src/miner.ts): Created PowTokenMiner class for client-side mining loop (native crypto for speed).
  • Heaviest-chain rule (cumulative work via 2^diff, tie-break by length).
  • Configurable compute difficulty (e.g., intervals like 2016 for BTC/LTC, 1440 for DOGE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant