public | ||
src | ||
.eslintrc.cjs | ||
.gitignore | ||
eslint.config.mjs | ||
next.config.ts | ||
package-lock.json | ||
package.json | ||
postcss.config.mjs | ||
README.md | ||
tsconfig.json |
ATOM Deploy - Laconic Registry
A simple Next.js frontend that allows users to pay in ATOM cryptocurrency (using Keplr wallet) and paste a URL. The transaction hash and URL are used to create records in the Laconic Registry.
Features
- Keplr wallet integration for ATOM payments
- URL validation and submission
- Transaction verification
- Laconic Registry record creation using official
@cerc-io/registry-sdk
Prerequisites
- Node.js 18.x or later
- npm or yarn
- Keplr wallet browser extension
- Access to a Laconic Registry node
Environment Variables
Copy the .env.local.example
file to .env.local
and fill in the required variables:
cp .env.local.example .env.local
Required environment variables:
Client-side (must be prefixed with NEXT_PUBLIC_):
NEXT_PUBLIC_RECIPIENT_ADDRESS
- The Cosmos address that will receive ATOM paymentsNEXT_PUBLIC_COSMOS_RPC_URL
- The RPC URL for the Cosmos blockchainNEXT_PUBLIC_COSMOS_CHAIN_ID
- The chain ID for Keplr wallet (e.g., cosmoshub-4)
Server-side:
REGISTRY_CHAIN_ID
- The chain ID for the Laconic RegistryREGISTRY_GQL_ENDPOINT
- The GraphQL endpoint for the Laconic RegistryREGISTRY_RPC_ENDPOINT
- The RPC endpoint for the Laconic RegistryREGISTRY_BOND_ID
- The bond ID to use for Laconic Registry recordsREGISTRY_AUTHORITY
- The authority for Laconic Registry LRNsREGISTRY_USER_KEY
- The private key for Laconic Registry transactionsAPP_NAME
- The name of the application (used in record creation)DEPLOYER_LRN
- The LRN of the deployer
Installation
npm install
Development
npm run dev
Visit http://localhost:3000 to see the application.
Build for Production
npm run build
Start Production Server
npm start
How It Works
- User connects their Keplr wallet to the application
- User enters a URL they want to deploy to the Laconic Registry
- User completes payment in ATOM to a specified address
- The application verifies the transaction using the Cosmos RPC
- The application calls a server-side API route which creates records in the Laconic Registry
- The record includes the URL, transaction hash, and other metadata
Architecture
This application uses a hybrid client/server approach:
- Client-side: Handles the user interface, Keplr wallet integration, and transaction verification
- Server-side: Next.js API route handles the communication with the Laconic Registry
This architecture allows us to keep sensitive keys secure on the server side while providing a responsive user experience.
Reference Files
This application was built with reference to:
snowballtools-base/packages/backend/src/registry.ts
hosted-frontends/deploy-atom.sh
Known Issues
- You may see a deprecated Buffer() warning during build. This comes from dependencies in the registry-sdk. This doesn't affect functionality.