@andamio/login
v0.1.0
Published
Andamio social login — sign in with Google/X/Discord and get a Cardano wallet. One call: no projectId, no chain provider.
Readme
@andamio/login
Social login for Cardano apps. Your users sign in with Google / X / Discord and get a non-custodial wallet (powered by utxos.dev) — in one call. No projectId, no chain provider, no seed phrases.
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.
Install
npm install @andamio/loginUse
import { createAndamioLogin } from "@andamio/login";
// You pick the network; Andamio maps it to its umbrella project internally.
const wallet = await createAndamioLogin("preprod"); // or "mainnet"
const address = await wallet.getBech32Address();
const signature = await wallet.signData(address, nonce); // sign a login-challenge nonce
const signedTx = await wallet.signTx(unsignedTxCborHex); // sign an Andamio-built txThat's the whole login. Signing happens in an isolated browser iframe — neither your app nor Andamio can access the user's key.
API
createAndamioLogin(network): Promise<AndamioWallet>
network:"preprod" | "mainnet".
AndamioWallet
getBech32Address(): Promise<string>signData(address, payload): Promise<{ key, signature }>signTx(unsignedTx, partialSign?): Promise<string>
Notes
- Sponsored / gateway transactions are built and submitted by your backend against the Andamio gateway with your API key; this package only signs.
