diff --git a/src/core/zhtp-api-methods.ts b/src/core/zhtp-api-methods.ts index 5d66a59..8d97de3 100644 --- a/src/core/zhtp-api-methods.ts +++ b/src/core/zhtp-api-methods.ts @@ -557,8 +557,12 @@ export abstract class ZhtpApiMethods extends ZhtpApiCore { return this.request(endpoint); } - async getContractByHash(hash: string): Promise { - return this.request(`/api/v1/blockchain/contract/${hash}`); + /** + * Lookup contract by blockchain transaction hash + * @param hash - Deployment transaction hash + */ + async getContractByHash(hash: string): Promise { + return this.request(`/api/v1/blockchain/contract/${hash}`); } async getContractById(contractId: string): Promise { @@ -569,6 +573,22 @@ export abstract class ZhtpApiMethods extends ZhtpApiCore { return this.request(`/api/v1/web4/resolve/${encodeURIComponent(domainName)}`); } + /** + * Resolve Web4 domain via DHT network + * @param domain - Domain name (e.g., "example.zhtp") + */ + async resolveWeb4ViaDht(domain: string): Promise { + return this.request(`/api/v1/dht/web4/resolve/${encodeURIComponent(domain)}`); + } + + /** + * Get contract from DHT distributed storage + * @param contractId - Contract identifier + */ + async getContractFromDht(contractId: string): Promise { + return this.request(`/api/v1/dht/contract/${contractId}`); + } + // ==================== Blockchain Operations ==================== async getBlockchainInfo(): Promise {