Developer Docs: Build with Kakr Labs
HomeAPI PolicyPrivacy & TermsPlayground
  • Core Concepts
    • Core Concepts
      • Introduction
        • What is a Blockchain?
        • Litecoin as a Service (LiaaS)
        • Web2 Vs Web3
        • Category Codes
      • Transactions
        • Stages of a Litecoin Transaction
        • What are UTXOs?
        • How to spend UTXOs?
      • Assets
        • Collections
        • Tokens
        • Uploading and Pinning Files on IPFS
      • Wallet
        • Non custody wallet vs custody wallet
        • Hierarchical Deterministic wallets(HD Wallets)
        • Passphrase and Private key
      • Address
        • Default Address of Wallet
        • Official Address of Wallet
        • Key Differences
      • MimbleWimble (MWEB)
      • Multi-sig Concept
    • 💰Pricing
  • Solutions
    • Solutions
      • Payments
        • Peer-to-Peer Payments
        • Micropayments
        • Confidential Payments
      • Tokenization
        • Stablecoins
          • Proof of Loyalty
        • NFT Marketplace overview
          • NFT Marketplace
        • Industrial Tokenization
          • Energy Sector
      • Multi-signature
        • Assets Security
      • IPFS Gateway
        • Decentralized Storage (IPFS + Litecoin)
      • Decentralized Identity & Authentication
        • Decentralized Identity: Password Recovery via Litecoin Address Ownership
        • Decentralized Identity: Passwordless Agent Authentication
        • Decentralized Authentication
  • Using Pteri
    • 🤝Introduction
    • 😇Create an Account
    • 💰Get started
      • ⚕️Stats
      • 📖Debug
      • ➡️Work Flow
      • 🤑Subscription
      • 💆‍♂️Usage
      • 💆‍♂️Settings
    • ✨PTERI Intelligence
  • Pteri Wallet
    • 🔁Wallet Recovery Mechanism on Pteri
  • LiaaS
    • LiaaS
      • What Kakr LiaaS
      • Getting set up
        • Authentication
      • Kakr (LiaaS) Features
        • Address Features
        • Token Features
        • Wallet Features
      • Wallet System
        • Create Wallet
        • Create Importable Wallet
        • Encrypt Wallet
        • Create Encrypted Wallet
        • Create Importable Encrypted Wallet
        • Change wallet passphrase
        • Generate Address
        • Generate Default Address
        • Wallet official address
        • Wallet default address
        • Wallet default address v2
        • Wallet addresses
        • Wallet Balance
        • Address Details
        • Load Wallet
        • Import Wallet
        • Address Balance (Using Wallet)
        • Wallet Tokens
        • Create Multi Signature Address (preview)
      • Token Issuance
        • Create Collection
        • Create Tokens
          • Create Secure Digital Asset SDA (Alias NFT)
          • Create Token
          • Create Token v2
          • Create Managed Supply Tokens
          • Mint Supply Tokens
          • Burn Supply Tokens
      • Token Transfer
        • Send Token
        • Send SDA/NFT
      • Transactions
        • Send Litecoin
        • Create Raw Transaction
        • Create Raw Transaction (Advanced)
        • Sign Transaction
        • Broadcast Transaction
      • Blocks
        • Blocks Information
        • Blocks Stat
        • Blocks Header Information
        • Block Transactions
      • Others
        • 🔁Get SDA Transaction Details
        • 🔁Address Details
        • 🔁External Address Details
        • ⏺️Address Transactions
        • ⏺️Address Balance
        • 🔐Address Private Key
        • 🔐Address Private Key V2
        • 🚀NFT Details
        • 🚀NFT Balance
        • 🚀Token and Collection Balance
        • 📙Property Details
        • 💹Wallet Details
        • 🔼Generate passphrase
        • 💱Wallet Transactions
        • ✒️Sign Wallet message
        • 🖊️Sign Address Message
        • 💱Verify Message
        • 🗄️Upload to IPFS
        • 📌Pin on IPFS
  • API Reference
  • FAQs and Troubleshooting
  • Developers FAQs and Error Handling
Powered by GitBook
LogoLogo

© 2025 Kakr Platform Inc. All rights reserved

On this page
  • Overview
  • Problem Statement
  • The Solution
  • Architecture
  • 📝Implementation Steps
  • 🔒Security Considerations
  • ➕Benefits
  • 🧲Advanced Features
  • 🚀 Start Exploring the Litecoin Blockchain Capability with Zero Cost
  • Conclusion
  • 📖 FAQs & Support

Was this helpful?

  1. Solutions
  2. Solutions
  3. Decentralized Identity & Authentication

Decentralized Identity: Passwordless Agent Authentication

Passwordless Agent Authentication Using LiaaS and Pteri Wallet Signatures

Overview

This documentation outlines a secure, decentralized, and passwordless authentication system for autonomous AI agents using Litecoin wallet signatures and Litecoin-as-a-Service (LiaaS). By leveraging cryptographic signatures, this approach eliminates reliance on traditional credentials like passwords, OAuth tokens, or API keys, enabling robust identity verification for agent-based workflows.


Problem Statement

As AI agents increasingly perform sensitive operations on behalf of users, secure authentication is critical. Traditional authentication methods, such as passwords, OAuth, or API keys, introduce significant risks:

  • Centralized Vulnerabilities: Passwords and API keys are susceptible to theft, phishing, or mismanagement, especially in distributed agent environments.

  • Credential Management Overhead: Managing and rotating credentials across multiple agents or services is complex and error-prone.

  • Vendor Lock-In: OAuth-based systems often tie users to centralized providers, limiting flexibility in decentralized ecosystems.

  • Agent Autonomy Risks: Agents acting autonomously must securely verify user identities without storing sensitive credentials.

These challenges demand a secure, decentralized, and user-friendly authentication mechanism that aligns with the principles of zero-trust security and agent-driven workflows.


The Solution

This solution implements a passwordless authentication flow using Litecoin wallet signatures verified through LiaaS. Users authenticate by signing a cryptographic challenge with their Litecoin wallet (e.g., Pteri Wallet), and the agent verifies the signature via LiaaS, ensuring secure, decentralized identity verification.

Key Features

  • Passwordless: Eliminates passwords, reducing attack surfaces and simplifying user experience.

  • Decentralized: Leverages Litecoin blockchain and LiaaS for trustless verification, avoiding reliance on centralized authorities.

  • Zero-Trust: No secrets or credentials are stored or shared by the agent.

  • Scalable: Integrates seamlessly with existing agent architectures and supports cross-service identity reuse.

  • Secure: Uses single-use nonces and cryptographic signatures to prevent replay… replay attacks.


Architecture

The authentication flow involves the following components:

User
 ↕
Frontend (Client)
 ↕
Node.js Agent (Express Server)
 ↕
LiaaS Signature Verification API
 ↕
Litecoin Blockchain

Prerequisites

  • A Litecoin-compatible wallet (e.g., Pteri Wallet or browser extension)

  • API Key or Node URL for LiaaS to verify signature

  • Node.js (v16 or higher) with Express

  • (Optional) JWT for session management

  • (Optional) Redis or a database for nonce storage in production


📝Implementation Steps

Step 1: Generate and Send Login Challenge

The server generates a unique nonce and sends it to the client for signing.

// server.js
const express = require('express');
const crypto = require('crypto');
const app = express();
const store = new Map(); // In-memory store (use Redis/DB in production)

app.use(express.json());

app.post('/auth/request', (req, res) => {
  const { address } = req.body;
  const nonce = crypto.randomUUID();
  store.set(address, nonce);
  res.json({ message: `Sign this nonce: ${nonce}` });
});

app.listen(3000, () => console.log('Server running on port 3000'));

Step 2: User Signs Challenge

The client signs the nonce using a Litecoin wallet. Example using a wallet library (liaas-js):

const LiaaS = require("liaas-js");
const liaasSdk = new LiaaS();

const nonce = "Sign this nonce: <nonce>";
const signature = await liaasSdk.signLitecoinMessage(nonce); // Open a popup from Pteri chrome extension to sign message

Step 3: Client Submits Signature

The client sends the signed message to the server:

// POST /auth/verify
{
  "address": "ltc1qxyz...",
  "message": "Sign this nonce: <nonce>",
  "signature": "H+W2..." // signature received from extension after successful signing
}

Step 4: Verify Signature with LiaaS

const axios = require('axios');

app.post('/auth/verify', async (req, res) => {
  const { address, message, signature } = req.body;

  const storedNonce = store.get(address);
  if (!storedNonce || !message.includes(storedNonce)) {
    return res.status(400).json({ error: 'Invalid nonce or message' });
  }

  try {
    // Include your api key in authorization header generated from Pteri Dashboard.
    const response = await axios.post('https://pteri.xyz/api/utilities/verifyMessage', {
      address,
      message,
      signature
    });

    if (response.data.verified) {
      // Optional: Issue JWT for session management
      return res.json({ verified: true, user: address });
    }
    return res.status(401).json({ verified: false });
  } catch (error) {
    return res.status(500).json({ error: 'Verification failed' });
  }
});

🔒Security Considerations

  • Nonce Management: Nonces must be single-use, time-bound, and stored securely (e.g., in Redis or a database).

  • Trusted Verification: Always use LiaaS’s official API for signature verification to prevent tampering.

  • Network Security: Enforce HTTPS and configure strict CORS policies in production.

  • Rate Limiting: Implement rate limiting to prevent brute-force attacks.

  • Session Management: Use JWTs with short expiration times for session tracking, if needed.


➕Benefits

  • Enhanced Security: Eliminates credentials, reducing risks of theft or leakage.

  • User-Friendly: Simplifies authentication to a single wallet-based action.

  • Decentralized Identity: Enables portable, wallet-based identities across services.

  • Extensible: Supports advanced access control (e.g., Omnilite NFT ownership).


🧲Advanced Features

  • Session Management: Implement JWT-based sessions for stateful interactions.

  • Access Control: Restrict agent actions based on token or NFT ownership.

  • Decentralized Dashboards: Build wallet-driven interfaces for agent monitoring.

  • Multi-Wallet Support: Extend compatibility to other Litecoin-compatible wallets.


🚀 Start Exploring the Litecoin Blockchain Capability with Zero Cost

Conclusion

This passwordless authentication system, powered by LiaaS and Litecoin wallet signatures, provides a secure, decentralized, and scalable solution for authenticating users to autonomous agents. By eliminating traditional credentials, it aligns with zero-trust principles and supports the evolving needs of decentralized agent ecosystems.

For further details or API access, visit LiaaS Documentation or contact the LiaaS support team.

📖 FAQs & Support

Can I use any Litecoin wallet for this authentication method?

Yes, as long as the wallet supports message signing (e.g., Pteri Wallet, Pteri Extension, or other LiaaS-compatible wallets).

Is the authentication flow secure without passwords or API keys?

Absolutely. It relies on public-key cryptography and one-time challenges, eliminating the risks of password reuse, leaks, or token interception.

What happens when migrating to a new device?

When moving to a new device, the user simply needs to restore their Litecoin wallet using their mnemonic phrase.

Once restored:

  • They can sign challenge messages and sign in as usual

  • No data or account migration is needed

⚠️ If the wallet was not backed up, access to the authentication system will be permanently lost.

For any further queries, please reach out to us at contact@kakrlabs.com.

PreviousDecentralized Identity: Password Recovery via Litecoin Address OwnershipNextDecentralized Authentication

Last updated 1 month ago

Was this helpful?

The server verifies the signature using the LiaaS .

📄Sign up on Pteri and gain instant access to powerful blockchain API endpoints with our Free Plan.→ /

🔐 Try Message Signing →

🔑 Try Message Verifying →

API
Join for Free
Azure Marketplace
Sign Message
Verify Message