├── .eslintrc.json ├── koii └── task-template │ ├── TaskDescription.md │ ├── babel.config.cjs │ ├── tests │ ├── wasm │ │ ├── zstd.wasm │ │ └── bincode_js_bg.wasm │ ├── testTask.js │ ├── config.js │ ├── test.webpack.config.js │ ├── simulateTask.js │ └── prod-debug.js │ ├── nodemon.json │ ├── jest.config.js │ ├── .gitlab-ci.yml │ ├── src │ ├── task │ │ ├── 0-setup.js │ │ ├── 5-routes.js │ │ ├── 2-submission.js │ │ ├── prediction_results.json │ │ ├── 3-audit.js │ │ ├── libs │ │ │ └── utils.js │ │ ├── 4-distribution.js │ │ └── candlestick-plotter.js │ └── index.js │ ├── .gitignore │ ├── .prettierrc │ ├── .eslintrc.js │ ├── webpack.config.js │ ├── docker-compose.yaml │ ├── package.json │ ├── Manual K2 Calls.md │ ├── .env.local.example │ └── error.txt ├── starknetNethermind └── my_project │ ├── .gitignore │ ├── Scarb.lock │ ├── snfoundry.toml │ ├── tests │ └── test_contract.cairo │ └── Scarb.toml ├── particle-auth-aa ├── .eslintrc.json ├── public │ ├── dark.png │ ├── logo.png │ ├── iexec.png │ ├── mobile.png │ ├── not-found.png │ ├── trading.png │ ├── dashboard1.png │ ├── pulsetrade.png │ ├── intermediate.png │ ├── vercel.svg │ └── next.svg ├── src │ ├── app │ │ ├── favicon.png │ │ ├── chat │ │ │ └── [chatId] │ │ │ │ └── layout.tsx │ │ ├── not-found.tsx │ │ ├── layout.tsx │ │ ├── globals.css │ │ └── trading │ │ │ └── execute │ │ │ └── page.tsx │ ├── components │ │ ├── MaxWidthWrapper.tsx │ │ ├── ui │ │ │ ├── textarea.tsx │ │ │ ├── input.tsx │ │ │ ├── progress.tsx │ │ │ ├── alert.tsx │ │ │ ├── button.tsx │ │ │ └── card.tsx │ │ ├── TxNotification.tsx │ │ ├── chats │ │ │ ├── GroupChatHeader.tsx │ │ │ ├── MessageList.tsx │ │ │ ├── MessageInput.tsx │ │ │ └── ChatInitiallizer.tsx │ │ ├── ai-chat │ │ │ ├── MessageList.tsx │ │ │ ├── Welcome.tsx │ │ │ ├── TradeValues.tsx │ │ │ └── ChatList.tsx │ │ └── Links.tsx │ └── lib │ │ ├── iexec.ts │ │ ├── hooks │ │ ├── useClickOutside.ts │ │ ├── useChat.ts │ │ ├── usePersistence.tsx │ │ ├── useWeb3Mail.ts │ │ ├── useParticleAuth.ts │ │ └── useDataProtectioon.ts │ │ ├── utils │ │ ├── lib-utils.ts │ │ └── connectionStore.ts │ │ ├── services │ │ └── ai-chat.ts │ │ ├── mockData.ts │ │ └── connectkit.tsx ├── next.config.mjs ├── IEXEC.txt ├── postcss.config.mjs ├── global.d.ts ├── contracts │ └── FILE.txt ├── components.json ├── .gitignore ├── .env.sample ├── tsconfig.json ├── firebase.config.ts ├── README.md ├── package.json └── tailwind.config.ts ├── .gitattributes ├── public ├── dark.png ├── iexec.png ├── logo.png ├── mobile.png ├── trading.png ├── dashboard1.png ├── not-found.png ├── pulsetrade.png ├── intermediate.png ├── pulsetrade(1).png ├── pulse-trade-logo.png ├── vercel.svg └── next.svg ├── src ├── app │ ├── favicon.png │ ├── chat │ │ └── [chatId] │ │ │ └── layout.tsx │ ├── not-found.tsx │ ├── layout.tsx │ ├── globals.css │ └── trading │ │ └── execute │ │ └── page.tsx ├── components │ ├── MaxWidthWrapper.tsx │ ├── ui │ │ ├── textarea.tsx │ │ ├── input.tsx │ │ ├── progress.tsx │ │ ├── alert.tsx │ │ ├── button.tsx │ │ └── card.tsx │ ├── TxNotification.tsx │ ├── chats │ │ ├── GroupChatHeader.tsx │ │ ├── MessageList.tsx │ │ ├── MessageInput.tsx │ │ └── ChatInitiallizer.tsx │ ├── ai-chat │ │ ├── MessageList.tsx │ │ ├── Welcome.tsx │ │ ├── TradeValues.tsx │ │ └── ChatList.tsx │ └── Links.tsx └── lib │ ├── iexec.ts │ ├── hooks │ ├── useClickOutside.ts │ ├── useChat.ts │ ├── usePersistence.tsx │ ├── useWeb3Mail.ts │ ├── useParticleAuth.ts │ └── useDataProtectioon.ts │ ├── utils │ ├── lib-utils.ts │ └── connectionStore.tsx │ ├── services │ └── ai-chat.ts │ ├── mockData.ts │ └── connectkit.tsx ├── tradeLLM ├── README.md ├── .gitignore ├── .env.example ├── render.yaml ├── config │ └── api-config.js ├── middleware │ ├── rateLimiter.js │ ├── errorHandler.js │ └── requestValidator.js ├── package.json ├── Test Prompts.md └── utils │ ├── marketDataValidator.js │ └── dataTransformer.js ├── IEXEC.txt ├── postcss.config.mjs ├── next-env.d.ts ├── global.d.ts ├── contracts └── FILE.txt ├── next.config.mjs ├── components.json ├── .env.sample ├── tsconfig.json ├── firebase.config.ts ├── LICENSE ├── package.json ├── tailwind.config.ts └── .gitignore /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /koii/task-template/TaskDescription.md: -------------------------------------------------------------------------------- 1 | # Task Description Template 2 | -------------------------------------------------------------------------------- /starknetNethermind/my_project/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .snfoundry_cache/ 3 | -------------------------------------------------------------------------------- /particle-auth-aa/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /koii/task-template/babel.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { presets: ["@babel/preset-env"] }; 2 | -------------------------------------------------------------------------------- /public/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/dark.png -------------------------------------------------------------------------------- /public/iexec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/iexec.png -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/mobile.png -------------------------------------------------------------------------------- /public/trading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/trading.png -------------------------------------------------------------------------------- /src/app/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/src/app/favicon.png -------------------------------------------------------------------------------- /tradeLLM/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/tradeLLM/README.md -------------------------------------------------------------------------------- /public/dashboard1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/dashboard1.png -------------------------------------------------------------------------------- /public/not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/not-found.png -------------------------------------------------------------------------------- /public/pulsetrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/pulsetrade.png -------------------------------------------------------------------------------- /public/intermediate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/intermediate.png -------------------------------------------------------------------------------- /public/pulsetrade(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/pulsetrade(1).png -------------------------------------------------------------------------------- /public/pulse-trade-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/public/pulse-trade-logo.png -------------------------------------------------------------------------------- /tradeLLM/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .env 3 | .DS_Store 4 | npm-debug.log 5 | yarn-debug.log 6 | yarn-error.log -------------------------------------------------------------------------------- /particle-auth-aa/public/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/dark.png -------------------------------------------------------------------------------- /particle-auth-aa/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/logo.png -------------------------------------------------------------------------------- /particle-auth-aa/public/iexec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/iexec.png -------------------------------------------------------------------------------- /particle-auth-aa/public/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/mobile.png -------------------------------------------------------------------------------- /particle-auth-aa/public/not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/not-found.png -------------------------------------------------------------------------------- /particle-auth-aa/public/trading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/trading.png -------------------------------------------------------------------------------- /particle-auth-aa/src/app/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/src/app/favicon.png -------------------------------------------------------------------------------- /koii/task-template/tests/wasm/zstd.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/koii/task-template/tests/wasm/zstd.wasm -------------------------------------------------------------------------------- /particle-auth-aa/public/dashboard1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/dashboard1.png -------------------------------------------------------------------------------- /particle-auth-aa/public/pulsetrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/pulsetrade.png -------------------------------------------------------------------------------- /particle-auth-aa/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /particle-auth-aa/public/intermediate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/particle-auth-aa/public/intermediate.png -------------------------------------------------------------------------------- /koii/task-template/tests/wasm/bincode_js_bg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickKish1/pulsetrade/HEAD/koii/task-template/tests/wasm/bincode_js_bg.wasm -------------------------------------------------------------------------------- /IEXEC.txt: -------------------------------------------------------------------------------- 1 | address=0x32e4fc3953c45f8fe11daddcbff702ff5a19119236fe6d453d424a25333fc08b 2 | 3 | Your protected data address: 0xB406035C56759Fd85c12A199453d2B6725488bd7 -------------------------------------------------------------------------------- /koii/task-template/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "events": { 3 | "crash": "echo 'Application has crashed' && kill $(ps aux | grep '[n]odemon' | awk '{print $2}')" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /koii/task-template/jest.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | transform: { "^.+\\.jsx?$": "babel-jest" }, 3 | transformIgnorePatterns: ["/node_modules/(?!@babel/runtime)"], 4 | }; 5 | -------------------------------------------------------------------------------- /particle-auth-aa/IEXEC.txt: -------------------------------------------------------------------------------- 1 | address=0x32e4fc3953c45f8fe11daddcbff702ff5a19119236fe6d453d424a25333fc08b 2 | 3 | Your protected data address: 0xB406035C56759Fd85c12A199453d2B6725488bd7 -------------------------------------------------------------------------------- /tradeLLM/.env.example: -------------------------------------------------------------------------------- 1 | GROQ_API_KEY='groq-api-key' 2 | POLYGON_API_KEY='polygon.io-api-key' 3 | NODE_ENV='development|production' 4 | ALLOWED_ORIGINS=http://localhost:3000 5 | PORT=3000 -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /koii/task-template/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - test 3 | 4 | jest_tests: 5 | stage: test 6 | image: node:latest 7 | script: 8 | - npm install 9 | - npm run jest-test 10 | -------------------------------------------------------------------------------- /particle-auth-aa/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /koii/task-template/src/task/0-setup.js: -------------------------------------------------------------------------------- 1 | export async function setup() { 2 | // define any steps that must be executed before the task starts 3 | console.log("PULSE TRADE PREDICTOR RUNNING....."); 4 | } 5 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /global.d.ts: -------------------------------------------------------------------------------- 1 | import { ConnectKitProvider } from "@particle-network/connectkit"; 2 | declare global { 3 | interface Window { 4 | ethereum: ConnectKitOptions; // Replace `any` with a more specific type if available 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /particle-auth-aa/global.d.ts: -------------------------------------------------------------------------------- 1 | import { ConnectKitProvider } from "@particle-network/connectkit"; 2 | declare global { 3 | interface Window { 4 | ethereum: ConnectKitOptions; // Replace `any` with a more specific type if available 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /koii/task-template/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | build 3 | node_modules 4 | package-lock.json 5 | yarn.lock 6 | migrate.sh 7 | */dev.js 8 | data/* 9 | executables/* 10 | namespace/* 11 | config/* 12 | .env.local 13 | taskStateInfoKeypair.json 14 | localKOIIDB.db 15 | metadata.json 16 | .npmrc 17 | .env* -------------------------------------------------------------------------------- /koii/task-template/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": false, 7 | "trailingComma": "all", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "arrowParens": "always", 11 | "endOfLine": "auto" 12 | } 13 | -------------------------------------------------------------------------------- /koii/task-template/tests/testTask.js: -------------------------------------------------------------------------------- 1 | import { taskRunner } from "@_koii/task-manager"; 2 | 3 | import "../src/index.js"; 4 | import { namespaceWrapper } from "@_koii/namespace-wrapper"; 5 | 6 | async function executeTasks() { 7 | let round = 1; 8 | await taskRunner.task(round); 9 | process.exit(0); 10 | } 11 | executeTasks() -------------------------------------------------------------------------------- /koii/task-template/.eslintrc.js: -------------------------------------------------------------------------------- 1 | export default { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es2021: true, 6 | node: true, 7 | jest: true, 8 | }, 9 | extends: "eslint:recommended", 10 | parserOptions: { 11 | ecmaVersion: 15, 12 | sourceType: "module", 13 | }, 14 | rules: {}, 15 | ignorePatterns: ["dist/", "node_modules/"], 16 | }; 17 | -------------------------------------------------------------------------------- /contracts/FILE.txt: -------------------------------------------------------------------------------- 1 | PULSE TRADE DEPLOYED ON CITREA 2 | status 0x1 Transaction mined and execution succeed 3 | transaction hash 0x6b0675375172e93d93a2febf9e0c42ad017cf60c211c7a4cac370f2001afe678 4 | block hash 0xc30f5ca54e66f2073a492eb337ec842b58e6698927697054c334b739e28bb29c 5 | block number 3904461 6 | contract address 0xe8da3071c06445ca26475f0fa1161ee5e8956929 7 | from 0xf171b553fe688c45d7dc9eeefe00709fc47b5a69 8 | -------------------------------------------------------------------------------- /koii/task-template/webpack.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | entry: "./src/index.js", 3 | target: "node", 4 | // When uploading to arweave use the production mode 5 | // mode:"production", 6 | mode: "development", 7 | devtool: "source-map", 8 | optimization: { 9 | usedExports: false, 10 | }, 11 | stats: { 12 | moduleTrace: false, 13 | }, 14 | node: { 15 | __dirname: true, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /particle-auth-aa/contracts/FILE.txt: -------------------------------------------------------------------------------- 1 | PULSE TRADE DEPLOYED ON CITREA 2 | status 0x1 Transaction mined and execution succeed 3 | transaction hash 0x6b0675375172e93d93a2febf9e0c42ad017cf60c211c7a4cac370f2001afe678 4 | block hash 0xc30f5ca54e66f2073a492eb337ec842b58e6698927697054c334b739e28bb29c 5 | block number 3904461 6 | contract address 0xe8da3071c06445ca26475f0fa1161ee5e8956929 7 | from 0xf171b553fe688c45d7dc9eeefe00709fc47b5a69 8 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const isProd = process.env.NODE_ENV === 'production'; 3 | const nextConfig = { 4 | reactStrictMode: true, 5 | images: { 6 | unoptimized: true, // Disable default image optimization 7 | }, 8 | assetPrefix: isProd ? '/pulsetrade/' : '', 9 | basePath: isProd ? '/pulsetrade' : '', 10 | output: 'export' 11 | }; 12 | export default nextConfig; 13 | -------------------------------------------------------------------------------- /koii/task-template/tests/config.js: -------------------------------------------------------------------------------- 1 | import "dotenv/config"; 2 | 3 | export const TASK_ID = 4 | process.env.TASK_ID || "BXbYKFdXZhQgEaMFbeShaisQBYG1FD4MiSf9gg4n6mVn"; 5 | export const WEBPACKED_FILE_PATH = 6 | process.env.WEBPACKED_FILE_PATH || "../dist/main.js"; 7 | 8 | const envKeywords = process.env.TEST_KEYWORDS ?? ""; 9 | 10 | export const TEST_KEYWORDS = envKeywords 11 | ? envKeywords.split(",") 12 | : ["TEST", "EZ TESTING"]; 13 | -------------------------------------------------------------------------------- /koii/task-template/src/task/5-routes.js: -------------------------------------------------------------------------------- 1 | import { namespaceWrapper, app } from "@_koii/namespace-wrapper"; 2 | 3 | export function routes() { 4 | /** 5 | * 6 | * Define all your custom routes here 7 | * 8 | */ 9 | 10 | // Example route 11 | app.get("/value", async (_req, res) => { 12 | const value = await namespaceWrapper.storeGet("value"); 13 | console.log("value", value); 14 | res.status(200).json({ value: value }); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /src/components/MaxWidthWrapper.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | import { ReactNode } from "react" 3 | 4 | const MaxWidthWrapper = ({ 5 | className, 6 | children 7 | }:{ 8 | className?: string, 9 | children: ReactNode 10 | }) => { 11 | return ( 12 |
14 | {children} 15 |
16 | ) 17 | } 18 | 19 | export default MaxWidthWrapper -------------------------------------------------------------------------------- /src/app/chat/[chatId]/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Metadata } from 'next'; 2 | 3 | export const metadata: Metadata = { 4 | title: 'Chat', 5 | description: 'Secure Web3 Chat', 6 | }; 7 | 8 | export default function ChatLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return ( 14 |
15 |
16 | {children} 17 |
18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /particle-auth-aa/src/components/MaxWidthWrapper.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | import { ReactNode } from "react" 3 | 4 | const MaxWidthWrapper = ({ 5 | className, 6 | children 7 | }:{ 8 | className?: string, 9 | children: ReactNode 10 | }) => { 11 | return ( 12 |
14 | {children} 15 |
16 | ) 17 | } 18 | 19 | export default MaxWidthWrapper -------------------------------------------------------------------------------- /particle-auth-aa/src/app/chat/[chatId]/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Metadata } from 'next'; 2 | 3 | export const metadata: Metadata = { 4 | title: 'Chat', 5 | description: 'Secure Web3 Chat', 6 | }; 7 | 8 | export default function ChatLayout({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | return ( 14 |
15 |
16 | {children} 17 |
18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /koii/task-template/tests/test.webpack.config.js: -------------------------------------------------------------------------------- 1 | import Dotenv from "dotenv-webpack"; 2 | 3 | export default { 4 | entry: "./src/index.js", 5 | target: "node", 6 | // When uploading to arweave use the production mode 7 | // mode:"production", 8 | mode: "development", 9 | devtool: "source-map", 10 | optimization: { 11 | usedExports: false, 12 | }, 13 | stats: { 14 | moduleTrace: false, 15 | }, 16 | node: { 17 | __dirname: true, 18 | }, 19 | plugins: [new Dotenv()], 20 | }; 21 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /particle-auth-aa/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /koii/task-template/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.2" 2 | services: 3 | task_node: 4 | image: public.ecr.aws/koii-network/task_node:latest 5 | command: yarn initialize-start 6 | extra_hosts: 7 | - "host.docker.internal:host-gateway" 8 | 9 | ports: 10 | - 30017:30017 11 | 12 | env_file: .env.local 13 | 14 | container_name: task_node 15 | 16 | # network_mode: host 17 | volumes: 18 | - ~/.config/koii:/app/config 19 | - ./data:/app/data 20 | - ./namespace:/app/namespace 21 | - ./dist:/app/executables 22 | -------------------------------------------------------------------------------- /tradeLLM/render.yaml: -------------------------------------------------------------------------------- 1 | # render.yaml 2 | services: 3 | - type: web 4 | name: tradellm-api 5 | env: node 6 | buildCommand: npm install 7 | startCommand: node server.js 8 | envVars: 9 | - key: PORT 10 | value: 3000 11 | - key: NODE_ENV 12 | value: production 13 | - key: GROQ_API_KEY 14 | sync: false # This will be added manually in Render dashboard 15 | - key: POLYGON_API_KEY 16 | sync: false # This will be added manually in Render dashboard 17 | healthCheckPath: /health 18 | autoDeploy: true 19 | -------------------------------------------------------------------------------- /particle-auth-aa/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /src/lib/iexec.ts: -------------------------------------------------------------------------------- 1 | // lib/iexec.ts 2 | import { IExec } from 'iexec'; 3 | 4 | export const iexec = new IExec({ ethProvider: window.ethereum }); 5 | 6 | export const registerOnIExec = async (emailOrWallet: string) => { 7 | try { 8 | // Mock registration (replace with actual Data Protector implementation) 9 | console.log('Registering on iExec:', emailOrWallet); 10 | // Example: await iexec.dataProtector.register(emailOrWallet); 11 | return true; 12 | } catch (error) { 13 | console.error('iExec registration failed:', error); 14 | throw error; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /particle-auth-aa/src/lib/iexec.ts: -------------------------------------------------------------------------------- 1 | // lib/iexec.ts 2 | import { IExec } from 'iexec'; 3 | 4 | export const iexec = new IExec({ ethProvider: window.ethereum }); 5 | 6 | export const registerOnIExec = async (emailOrWallet: string) => { 7 | try { 8 | // Mock registration (replace with actual Data Protector implementation) 9 | console.log('Registering on iExec:', emailOrWallet); 10 | // Example: await iexec.dataProtector.register(emailOrWallet); 11 | return true; 12 | } catch (error) { 13 | console.error('iExec registration failed:', error); 14 | throw error; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /particle-auth-aa/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /starknetNethermind/my_project/Scarb.lock: -------------------------------------------------------------------------------- 1 | # Code generated by scarb DO NOT EDIT. 2 | version = 1 3 | 4 | [[package]] 5 | name = "pulsetrade" 6 | version = "0.1.0" 7 | dependencies = [ 8 | "snforge_std", 9 | ] 10 | 11 | [[package]] 12 | name = "snforge_scarb_plugin" 13 | version = "0.34.0" 14 | source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.34.0#d6976d4635cbe69bd199fd502788c469d408ed2d" 15 | 16 | [[package]] 17 | name = "snforge_std" 18 | version = "0.34.0" 19 | source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.34.0#d6976d4635cbe69bd199fd502788c469d408ed2d" 20 | dependencies = [ 21 | "snforge_scarb_plugin", 22 | ] 23 | -------------------------------------------------------------------------------- /koii/task-template/src/task/2-submission.js: -------------------------------------------------------------------------------- 1 | import { namespaceWrapper } from "@_koii/namespace-wrapper"; 2 | 3 | export async function submission(roundNumber) { 4 | try { 5 | console.log(`MAKE SUBMISSION FOR ROUND ${roundNumber}`); 6 | 7 | // Get the stored stock symbol 8 | const stockSymbol = await namespaceWrapper.storeGet("value"); 9 | 10 | if (!stockSymbol) { 11 | throw new Error("No stock symbol found in storage"); 12 | } 13 | 14 | // Return the stock symbol for validation 15 | return stockSymbol; 16 | } catch (error) { 17 | console.error("MAKE SUBMISSION ERROR:", error); 18 | throw error; 19 | } 20 | } -------------------------------------------------------------------------------- /koii/task-template/src/task/prediction_results.json: -------------------------------------------------------------------------------- 1 | { 2 | "symbol": "AAPL", 3 | "lastPrice": 192.53, 4 | "predictedPrice": 191.58003692388536, 5 | "signals": { 6 | "type": "SELL", 7 | "entry": 192.53, 8 | "prediction": 191.58003692388536, 9 | "stopLoss": 196.38060000000002, 10 | "takeProfit": 186.7541, 11 | "potentialReturn": 0.493410417137403, 12 | "confidence": "LOW" 13 | }, 14 | "modelMetrics": { 15 | "lookbackPeriod": 30, 16 | "iterations": 2000, 17 | "learningRate": 0.005, 18 | "hiddenLayers": [ 19 | 12, 20 | 12, 21 | 8 22 | ] 23 | }, 24 | "timestamp": "2024-12-29T09:02:43.373Z" 25 | } -------------------------------------------------------------------------------- /.env.sample: -------------------------------------------------------------------------------- 1 | # Particle Project Config, learn more info: https://dashboard.particle.network/ 2 | NEXT_PUBLIC_PROJECT_ID= 3 | NEXT_PUBLIC_CLIENT_KEY= 4 | NEXT_PUBLIC_APP_ID= 5 | 6 | # WalletConnect Project Id, learn more info: https://cloud.walletconnect.com/ 7 | NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= 8 | 9 | NEXT_PUBLIC_FIREBASE_API_KEY= 10 | NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= 11 | NEXT_PUBLIC_FIREBASE_PROJECT_ID= 12 | NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= 13 | NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= 14 | NEXT_PUBLIC_FIREBASE_APP_ID= 15 | NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID= 16 | 17 | # Contract Addresses 18 | NEXT_PUBLIC_ETH_CONTRACT_ADDRESS=0xe8da3071c06445ca26475f0fa1161ee5e8956929 -------------------------------------------------------------------------------- /src/lib/hooks/useClickOutside.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from "react"; 2 | 3 | const useClickOutside = (handler: () => void) => { 4 | const ref = useRef(null); 5 | 6 | useEffect(() => { 7 | const handleClickOutside = (event: MouseEvent) => { 8 | if (ref.current && !ref.current.contains(event.target as Node)) { 9 | handler(); 10 | } 11 | }; 12 | 13 | document.addEventListener("mousedown", handleClickOutside); 14 | 15 | return () => { 16 | document.removeEventListener("mousedown", handleClickOutside); 17 | }; 18 | }, [handler]); 19 | 20 | return ref; 21 | }; 22 | 23 | export default useClickOutside; 24 | -------------------------------------------------------------------------------- /src/lib/utils/lib-utils.ts: -------------------------------------------------------------------------------- 1 | 2 | // Utility function to format the balance to 6 decimal places 3 | // This is more accurate than using .toFixed() because it does not rount it 4 | export const formatBalance = (balanceInEther: string): string => { 5 | const [integerPart, decimalPart] = balanceInEther.split("."); 6 | const truncatedDecimalPart = decimalPart ? decimalPart.slice(0, 6) : "000000"; 7 | return `${integerPart}.${truncatedDecimalPart}`; 8 | }; 9 | 10 | // Function to truncate addresses for display 11 | export const truncateAddress = (address: string): string => { 12 | return address ? `${address.slice(0, 6)}...${address.slice(address.length - 4)}` : ''; 13 | }; -------------------------------------------------------------------------------- /koii/task-template/src/index.js: -------------------------------------------------------------------------------- 1 | import { initializeTaskManager } from "@_koii/task-manager"; 2 | // any custom setup logic you need 3 | import { setup } from "./task/0-setup.js"; 4 | 5 | // your task, submission, and audit logic 6 | import { task } from "./task/1-task.js"; 7 | import { submission } from "./task/2-submission.js"; 8 | import { audit } from "./task/3-audit.js"; 9 | 10 | // rewards calculation 11 | import { distribution } from "./task/4-distribution.js"; 12 | 13 | // custom REST API routes 14 | import { routes } from "./task/5-routes.js"; 15 | 16 | initializeTaskManager({ 17 | setup, 18 | task, 19 | submission, 20 | audit, 21 | distribution, 22 | routes, 23 | }); 24 | -------------------------------------------------------------------------------- /particle-auth-aa/src/lib/hooks/useClickOutside.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from "react"; 2 | 3 | const useClickOutside = (handler: () => void) => { 4 | const ref = useRef(null); 5 | 6 | useEffect(() => { 7 | const handleClickOutside = (event: MouseEvent) => { 8 | if (ref.current && !ref.current.contains(event.target as Node)) { 9 | handler(); 10 | } 11 | }; 12 | 13 | document.addEventListener("mousedown", handleClickOutside); 14 | 15 | return () => { 16 | document.removeEventListener("mousedown", handleClickOutside); 17 | }; 18 | }, [handler]); 19 | 20 | return ref; 21 | }; 22 | 23 | export default useClickOutside; 24 | -------------------------------------------------------------------------------- /particle-auth-aa/.env.sample: -------------------------------------------------------------------------------- 1 | # Particle Project Config, learn more info: https://dashboard.particle.network/ 2 | NEXT_PUBLIC_PROJECT_ID= 3 | NEXT_PUBLIC_CLIENT_KEY= 4 | NEXT_PUBLIC_APP_ID= 5 | 6 | # WalletConnect Project Id, learn more info: https://cloud.walletconnect.com/ 7 | NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= 8 | 9 | NEXT_PUBLIC_FIREBASE_API_KEY= 10 | NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= 11 | NEXT_PUBLIC_FIREBASE_PROJECT_ID= 12 | NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= 13 | NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= 14 | NEXT_PUBLIC_FIREBASE_APP_ID= 15 | NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID= 16 | 17 | # Contract Addresses 18 | NEXT_PUBLIC_ETH_CONTRACT_ADDRESS=0xe8da3071c06445ca26475f0fa1161ee5e8956929 -------------------------------------------------------------------------------- /particle-auth-aa/src/lib/utils/lib-utils.ts: -------------------------------------------------------------------------------- 1 | 2 | // Utility function to format the balance to 6 decimal places 3 | // This is more accurate than using .toFixed() because it does not rount it 4 | export const formatBalance = (balanceInEther: string): string => { 5 | const [integerPart, decimalPart] = balanceInEther.split("."); 6 | const truncatedDecimalPart = decimalPart ? decimalPart.slice(0, 6) : "000000"; 7 | return `${integerPart}.${truncatedDecimalPart}`; 8 | }; 9 | 10 | // Function to truncate addresses for display 11 | export const truncateAddress = (address: string): string => { 12 | return address ? `${address.slice(0, 6)}...${address.slice(address.length - 4)}` : ''; 13 | }; -------------------------------------------------------------------------------- /src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { Button } from "@/components/ui/button"; 3 | import Image from "next/image"; 4 | import Link from "next/link"; 5 | 6 | export default function NotFound() { 7 | return ( 8 |
9 | Not Found 10 |

Page Not Found

11 |

The page you are looking for does not exist.

12 | 13 | 14 | 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "*.mjs" ,"global.d.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /particle-auth-aa/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "global.d.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /particle-auth-aa/src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { Button } from "@/components/ui/button"; 3 | import Image from "next/image"; 4 | import Link from "next/link"; 5 | 6 | export default function NotFound() { 7 | return ( 8 |
9 | Not Found 10 |

Page Not Found

11 |

The page you are looking for does not exist.

12 | 13 | 14 | 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |