You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue provides a comprehensive reference of all API endpoints currently available on the ZHTP node. Use this as a guide to implement missing methods in the API client library.
Status Summary
The ZHTP node now has 90+ endpoints implemented across all major categories. The API client needs to be updated to include methods for all these endpoints.
Overview
This issue provides a comprehensive reference of all API endpoints currently available on the ZHTP node. Use this as a guide to implement missing methods in the API client library.
Status Summary
The ZHTP node now has 90+ endpoints implemented across all major categories. The API client needs to be updated to include methods for all these endpoints.
Endpoint Categories
1. Authentication & Identity Management (15 endpoints)
Authentication
POST /api/v1/identity/create- Create new identityPOST /api/v1/identity/signin- Sign in with DID + passphrasePOST /api/v1/identity/login- Login (alias for signin)GET /api/v1/identity/{id}- Get identity detailsBackup & Recovery (Issue #4 - CLOSED)
POST /api/v1/identity/backup/generate- Generate recovery phrasePOST /api/v1/identity/backup/verify- Verify recovery phrasePOST /api/v1/identity/recover- Recover identity from phraseGET /api/v1/identity/backup/status- Check backup statusPOST /api/v1/identity/backup/export- Export encrypted backupPOST /api/v1/identity/backup/import- Import encrypted backupPOST /api/v1/identity/seed/verify- Verify seed phrase (12-word BIP39)Other Identity
POST /api/v1/identity/citizenship/apply- Apply for citizenshipPOST /api/v1/identity/sign- Sign message with identityPOST /api/v1/identity/password/recover- Password recovery2. Guardian Social Recovery (9 endpoints) - Issue #5 CLOSED
POST /api/v1/identity/guardians/add- Add guardianDELETE /api/v1/identity/guardians/{guardian_id}- Remove guardianGET /api/v1/identity/guardians- List guardiansPOST /api/v1/identity/recovery/initiate- Initiate recoveryPOST /api/v1/identity/recovery/{recovery_id}/approve- Guardian approvesPOST /api/v1/identity/recovery/{recovery_id}/complete- Complete recoveryPOST /api/v1/identity/recovery/{recovery_id}/reject- Guardian rejectsGET /api/v1/identity/recovery/{recovery_id}/status- Check statusGET /api/v1/identity/recovery/pending- List pending requests3. Zero-Knowledge Proofs (2 endpoints) - Issue #6 CLOSED
POST /api/v1/zkp/generate- Generate ZK proofPOST /api/v1/zkp/verify- Verify ZK proof4. DAO Operations (13 endpoints) - Part of Issue #112 CLOSED
Treasury
GET /api/v1/dao/treasury/status- Get treasury statusGET /api/v1/dao/treasury/transactions- List transactions (with pagination)Proposals
POST /api/v1/dao/proposal/create- Create proposalGET /api/v1/dao/proposals/list- List proposals (with filters)GET /api/v1/dao/proposal/{proposal_id}- Get proposal detailsPOST /api/v1/dao/proposals/spending- Create spending proposalVoting
POST /api/v1/dao/vote/cast- Cast voteGET /api/v1/dao/vote/power/{identity_id}- Get voting powerGET /api/v1/dao/votes/{proposal_id}- Get proposal votesDelegates
GET /api/v1/dao/data- Get DAO dataGET /api/v1/dao/delegates- List delegatesPOST /api/v1/dao/delegates/register- Register as delegatePOST /api/v1/dao/delegates/revoke- Revoke delegate5. Wallet Operations (8 endpoints) - Part of Issue #112 CLOSED
GET /api/v1/wallet/balance/{type}/{id}- Get wallet balanceGET /api/v1/wallet/list/{identity_id}- List wallets for identityPOST /api/v1/wallet/send- Send transactionGET /api/v1/wallet/transactions/{id}- Get wallet transactionsGET /api/v1/wallet/statistics/{id}- Get wallet statisticsPOST /api/v1/wallet/staking/stake- Stake tokensPOST /api/v1/wallet/staking/unstake- Unstake tokensPOST /api/v1/wallet/transfer/cross-wallet- Transfer between wallets6. Blockchain Operations (22 endpoints)
Blocks & Transactions
GET /api/v1/blockchain/status- Get blockchain statusGET /api/v1/blockchain/latest- Get latest blockGET /api/v1/blockchain/tip- Get blockchain tipGET /api/v1/blockchain/blocks/{height}- Get block by heightGET /api/v1/blockchain/block/{hash}- Get block by hashPOST /api/v1/blockchain/transaction/broadcast- Broadcast transactionGET /api/v1/blockchain/transaction/{hash}- Get transactionPOST /api/v1/blockchain/transaction/estimate-fee- Estimate feeGET /api/v1/blockchain/transactions/pending- Get pending transactionsGET /api/v1/blockchain/mempool- Get mempool statusGET /api/v1/blockchain/balance/{address}- Get address balanceSmart Contracts
POST /api/v1/blockchain/contracts/deploy- Deploy contractGET /api/v1/blockchain/contracts- List contractsGET /api/v1/blockchain/contracts/{address}- Get contract detailsNetwork & Peers
GET /api/v1/blockchain/network/peers- List network peersGET /api/v1/blockchain/network/stats- Get network statisticsPOST /api/v1/blockchain/network/peer/add- Add peerGET /api/v1/blockchain/network/peer/{peer_id}- Get peer infoSync & Performance
GET /api/v1/blockchain/sync/metrics- Get sync metricsGET /api/v1/blockchain/sync/peers- Get sync peersGET /api/v1/blockchain/sync/performance- Get sync performanceGET /api/v1/blockchain/edge-stats- Get edge statistics7. Network & Protocol (6 endpoints) - Part of Issue #112 CLOSED
Network
GET /api/v1/network/gas- Get gas pricing (Issue [FRONTEND]: Network gas pricing endpoint missing #10 - CLOSED)Protocol Info
GET /api/v1/protocol/info- Get protocol informationGET /api/v1/protocol/version- Get protocol versionGET /api/v1/protocol/health- Health checkGET /api/v1/protocol/capabilities- Get capabilitiesGET /api/v1/protocol/stats- Get protocol statistics8. Storage Operations (7 endpoints)
POST /api/v1/storage/put- Store dataPOST /api/v1/storage/store- Store data (alias)GET /api/v1/storage/get- Retrieve dataDELETE /api/v1/storage/delete- Delete dataGET /api/v1/storage/status- Get storage statusGET /api/v1/storage/stats- Get storage statistics9. Web4 & Content (3+ endpoints) - Issue #113 REMAINING
GET /api/v1/web4/domains/{domain}- Resolve domainGET /api/v1/web4/content/{cid}- Get content by CIDPOST /api/v1/web4/load- Load Web4 resource10. Validator Operations (3 endpoints)
POST /api/v1/validator/register- Register validatorGET /api/v1/validator/{validator_id}- Get validator infoGET /api/v1/validators- List validators11. Cryptography Operations (3 endpoints)
POST /api/v1/crypto/generate_keypair- Generate keypairPOST /api/v1/crypto/sign_message- Sign messagePOST /api/v1/crypto/verify_signature- Verify signature12. Mesh Operations
POST /api/v1/mesh/create- Create mesh networkBackward Compatibility Aliases (Issue #7, #8 - CLOSED)
The node supports both old and new paths via backward compatibility aliases:
Old Path → New Path Mappings
/dao/proposals→/api/v1/dao/proposals/list/dao/vote→/api/v1/dao/vote/cast/dao/treasury→/api/v1/dao/treasury/status/mesh/peers→/api/v1/blockchain/network/peers/node/status→/api/v1/protocol/info/blockchain/info→/api/v1/blockchain/status/network/gas→/api/v1/network/gas/wallet/balance→/api/v1/wallet/balance/{type}/{id}/wallet/transactions→/api/v1/wallet/transactions/{id}/api/v1/contract/*→/api/v1/blockchain/contracts/*Implementation Tasks for API Client
Priority 1: Update Existing Methods (Issues #7, #8, #10)
/api/v1prefix/api/v1/blockchain/contractsPriority 2: Add Missing Identity Methods (Issues #4, #5)
Priority 3: Add ZK Proof Methods (Issue #6)
generateZkProof()methodverifyZkProof()methodPriority 4: Add DAO Methods (Part of Issue #112)
Priority 5: Add Wallet Methods (Part of Issue #112)
Priority 6: Add Network & Protocol Methods
Priority 7: Add Web4 Methods (Issue #9)
Request/Response Type Definitions Needed
Authentication
Backup/Recovery
Guardian Recovery
ZK Proofs
DAO Operations
Security Notes
All authenticated endpoints require:
Authorization: Bearer <session_token>headerRate limits:
Related Issues
Closed Node Issues:
Open Node Issues:
API Client Issues:
Total Endpoint Count
Implemented: 90+ endpoints
Remaining: 3 endpoints (Web4/DHT in issue #113)
Next Steps
This represents 90% completion on the node side. The API client implementation can proceed immediately!