{"_id":"@el-pentagono/shieldai-sdk","name":"@el-pentagono/shieldai-sdk","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@el-pentagono/shieldai-sdk","version":"2.0.0","description":"ShieldAI — Biometric KYC, Immutable Audit Log, Real-Time Fraud Detection and RFC 3161 TSA Timestamping in one SDK","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"node dist/index.js"},"keywords":["shieldai","kyc","biometric","fraud-detection","tsa","rfc3161","audit-log","sha256","immutable","compliance","bcra","uif","gdpr","soc2"],"author":{"name":"Gustavo Gaston Gonzalez Alfonzo","email":"elpentagono.digital@gmail.com"},"license":"UNLICENSED","repository":{"type":"git","url":"git+https://github.com/el-pentagono/shieldai-sdk.git"},"dependencies":{"axios":"^1.6.0","crypto":"^1.0.1"},"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"engines":{"node":">=18.0.0"},"_id":"@el-pentagono/shieldai-sdk@2.0.0","bugs":{"url":"https://github.com/el-pentagono/shieldai-sdk/issues"},"homepage":"https://github.com/el-pentagono/shieldai-sdk#readme","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-zbf+Vs0bzJIe+Fmd2KbPu25LRjbUYmXzz0aIdGP+I9cSY0uoss2e6TNI9ordf0KJoyCu4q+sTGJ/0jVt+ugeGQ==","shasum":"3f95ae757e795d6109ba895a59b495a0b88d6c8e","tarball":"https://registry.npmjs.org/@el-pentagono/shieldai-sdk/-/shieldai-sdk-2.0.0.tgz","fileCount":8,"unpackedSize":76015,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIARRAQyt6w0ynlJnH4L5l3D/i/Ytnao/VX+X4wqPJjXCAiEA/csfFsLkeo2xdVfBYrkPcsOWDl+6/mtPOz0Jpuwayd4="}]},"_npmUser":{"name":"atilaggg","email":"gustavogastongonzalez@gmail.com"},"directories":{},"maintainers":[{"name":"atilaggg","email":"gustavogastongonzalez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shieldai-sdk_2.0.0_1779727451591_0.6019947754411679"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T16:44:11.480Z","2.0.0":"2026-05-25T16:44:11.826Z","modified":"2026-05-25T16:44:11.999Z"},"maintainers":[{"name":"atilaggg","email":"gustavogastongonzalez@gmail.com"}],"description":"ShieldAI — Biometric KYC, Immutable Audit Log, Real-Time Fraud Detection and RFC 3161 TSA Timestamping in one SDK","homepage":"https://github.com/el-pentagono/shieldai-sdk#readme","keywords":["shieldai","kyc","biometric","fraud-detection","tsa","rfc3161","audit-log","sha256","immutable","compliance","bcra","uif","gdpr","soc2"],"repository":{"type":"git","url":"git+https://github.com/el-pentagono/shieldai-sdk.git"},"author":{"name":"Gustavo Gaston Gonzalez Alfonzo","email":"elpentagono.digital@gmail.com"},"bugs":{"url":"https://github.com/el-pentagono/shieldai-sdk/issues"},"license":"UNLICENSED","readme":"# @el-pentagono/shieldai-sdk\n\n> **Biometric KYC · Immutable Audit Log · Real-Time Fraud Detection · RFC 3161 TSA Timestamping**\n\nThe only security SDK in LATAM that combines all four in one integration.\n\nBuilt by **El Pentágono** — Gustavo Gastón González Alfonzo\n\n---\n\n## What is ShieldAI?\n\nShieldAI is the security engine that powers El Pentágono's ecosystem of 9 social-impact applications. It provides:\n\n| Module | Function | Price |\n|--------|----------|-------|\n| **CryptoSeal** | SHA-256 + HMAC-SHA-512 hashing for any content | Included |\n| **ChronoStamp** | RFC 3161 TSA timestamp — legally certified proof of existence | USD 0.03/stamp |\n| **ImmutableLog** | SHA-256 hash chain audit log — mathematically unalterable | USD 0.01/entry |\n| **FraudDetection** | Real-time fraud detection: velocity, email patterns, grooming | USD 0.02/analysis |\n| **GeoFence** | GPS anti-spoofing + physical speed validation | USD 0.02/verification |\n| **AuditChain** | Full chain of custody with TSA sealing per event | USD 0.04/event |\n\n---\n\n## Why ShieldAI?\n\n| Feature | SEON | AWS Rekognition | DigiCert TSA | ShieldAI |\n|---------|------|-----------------|--------------|----------|\n| Biometric KYC | No | Yes | No | ✓ |\n| Real-time fraud detection | Yes | No | No | ✓ |\n| Immutable hash chain log | No | No | No | ✓ |\n| RFC 3161 TSA timestamp | No | No | Yes | ✓ |\n| GPS anti-spoofing | No | No | No | ✓ |\n| All in one SDK | No | No | No | ✓ |\n| Integration time | Weeks | Weeks | Weeks | **1 week** |\n| Pricing model | Per user | Per call | Per cert | **Per volume** |\n\n---\n\n## Installation\n\n```bash\nnpm install @el-pentagono/shieldai-sdk\n```\n\n---\n\n## Quick Start\n\n```typescript\nimport ShieldAI from '@el-pentagono/shieldai-sdk';\n\nconst shield = new ShieldAI({\n  environment: 'sandbox', // or 'production'\n  tsaUrl: 'https://freetsa.org/tsr', // or FNMT-RCM for Spain\n});\n```\n\n---\n\n## Usage Examples\n\n### 1. Seal a Document (RFC 3161 TSA)\n\n```typescript\nconst { certificate, seal } = await shield.sealDocument(\n  'Patient medical record content...',\n  'Medical Record — Juan García — 2026-05-25'\n);\n\nconsole.log(certificate);\n// ═══════════════════════════════════════════════════\n//   SHIELDAI — CERTIFICATE OF EXISTENCE\n//   ChronoStamp v2.0 · RFC 3161 Compatible\n// ═══════════════════════════════════════════════════\n//   Document : Medical Record — Juan García — 2026-05-25\n//   Hash     : a30259a9b93a108191ce...\n//   Timestamp: 2026-05-25T14:32:11.000Z\n//   TSA Token: 7f3a9b...\n//   Status   : VERIFIED ✓\n// ═══════════════════════════════════════════════════\n```\n\n### 2. Hash Chain Audit Log\n\n```typescript\nconst auditChain = shield.createAuditChain('order_12345');\n\nawait auditChain.record('ORDER_PLACED', { amount: 1500, userId: 'usr_456' });\nawait auditChain.record('PAYMENT_PROCESSED', { transactionId: 'tx_789' });\nawait auditChain.record('DELIVERY_CONFIRMED', { location: '-34.6,-58.4' });\n\nconst chain = auditChain.exportChain();\nconsole.log('Integrity:', chain.integrity); // true — tamper-evident\n```\n\n### 3. Real-Time Fraud Detection\n\n```typescript\nconst fraud = shield.fraudDetection;\n\nconst analysis = fraud.analyze({\n  email: 'user@example.com',\n  amount: 50000,\n  deviceId: 'device_abc123',\n  velocityCheck: {\n    transactionsLastHour: 3,\n    transactionsLastDay: 12\n  }\n});\n\nconsole.log(analysis.riskLevel);     // 'LOW'\nconsole.log(analysis.recommendation); // 'APPROVE'\n```\n\n### 4. GPS Anti-Spoofing (Delivery Verification)\n\n```typescript\nconst deliveryProof = await shield.verifyDelivery({\n  orderId: 'ord_12345',\n  driverId: 'drv_456',\n  photoBase64: 'data:image/jpeg;base64,...',\n  location: {\n    lat: -34.603722,\n    lng: -58.381592,\n    accuracy: 15\n  }\n});\n\nconsole.log(deliveryProof.verified);          // true\nconsole.log(deliveryProof.geoVerification.spoofingDetected); // false\nconsole.log(deliveryProof.certificate);\n// ═══════════════════════════════════════════════════\n//   SHIELDAI — DELIVERY VERIFICATION CERTIFICATE\n// ═══════════════════════════════════════════════════\n//   Order ID  : ord_12345\n//   GPS Valid : YES ✓\n//   Spoofing  : NOT DETECTED ✓\n//   Status    : VERIFIED ✓\n// ═══════════════════════════════════════════════════\n```\n\n### 5. Grooming Detection (SafeVibe Integration)\n\n```typescript\nconst result = shield.fraudDetection.detectGrooming(\n  'no le cuentes a tus padres pero mándame una foto'\n);\n\nconsole.log(result.detected);    // true\nconsole.log(result.patterns);    // ['SECRECY_REQUEST', 'PHOTO_REQUEST']\nconsole.log(result.confidence);  // 50\n```\n\n---\n\n## Use Cases\n\n### Healthcare (TramitExpress integration)\n- Seal medical records with RFC 3161 TSA — legally admissible in court\n- Biometric consent signatures\n- Automatic legal retention\n\n### Logistics\n- Delivery proof with GPS anti-spoofing\n- Photo sealing with SHA-256\n- Immutable delivery audit log\n\n### Fintech / Crypto Exchanges\n- KYC compliance for BCRA and UIF regulations\n- AML transaction monitoring\n- SOC2-compliant audit logs\n\n### Legal / Compliance\n- Chain of custody for legal evidence\n- Document existence proof with certified timestamp\n- Anti-tampering verification\n\n---\n\n## API Reference\n\n### `ShieldAI`\n\n```typescript\nnew ShieldAI(config?: ShieldAIConfig)\n```\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `apiKey` | string | — | Your API key (production) |\n| `tsaUrl` | string | FreeTSA | TSA server URL |\n| `environment` | string | 'sandbox' | 'sandbox' or 'production' |\n\n### Methods\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `sealDocument(content, title)` | Promise | Seal a document with TSA timestamp |\n| `createAuditChain(chainId?)` | AuditChainModule | Create an immutable audit chain |\n| `verifyDelivery(data)` | Promise | Full delivery verification with GPS + photo + log |\n| `info()` | Object | SDK version and configuration |\n\n---\n\n## Compliance\n\n- **BCRA / UIF** (Argentina) — Immutable audit logs for financial transactions\n- **GDPR** (Europe) — Data minimization and audit trails\n- **eIDAS** (Spain) — Compatible with electronic identification standards\n- **SOC2** — Tamper-evident logs for security audits\n\n---\n\n## About El Pentágono\n\nShieldAI is the security engine powering El Pentágono — an ecosystem of 9 social-impact applications built in Argentina, expanding to Spain and LATAM.\n\n- 📦 **TramitExpress** — Document engine with native legal value\n- 🔐 **ShieldAI** — Security infrastructure (this SDK)\n- 🚗 **FemDrive** — Women-only ride-sharing\n- 🏥 **SaludYa** — Digital health records\n- 🚌 **RastroBus** — Transport evidence certification\n- 📚 **Vacantes Ya** — School vacancy management\n- 🛡 **SafeVibe** — Parental digital content control\n- 🌙 **Oneiros** — Wellbeing and sleep tracking\n- 🏫 **AulaEnfocada** — Classroom device management\n\n---\n\n## License\n\nUNLICENSED — All rights reserved.\n© 2026 Gustavo Gastón González Alfonzo — El Pentágono\nelpentagono.digital@gmail.com\n\n---\n\n## Contact\n\nFor commercial inquiries, pilots, and integrations:\n\n📧 elpentagono.digital@gmail.com\n🌐 stately-dolphin-0a6bff.netlify.app\n📦 npm: `@el-pentagono/shieldai-sdk`\n","readmeFilename":"README.md","_rev":"1-14d063bf3833a04a75cd719564d04fc5"}