A comprehensive authentication bridge system for the Sui blockchain that enables secure, centralized signature verification for sensitive capability management.
mintcap/
├── contract/ # Move smart contract
│ ├── sources/ # Contract source code
│ └── tests/ # Contract tests
├── sdk/ # TypeScript SDK
│ └── src/ # SDK source code
└── README.md # This file
Auth Bridge is a security framework that allows you to:
- 🔒 Secure Sensitive Capabilities: Store mint caps, admin caps, and other sensitive objects behind authentication
- ✍️ Centralized Signing: Use Ed25519 signatures from trusted centralized services
- 🔄 Safe Borrowing: Borrow capabilities for operations and safely return them
- ⚙️ Flexible Configuration: Define custom authentication parameters per protocol
Move smart contract built for Sui blockchain that provides:
- Protocol registration and configuration
- Ed25519 signature verification
- Secure capability storage using borrow checker pattern
- Authentication object management
Tech Stack: Move language, Sui blockchain
Complete SDK for interacting with the smart contract:
- Transaction building helpers
- Signature construction and verification
- Type-safe API with full IntelliSense support
- Support for both backend (with private keys) and frontend usage
Tech Stack: TypeScript, Bun runtime, Sui TypeScript SDK
npm install @reforgelab/auth-bridge
# or
bun add @reforgelab/auth-bridge
import { AuthBridgeSdk } from '@reforgelab/auth-bridge';
// Initialize authentication system
const sdk = new AuthBridgeSdk(privateKey);
// Set up authentication for your capability
await sdk.initialize({
key: yourMintCap,
input_keys: ['amount'],
output_keys: ['amount'],
// ... other params
});
// Authenticate and borrow capability
const signature = await sdk.constructSignature({/* params */});
const { authentication } = await sdk.signin({/* params */});
const { cap } = await sdk.borrowCap({ authentication, /* params */ });
// Use capability safely
// ... your secure operations
// Return capability
await sdk.returnCap({/* params */});
cd contract
sui move build # Build contract
sui move test # Run tests
cd sdk
bun install # Install dependencies
bun run format # Format code
- NFT Collections: Secure mint capabilities behind authentication
- Gaming: Protect admin capabilities for in-game assets
- DeFi: Secure treasury and admin functions
- DAOs: Authenticate proposal execution capabilities
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.
Carl Klöfverskjöld
- GitHub: @Reblixt