Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kynesys.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Web2

What is Web2 Proxy?

The Web2 proxy system allows you to make HTTP requests through the Demos network. Requests are verified by a network of attestation nodes, ensuring data integrity and reliability. The system provides:
  • Secure proxy requests through the Demos network
  • Session-based request handling
  • Support for all standard HTTP methods
  • Custom header and payload support

Basic Example

import { Demos } from "@kynesyslabs/demosdk/websdk"

// Connect to demos and set up identity
const demos = new Demos()
await demos.connect("http://localhost:53550")
await demos.connectWallet(mnemonic)

// Create and use proxy
const dahr = await demos.web2.createDahr()
const response = await dahr.startProxy({
    url: "https://api.example.com",
    method: "GET",
})

Key Features

  • Session Management: Each proxy request is handled through a dedicated session
  • Method Support: GET, POST, PUT, PATCH, DELETE
  • Custom Headers: Add your own headers to requests
  • Payload Support: Send data with your requests
  • Authorization: Include authorization tokens when needed

Choosing Between DAHR and TLSNotary

The Demos Web2 system offers two complementary methods for web attestation:

DAHR

Fast proxied requests with hash attestation. Best for general API calls where speed matters. Response hashes are stored on-chain.

TLSNotary

Cryptographic proofs from TLS sessions. Best for confidential data requiring verifiable attestation with selective disclosure.
FeatureDAHRTLSNotary
Speed~500ms2-5s
CostGas only1+ DEM + gas
PrivacyHash attestationZero-knowledge possible
Best forGeneral APIsConfidential data