Go to file
2025-05-03 09:42:05 -04:00
public Initial commit from Create Next App 2025-05-02 15:18:41 -04:00
src nice 2025-05-03 09:42:05 -04:00
.eslintrc.cjs init, working 2025-05-02 16:05:48 -04:00
.gitignore Initial commit from Create Next App 2025-05-02 15:18:41 -04:00
eslint.config.mjs Initial commit from Create Next App 2025-05-02 15:18:41 -04:00
next.config.ts nice 2025-05-03 09:42:05 -04:00
package-lock.json init, working 2025-05-02 16:05:48 -04:00
package.json init, working 2025-05-02 16:05:48 -04:00
postcss.config.mjs Initial commit from Create Next App 2025-05-02 15:18:41 -04:00
README.md init, working 2025-05-02 16:05:48 -04:00
tsconfig.json Initial commit from Create Next App 2025-05-02 15:18:41 -04:00

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 payments
  • NEXT_PUBLIC_COSMOS_RPC_URL - The RPC URL for the Cosmos blockchain
  • NEXT_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 Registry
  • REGISTRY_GQL_ENDPOINT - The GraphQL endpoint for the Laconic Registry
  • REGISTRY_RPC_ENDPOINT - The RPC endpoint for the Laconic Registry
  • REGISTRY_BOND_ID - The bond ID to use for Laconic Registry records
  • REGISTRY_AUTHORITY - The authority for Laconic Registry LRNs
  • REGISTRY_USER_KEY - The private key for Laconic Registry transactions
  • APP_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

  1. User connects their Keplr wallet to the application
  2. User enters a URL they want to deploy to the Laconic Registry
  3. User completes payment in ATOM to a specified address
  4. The application verifies the transaction using the Cosmos RPC
  5. The application calls a server-side API route which creates records in the Laconic Registry
  6. 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.