{"id":28583757,"url":"https://github.com/convex-dev/convex.ts","last_synced_at":"2026-02-10T12:04:50.076Z","repository":{"id":296853694,"uuid":"994720252","full_name":"Convex-Dev/convex.ts","owner":"Convex-Dev","description":"Typescript / Javascript library for Convex","archived":false,"fork":false,"pushed_at":"2025-06-02T13:20:12.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-03T01:16:26.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Convex-Dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T11:31:31.000Z","updated_at":"2025-06-02T13:20:16.000Z","dependencies_parsed_at":"2025-06-03T01:16:34.443Z","dependency_job_id":"e85ee9e7-de2d-46d6-89ec-3b753b5c17a2","html_url":"https://github.com/Convex-Dev/convex.ts","commit_stats":null,"previous_names":["convex-dev/convex.ts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Convex-Dev%2Fconvex.ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Convex-Dev%2Fconvex.ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Convex-Dev%2Fconvex.ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Convex-Dev%2Fconvex.ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Convex-Dev","download_url":"https://codeload.github.com/Convex-Dev/convex.ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Convex-Dev%2Fconvex.ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259210030,"owners_count":22822293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T05:39:02.949Z","updated_at":"2026-02-10T12:04:50.070Z","avatar_url":"https://github.com/Convex-Dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Convex TypeScript Client](https://github.com/Convex-Dev/convex.ts)\n\nA TypeScript/JavaScript client library for interacting with the Convex DLT network.\n\nSee: [Convex Docs](https://docs.convex.world)\n\n## Installation\n\n```bash\npnpm add convex-ts\n```\n\n## Usage\n\n### TypeScript\n\n```typescript\nimport { Convex } from 'convex-ts';\n\n// Connect to a Convex peer\nconst convex = new Convex('https://convex.world');\n\n// Create a new account with initial balance (on test network)\nawait convex.createAccount(10000000);\n\n// Get account information\nconst accountInfo = await convex.getAccountInfo();\n\n// Submit a transaction\nconst result = await convex.submitTransaction({\n  // transaction details\n});\n```\n\n### JavaScript (ESM)\n\n```javascript\nimport { Convex } from 'convex-ts';\n\n// Connect to a Convex peer\nconst convex = new Convex('https://convex.world');\n\n// Create a new account with initial balance (on test network)\nawait convex.createAccount(10000000);\n```\n\n### JavaScript (CommonJS)\n\n```javascript\nconst { Convex } = require('convex-ts');\n\n// Connect to a Convex peer\nconst convex = new Convex('https://convex.world');\n\n// Create a new account with initial balance (on test network)\nconvex.createAccount(10000000)\n  .then(account =\u003e console.log(account));\n```\n\n## Features\n\n- Connect to Convex network peers\n- Account management\n- Transaction submission and tracking\n- Cryptographic key pair generation and management\n- Query state and history\n- Full TypeScript type definitions\n- Supports both ESM and CommonJS\n\n## Development\n\n### Prerequisites\n\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/)\n- [pnpm](https://pnpm.io/) (v8 or later)\n- Node.js (v16 or later)\n\n### Setup\n\n```bash\n# Install dependencies\npnpm install\n\n# Build all packages\npnpm run build\n```\n\n### Building Individual Packages\n\n```bash\n# Build the convex-client package\npnpm --filter @convex-world/convex-client build\n\n# Build the convex-react package\npnpm --filter @convex-world/convex-react build\n\n# Build the demo-site package\npnpm --filter @convex-world/demo-site build\n```\n\n### Running the Demo Site\n\nThe demo site showcases the Convex client library with a simple key pair generation interface.\n\n#### Development Mode\n\n```bash\n# Start the demo site in development mode\npnpm demo\n\n# Or run directly in the demo-site directory\ncd packages/demo-site\npnpm dev\n```\n\nThe demo site will be available at `http://localhost:3000`\n\n#### Production Build\n\n```bash\n# Build the demo site for production\npnpm --filter @convex-world/demo-site build\n\n# Start the production server\npnpm --filter @convex-world/demo-site start\n```\n\n#### Demo Site Features\n\n- **Key Pair Generation**: Demonstrates cryptographic key pair generation using the Convex client\n- **Real-time Updates**: Shows live key generation with loading states\n- **TypeScript Integration**: Full type safety with the Convex client library\n\n### Running Tests\n\nThe tests require a local Convex peer running in Docker. Follow these steps:\n\n1. Start Docker Desktop and ensure it's running\n\n2. Start the local Convex peer:\n```bash\ndocker-compose up -d\n```\n\n3. Verify the peer is running:\n```bash\n# Check container status\ndocker ps | grep convex-peer\n\n# Check API endpoint\ncurl http://localhost:8080/api/v1/status\n```\n\n4. Run the tests:\n```bash\n# Run all tests\npnpm test\n\n# Run tests with local peer\nCONVEX_PEER_URL=http://localhost:8080 pnpm test\n\n# Run tests for specific package\npnpm --filter @convex-world/convex-client test\n```\n\n### Project Structure\n\n```\nconvex.ts/\n├── packages/\n│   ├── convex-client/     # Main TypeScript client library\n│   ├── convex-react/      # React hooks and components\n│   └── demo-site/         # Next.js demo application\n├── scripts/               # Build and utility scripts\n└── docker-compose.yml     # Local Convex peer setup\n```\n\n### Troubleshooting\n\nIf you can't access the Convex peer:\n\n1. Check Docker container status:\n```bash\ndocker-compose ps\n```\n\n2. Check container logs:\n```bash\ndocker-compose logs\n```\n\n3. Ensure ports are properly exposed:\n```bash\n# Stop the container\ndocker-compose down\n\n# Start with verbose output\ndocker-compose up\n```\n\n4. If you still can't connect, try:\n   - Restarting Docker Desktop\n   - Running `docker-compose down` followed by `docker-compose up -d`\n   - Checking your firewall settings for ports 18888 and 18889\n\n#### Demo Site Issues\n\nIf the demo site won't start:\n\n1. Ensure all dependencies are installed:\n```bash\npnpm install\n```\n\n2. Build the client library first:\n```bash\npnpm --filter @convex-world/convex-client build\n```\n\n3. Check for port conflicts:\n```bash\n# Check if port 3000 is in use\nnetstat -an | grep :3000\n```\n\n4. Clear Next.js cache:\n```bash\ncd packages/demo-site\nrm -rf .next\npnpm dev\n```\n\n## API Documentation\n\n### Convex\n\nThe main class for interacting with the Convex network.\n\n#### Constructor\n\n```typescript\nnew Convex(peerUrl: string, options?: ClientOptions)\n```\n\n#### Methods\n\n- `createAccount(initialBalance?: number): Promise\u003cAccount\u003e`\n- `getAccountInfo(): Promise\u003cAccountInfo\u003e`\n- `submitTransaction(tx: Transaction): Promise\u003cTransactionResult\u003e`\n- `getKeyPair(): KeyPair`\n- `query(query: Query): Promise\u003cQueryResult\u003e`\n\n## License\n\nApache License 2.0 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvex-dev%2Fconvex.ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconvex-dev%2Fconvex.ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconvex-dev%2Fconvex.ts/lists"}