0.0.1 • Published 3 months ago

shogun-core v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Shogun SDK

Overview

Welcome to the Shogun SDK! This powerful and user-friendly SDK is designed to simplify decentralized authentication and wallet management. With support for various authentication methods including standard username/password, MetaMask, and WebAuthn, Shogun SDK integrates seamlessly with GunDB for decentralized user authentication. Whether you're building a new application or enhancing an existing one, Shogun SDK provides the tools you need to manage user authentication and crypto wallets efficiently.

Key Features

  • Multi-layer Authentication: Supports username/password, MetaMask, and WebAuthn.
  • Wallet Management: Easily manage crypto wallets, mnemonics, and keys.
  • GunDB Integration: Decentralized user authentication with GunDB.
  • Stealth Addresses: Create and manage stealth addresses for enhanced privacy.
  • Storage Solutions: Simple key-value storage with support for localStorage.

Installazione

npm install @shogun/shogun-core
# o
yarn add @shogun/shogun-core

Esempio Base d'Uso

import { ShogunSDK } from '@shogun/shogun-core';

// Inizializzazione
const shogun = new ShogunSDK({
  peers: ['https://your-gun-peer.com/gun'],
  localStorage: true
});

// Autenticazione con username/password
const loginResult = await shogun.login('username', 'password');

// Oppure con MetaMask
const metaMaskLoginResult = await shogun.loginWithMetaMask('ethereumAddress');

// Oppure con WebAuthn
const webAuthnLoginResult = await shogun.loginWithWebAuthn('username');

Documentazione Completa

Shogun SDK include una documentazione tecnica completa generata con TSDoc:

  • Documentazione locale: Visualizza la documentazione aprendo ./docs/index.html
  • Classi principali: Consulta ./docs/classes/ per dettagli sulle singole classi
  • Interfacce: Consulta ./docs/interfaces/ per dettagli sulle interfacce

Requisiti di Sistema e Compatibilità

  • Browser moderni con supporto per WebAuthn (Chrome, Firefox, Edge, Safari)
  • Node.js 14 o superiore
  • Compatibile con ethers.js v6

Contribuire

Le contribuzioni sono benvenute! Se desideri contribuire al progetto, per favore:

  1. Forka il repository
  2. Crea un branch per la tua feature (git checkout -b feature/amazing-feature)
  3. Committa i tuoi cambiamenti (git commit -m 'Aggiunta nuova feature')
  4. Effettua il push al branch (git push origin feature/amazing-feature)
  5. Apri una Pull Request

Licenza

MIT