{"_id":"@andamio/login","_rev":"3-59485464a048e30d3534b36454b0938f","name":"@andamio/login","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@andamio/login","version":"0.1.0","keywords":["andamio","cardano","social-login","wallet","utxos"],"license":"MIT","_id":"@andamio/login@0.1.0","maintainers":[{"name":"james-andamio","email":"james@andamio.io"},{"name":"nelsonksh","email":"nelsonksh@gimbalabs.io"}],"dist":{"shasum":"75623dcc53e1f45bc22359b469d1707f5b711076","tarball":"https://registry.npmjs.org/@andamio/login/-/login-0.1.0.tgz","fileCount":4,"integrity":"sha512-gEFXU+9H124JHMoCv0hFyLREs/6ys3BKhVRFGMIoONgX8E4SBZWygoFTNgAUeIXzacjSyiOBahpCTMk7tHVboA==","signatures":[{"sig":"MEQCIGjX0BxZqpj0Y+OYO90aRcgZbuTSUv0Tyh8FHzep0gxHAiBbquSnsvoCNmA+TePMBqBS+w2/LbwNneq1PyuZ6klPYg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5210},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"nelsonksh","email":"nelsonksh@gimbalabs.io"},"_npmVersion":"10.9.4","description":"Andamio social login — sign in with Google/X/Discord and get a Cardano wallet. One call: no projectId, no chain provider.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.0","dependencies":{"@utxos/sdk":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/login_0.1.0_1780651725238_0.6653624131888431","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Broken — mainnet projectId is empty and preprod ships a demo project ID. Use 0.2.0+, which resolves { projectId, networkId } from the gateway."},"0.2.0":{"name":"@andamio/login","version":"0.2.0","keywords":["andamio","cardano","social-login","wallet","utxos"],"license":"MIT","_id":"@andamio/login@0.2.0","maintainers":[{"name":"james-andamio","email":"james@andamio.io"},{"name":"nelsonksh","email":"nelsonksh@gimbalabs.io"}],"dist":{"shasum":"e798f36645d11a48a472827dbf273348ed484ffe","tarball":"https://registry.npmjs.org/@andamio/login/-/login-0.2.0.tgz","fileCount":5,"integrity":"sha512-Kn+RnHY4KJo2eYsj/8yLFbF3bv7UBHWPK+DMVLvCcBAF5oBptdGg6s/11yTOxfOS4oHJitJvaAmvtZ+XSZyGCQ==","signatures":[{"sig":"MEUCIAX401+p2rkalnTwTiRPqlQdhgCc/cIMSfe7e0ETBmeaAiEA50mDgII6TmHEkOLbJsZ4KlHII8vG0+BVpP3yHwTFOEA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8284},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"624d571e0cb4e20bbb96d3808e716b68b86bea72","scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"nelsonksh","email":"nelsonksh@gimbalabs.io"},"_npmVersion":"10.8.2","description":"Andamio social login — sign in with Google/X/Discord and get a Cardano wallet. One call: no projectId, no chain provider.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"@utxos/sdk":"^0.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/login_0.2.0_1787582553299_0.05787687656403828","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-05T09:28:45.113Z","modified":"2026-08-24T14:44:34.530Z","0.1.0":"2026-06-05T09:28:45.367Z","0.2.0":"2026-08-24T14:42:33.471Z"},"license":"MIT","keywords":["andamio","cardano","social-login","wallet","utxos"],"description":"Andamio social login — sign in with Google/X/Discord and get a Cardano wallet. One call: no projectId, no chain provider.","maintainers":[{"name":"james-andamio","email":"james@andamio.io"},{"name":"nelsonksh","email":"nelsonksh@gimbalabs.io"}],"readme":"# @andamio/login\n\nSocial login for Cardano apps. Your users sign in with **Google / X / Discord** and get a non-custodial wallet (powered by [utxos.dev](https://utxos.dev)) — in one call. No utxos.dev signup, no chain provider, no seed phrases.\n\n> This is the **login / wallet** piece. To call Andamio's API (build & submit transactions), your **backend** uses your **Andamio API key** server-side — that's a separate concern from login.\n\n## Install\n\n```bash\nnpm install @andamio/login\n```\n\n## Use\n\n```ts\nimport { createAndamioLogin } from \"@andamio/login\";\n\n// { projectId, networkId } is resolved by YOUR backend from the Andamio gateway\n// (see \"Resolving config\") and handed to the browser. The package never hardcodes\n// it — if Andamio later moves you to a dedicated project, nothing here changes.\nconst wallet = await createAndamioLogin({ projectId, networkId });\n\nconst address   = await wallet.getBech32Address();\nconst signature = await wallet.signData(address, nonce);   // sign a login-challenge nonce\nconst signedTx  = await wallet.signTx(unsignedTxCborHex);  // sign an Andamio-built tx\n```\n\nThat's the whole login. Signing happens in an isolated browser iframe — neither your app nor Andamio can access the user's key.\n\n## Resolving config\n\n`createAndamioLogin` takes `{ projectId, networkId }` resolved from the Andamio gateway, **not** a hardcoded constant:\n\n```\nGET {ANDAMIO_API_URL}/issuer/v1/config          header: X-API-Key: <your enterprise key>\n→ { \"project_id\": \"…\", \"network_id\": \"preprod\" }\n```\n\nDespite the `_id` suffix, `network_id` is the **string** `\"preprod\" | \"mainnet\"` — not a number. The Cardano/SDK numeric id (`0`/`1`) is mapped inside this package and never appears in the gateway contract.\n\n- **Call it from your backend, with your enterprise API key.** That key is a server-side secret and must not reach the browser — your backend resolves the config (`project_id` → `projectId`, `network_id` → `networkId`) and hands `{ projectId, networkId }` to the page.\n- **Resolve once and cache it.** The value is static per key, so fetch it at startup (or once, lazily) and reuse it. Do **not** call the endpoint on every login — that's a needless request per sign-in.\n\nWhy a lookup instead of a constant: it lets Andamio move a tenant onto their own utxos.dev project later (isolated usage limits + origin allowlist) as a **backend-only** change — your integration never changes.\n\n## API\n\n### `createAndamioLogin(config): Promise<AndamioWallet>`\n- `config.projectId: string` — from `GET /issuer/v1/config`'s `project_id`.\n- `config.networkId: \"preprod\" | \"mainnet\"` — from `GET /issuer/v1/config`'s `network_id` (mapped to the SDK's `0`/`1` internally).\n\n### `AndamioWallet`\n- `getBech32Address(): Promise<string>`\n- `signData(address, payload): Promise<{ key, signature }>`\n- `signTx(unsignedTx, partialSign?): Promise<string>`\n\n## Notes\n\n- **Sponsored / gateway transactions** are built and submitted by your backend against the Andamio gateway with your API key; this package only signs.\n","readmeFilename":"README.md"}