Skip to content

Zero-Trust. Infinite Signal. The universal behavioral fingerprinting engine for Web3 apps, wallets, and platforms.

License

Notifications You must be signed in to change notification settings

Jesse-21/TraceObserver-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

🧬 TraceObserver SDK

Zero-Trust. Infinite Signal.

The universal passive behavioral fingerprinting + risk scoring engine for Web3

Used by Unmask Protocol and RugDox to protect Web3 users by capturing invisible behavioral entropy.

Vercel Hosted Demo: https://trace-observer-sdk.vercel.app

Use in Projects/CDN:

image[https://cdn.jsdelivr.net/gh/RUGDOX/TraceObserver-SDK/]

What Is It?

TraceObserver is a client-side JavaScript SDK that generates a cryptographically hashed fingerprint of a user's session by analyzing:

  • Interaction entropy (mouse movement, focus, scroll)
  • Wallet method timings
  • Memory usage patterns
  • Session duration and behavioral rhythms

It works entirely on the client, streams via CDN, and supports any Web3 app or frontend. Submissions are sent to any server endpoint you define.

Perfect for:

  • Fraud detection
  • Risk scoring
  • Account security & recovery
  • Web3 identity fingerprinting
  • Cross-wallet behavior linking
  • Rug pull forensics (Unmask Protocol compatible)

What It Captures

Signal Type ---> Details:

  • RPC Trace Timing ---> Method-by-method latency fingerprint during wallet operations
  • Focus/Blur Entropy ---> Wallet popup behavior, user reflex pattern
  • Memory Signature ---> JS heap usage deltas hinting at browser/device load
  • User Input Rhythm ---> Mouse movement, scroll, keyboard cadence
  • Session Duration ---> total interaction time
  • Wallet Patterning ---> Tracks gas estimate retries, signing flow behavior
  • SHA-256 Fingerprint ---> Final hash digest of entire interaction
  • Basic Risk Analysis ---> Output from custom scoring (optional)

SDK Methods

  • init(config) – Starts SDK with runtime config
  • setScorer(fn) – Inject custom scoring function
  • finalize() – Builds and returns trace object
  • submit(endpoint?) – Submits to endpoint
  • export() – Returns trace data locally

Security Notes

  • No PII is collected
  • Passive by default (submission requires submit())
  • Fully client-side and CDN compatible

What You Get

  • ✅ Fully client-side, browser-native SDK
  • ✅ No dependencies, ultra-lightweight
  • ✅ Works with all EVM wallets, especially MetaMask
  • ✅ Built for CDN delivery (can host via Vercel/Cloudflare)
  • ✅ Plug in your own scoring, AI, or rules engine
  • ✅ export() method for offline trace analysis
  • ✅ Use in wallets, platforms, NFTs, bridges, DeFi, anything

Why It Matters

Web3 needs more than signatures — it needs evidence of presence.

TraceObserver turns the invisible into immutable evidence:

  • Catch bot-driven airdrop abuse
  • Prevent identity cloaking during RugID issuance
  • Detect rug-pull operations in progress
  • Link malicious actors across wallets and browsers
  • De-anonymize repeated wallet factory spammers

Built for the Next Generation of Web3 Forensics

This SDK powers:

  • Web3DNA Global Identity Engine
  • Unmask Protocol for founder accountability
  • RugDox Risk Scoring & Verification Systems

⚙️ How It Works

The TraceObserver SDK passively collects behavioral signals and session entropy from users interacting with your site or dApp. It generates a cryptographic fingerprint (Web3DNA) that can be submitted to your backend, stored, or used in real-time risk scoring.

🛠️ 1. Load the SDK

Load via CDN or serve statically:

<script src="https://cdn.yourdomain.com/trace-observer.sdk.js"></script>

⚙️ 2. Initialize the SDK

TraceObserver.init({
  platform_id: "UNMASK_PROTOCOL",                         // Your project or app name
  wallet: "0x123...abc",                                   // Optional wallet ID
  submitEndpoint: "https://your-api.com/trace/submit",    // Where to send trace data
  captureUserInput: true,                                 // Track clicks, movement, scrolls
  enableFocusEvents: true,                                // Detect alt-tab or popup focus
  enableMemorySampling: true,                             // Monitor memory usage
  debug: true                                              // Console logs for debugging
});

🧠 3. (Optional) Add a Custom Scoring Engine

TraceObserver.setScorer(trace => {
  let score = 0;
  if (trace.rpcTimeline.length > 10) score += 20;
  if (trace.userActions.length < 3) score += 40;
  return { score, flagged: score > 40 };
});

This lets you define what risky or suspicious behavior looks like for your system.

📤 4. Submit the Trace

const result = await TraceObserver.submit();

This packages the trace, hashes the session data, adds your risk score, and sends it to the configured endpoint.

📦 Optional: Export Without Submitting

const localTrace = TraceObserver.export();

Use this if you want to inspect or store the trace locally or feed it into another system.

Dev Notes

  • Framework agnostic
  • ES module & IIFE versions supported
  • Extendable with WebGL, audio, canvas, timezone, font entropy
  • Compatible with federated learning / AI modeling systems

Vision

Fingerprinting isn’t about watching — it’s about witnessing.

When the scam hits, you’ll know who, how, and what led to it.

TraceObserver is your silent watcher in a trustless world.

About

Zero-Trust. Infinite Signal. The universal behavioral fingerprinting engine for Web3 apps, wallets, and platforms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published