{"_id":"@rodit/rodit-auth-fe","_rev":"108-957f816ba3ac474b1b5740663bd8fa03","name":"@rodit/rodit-auth-fe","dist-tags":{"latest":"4.10.10"},"versions":{"4.10.8":{"name":"@rodit/rodit-auth-fe","version":"4.10.8","keywords":["rodit","authentication","api","sdk","rodit"],"author":{"name":"Discernible IO"},"license":"UNLICENSED","_id":"@rodit/rodit-auth-fe@4.10.8","maintainers":[{"name":"rodit","email":"npmjs+npmjs@discernible.io"}],"homepage":"https://github.com/discernible-io/rodit-auth-fe#readme","bugs":{"url":"https://github.com/discernible-io/rodit-auth-fe/issues"},"dist":{"shasum":"951eb9c7f3f8d47c915000780220edc9faebd085","tarball":"https://registry.npmjs.org/@rodit/rodit-auth-fe/-/rodit-auth-fe-4.10.8.tgz","fileCount":8,"integrity":"sha512-hJD2wDxvs8svBxiuIM0xEp5NyUHD8XD9E/TikjBTa+gJdNT9qpHAyKkw32OPqtuSe7Qh+XjMJMtFJolBLxo10Q==","signatures":[{"sig":"MEQCIH7VHRS4gS+G4IQXrh1Q/JgN5jxVi9fN8AM4jQ5CNayuAiBHuIEm1Sgl4yeFi00B6ayaoQ8ZcAQbEMyRjsAxUnY3Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212403},"main":"index.js","browser":"index.js","engines":{"node":">=20.0.0"},"gitHead":"a954050a2924634744b20fc158443742ad8fb7aa","scripts":{"docs":"jsdoc -c jsdoc.json","lint":"eslint .","test":"node --test test/","build":"echo 'SDK build complete - no build step required for this package'"},"_npmUser":{"name":"rodit","email":"npmjs+npmjs@discernible.io"},"repository":{"url":"git+https://github.com/discernible-io/rodit-auth-fe.git","type":"git"},"_npmVersion":"10.9.7","description":"JavaScript sdk for interacting with RODiT authentication and API services","directories":{},"_nodeVersion":"22.22.2","dependencies":{"bs58":"^5.0.0","ulid":"^2.3.0","tweetnacl":"^1.0.3","jwt-decode":"^4.0.0","tweetnacl-util":"^0.15.1"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.2","eslint":"^8.40.0"},"_npmOperationalInternal":{"tmp":"tmp/rodit-auth-fe_4.10.8_1780325182802_0.7551297934931565","host":"s3://npm-registry-packages-npm-production"}},"4.10.10":{"_id":"@rodit/rodit-auth-fe@4.10.10","bugs":{"url":"https://github.com/discernible-io/rodit-sdk/issues"},"dist":{"shasum":"312aaa25b667f8f18a5643d902dae9c26d8a916a","tarball":"https://registry.npmjs.org/@rodit/rodit-auth-fe/-/rodit-auth-fe-4.10.10.tgz","fileCount":8,"integrity":"sha512-9UELIEOwj6iJFqekQMGdGY7Ic7Tem4bUXvZ4OQJF3eZr42MlkSrDVcKpmRNdiYv8DUc9lRLL8n2e9zPa2oulBw==","signatures":[{"sig":"MEQCIDK4N3cuV9IO/iJ2LsCSxz0EehxZMkMyCDdiHoHBZNU6AiBzzBawEwZyO87rQp5wZKgVaIbx+sy1PGhZCPNgVDQF7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC0QDc603IwEfoChQfEfxFchedNeeksBck6bwrkGvs6IQIhAKvf2kwyvu7qLkR9qQWCxO8CV7Q4p/VZRQW0NTqGXD+d"}],"unpackedSize":214756},"main":"index.js","name":"@rodit/rodit-auth-fe","author":{"name":"Discernible IO"},"browser":"index.js","engines":{"node":">=20.0.0"},"gitHead":"7a3fa47f24d9049071db56f8d8af404a69451dc2","license":"UNLICENSED","scripts":{"docs":"jsdoc -c jsdoc.json","lint":"eslint .","test":"node --test test/","build":"echo 'SDK build complete - no build step required for this package'"},"version":"4.10.10","_npmUser":{"name":"rodit","email":"npmjs+npmjs@discernible.io"},"homepage":"https://github.com/discernible-io/rodit-sdk/tree/main/rodit-auth-fe#readme","keywords":["rodit","authentication","api","sdk","rodit"],"repository":{"url":"git+https://github.com/discernible-io/rodit-sdk.git","type":"git","directory":"rodit-auth-fe"},"_npmVersion":"10.9.8","description":"JavaScript sdk for interacting with RODiT authentication and API services","directories":{},"maintainers":[{"name":"rodit","email":"npmjs+npmjs@discernible.io"}],"_nodeVersion":"22.23.2","dependencies":{"bs58":"^5.0.0","ulid":"^2.3.0","tweetnacl":"^1.0.3","jwt-decode":"^4.0.0","tweetnacl-util":"^0.15.1"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.2","eslint":"^8.40.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rodit-auth-fe_4.10.10_1790074736909_0.19376071671504902"}}},"time":{"created":"2025-09-06T09:30:10.177Z","modified":"2026-09-22T10:58:57.186Z","1.0.0":"2025-09-06T09:30:10.498Z","1.0.1":"2025-09-06T09:40:48.020Z","1.0.2":"2025-09-06T18:13:15.264Z","1.0.3":"2025-09-06T18:16:03.551Z","1.0.4":"2025-09-06T18:21:18.550Z","1.0.5":"2025-09-06T18:30:04.721Z","1.0.6":"2025-09-06T18:33:28.738Z","1.0.7":"2025-09-06T18:35:46.234Z","1.0.8":"2025-09-06T18:43:00.231Z","1.0.9":"2025-09-07T06:08:33.256Z","1.0.10":"2025-09-07T06:20:06.638Z","1.0.11":"2025-09-07T06:31:16.777Z","1.0.13":"2025-09-07T06:40:40.422Z","1.0.14":"2025-09-07T06:58:24.572Z","1.0.15":"2025-09-07T07:19:22.717Z","1.0.16":"2025-09-07T11:36:07.467Z","1.0.18":"2025-09-07T12:01:52.817Z","1.0.19":"2025-09-07T13:23:24.145Z","1.0.20":"2025-09-07T13:46:36.097Z","1.0.21":"2025-09-07T15:19:00.657Z","1.0.22":"2025-09-07T15:37:03.378Z","1.1.0":"2025-09-21T10:56:01.473Z","2.0.0":"2025-09-21T12:33:40.765Z","2.0.1":"2025-09-21T14:51:34.518Z","2.0.2":"2025-09-22T14:14:23.477Z","2.0.3":"2025-09-22T14:19:11.826Z","2.0.4":"2025-09-22T14:33:45.943Z","2.0.5":"2025-09-22T15:10:57.377Z","2.0.6":"2025-09-22T15:18:02.673Z","2.9.0":"2025-09-23T09:39:18.375Z","2.9.1":"2025-09-23T12:39:05.006Z","3.0.0":"2025-09-23T13:13:32.961Z","3.0.1":"2025-09-23T14:04:32.597Z","3.0.2":"2025-09-23T18:58:32.650Z","3.0.3":"2025-09-25T10:53:21.518Z","3.0.4":"2025-09-26T15:06:19.382Z","3.0.5":"2025-10-02T10:39:53.359Z","3.0.6":"2025-10-02T10:45:31.396Z","3.0.7":"2025-10-20T12:35:55.838Z","3.0.8":"2025-10-24T13:26:42.965Z","3.1.0":"2025-10-29T07:52:26.465Z","3.1.1":"2025-10-29T11:28:39.149Z","3.1.2":"2026-04-09T11:45:01.642Z","3.2.0":"2026-04-27T13:16:44.852Z","3.2.1":"2026-04-27T13:45:18.718Z","3.3.3":"2026-04-27T14:06:35.144Z","3.3.4":"2026-04-27T14:32:16.145Z","4.0.1":"2026-05-02T09:19:35.898Z","4.10.1":"2026-05-15T13:12:51.580Z","4.10.2":"2026-05-18T10:51:28.988Z","4.10.6":"2026-05-22T10:08:18.009Z","4.10.8":"2026-06-01T14:46:22.955Z","4.10.10":"2026-09-22T10:58:56.994Z"},"bugs":{"url":"https://github.com/discernible-io/rodit-sdk/issues"},"author":{"name":"Discernible IO"},"license":"UNLICENSED","homepage":"https://github.com/discernible-io/rodit-sdk/tree/main/rodit-auth-fe#readme","keywords":["rodit","authentication","api","sdk","rodit"],"repository":{"url":"git+https://github.com/discernible-io/rodit-sdk.git","type":"git","directory":"rodit-auth-fe"},"description":"JavaScript sdk for interacting with RODiT authentication and API services","maintainers":[{"name":"rodit","email":"npmjs+npmjs@discernible.io"}],"readme":"# @rodit/rodit-auth-fe\n\nBrowser SDK for RODiT (RRich Online Digital Token) authentication — NEAR wallet (NEP-413), on-chain token verification, and JWT sessions against RODiT-powered APIs.\n\n**npm:** [https://www.npmjs.com/package/@rodit/rodit-auth-fe](https://www.npmjs.com/package/@rodit/rodit-auth-fe)  \n**Monorepo:** [discernible-io/rodit-sdk](../README.md) (this directory)\n\n> **Backend counterpart:** Server-side login, permissions, and webhooks live in [`@rodit/rodit-auth-be`](https://www.npmjs.com/package/@rodit/rodit-auth-be).\n\n## Production APIs using this SDK\n\nWeb and wallet clients authenticate to live RODiT APIs with `RoditAuthService`, including:\n\n| API | Typical use |\n|-----|-------------|\n| [api.identyclaw.com](https://api.identyclaw.com) | IdentyClaw agents, portals, and mint flows ([api-idc](https://github.com/discernible-io/api-idc)) |\n| [api.lastcradle.io](https://api.lastcradle.io) | Last Cradle family applications |\n| Other `subjectuniqueidentifier_url` endpoints | Any API whose server RODiT metadata points at the same login/JWT contract |\n\nPoint `apiEndpoint` at your target API base URL; the server must run [`@rodit/rodit-auth-be`](https://www.npmjs.com/package/@rodit/rodit-auth-be).\n\n## Overview\n\nThis SDK is designed for **browser environments only** and provides:\n- **NEP-413 Authentication**: NEAR wallet signature-based authentication\n- **RODiT Token Management**: Fetch and verify RODiT tokens from NEAR blockchain\n- **JWT Session Management**: Handle JWT tokens; absorb server `New-Token` renewals (default). Optional `POST /api/refresh` only if the host mounts it.\n- **Cryptographic Verification**: Verify RODiT ownership and signatures\n- **State Management**: Browser-compatible session and state storage\n\n## Installation\n\n```bash\nnpm install @rodit/rodit-auth-fe\n```\n\n## Frontend vs Backend SDK\n\n| Feature | @rodit/rodit-auth-fe (Frontend) | @rodit/rodit-auth-be (Backend) |\n|---------|--------------------------------|-------------------------------|\n| **Environment** | Browser only | Node.js only |\n| **Use Case** | Client-side web applications | Server-side APIs and services |\n| **DNS Verification** | ❌ Skipped (browser limitation) | ✅ Full DNS TXT record verification |\n| **Cryptography** | Web Crypto API, tweetnacl | Node.js crypto module |\n| **Storage** | sessionStorage, localStorage | File system, databases |\n| **NEAR Integration** | NEAR wallet browser integration | Direct RPC calls |\n| **JWT Operations** | jwt-decode, tweetnacl verify | Full jose with Node.js features |\n\n**When to use this SDK (`@rodit/rodit-auth-fe`):**\n- Building web applications with NEAR wallet integration\n- Client-side RODiT authentication flows\n- Browser-based API clients\n- React, Vue, or other frontend frameworks\n\n**When to use `@rodit/rodit-auth-be`:**\n- Building backend API servers\n- Server-side RODiT verification with full DNS checks\n- Node.js microservices\n- API gateways and middleware\n\n## Quick Start\n\n### Basic Setup\n\n```javascript\nimport { RoditAuthService } from '@rodit/rodit-auth-fe';\nimport { Wallet } from './near-wallet'; // Your NEAR wallet implementation\n\n// Initialize NEAR wallet\nconst wallet = new Wallet({\n  createAccessKeyFor: 'your-contract.near',\n  network: 'mainnet'\n});\n\n// Create RODiT authentication service\nconst roditAuth = new RoditAuthService(\n  wallet,\n  'https://api.example.com',           // API endpoint\n  window.location.origin,              // Callback endpoint\n  'your-contract.near',             // Contract ID\n  'https://rpcnear.org'       // RPC URL\n);\n```\n\n### Authentication Flow\n\n```javascript\n// 1. Initiate login with NEP-413 signature\nawait roditAuth.login_server_withnep413({\n  callbackUrl: `${window.location.origin}/login`\n});\n\n// 2. Handle callback after wallet signature\nconst loginResult = await roditAuth.handleLoginCallback(window.location.href);\nconsole.log('JWT Token:', loginResult.jwt_token);\n\n// 3. Make authenticated API calls\nconst response = await roditAuth.fetchWithErrorHandling_fe(\n  'https://api.example.com/api/endpoint',\n  {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({ data: 'example' })\n  }\n);\n```\n\n## Core Components\n\n### RoditAuthService\n\nMain authentication service class that handles the complete authentication lifecycle.\n\n#### Constructor\n\n```javascript\nnew RoditAuthService(wallet, apiEndpoint, callbackEndpoint, contractId, rpcUrl)\n```\n\n**Parameters:**\n- `wallet` - NEAR wallet instance with `accountId` and `viewMethod` support\n- `apiEndpoint` - Base URL of the API server (e.g., `https://api.example.com`)\n- `callbackEndpoint` - Callback URL for authentication redirects (typically `window.location.origin`)\n- `contractId` - NEAR smart contract ID where RODiT tokens are stored\n- `rpcUrl` - NEAR RPC endpoint URL (e.g., `https://rpcnear.org`)\n\n#### Key Methods\n\n##### `login_server_withnep413(options)`\n\nInitiates NEP-413 authentication flow with NEAR wallet.\n\n```javascript\nawait roditAuth.login_server_withnep413({\n  callbackUrl: `${window.location.origin}/login`\n});\n```\n\n**Process:**\n1. Fetches user's RODiT token from blockchain\n2. Generates cryptographically secure nonce\n3. Stores login data in sessionStorage\n4. Triggers NEAR wallet signature request\n\n##### `handleLoginCallback(url)`\n\nProcesses the callback after wallet signature.\n\n```javascript\nconst result = await roditAuth.handleLoginCallback(window.location.href);\n// Returns: { jwt_token: string, decoded: object }\n```\n\n**Process:**\n1. Extracts signature from callback URL\n2. Validates signature against stored login data\n3. Sends authentication request to API server\n4. Receives and stores JWT token\n5. Optionally arms a client refresh timer (only useful if the API mounts `POST /api/refresh`; default renewal is server-initiated via `New-Token` on subsequent calls)\n\n##### `fetchWithErrorHandling_fe(url, options)`\n\nMakes authenticated API requests with automatic JWT token inclusion.\n\n```javascript\nconst response = await roditAuth.fetchWithErrorHandling_fe(\n  'https://api.example.com/api/endpoint',\n  {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({ data: 'value' })\n  }\n);\n```\n\n**Features:**\n- Automatically adds JWT token to Authorization header\n- Absorbs server-initiated renewals from the `New-Token` response header (default)\n- Optional client timer may call `POST /api/refresh` only if the host exposes it\n- Comprehensive error logging\n- Returns parsed JSON response\n\n##### `nearorg_wallet_tokensfromaccountid(wallet, contractId, accountId)`\n\nFetches RODiT tokens owned by a specific NEAR account.\n\n```javascript\nconst token = await roditAuth.nearorg_wallet_tokensfromaccountid(\n  wallet,\n  'contract.near',\n  'user.near'\n);\n```\n\n## Exported Functions\n\n### Authentication & Verification\n\n```javascript\nimport {\n  RoditAuthService,\n  verify_rodit_ownership,\n  verify_rodit_islive,\n  verify_rodit_isamatch,\n  verify_rodit_isactive_fe,\n  verify_rodit_istrusted_issuingsmartcontract_fe,\n  verify_peerrodit_getrodit_fe,\n  stateManager,\n  validateMetadata,\n  verifyRoditBeforeMinting,\n  verifyRoditPairBeforeMinting\n} from '@rodit/rodit-auth-fe';\n```\n\n#### `verify_rodit_ownership(peerroditid, peer_rodit, authService)`\n\nVerifies cryptographic ownership of a RODiT token by validating the Ed25519 signature.\n\n#### `verify_rodit_islive(notAfter, notBefore)`\n\nChecks if a RODiT token is within its valid time period.\n\n#### `verify_rodit_isamatch(serviceprovider_id, peer_rodit, rpcUrl?, contractId?)`\n\nVerifies that a peer RODiT matches the service provider ID. Optional `rpcUrl` and `contractId` are used for blockchain lookups; `RoditAuthService#verify_rodit_isamatch` passes the instance values.\n\n#### `verify_rodit_isactive_fe(tokenId, url)`\n\nBrowser-compatible check for RODiT activity status (DNS checks skipped).\n\n#### `verify_peerrodit_getrodit_fe(roditId, timestamp, signature, authService)`\n\nFetches and verifies a peer RODiT token from the blockchain.\n\n### Blockchain Models\n\n```javascript\nimport { CONSTANTS, RODiT } from '@rodit/rodit-auth-fe';\n```\n\n#### `RODiT` Class\n\nData model representing a RODiT token with metadata:\n\n```javascript\nconst rodit = new RODiT();\nrodit.token_id = \"bc=near.org;sc=contract.near;id=01ABC123...\";\nrodit.owner_id = \"user.near\";\nrodit.metadata = {\n  subjectuniqueidentifier_url: \"https://api.example.com\",\n  not_before: \"2025-01-01T00:00:00Z\",\n  not_after: \"2026-01-01T00:00:00Z\",\n  allowed_cidr: \"0.0.0.0/0\",\n  allowed_iso3166list: '{\"allow\": [\"USA\"]}',\n  permissioned_routes: '{\"routes\": {...}}',\n  max_requests: \"1000\",\n  maxrq_window: \"3600\",\n  jwt_duration: \"3600\",\n  webhook_url: \"https://webhook.example.com\",\n  webhook_cidr: \"10.0.0.0/8\",\n  serviceprovider_id: \"bc=near.org;sc=provider.near;id=...\",\n  serviceprovider_signature: \"base64signature...\"\n};\n```\n\n### Utility Functions\n\n```javascript\nimport {\n  calculateCanonicalHash,\n  canonicalizeObject,\n  base64ToBase64Url,\n  base64url2jwk_public_key,\n  jwtVerify_fe,\n  verifyRoditSignature,\n  validateBufferIntegrity,\n  verifyHashInputs,\n  bufferUtils,\n  debugWithType,\n  validateAndSetUrl,\n  validateAndSetDate,\n  validateAndSetJson,\n  validateAndSetSignature,\n  validateSignatureFormat,\n  validatePublicKeyFormat\n} from '@rodit/rodit-auth-fe';\n```\n\n#### `calculateCanonicalHash(obj)`\n\nCreates a deterministic hash of an object for verification purposes.\n\n#### `base64ToBase64Url(base64)`\n\nConverts standard Base64 to URL-safe Base64.\n\n#### `jwtVerify_fe(token, publicKeyJwk)`\n\nVerifies JWT token signature using a JWK public key (browser-compatible).\n\n#### `verifyRoditSignature(message, signature, publicKey)`\n\nVerifies Ed25519 signature using tweetnacl.\n\n### Logger\n\n```javascript\nimport { logger, createLogContext } from '@rodit/rodit-auth-fe';\n\nlogger.debug('Debug message', { component: 'MyComponent', data: {...} });\nlogger.info('Info message', { component: 'MyComponent' });\nlogger.warn('Warning message', { component: 'MyComponent' });\nlogger.error('Error message', { component: 'MyComponent', error });\n```\n\n## State Management\n\nThe SDK includes a `stateManager` for managing authentication state:\n\n```javascript\nimport { stateManager } from '@rodit/rodit-auth-fe';\n\n// Set own RODiT configuration\nstateManager.setConfigOwnRodit({\n  own_rodit: {\n    token_id: \"...\",\n    owner_id: \"...\",\n    metadata: {...}\n  }\n});\n\n// Get configuration\nconst config = stateManager.getConfigOwnRodit();\n```\n\n## RODiT Token Metadata Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `subjectuniqueidentifier_url` | string | API endpoint base URL |\n| `not_before` | ISO 8601 | Token validity start date |\n| `not_after` | ISO 8601 | Token expiration date |\n| `allowed_cidr` | string | Comma-separated CIDR ranges for allowed client IPs |\n| `allowed_iso3166list` | JSON string | Allowed country codes: `{\"allow\": [\"USA\", \"CAN\"]}` |\n| `permissioned_routes` | JSON string | Route permissions and rate limits |\n| `max_requests` | string | Maximum requests per time window |\n| `maxrq_window` | string | Rate limit time window in seconds |\n| `jwt_duration` | string | JWT token lifetime in seconds |\n| `webhook_url` | string | Webhook notification endpoint |\n| `webhook_cidr` | string | CIDR ranges for webhook server IPs |\n| `serviceprovider_id` | string | Service provider's RODiT ID |\n| `serviceprovider_signature` | string | Service provider's signature |\n| `openapijson_url` | string | OpenAPI specification URL |\n| `userselected_dn` | string | User-selected display name |\n\n## Usage in mintserverapi-rodit\n\nThis SDK is used in the RODiT Server Mint application for:\n\n1. **User Authentication**: Authenticating users via NEAR wallet with NEP-413 signatures\n2. **RODiT Minting**: Verifying RODiT ownership before minting new server RODiT tokens\n3. **API Communication**: Making authenticated requests to the SignSanctum API\n4. **Token Verification**: Validating RODiT tokens and their metadata\n\n### Example from mintserverapi-rodit\n\n```javascript\n// From src/index.js\nimport { RoditAuthService } from \"@rodit/rodit-auth-fe\";\n\nconst wallet = new Wallet({\n  createAccessKeyFor: process.env.REACT_APP_NEAR_CONTRACT_ID,\n  network: \"mainnet\"\n});\n\nconst roditAuth = new RoditAuthService(\n  wallet,\n  process.env.REACT_APP_SIGNAPIENDPOINT,\n  window.location.origin,\n  process.env.REACT_APP_NEAR_CONTRACT_ID,\n  process.env.REACT_APP_NEAR_RPC_URL\n);\n\n// Used in Contract class for minting operations\nawait roditAuth.login_server_withnep413({\n  callbackUrl: `${window.location.origin}/login`\n});\n```\n\n## Security Considerations\n\n### Cryptographic Security\n\n- **Nonce Generation**: Uses `window.crypto.getRandomValues()` for secure random nonce generation\n- **HTTPS Required**: Cryptographic operations require HTTPS context on main\n- **Ed25519 Signatures**: All RODiT ownership verification uses Ed25519 cryptography\n- **JWT Tokens**: Session tokens are JWT-based with automatic expiration. By default the **server** renews access credentials on authenticated requests (`New-Token`). Explicit `POST /api/refresh` is optional and normally unnecessary.\n\n### Browser Limitations\n\n- **DNS Verification Skipped**: DNS TXT record verification not possible in browser. For full DNS verification, use [`@rodit/rodit-auth-be`](https://www.npmjs.com/package/@rodit/rodit-auth-be) on the server-side.\n- **No Node.js Support**: This package is browser-only and does not support Node.js `require()`. Use [`@rodit/rodit-auth-be`](https://www.npmjs.com/package/@rodit/rodit-auth-be) for Node.js environments.\n\n## Environment Variables\n\nRequired environment variables for mintserverapi-rodit:\n\n```bash\nREACT_APP_NEAR_CONTRACT_ID=your-contract.near\nREACT_APP_SIGNAPIENDPOINT=https://api.example.com\nREACT_APP_NEAR_RPC_URL=https://rpcnear.org\n```\n\n## Dependencies\n\n- `bs58` - Base58 encoding/decoding\n- `jwt-decode` - JWT token decoding\n- `tweetnacl` - Ed25519 cryptography\n- `tweetnacl-util` - Utility functions for tweetnacl\n- `ulid` - ULID generation for request tracking\n\n## Package Information\n\n- **Name**: `@rodit/rodit-auth-fe`\n- **Version**: 3.0.6\n- **License**: UNLICENSED\n- **Repository**: https://github.com/discernible-io/rodit-sdk/tree/main/rodit-auth-fe\n- **Node Version**: >=20.0.0\n\n## Related Packages\n\n- **[@rodit/rodit-auth-be](https://www.npmjs.com/package/@rodit/rodit-auth-be)** - Backend/Node.js version with full DNS verification and server-side features\n\n## Testing\n\nRun the test suite:\n\n```bash\nnpm test\n```\n\n## License\n\nUNLICENSED - Copyright (c) 2026 Discernible IO. All rights reserved.\n\n---\n\n[discernible.io](https://www.discernible.io) · [identyclaw-agents](https://github.com/discernible-io/identyclaw-agents) · [discernible-io](https://github.com/discernible-io)\n","readmeFilename":"README.md"}