A showcase template for @tychee/sdk — Regulatory-compliant card tokenization with Web3 self-custody on Stellar blockchain.
- 🔐 Card Tokenization — Encrypt and store cards on Stellar using AES-256-GCM
- 💼 Wallet Integration — Connect with Stellar wallets (Freighter) or demo keypairs
- 🎁 Rewards System — Track points, tiers, and earn rewards
- 🎟️ Vouchers — Browse and redeem vouchers with points
- 📊 Spending Analytics — View transaction history and category breakdown
git clone <repo-url> tychee-template
cd tychee-template
npm installCopy .env.example to .env.local and update the values:
cp .env.example .env.localRequired variables:
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_TOKEN_VAULT_ADDRESS=<your-contract-address>npm run devThis template demonstrates how to use @tychee/sdk:
import { TycheeSDK } from '@tychee/sdk';
const sdk = new TycheeSDK({
stellarNetwork: 'testnet',
horizonUrl: 'https://horizon-testnet.stellar.org',
sorobanRpcUrl: 'https://soroban-testnet.stellar.org',
tokenVaultAddress: process.env.NEXT_PUBLIC_TOKEN_VAULT_ADDRESS!,
useAccountAbstraction: false,
});
await sdk.initialize(secretKey);import { CardData } from '@tychee/sdk';
const cardData: CardData = {
pan: '4242424242424242',
cvv: '123',
expiryMonth: '12',
expiryYear: '26',
cardholderName: 'JOHN DOE',
network: 'visa',
};
const token = await sdk.storeCard(cardData);
console.log('Token Hash:', token.tokenHash);const token = await sdk.retrieveCard();
if (token) {
const cardData = await sdk.decryptCard(Buffer.from(token.encryptedPayload));
}src/
├── app/
│ ├── page.tsx # Home page
│ ├── cards/page.tsx # Card tokenization
│ ├── rewards/page.tsx # Points & tiers
│ ├── vouchers/page.tsx # Voucher store
│ └── spends/page.tsx # Transaction history
├── components/
│ └── navigation.tsx # Header & wallet connect
└── lib/
└── tychee-provider.tsx # SDK context wrapper
| Network | Card Number | CVV | Expiry |
|---|---|---|---|
| Visa | 4242 4242 4242 4242 | Any | Future |
| Mastercard | 5555 5555 5555 4444 | Any | Future |
| Amex | 3782 8224 6310 005 | Any | Future |
MIT © Tychee Labs