Açıklama Yok

lushdog@outlook.com f15d6530f7 fix(jupiter): Price API v3 需 API Key,增加未配置与 401 时的提示 1 ay önce
.vscode d4ffe3b046 add my lp 2 ay önce
public a012ba0e18 Initial commit from Create Next App 3 ay önce
src f15d6530f7 fix(jupiter): Price API v3 需 API Key,增加未配置与 401 时的提示 1 ay önce
.dockerignore f89e4a0225 docker 3 ay önce
.env.example abb76a03a9 fix: 使用 Jupiter Price API v3 替代已弃用的 price.jup.ag 1 ay önce
.gitignore f91bf287f6 feat(deploy): use htpasswd file for basic auth 1 ay önce
.prettierignore f89e4a0225 docker 3 ay önce
.prettierrc.json d4ffe3b046 add my lp 2 ay önce
API_AUTH.md 2f39a52d44 fix(caddy): use basic_auth with import for htpasswd file 1 ay önce
Caddyfile 2f39a52d44 fix(caddy): use basic_auth with import for htpasswd file 1 ay önce
Dockerfile 968983f5e7 fix pnpm 1 ay önce
README.md de60c0b5aa add auth 2 ay önce
docker-compose.yml f91bf287f6 feat(deploy): use htpasswd file for basic auth 1 ay önce
eslint.config.mjs d4ffe3b046 add my lp 2 ay önce
next.config.ts c4b6aba994 fix: 修复 API route 中 bn.js 服务端打包导致的 _bn 属性访问错误 1 ay önce
package.json b81751e281 chore(deps): upgrade next.js to 16.1.6 1 ay önce
pnpm-lock.yaml b81751e281 chore(deps): upgrade next.js to 16.1.6 1 ay önce
postcss.config.mjs d4ffe3b046 add my lp 2 ay önce
tsconfig.json 7d192a4bca fix 2 ay önce
update.sh 17d8b1511d add update.sh 2 ay önce

README.md

This is a Next.js project bootstrapped with create-next-app.

环境变量配置

本地开发

  1. 创建 .env.local 文件(此文件已被 .gitignore 忽略,不会提交到 Git):

    # Solana RPC 地址
    SOL_ENDPOINT=https://lb.drpc.live/solana/
    
    # Solana 私钥(用于签名交易,敏感信息,不要提交到 Git)
    SOL_SECRET_KEY=your_secret_key_here
    
  2. 或者参考 .env.example 文件创建 .env.local

Docker 运行

创建.env文件,添加以下内容

# Solana RPC 地址
SOL_ENDPOINT=https://lb.drpc.live/solana/

# Solana 私钥(用于签名交易,敏感信息,不要提交到 Git)
SOL_SECRET_KEY=your_secret_key_here

直接启动(会先自动编译)


apt install httpd

# 按提示输入两次密码
htpasswd -c ./htpasswd admin

docker compose up -d

使用 RPC 地址

在代码中使用 src/lib/solana-config.ts 中的工具函数:

import { getSolanaRpcUrl } from '@/lib/solana-config'

const rpcUrl = getSolanaRpcUrl()

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.