{"id":50593573,"url":"https://github.com/quantachain/quanta-sdk","last_synced_at":"2026-06-05T12:03:53.311Z","repository":{"id":354216408,"uuid":"1212454197","full_name":"quantachain/quanta-sdk","owner":"quantachain","description":"Core Android library powering QuantaChain mobile applications, built in Rust for high-performance cryptographic operations and secure transaction handling.","archived":false,"fork":false,"pushed_at":"2026-04-27T15:55:29.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T17:30:11.853Z","etag":null,"topics":["pqc","quanta-sdk","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/quanta-sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantachain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T11:52:09.000Z","updated_at":"2026-04-27T15:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quantachain/quanta-sdk","commit_stats":null,"previous_names":["quantachain/quanta-sdk"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/quantachain/quanta-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantachain%2Fquanta-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantachain%2Fquanta-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantachain%2Fquanta-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantachain%2Fquanta-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantachain","download_url":"https://codeload.github.com/quantachain/quanta-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantachain%2Fquanta-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33939237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pqc","quanta-sdk","sdk","typescript"],"created_at":"2026-06-05T12:03:52.417Z","updated_at":"2026-06-05T12:03:53.303Z","avatar_url":"https://github.com/quantachain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quanta SDK\n\nThe official JavaScript/TypeScript developer toolkit for the Quanta Protocol.\n\n[![npm](https://img.shields.io/npm/v/quanta-sdk)](https://www.npmjs.com/package/quanta-sdk)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](LICENSE)\n\nThe SDK provides a complete abstraction over the Quanta Node REST API and integrates the [`quanta-wasm`](https://www.npmjs.com/package/quanta-wasm) Falcon-512 post-quantum cryptography engine. Use it to build wallets, explorers, exchanges, and any integration with the Quanta Protocol.\n\n---\n\n## Installation\n\n```bash\nnpm install quanta-sdk\n```\n\n---\n\n## Quick Start\n\n```typescript\nimport { QuantaClient, QuantaWallet, TransactionBuilder, initQuanta } from 'quanta-sdk';\n\n// 1. Initialize the WASM crypto engine (once at startup)\nawait initQuanta();\n\n// 2. Create or restore a wallet\nconst wallet = QuantaWallet.create();\nconsole.log('Address:', wallet.address);\nconsole.log('Mnemonic:', wallet.mnemonic);  // store offline\n\n// 3. Connect to a node\nconst client = new QuantaClient('https://rpc.quantachain.org');\n\n// 4. Check balance (amounts are in microunits: 1 QUA = 1,000,000)\nconst balance = await client.getBalance(wallet.address);\nconsole.log(`Balance: ${balance / 1_000_000} QUA`);\n\n// 5. Send a transaction\nconst nonce = await client.getNonce(wallet.address);\nconst unsignedTx = TransactionBuilder.createUnsigned(\n  wallet.address, '0xRECIPIENT', 5_000_000, nonce + 1  // 5 QUA\n);\nconst signedTx = TransactionBuilder.sign(unsignedTx, wallet);\nconst { tx_hash } = await client.submitTransaction(signedTx);\nconsole.log('Sent:', tx_hash);\n```\n\n---\n\n## Features\n\n- **Post-Quantum Cryptography** — Falcon-512 key generation and transaction signing via `quanta-wasm`\n- **Node Client** — typed interface to the Quanta REST API (blocks, accounts, mempool, transactions)\n- **Transaction Builder** — builds and signs Transfer, TimeLockTransfer, and MultiSigTransfer transactions\n- **Wallet Management** — create, restore from mnemonic, and derive addresses\n- **CLI Utility** — `npx quanta-cli` for wallet generation and node inspection\n- **TypeScript** — full type definitions included\n\n---\n\n## API Reference\n\n### `initQuanta()`\n\nInitializes the WASM cryptography module. Must be called once before any wallet or signing operation.\n\n```typescript\nawait initQuanta();\n```\n\n---\n\n### `QuantaClient`\n\nHTTP client for the Quanta REST API.\n\n```typescript\nconst client = new QuantaClient(nodeUrl: string);\n```\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `client.getHealth()` | `NodeHealth` | Node status, height, peer count |\n| `client.getLatestBlock()` | `Block` | Latest confirmed block |\n| `client.getBlock(height)` | `Block` | Block by height |\n| `client.getTransaction(hash)` | `Transaction` | Transaction by hash |\n| `client.getBalance(address)` | `number` | Balance in microunits |\n| `client.getNonce(address)` | `number` | Current account nonce |\n| `client.getMempool()` | `MempoolInfo` | Pending transactions |\n| `client.submitTransaction(tx)` | `{ tx_hash }` | Broadcast signed transaction |\n| `client.getNetworkStats()` | `NetworkStats` | Height, TPS, peer count |\n\n---\n\n### `QuantaWallet`\n\nWallet creation and restoration.\n\n```typescript\n// Create new wallet with fresh Falcon-512 keypair\nconst wallet = QuantaWallet.create();\n// wallet.address  — \"0x...\" \n// wallet.mnemonic — 24-word BIP39 phrase\n\n// Restore from mnemonic\nconst wallet = QuantaWallet.fromMnemonic(\"word1 word2 ... word24\");\n```\n\n---\n\n### `TransactionBuilder`\n\nBuilds and signs transactions.\n\n```typescript\n// Standard transfer\nconst tx = TransactionBuilder.createUnsigned(\n  sender,     // \"0x...\" address\n  recipient,  // \"0x...\" address\n  amount,     // microunits\n  nonce,      // current nonce + 1\n  txType?     // optional: TimeLockTransfer | MultiSigTransfer\n);\n\nconst signedTx = TransactionBuilder.sign(tx, wallet);\n```\n\n#### TimeLock Transfer\n\n```typescript\nconst tx = TransactionBuilder.createUnsigned(\n  sender, recipient, amount, nonce,\n  { type: 'TimeLockTransfer', unlock_height: 20000 }\n);\n```\n\n#### MultiSig Transfer\n\n```typescript\nconst tx = TransactionBuilder.createUnsigned(\n  sender, recipient, amount, nonce,\n  { type: 'MultiSigTransfer', signers_required: 3 }\n);\n```\n\n---\n\n## CLI\n\n```bash\n# Generate a new wallet\nnpx quanta-cli wallet generate\n\n# Check node status\nnpx quanta-cli node status https://rpc.quantachain.org\n\n# Check balance\nnpx quanta-cli balance 0xYOUR_ADDRESS\n```\n\n---\n\n## Units\n\nAll amounts in the API and SDK are in **microunits**:\n\n| QUA | Microunits |\n|-----|-----------|\n| 1 QUA | 1,000,000 |\n| 5 QUA | 5,000,000 |\n| Min fee | 100 (0.0001 QUA) |\n\n---\n\n## Architecture\n\n```\nquanta-sdk\n├── QuantaClient      — REST API wrapper\n├── QuantaWallet      — Falcon-512 keypair, address derivation, mnemonic\n├── TransactionBuilder — Canonical tx construction + signing contract\n└── quanta-wasm       — Rust/WASM Falcon-512 crypto engine (bundled)\n```\n\n`quanta-sdk` bundles and manages `quanta-wasm` internally. You do not need to install `quanta-wasm` separately unless you need the raw WASM API.\n\n---\n\n## Public Testnet Endpoint\n\n```\nhttps://rpc.quantachain.org\n```\n\nFor high-volume integrations, run your own node. See the [node documentation](https://quantachain.gitbook.io/quantachain-docs/node-operator-guide).\n\n---\n\n## License\n\nISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantachain%2Fquanta-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantachain%2Fquanta-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantachain%2Fquanta-sdk/lists"}