Skip to content

adelos-protocol/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

Adelos Protocol

Privacy-preserving stealth transfers on Solana using Single-Key Stealth Addresses (SKSA).

πŸ” What is Adelos?

Adelos enables private transactions on Solana by generating unique stealth addresses for each transfer. Only the intended recipient can detect and claim the funds, making transactions unlinkable to their main wallet.

Key Features

  • Stealth Addresses: Each transfer goes to a unique, one-time address
  • Unlinkability: No on-chain connection between sender and receiver's main wallet
  • Non-interactive: Sender only needs receiver's registered public key
  • Full Withdrawal: Receiver can withdraw funds to any wallet

πŸ“¦ Project Structure

adelos/
β”œβ”€β”€ anchor/           # Solana smart contract (Anchor)
β”œβ”€β”€ sdk/              # TypeScript SDK (@adelos/sdk)
β”œβ”€β”€ demo-dapp/        # Next.js demo application
└── README.md

πŸš€ Quick Start

1. Install SDK

npm install @adelos/sdk

2. Initialize SDK

import { AdelosSDK, AdelosIndexer, derivePublicKey } from "@adelos/sdk";

const sdk = new AdelosSDK({
  rpcUrl: "https://api.devnet.solana.com",
  debug: true
});

3. Register Identity (Receiver)

// Unlock privacy (deterministic key from wallet signature)
const metaSk = await sdk.unlockPrivacy(signMessage);
const metaPk = derivePublicKey(metaSk);

// Register on-chain
// const tx = await sdk.createRegisterTransaction(publicKey, metaPk);
const signedTx = await signTransaction(tx);
await sdk.sendAndConfirm(signedTx);

4. Send Stealth Transfer (Sender)

// Check if recipient is registered
const registry = await sdk.getRegistry(recipientPubkey);

if (registry.exists) {
  // Create and send stealth transfer
  const { transaction, stealthAddress, memo } = await sdk.createStealthTransfer(
    senderPubkey,
    recipientPubkey,
    0.1, // SOL amount
    "v0"
  );
  
  const signedTx = await signTransaction(transaction);
  await sdk.sendAndConfirm(signedTx);
}

5. Scan & Withdraw (Receiver)

import { AdelosIndexer } from "@adelos/sdk";

// Initialize indexer
const indexer = new AdelosIndexer(connection);

// Scan for incoming stealth transfers
const transfers = await indexer.scanForStealthTransfers(metaSk, metaPk, 50);

// Withdraw to any address
for (const tx of transfers) {
  const withdrawable = indexer.prepareWithdraw(tx, metaSk, metaPk);
  
  const { signature } = await sdk.createWithdrawTransaction(
    withdrawable.stealthSecretKey,
    tx.stealthAddress,
    destinationPubkey
  );
}

πŸ“– Documentation

πŸ”— Links

πŸ”’ Cryptography

Adelos uses industry-standard cryptographic primitives:

Component Algorithm
Elliptic Curve Ed25519
Key Exchange ECDH (X25519)
Hash Function SHA-256
Signature EdDSA

How It Works

  1. Receiver registers a meta public key derived from their wallet signature
  2. Sender generates an ephemeral keypair and computes ECDH shared secret
  3. Stealth address is derived: P_stealth = P_meta + G Β· H(shared_secret)
  4. Receiver scans memo program for ephemeral keys and trial-decrypts
  5. Receiver recovers stealth private key: s_stealth = s_meta + H(S) mod n

πŸ›‘οΈ Security

For security issues, please email: albary6700@gmail.com

πŸ“„ License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors