{"_id":"@daiwikdomain/parellax-compute","_rev":"2-a63a9337ca32a73a18cc0e7c8c002c78","name":"@daiwikdomain/parellax-compute","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@daiwikdomain/parellax-compute","version":"0.1.0","keywords":["0g","tee","compute","llm","parellax"],"license":"MIT","_id":"@daiwikdomain/parellax-compute@0.1.0","maintainers":[{"name":"daiwikdomain","email":"daiwikmahesh@gmail.com"}],"dist":{"shasum":"d56eec98a32a7c4bc2d6356a09321237691c5d6f","tarball":"https://registry.npmjs.org/@daiwikdomain/parellax-compute/-/parellax-compute-0.1.0.tgz","fileCount":4,"integrity":"sha512-+IXUjnKsqRFc0xVjlJU4EGhHa4nBGPz6Bqw7JTwJPueMCyftKSMp8rNnxdKuH/eIbOvYO5N599okuxZdBiXP+A==","signatures":[{"sig":"MEYCIQDTm7aetjqQPYMEFqXGLTEmsYUyYYZTFxli6laYOZ+3LAIhAIA79c4DqB2wiUS1cNOHovwSrMXQBABA9IauS/qky5D6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3688},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"daiwikdomain","email":"daiwikmahesh@gmail.com"},"_npmVersion":"10.9.4","description":"0G Compute TEE wrapper — verifiable LLM inference for transaction evaluation","directories":{},"_nodeVersion":"22.22.0","dependencies":{"openai":"^6.35.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/parellax-compute_0.1.0_1777815039133_0.615179873917691","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@daiwikdomain/parellax-compute","version":"0.1.1","description":"0G Compute TEE wrapper — verifiable LLM inference for transaction evaluation","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch"},"keywords":["0g","tee","compute","llm","parellax"],"license":"MIT","dependencies":{"openai":"^6.35.0"},"devDependencies":{"@types/node":"^20","typescript":"^5"},"_id":"@daiwikdomain/parellax-compute@0.1.1","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-eSV9M4Swyqsb12ho/gEBytaZz2bLxWJsEo+4l/hBdmjAukoi0EYFG1GzTRBRwJbVCaYvKUvlPtTd6/dSJOnZKQ==","shasum":"85656d6c8debc0f507849eb0728b0ebdeae6d761","tarball":"https://registry.npmjs.org/@daiwikdomain/parellax-compute/-/parellax-compute-0.1.1.tgz","fileCount":5,"unpackedSize":6461,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEjRvEUygjOuLjew9jMb0HThH6IqPAkNs2gaapP5li/OAiBoIG1njt8qU9NBNXh3NrGlmXpUZykeXcoT3Ef+Y/ifYA=="}]},"_npmUser":{"name":"daiwikdomain","email":"daiwikmahesh@gmail.com"},"directories":{},"maintainers":[{"name":"daiwikdomain","email":"daiwikmahesh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parellax-compute_0.1.1_1777815184792_0.9918311727399485"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T13:30:38.987Z","modified":"2026-05-03T13:33:05.077Z","0.1.0":"2026-05-03T13:30:39.287Z","0.1.1":"2026-05-03T13:33:04.975Z"},"license":"MIT","keywords":["0g","tee","compute","llm","parellax"],"description":"0G Compute TEE wrapper — verifiable LLM inference for transaction evaluation","maintainers":[{"name":"daiwikdomain","email":"daiwikmahesh@gmail.com"}],"readme":"# @daiwikdomain/parellax-compute\n\n0G Compute TEE wrapper for agentic banking — evaluates financial transaction intents using an LLM running inside a Trusted Execution Environment. Every decision comes with a cryptographic verification ID and a `teeVerified` flag confirming the inference ran inside a sealed enclave.\n\n## Install\n\n```bash\nnpm install @daiwikdomain/parellax-compute\n```\n\n## Environment variables\n\n| Variable | Required | Description |\n|---|---|---|\n| `OG_COMPUTE_KEY` | Yes | API key for the 0G Compute router |\n\nGet a key from the 0G Compute portal.\n\n## Usage\n\n```ts\nimport { evaluateTransaction } from '@daiwikdomain/parellax-compute'\nimport { parseEther } from 'viem'\n\nconst decision = await evaluateTransaction(\n  'pay the nanny 0.1 OG',\n  {\n    walletAddr: '0xUserWallet',\n    amountWei: parseEther('0.1'),\n    recipient: '0xRecipientAddress',\n    spendingLimitWei: parseEther('1.0'),\n    currentBalanceWei: parseEther('0.3'),\n  }\n)\n\nconsole.log(decision.approved)        // true | false\nconsole.log(decision.reason)          // 'Transaction within limit and balance'\nconsole.log(decision.verificationId)  // 'chatcmpl-abc123' — TEE inference ID\nconsole.log(decision.teeVerified)     // true — confirmed sealed enclave execution\nconsole.log(decision.model)           // model name used\n```\n\n## Types\n\n```ts\ninterface TransactionContext {\n  walletAddr: string        // user wallet address\n  amountWei: bigint         // amount to transfer in wei\n  recipient: string         // recipient address\n  spendingLimitWei: bigint  // user's current spending limit in wei\n  currentBalanceWei: bigint // available balance in wei\n}\n\ninterface ApprovalDecision {\n  approved: boolean         // whether the TEE approved the transaction\n  reason: string            // short explanation from the model\n  model: string             // model ID used for inference\n  verificationId: string    // unique ID for this TEE inference run\n  teeVerified: boolean      // true if inference ran inside a sealed enclave\n}\n```\n\n## What the TEE does\n\nThe model receives the intent, amount, recipient, spending limit, and balance — all in human-readable OG amounts. It returns a structured JSON decision. The inference runs with `verify_tee: true`, which triggers on-chain signature verification by the provider. The `teeVerified` flag in the response confirms the computation happened inside a sealed enclave that the host cannot inspect or tamper with.\n\nThe `verificationId` is the receipt. Use it as the authorization proof when calling your on-chain vault.\n\n## Network\n\n| Constant | Value |\n|---|---|\n| Compute router | `https://router-api-testnet.integratenetwork.work/v1` |\n| Model | `qwen/qwen-2.5-7b-instruct` |\n","readmeFilename":"README.md"}