Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example .env file for the API server
# If you want to add new variables, please do it in the format below
# <Your Variable Name>=<An explanation of the variable>
# <Your Variable Name>=<An explanation of the variable>
# On the next iteration of pnpm run dev, the new variables picked up by the validate-env script will be added to the .env file
# You can add hints to the ENV_HINTS object in the validate-env script to help the user with the new variables

Expand Down Expand Up @@ -29,4 +29,10 @@ TWITTER_PASSWORD=<Your Twitter Password>
TWITTER_API_KEY=<Your Twitter API Key>
TWITTER_API_SECRET_KEY=<Your Twitter API Secret Key>
TWITTER_ACCESS_TOKEN=<Your Twitter Access Token>
TWITTER_ACCESS_TOKEN_SECRET=<Your Twitter Access Token Secret>
TWITTER_ACCESS_TOKEN_SECRET=<Your Twitter Access Token Secret>
NEVERMINED_WEB3_PROVIDER_URI=<Your Nevermined Web3 Provider URI>
NEVERMINED_MARKETPLACE_URI=<Your Nevermined Marketplace URI>
NEVERMINED_NODE_URI=<Your Nevermined Node URI>
NEVERMINED_NODE_ADDRESS=<Your Nevermined Node Address>
MARKETPLACE_AUTH_TOKEN=<Your Marketplace Auth Token>
ARTIFACTS_FOLDER=<Your Artifacts Folder>
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A modern full-stack AI-enabled template using Next.js for frontend and Express.j

> [!IMPORTANT]
> The AI Agent Starter Kit is powered by the Collab.Land AccountKit APIs
>
>
> More information here: https://accountkit-docs-qa.collab.land/

## 🎯 Cursor IDE Integration
Expand Down Expand Up @@ -233,6 +233,19 @@ pnpm run dev
GITHUB_CLIENT_SECRET=1234567890abcdef1234567890abcdef12345678
```

- `NEVERMINED_`: Connection information for the Nevermined SDK

1. Go to [Using default Developer values](https://docs.nevermined.io/docs/nevermined-sdk/getting-started/)

```bash
NEVERMINED_WEB3_PROVIDER_URI=https://sepolia-rollup.arbitrum.io/rpc
NEVERMINED_MARKETPLACE_URI=https://marketplace-api.testing.nevermined.app
NEVERMINED_NODE_URI=https://node.testing.nevermined.app
NEVERMINED_NODE_ADDRESS=0x5838B5512cF9f12FE9f2beccB20eb47211F9B0bc
MARKETPLACE_AUTH_TOKEN=
ARTIFACTS_FOLDER=./artifacts
```

**Note**: For production, update the Homepage URL and callback URL to your production domain.

**Security Notes**:
Expand Down
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@ai16z/eliza": "0.1.5-alpha.3",
"@ai16z/plugin-bootstrap": "0.1.5-alpha.3",
"@grammyjs/conversations": "^1.2.0",
"@nevermined-io/sdk": "^3.1.0",
"@ngrok/ngrok": "^1.4.1",
"@solana/web3.js": "^1.98.0",
"agent-twitter-client": "^0.0.18",
Expand Down
4 changes: 4 additions & 0 deletions server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { TelegramService } from "./services/telegram.service.js";
import { IService } from "./services/base.service.js";
import twitterRouter from "./routes/twitter.js";
import discordRouter from "./routes/discord.js";
import neverminedRouter from "./routes/nevermined.js";
import cookieParser from "cookie-parser";
import githubRouter from "./routes/github.js";
import { AnyType } from "./utils.js";
Expand Down Expand Up @@ -57,6 +58,9 @@ app.use("/auth/discord", discordRouter);
// Mount GitHub OAuth routes
app.use("/auth/github", githubRouter);

// Mount Nevermined SDK routes
app.use("/nevermined", neverminedRouter);

// 404 handler
app.use((_req: Request, _res: Response, _next: NextFunction) => {
_res.status(404).json({
Expand Down
18 changes: 18 additions & 0 deletions server/src/routes/nevermined.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Router, Request, Response } from "express";
import { neverminedService } from "../services/nevermined/nevermined.service.js";

const router = Router();

//handles the collabland api token creation in .env
const initializeNevermined = async (_req: Request, res: Response) => {
console.log("Initializing Nevermined SDK ...");

res.status(200).json({
message: "Nevermined SDK server configuration",
info: neverminedService(),
});
};

router.get("/init", initializeNevermined);

export default router;
Loading