{"_id":"@authjs-web3-providers/core","name":"@authjs-web3-providers/core","dist-tags":{"latest":"0.5.0"},"versions":{"0.5.0":{"name":"@authjs-web3-providers/core","version":"0.5.0","description":"Contains base abstractions and utilities for AuthJS Web3 Providers","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"dependencies":{"cookie":"^1.0.2","next-auth":"^4.24.11","siwe":"^3.0.0","uuid":"^9.0.1"},"devDependencies":{"@types/jest":"^29.5.0","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","eslint":"^8.0.0","jest":"^29.0.0","ts-jest":"^29.0.0","typedoc":"^0.24.0","typescript":"^5.0.0"},"keywords":["auth","web3","ethereum","siwe","next-auth","authentication"],"author":{"name":"palsergech"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/palsergech/authjs-web3-providers.git"},"bugs":{"url":"https://github.com/palsergech/authjs-web3-providers/issues"},"homepage":"https://github.com/palsergech/authjs-web3-providers#readme","publishConfig":{"access":"public"},"scripts":{"build":"tsc -p .","test":"jest --passWithNoTests","lint":"eslint src/**/*.ts","watch":"tsc -p . --watch","docs":"typedoc --out docs src"},"_id":"@authjs-web3-providers/core@0.5.0","_integrity":"sha512-SDk+YqbkZEQk6U/Uj2+9H1qITmU2rA09rJ+7jKrsOoGt+flGBaxe3ONLhZiB0wqHf1Ewrn9suo5RapNoDT2Fxg==","_resolved":"/tmp/0b2ff350d4887b21f9279281db5e30a0/authjs-web3-providers-core-0.5.0.tgz","_from":"file:authjs-web3-providers-core-0.5.0.tgz","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-SDk+YqbkZEQk6U/Uj2+9H1qITmU2rA09rJ+7jKrsOoGt+flGBaxe3ONLhZiB0wqHf1Ewrn9suo5RapNoDT2Fxg==","shasum":"fadaea3b6fb046f89dbf070f37dfa12dc5155643","tarball":"https://registry.npmjs.org/@authjs-web3-providers/core/-/core-0.5.0.tgz","fileCount":9,"unpackedSize":9706,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC8ItiMkh8yIxgVDwmXRuc6IDyxZuZ8X1xqDh09vrHKaAiEAjZEQJLe0X+bDqvz3q3QYh8716X7nWPzt3gZMCEd9rg8="}]},"_npmUser":{"name":"palsergech","email":"paulpaulych@gmail.com"},"directories":{},"maintainers":[{"name":"palsergech","email":"paulpaulych@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.5.0_1744303581022_0.7651808976430472"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-10T16:46:20.937Z","0.5.0":"2025-04-10T16:46:21.193Z","modified":"2025-04-10T16:46:21.482Z"},"maintainers":[{"name":"palsergech","email":"paulpaulych@gmail.com"}],"description":"Contains base abstractions and utilities for AuthJS Web3 Providers","homepage":"https://github.com/palsergech/authjs-web3-providers#readme","keywords":["auth","web3","ethereum","siwe","next-auth","authentication"],"repository":{"type":"git","url":"git+https://github.com/palsergech/authjs-web3-providers.git"},"author":{"name":"palsergech"},"bugs":{"url":"https://github.com/palsergech/authjs-web3-providers/issues"},"license":"MIT","readme":"# @authjs-web3-providers/core\n\nCore functionality for AuthJS Web3 Providers. This package provides enhanced credentials provider implementation for NextAuth.js that supports Web3 authentication.\n\n## Features\n\n- Enhanced credentials provider for NextAuth.js\n- Support for Web3 authentication flows\n- Flexible adapter integration\n- Customizable session handling\n- Type-safe implementation\n\n## Installation\n\n```bash\npnpm add @authjs-web3-providers/core\n```\n\n## Usage\n\n```typescript\nimport { EnhancedCredentialsProvider } from '@authjs-web3-providers/core';\nimport { NextAuth } from 'next-auth';\n\nconst auth = new NextAuth({\n  providers: [\n    EnhancedCredentialsProvider({\n      id: 'web3',\n      name: 'Web3',\n      credentials: {\n        // Your credentials configuration\n      },\n      async authorize(credentials, req) {\n        // Your authorization logic\n        return {\n          providerAccountId: 'unique-id',\n          name: 'user-name',\n          publicData: {\n            // Any public user data\n          }\n        };\n      }\n    })\n  ]\n});\n```\n\n## API\n\n### EnhancedCredentialsProvider\n\nEnhanced credentials provider that extends NextAuth.js credentials provider with additional features:\n\n```typescript\ntype EnhancedCredentialsConfig = {\n  id: string;\n  name: string;\n  credentials: Record<string, CredentialInput>;\n  adapter?: Adapter;\n  sessionCookie?: CookieOption;\n  authorize: (\n    credentials: any,\n    req: Pick<RequestInternal, \"body\" | \"query\" | \"headers\" | \"method\">\n  ) => Promise<CredentialsAccount | null>;\n};\n```\n\n### CredentialsAccount\n\nType representing a user account in the credentials flow:\n\n```typescript\ntype CredentialsAccount = {\n  providerAccountId: string;\n  name: string;\n  publicData?: any;\n  privateData?: any;\n};\n```\n\n## License\n\nMIT ","readmeFilename":"README.md","_rev":"1-899393c810e028568d6ecb5c42c67da0"}