const response = await dahr.startProxy({
url: "https://postman-echo.com/get?test=1",
method: "GET",
options: {
headers: { Accept: ["application/json", "text/plain"] },
authorization: "my-token-if-needed",
},
})
// HTTP response + hashes + tx hash (returned by SDK)
console.log(res.status, res.statusText)
console.log(res.dataHash, res.responseHeadersHash)
console.log(res.txHash) // can be verified on-chain
// Verify on-chain (optional)
if (res.txHash) {
const tx = await demos.getTxByHash(res.txHash)
console.log(!!tx ? "On-chain tx found" : "Tx not found")
}