oneie 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +245 -0
- package/CLAUDE.md +534 -0
- package/one/.obsidian/app.json +1 -0
- package/one/.obsidian/appearance.json +1 -0
- package/one/.obsidian/core-plugins.json +33 -0
- package/one/.obsidian/workspace.json +211 -0
- package/one/connections/a2a.md +551 -0
- package/one/connections/acp.md +761 -0
- package/one/connections/acps.md +731 -0
- package/one/connections/agui.md +767 -0
- package/one/connections/any-backend.md +1702 -0
- package/one/connections/ap2.md +998 -0
- package/one/connections/api-docs.md +1891 -0
- package/one/connections/api.md +2190 -0
- package/one/connections/architecture-diagram.md +94 -0
- package/one/connections/communications.md +449 -0
- package/one/connections/connections.md +339 -0
- package/one/connections/cryptonetworks.md +781 -0
- package/one/connections/documentation.md +1120 -0
- package/one/connections/effect.md +279 -0
- package/one/connections/elizaos.md +1290 -0
- package/one/connections/inference.md +58 -0
- package/one/connections/kyc.md +632 -0
- package/one/connections/mcp.md +842 -0
- package/one/connections/membership.md +1152 -0
- package/one/connections/middleware.md +1067 -0
- package/one/connections/multitenant.md +1341 -0
- package/one/connections/n8n.md +1015 -0
- package/one/connections/patterns.md +89 -0
- package/one/connections/protocols.md +279 -0
- package/one/connections/relationships.md +107 -0
- package/one/connections/schema.md +587 -0
- package/one/connections/service-layer.md +550 -0
- package/one/connections/structure.md +0 -0
- package/one/connections/vectors.md +207 -0
- package/one/connections/wordpress.md +1302 -0
- package/one/connections/workflow-copy.md +905 -0
- package/one/connections/workflow-examples.md +741 -0
- package/one/connections/workflow.md +905 -0
- package/one/connections/workflows/delegation.md +885 -0
- package/one/connections/workflows/frontend.md +1037 -0
- package/one/connections/workflows/strategy.md +903 -0
- package/one/connections/workflows/tasks.md +698 -0
- package/one/connections/x402.md +1249 -0
- package/one/events/events.md +545 -0
- package/one/knowledge/ai-platform.md +305 -0
- package/one/knowledge/architecture-diagram.md +94 -0
- package/one/knowledge/architecture-frontend.md +930 -0
- package/one/knowledge/architecture.md +2077 -0
- package/one/knowledge/crypto.md +960 -0
- package/one/knowledge/dsl.md +1660 -0
- package/one/knowledge/files.md +2471 -0
- package/one/knowledge/frontend.md +1038 -0
- package/one/knowledge/hono.md +2109 -0
- package/one/knowledge/implementation-examples.md +2536 -0
- package/one/knowledge/inference-score.md +159 -0
- package/one/knowledge/knowledge.md +642 -0
- package/one/knowledge/language.md +980 -0
- package/one/knowledge/lessons-learned.md +70 -0
- package/one/knowledge/ontology-6-dimensions.md +0 -0
- package/one/knowledge/ontology-documentation.md +356 -0
- package/one/knowledge/ontology-engineering-specification.md +1292 -0
- package/one/knowledge/ontology-engineering.md +1652 -0
- package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
- package/one/knowledge/ontology-frontend-copy.md +753 -0
- package/one/knowledge/ontology-frontend-specifications.md +2188 -0
- package/one/knowledge/ontology-frontend.md +2427 -0
- package/one/knowledge/ontology-minimal.yaml +299 -0
- package/one/knowledge/ontology.md +2819 -0
- package/one/knowledge/ontology.yaml +1165 -0
- package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
- package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
- package/one/knowledge/patterns/backend/mutation-template.md +231 -0
- package/one/knowledge/patterns/backend/query-template.md +267 -0
- package/one/knowledge/patterns/backend/service-template.md +237 -0
- package/one/knowledge/patterns/design/component-architecture.md +399 -0
- package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
- package/one/knowledge/patterns/design/wireframe-template.md +216 -0
- package/one/knowledge/patterns/frontend/component-template.md +195 -0
- package/one/knowledge/patterns/frontend/form-template.md +276 -0
- package/one/knowledge/patterns/frontend/page-template.md +178 -0
- package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
- package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
- package/one/knowledge/patterns/test/technical-test-template.md +544 -0
- package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
- package/one/knowledge/patterns/test/user-flow-template.md +254 -0
- package/one/knowledge/quality-loop.md +401 -0
- package/one/knowledge/readme.md +131 -0
- package/one/knowledge/rules.md +626 -0
- package/one/knowledge/score.md +67 -0
- package/one/knowledge/specifications.md +855 -0
- package/one/knowledge/tags.md +130 -0
- package/one/organisation/one.md +599 -0
- package/one/organisation/organisation.md +438 -0
- package/one/organisation/revenue.md +673 -0
- package/one/organisation/strategy.md +869 -0
- package/one/organisation/vision.md +98 -0
- package/one/people/anthony-o-connell.md +440 -0
- package/one/people/people.md +567 -0
- package/one/repomix-output.md +92634 -0
- package/one/things/agentkit.md +349 -0
- package/one/things/agents/agent-backend.md +1401 -0
- package/one/things/agents/agent-builder.md +955 -0
- package/one/things/agents/agent-clean.md +709 -0
- package/one/things/agents/agent-clone.md +1341 -0
- package/one/things/agents/agent-designer.md +2177 -0
- package/one/things/agents/agent-director.md +1508 -0
- package/one/things/agents/agent-documenter.md +1049 -0
- package/one/things/agents/agent-frontend.md +1119 -0
- package/one/things/agents/agent-integrator.md +1192 -0
- package/one/things/agents/agent-problem-solver.md +1379 -0
- package/one/things/agents/agent-quality.md +1353 -0
- package/one/things/agents/agent-sales.md +986 -0
- package/one/things/cascade/cascade.yaml +464 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
- package/one/things/cascade/docs/examples/readme.md +222 -0
- package/one/things/cascade/docs/getting-started.md +515 -0
- package/one/things/cascade/docs/workflow.md +1372 -0
- package/one/things/cascade/readme.md +336 -0
- package/one/things/cascade/templates/feature-template.md +267 -0
- package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
- package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
- package/one/things/claude/agents/analyst.md +483 -0
- package/one/things/claude/agents/architect.md +480 -0
- package/one/things/claude/agents/brand-identity-specialist.md +513 -0
- package/one/things/claude/agents/bstp-token-strategist.md +667 -0
- package/one/things/claude/agents/builder-repo.md +489 -0
- package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
- package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
- package/one/things/claude/agents/company-bullstamp-character.md +587 -0
- package/one/things/claude/agents/company-bullstamp-community.md +292 -0
- package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
- package/one/things/claude/agents/company-bullstamp-token.md +292 -0
- package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
- package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
- package/one/things/claude/agents/content-calendar-planner.md +448 -0
- package/one/things/claude/agents/content-chapter-formatter.md +488 -0
- package/one/things/claude/agents/content-formatter.md +546 -0
- package/one/things/claude/agents/content-hook-specialist.md +462 -0
- package/one/things/claude/agents/content-image-formatter.md +535 -0
- package/one/things/claude/agents/content-introduction-formatter.md +485 -0
- package/one/things/claude/agents/content-multiplication-engine.md +556 -0
- package/one/things/claude/agents/content-playbook-writer.md +448 -0
- package/one/things/claude/agents/content-team-manager.md +622 -0
- package/one/things/claude/agents/content-toc-formatter.md +522 -0
- package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
- package/one/things/claude/agents/core-manager.md +582 -0
- package/one/things/claude/agents/core-master.md +403 -0
- package/one/things/claude/agents/cross-functional-manager.md +471 -0
- package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
- package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
- package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
- package/one/things/claude/agents/crypto-community-analyst.md +298 -0
- package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
- package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
- package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
- package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
- package/one/things/claude/agents/crypto-market-researcher.md +292 -0
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
- package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
- package/one/things/claude/agents/crypto-team-manager.md +387 -0
- package/one/things/claude/agents/crypto-token-analyst.md +278 -0
- package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
- package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
- package/one/things/claude/agents/customer-journey-designer.md +481 -0
- package/one/things/claude/agents/customer-success-manager.md +581 -0
- package/one/things/claude/agents/dev.md +413 -0
- package/one/things/claude/agents/documenter.md +546 -0
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
- package/one/things/claude/agents/engagement-specialist.md +509 -0
- package/one/things/claude/agents/engineering-architect.md +387 -0
- package/one/things/claude/agents/engineering-business-analyst.md +537 -0
- package/one/things/claude/agents/engineering-developer.md +387 -0
- package/one/things/claude/agents/engineering-director.md +282 -0
- package/one/things/claude/agents/engineering-ingestor.md +649 -0
- package/one/things/claude/agents/engineering-product-manager.md +537 -0
- package/one/things/claude/agents/engineering-product-owner.md +537 -0
- package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
- package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
- package/one/things/claude/agents/engineering-team-manager.md +512 -0
- package/one/things/claude/agents/engineering-user-experience.md +387 -0
- package/one/things/claude/agents/framework-elevate-manager.md +294 -0
- package/one/things/claude/agents/improver.md +763 -0
- package/one/things/claude/agents/intelligence-team-manager.md +385 -0
- package/one/things/claude/agents/lead-capture-expert.md +466 -0
- package/one/things/claude/agents/lead-magnet-creator.md +453 -0
- package/one/things/claude/agents/market-research-analyst.md +412 -0
- package/one/things/claude/agents/marketing-brand-identity.md +314 -0
- package/one/things/claude/agents/marketing-content-hooks.md +450 -0
- package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
- package/one/things/claude/agents/marketing-content-poster.md +361 -0
- package/one/things/claude/agents/marketing-customer-journey.md +326 -0
- package/one/things/claude/agents/marketing-director.md +397 -0
- package/one/things/claude/agents/marketing-engagement.md +326 -0
- package/one/things/claude/agents/marketing-lead-capture.md +326 -0
- package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
- package/one/things/claude/agents/marketing-network-effects.md +326 -0
- package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
- package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
- package/one/things/claude/agents/marketing-team-manager.md +446 -0
- package/one/things/claude/agents/marketing-viral-growth.md +201 -0
- package/one/things/claude/agents/mission-commander.md +373 -0
- package/one/things/claude/agents/network-effect-analyst.md +587 -0
- package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
- package/one/things/claude/agents/npx.md +890 -0
- package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
- package/one/things/claude/agents/one-master.md +355 -0
- package/one/things/claude/agents/one-orchestrator.md +315 -0
- package/one/things/claude/agents/one.md +601 -0
- package/one/things/claude/agents/playbook-generator.md +503 -0
- package/one/things/claude/agents/pm.md +326 -0
- package/one/things/claude/agents/po.md +345 -0
- package/one/things/claude/agents/qa.md +336 -0
- package/one/things/claude/agents/research-foundation-analyst.md +307 -0
- package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
- package/one/things/claude/agents/research-market-analyst.md +307 -0
- package/one/things/claude/agents/research-team-manager.md +482 -0
- package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
- package/one/things/claude/agents/sales-team-manager.md +400 -0
- package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
- package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
- package/one/things/claude/agents/service-advocacy-manager.md +307 -0
- package/one/things/claude/agents/service-success-manager.md +307 -0
- package/one/things/claude/agents/service-team-manager.md +400 -0
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
- package/one/things/claude/agents/share-optimization-specialist.md +551 -0
- package/one/things/claude/agents/sm.md +327 -0
- package/one/things/claude/agents/story-teller.md +473 -0
- package/one/things/claude/agents/task-master.md +596 -0
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
- package/one/things/claude/agents/tester.md +556 -0
- package/one/things/claude/agents/the-bull-character-manager.md +580 -0
- package/one/things/claude/agents/tools-playbook-generator.md +489 -0
- package/one/things/claude/agents/turbo-repo-builder.md +316 -0
- package/one/things/claude/agents/upsell-strategist.md +480 -0
- package/one/things/claude/agents/ux-expert.md +335 -0
- package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
- package/one/things/claude/claude-code-hooks-development.json +21 -0
- package/one/things/claude/claude-code-hooks-production.json +21 -0
- package/one/things/claude/claude-code-hooks.json +25 -0
- package/one/things/claude/commands/agent.md +104 -0
- package/one/things/claude/commands/cascade-status.md +128 -0
- package/one/things/claude/commands/ingest.md +290 -0
- package/one/things/claude/commands/ingestor.md +136 -0
- package/one/things/claude/commands/mission.md +83 -0
- package/one/things/claude/commands/npx.md +133 -0
- package/one/things/claude/commands/one.md +440 -0
- package/one/things/claude/commands/quality-check.md +204 -0
- package/one/things/claude/commands/smart-route.md +220 -0
- package/one/things/claude/commands/start.md +121 -0
- package/one/things/claude/commands/story.md +83 -0
- package/one/things/claude/commands/task.md +173 -0
- package/one/things/claude/hook-bypass.json +32 -0
- package/one/things/claude/hooks/agent-hook-config.json +427 -0
- package/one/things/claude/hooks/agent-hook-manager.js +525 -0
- package/one/things/claude/hooks/agent-load-balancer.js +271 -0
- package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
- package/one/things/claude/hooks/build-hook.sh +156 -0
- package/one/things/claude/hooks/cascade-feedback.js +297 -0
- package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
- package/one/things/claude/hooks/cleanup-hook.sh +201 -0
- package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
- package/one/things/claude/hooks/file-organization-engine.js +427 -0
- package/one/things/claude/hooks/file-organization-hook.sh +80 -0
- package/one/things/claude/hooks/file-organization-monitor.js +269 -0
- package/one/things/claude/hooks/format-hook.sh +43 -0
- package/one/things/claude/hooks/hook-bypass.sh +293 -0
- package/one/things/claude/hooks/hook-config-manager.js +202 -0
- package/one/things/claude/hooks/hook-debouncer.sh +62 -0
- package/one/things/claude/hooks/hook-logger.sh +89 -0
- package/one/things/claude/hooks/hook-orchestrator.js +662 -0
- package/one/things/claude/hooks/hook-performance-report.js +120 -0
- package/one/things/claude/hooks/lint-hook.sh +140 -0
- package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
- package/one/things/claude/hooks/memory-optimizer.js +510 -0
- package/one/things/claude/hooks/notification-hook.sh +204 -0
- package/one/things/claude/hooks/ontology-compliance.js +394 -0
- package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
- package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
- package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
- package/one/things/claude/hooks/performance-metrics.json +25 -0
- package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
- package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
- package/one/things/claude/hooks/security-hook.sh +256 -0
- package/one/things/claude/hooks/simple-load-balancer.js +238 -0
- package/one/things/claude/hooks/startup-optimizer.js +625 -0
- package/one/things/claude/hooks/story-scoring-system.js +445 -0
- package/one/things/claude/hooks/story-validation-engine.js +473 -0
- package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
- package/one/things/claude/hooks/story-validation-hook.sh +145 -0
- package/one/things/claude/hooks/structure-synchronizer.js +194 -0
- package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
- package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
- package/one/things/claude/hooks/test-hook.sh +145 -0
- package/one/things/claude/hooks/test-story-validation.sh +170 -0
- package/one/things/claude/hooks/trinity-validation-system.js +392 -0
- package/one/things/claude/settings-local.json +86 -0
- package/one/things/cli-code.md +652 -0
- package/one/things/cli-compiler-code.md +652 -0
- package/one/things/cli.md +1045 -0
- package/one/things/components/card-shadcn.md +929 -0
- package/one/things/components/card.md +1050 -0
- package/one/things/components.md +1669 -0
- package/one/things/componets.md +4 -0
- package/one/things/copilotkit.md +1559 -0
- package/one/things/creator-diagram.md +166 -0
- package/one/things/examples/children/lemonade-stand.md +366 -0
- package/one/things/examples/enterprise/crm-saas.md +1429 -0
- package/one/things/features/1-1-agent-prompts/design.md +470 -0
- package/one/things/features/1-1-agent-prompts/tests.md +264 -0
- package/one/things/features/1-1-agent-prompts.md +486 -0
- package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
- package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
- package/one/things/features/1-2-yaml-orchestrator.md +516 -0
- package/one/things/features/1-3-event-coordination/design.md +544 -0
- package/one/things/features/1-3-event-coordination/tests.md +223 -0
- package/one/things/features/1-3-event-coordination.md +508 -0
- package/one/things/features/1-4-knowledge-management/design.md +609 -0
- package/one/things/features/1-4-knowledge-management/tests.md +195 -0
- package/one/things/features/1-4-knowledge-management.md +577 -0
- package/one/things/features/1-5-quality-loops/design.md +797 -0
- package/one/things/features/1-5-quality-loops/tests.md +212 -0
- package/one/things/features/1-5-quality-loops.md +641 -0
- package/one/things/features/1-6-numbering-structure/design.md +610 -0
- package/one/things/features/1-6-numbering-structure/tests.md +213 -0
- package/one/things/features/1-6-numbering-structure.md +575 -0
- package/one/things/features/2-cli.md +1235 -0
- package/one/things/features/use-one-backend.md +1180 -0
- package/one/things/ideas/1-create-workflow.md +189 -0
- package/one/things/plans/1-create-workflow-status.md +555 -0
- package/one/things/plans/1-create-workflow.md +713 -0
- package/one/things/plans/app.md +761 -0
- package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
- package/one/things/plans/better-auth-any-backend.md +1852 -0
- package/one/things/plans/better-auth-available-features.md +235 -0
- package/one/things/plans/big-plan.md +38 -0
- package/one/things/plans/convex-better-auth.md +1109 -0
- package/one/things/plans/convex-on-off.md +389 -0
- package/one/things/plans/desktop.md +1121 -0
- package/one/things/plans/effect-components.md +1669 -0
- package/one/things/plans/effect.md +973 -0
- package/one/things/plans/email.md +953 -0
- package/one/things/plans/enhance-auth.md +1669 -0
- package/one/things/plans/install-components.md +198 -0
- package/one/things/plans/landing.md +728 -0
- package/one/things/plans/layout.md +205 -0
- package/one/things/plans/mail-backend.md +1308 -0
- package/one/things/plans/mail.md +2624 -0
- package/one/things/plans/next-features.md +83 -0
- package/one/things/plans/one.md +658 -0
- package/one/things/plans/ontology-6-dimensions.md +2216 -0
- package/one/things/plans/ontology-driven-strategy.md +866 -0
- package/one/things/plans/ontology-ui-approach.md +357 -0
- package/one/things/plans/open-agent.md +785 -0
- package/one/things/plans/performace.md +90 -0
- package/one/things/plans/releases.md +809 -0
- package/one/things/plans/repos.md +76 -0
- package/one/things/plans/separate-copy-2.md +1293 -0
- package/one/things/plans/separate-copy-3.md +2458 -0
- package/one/things/plans/separate-copy.md +1293 -0
- package/one/things/plans/separate.md +1983 -0
- package/one/things/plans/shadcn-integration-summary.md +450 -0
- package/one/things/plans/sidebar.md +172 -0
- package/one/things/plans/small-fixes.md +5 -0
- package/one/things/plans/test-backend-connection.md +476 -0
- package/one/things/plans/workflow-files.md +1196 -0
- package/one/things/plans/workflow.md +1372 -0
- package/one/things/products/cascade-landing-page.md +737 -0
- package/one/things/products/cascade.md +1518 -0
- package/one/things/products/context-engineering.md +1427 -0
- package/one/things/products/onthology.md +0 -0
- package/one/things/products/ontology-ui-shadcn.md +1280 -0
- package/one/things/products/ontology-ui.md +1387 -0
- package/one/things/products/ontology.md +717 -0
- package/one/things/products/sdk.md +557 -0
- package/one/things/promptkit.md +903 -0
- package/one/things/service-providers-new.md +982 -0
- package/one/things/service-providers.md +1092 -0
- package/one/things/things.md +349 -0
- package/one/things/todo.md +1248 -0
- package/package.json +5 -2
|
@@ -0,0 +1,960 @@
|
|
|
1
|
+
# SUI Move - Smart Contract Integration
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Status:** Active
|
|
5
|
+
**Purpose:** Map SUI Move smart contracts to the ONE Platform 6-dimension ontology
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
SUI Move is our smart contract layer for blockchain operations. It integrates seamlessly with the ONE Platform ontology using protocol-agnostic patterns where SUI-specific details live in `metadata.network` and entity `properties`.
|
|
12
|
+
|
|
13
|
+
**Key Principle:** SUI Move is just another protocol. It maps TO the ontology via metadata, never the other way around.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## SUI Move in the 6-Dimension Universe
|
|
18
|
+
|
|
19
|
+
### 1. THINGS (Entities)
|
|
20
|
+
|
|
21
|
+
**SUI-Related Thing Types:**
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// Core blockchain entities
|
|
25
|
+
| 'token_contract' // SUI Move smart contract
|
|
26
|
+
| 'token' // SUI token instance (Coin<T>)
|
|
27
|
+
| 'nft' // SUI NFT (kiosk objects)
|
|
28
|
+
| 'payment' // SUI payment transaction
|
|
29
|
+
| 'external_connection' // Connection to SUI network/RPC
|
|
30
|
+
| 'creator_token' // Fan/creator social token (CreatorOS package)
|
|
31
|
+
|
|
32
|
+
// Creator economy
|
|
33
|
+
| 'creator' // Creator with SUI wallet
|
|
34
|
+
| 'digital_product' // Product with SUI payment option
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Token Contract Properties (SUI Move):**
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
{
|
|
41
|
+
type: "token_contract",
|
|
42
|
+
name: "Creator Token Contract",
|
|
43
|
+
properties: {
|
|
44
|
+
// SUI-specific fields
|
|
45
|
+
network: "sui", // or "sui-testnet", "sui-devnet"
|
|
46
|
+
packageId: string, // SUI package object ID
|
|
47
|
+
moduleNames: string[], // Move modules in package
|
|
48
|
+
coinType: string, // Full coin type (e.g., "0x123::token::TOKEN")
|
|
49
|
+
treasuryCap: string, // Treasury cap object ID
|
|
50
|
+
metadata: string, // CoinMetadata object ID
|
|
51
|
+
|
|
52
|
+
// Token economics
|
|
53
|
+
totalSupply: number,
|
|
54
|
+
decimals: number,
|
|
55
|
+
symbol: string,
|
|
56
|
+
description: string,
|
|
57
|
+
iconUrl?: string,
|
|
58
|
+
|
|
59
|
+
// Utility & governance
|
|
60
|
+
utility: string[], // ["staking", "governance", "access"]
|
|
61
|
+
stakingEnabled: boolean,
|
|
62
|
+
governanceEnabled: boolean,
|
|
63
|
+
|
|
64
|
+
// Deployment info
|
|
65
|
+
deployedBy: Id<"entities">, // Creator who deployed
|
|
66
|
+
deployTxDigest: string, // SUI transaction digest
|
|
67
|
+
deployedAt: number,
|
|
68
|
+
upgradeCapability: "immutable" | "owner" | "multisig",
|
|
69
|
+
},
|
|
70
|
+
status: "active",
|
|
71
|
+
createdAt: number,
|
|
72
|
+
updatedAt: number,
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Token Instance Properties (SUI Coin):**
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
{
|
|
80
|
+
type: "token",
|
|
81
|
+
name: "Creator Token",
|
|
82
|
+
properties: {
|
|
83
|
+
blockchain: "sui",
|
|
84
|
+
network: "sui", // mainnet
|
|
85
|
+
standard: "COIN", // SUI Coin standard
|
|
86
|
+
coinType: string, // Full type
|
|
87
|
+
contractAddress: string, // Package ID
|
|
88
|
+
|
|
89
|
+
// Supply & economics
|
|
90
|
+
totalSupply: number,
|
|
91
|
+
circulatingSupply: number,
|
|
92
|
+
price: number, // USD per token
|
|
93
|
+
marketCap: number,
|
|
94
|
+
|
|
95
|
+
// On-chain metrics
|
|
96
|
+
holders: number,
|
|
97
|
+
transactions24h: number,
|
|
98
|
+
volume24h: number,
|
|
99
|
+
|
|
100
|
+
// SUI-specific
|
|
101
|
+
epochSupply: number, // Supply at current epoch
|
|
102
|
+
lastEpochUpdate: number,
|
|
103
|
+
},
|
|
104
|
+
status: "active",
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Creator Token Properties (CreatorOS Coin)**
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
{
|
|
112
|
+
type: "creator_token",
|
|
113
|
+
name: "CreatorOS Fan Token",
|
|
114
|
+
properties: {
|
|
115
|
+
blockchain: "sui",
|
|
116
|
+
network: "sui",
|
|
117
|
+
standard: "COIN",
|
|
118
|
+
coinType: string, // e.g. "0xcreatoros::token::ALIYAH"
|
|
119
|
+
packageId: string, // CreatorOS package
|
|
120
|
+
treasuryCap: string, // TreasuryCap object ID
|
|
121
|
+
launchpadModule: string, // Module handling mint/vesting
|
|
122
|
+
|
|
123
|
+
creatorThingId: Id<"things">,
|
|
124
|
+
totalSupply: number,
|
|
125
|
+
circulatingSupply: number,
|
|
126
|
+
priceUsd?: number,
|
|
127
|
+
rewardPrograms: [
|
|
128
|
+
{
|
|
129
|
+
type: "airdrop" | "course_reward" | "community_reward" | "purchase_bonus",
|
|
130
|
+
metadata: Record<string, any>,
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
gatedUtilities: [
|
|
134
|
+
{
|
|
135
|
+
targetThingId: Id<"things">, // e.g., digital_product, community space
|
|
136
|
+
requirement: "hold" | "stake" | "burn",
|
|
137
|
+
threshold: number,
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
vestingSchedules: [
|
|
141
|
+
{
|
|
142
|
+
beneficiaryThingId: Id<"things">,
|
|
143
|
+
allocation: number,
|
|
144
|
+
cliffAt: number,
|
|
145
|
+
unlockFrequencyDays: number,
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
createdBy: Id<"things">,
|
|
149
|
+
launchTxDigest: string,
|
|
150
|
+
createdAt: number,
|
|
151
|
+
updatedAt: number,
|
|
152
|
+
},
|
|
153
|
+
status: "active",
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**NFT Properties (SUI Kiosk):**
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
{
|
|
161
|
+
type: "nft",
|
|
162
|
+
name: "Creator NFT #123",
|
|
163
|
+
properties: {
|
|
164
|
+
blockchain: "sui",
|
|
165
|
+
network: "sui",
|
|
166
|
+
standard: "KIOSK", // SUI Kiosk standard
|
|
167
|
+
|
|
168
|
+
// Object details
|
|
169
|
+
objectId: string, // Unique object ID
|
|
170
|
+
packageId: string, // NFT package
|
|
171
|
+
moduleType: string, // Full type (e.g., "0x123::nft::CreatorNFT")
|
|
172
|
+
version: number, // Object version
|
|
173
|
+
digest: string, // Object digest
|
|
174
|
+
|
|
175
|
+
// Kiosk details
|
|
176
|
+
kioskId?: string, // If listed in kiosk
|
|
177
|
+
transferPolicy?: string, // Transfer policy object
|
|
178
|
+
|
|
179
|
+
// Metadata
|
|
180
|
+
name: string,
|
|
181
|
+
description: string,
|
|
182
|
+
imageUrl: string,
|
|
183
|
+
attributes: Record<string, any>,
|
|
184
|
+
|
|
185
|
+
// Ownership & transfer
|
|
186
|
+
owner: string, // SUI address
|
|
187
|
+
transferrable: boolean,
|
|
188
|
+
|
|
189
|
+
// Creator economy
|
|
190
|
+
royaltyBps: number, // Royalty in basis points
|
|
191
|
+
creatorAddress: string,
|
|
192
|
+
},
|
|
193
|
+
status: "active",
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**External Connection Properties (SUI RPC):**
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
{
|
|
201
|
+
type: "external_connection",
|
|
202
|
+
name: "SUI Mainnet RPC",
|
|
203
|
+
properties: {
|
|
204
|
+
platform: "sui",
|
|
205
|
+
connectionType: "rpc",
|
|
206
|
+
baseUrl: "https://fullnode.mainnet.sui.io:443",
|
|
207
|
+
websocketUrl: "wss://fullnode.mainnet.sui.io:443",
|
|
208
|
+
|
|
209
|
+
// Authentication
|
|
210
|
+
authentication: {
|
|
211
|
+
type: "apiKey", // or "none" for public RPC
|
|
212
|
+
credentials: any, // Encrypted
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
// Network
|
|
216
|
+
network: "mainnet", // or "testnet", "devnet"
|
|
217
|
+
chainId: string,
|
|
218
|
+
|
|
219
|
+
// Health
|
|
220
|
+
status: "active",
|
|
221
|
+
lastConnectedAt: number,
|
|
222
|
+
rateLimits: {
|
|
223
|
+
requestsPerMinute: number,
|
|
224
|
+
requestsPerDay: number,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 2. CONNECTIONS (Relationships)
|
|
231
|
+
|
|
232
|
+
**SUI-Related Connections:**
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
// User holds SUI tokens
|
|
236
|
+
{
|
|
237
|
+
fromThingId: userId,
|
|
238
|
+
toThingId: tokenId,
|
|
239
|
+
relationshipType: "holds_tokens",
|
|
240
|
+
metadata: {
|
|
241
|
+
network: "sui",
|
|
242
|
+
balance: number, // Token balance
|
|
243
|
+
balanceObjectId: string, // SUI Coin object ID
|
|
244
|
+
walletAddress: string, // SUI wallet address
|
|
245
|
+
acquiredAt: number,
|
|
246
|
+
lastUpdatedAt: number,
|
|
247
|
+
},
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// User owns NFT
|
|
251
|
+
{
|
|
252
|
+
fromThingId: userId,
|
|
253
|
+
toThingId: nftId,
|
|
254
|
+
relationshipType: "owns",
|
|
255
|
+
metadata: {
|
|
256
|
+
network: "sui",
|
|
257
|
+
objectId: string, // NFT object ID
|
|
258
|
+
kioskId?: string, // If in kiosk
|
|
259
|
+
acquiredTxDigest: string, // Purchase transaction
|
|
260
|
+
acquiredAt: number,
|
|
261
|
+
},
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Creator owns token contract
|
|
265
|
+
{
|
|
266
|
+
fromThingId: creatorId,
|
|
267
|
+
toThingId: contractId,
|
|
268
|
+
relationshipType: "owns",
|
|
269
|
+
metadata: {
|
|
270
|
+
network: "sui",
|
|
271
|
+
deploymentRole: "deployer",
|
|
272
|
+
upgradeCap?: string, // Upgrade capability object
|
|
273
|
+
adminCap?: string, // Admin capability object
|
|
274
|
+
},
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Creator treasury allocation of creator token supply
|
|
278
|
+
{
|
|
279
|
+
fromThingId: creatorId,
|
|
280
|
+
toThingId: creatorTokenId,
|
|
281
|
+
relationshipType: "owns",
|
|
282
|
+
metadata: {
|
|
283
|
+
network: "sui",
|
|
284
|
+
allocation: number, // Amount allocated to creator
|
|
285
|
+
vestingScheduleId?: string,
|
|
286
|
+
cliffAt?: number,
|
|
287
|
+
unlockFrequencyDays?: number,
|
|
288
|
+
notes?: string,
|
|
289
|
+
},
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Fan holds creator tokens (airdrop, rewards, purchases)
|
|
293
|
+
{
|
|
294
|
+
fromThingId: fanId,
|
|
295
|
+
toThingId: creatorTokenId,
|
|
296
|
+
relationshipType: "holds_tokens",
|
|
297
|
+
metadata: {
|
|
298
|
+
network: "sui",
|
|
299
|
+
balance: number,
|
|
300
|
+
walletAddress: string,
|
|
301
|
+
acquisitionSource: "airdrop" | "purchase" | "course_reward" | "community_reward",
|
|
302
|
+
acquiredAt: number,
|
|
303
|
+
lastUpdatedAt: number,
|
|
304
|
+
},
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Product accepts SUI payment
|
|
308
|
+
{
|
|
309
|
+
fromThingId: productId,
|
|
310
|
+
toThingId: paymentMethodId,
|
|
311
|
+
relationshipType: "accepts_payment",
|
|
312
|
+
metadata: {
|
|
313
|
+
network: "sui",
|
|
314
|
+
paymentType: "coin",
|
|
315
|
+
coinTypes: string[], // Accepted coin types
|
|
316
|
+
recipientAddress: string, // Creator's SUI address
|
|
317
|
+
},
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Token staked in protocol
|
|
321
|
+
{
|
|
322
|
+
fromThingId: userId,
|
|
323
|
+
toThingId: stakingPoolId,
|
|
324
|
+
relationshipType: "staked_in",
|
|
325
|
+
metadata: {
|
|
326
|
+
network: "sui",
|
|
327
|
+
stakedAmount: number,
|
|
328
|
+
stakedObjectId: string, // Staking position object
|
|
329
|
+
stakedAt: number,
|
|
330
|
+
unlockAt?: number,
|
|
331
|
+
rewards: number,
|
|
332
|
+
},
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### 3. EVENTS (Actions)
|
|
337
|
+
|
|
338
|
+
**SUI-Related Events:**
|
|
339
|
+
|
|
340
|
+
All SUI events include `metadata.network: "sui"` for network identity.
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
// Token minted on SUI
|
|
344
|
+
{
|
|
345
|
+
type: "token_minted",
|
|
346
|
+
actorId: creatorId,
|
|
347
|
+
targetId: tokenId,
|
|
348
|
+
timestamp: Date.now(),
|
|
349
|
+
metadata: {
|
|
350
|
+
network: "sui",
|
|
351
|
+
amount: number,
|
|
352
|
+
txDigest: string, // SUI transaction digest
|
|
353
|
+
coinObjectId: string, // Created coin object
|
|
354
|
+
epoch: number, // SUI epoch
|
|
355
|
+
gasUsed: number, // MIST used
|
|
356
|
+
},
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Tokens purchased with SUI
|
|
360
|
+
{
|
|
361
|
+
type: "tokens_purchased",
|
|
362
|
+
actorId: buyerId,
|
|
363
|
+
targetId: tokenId,
|
|
364
|
+
timestamp: Date.now(),
|
|
365
|
+
metadata: {
|
|
366
|
+
network: "sui",
|
|
367
|
+
amount: number, // Tokens purchased
|
|
368
|
+
paidAmount: number, // SUI paid
|
|
369
|
+
paidCoinType: string, // Payment coin type
|
|
370
|
+
txDigest: string,
|
|
371
|
+
seller?: Id<"entities">,
|
|
372
|
+
marketplaceContract?: string,
|
|
373
|
+
},
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// NFT minted
|
|
377
|
+
{
|
|
378
|
+
type: "nft_minted",
|
|
379
|
+
actorId: creatorId,
|
|
380
|
+
targetId: nftId,
|
|
381
|
+
timestamp: Date.now(),
|
|
382
|
+
metadata: {
|
|
383
|
+
network: "sui",
|
|
384
|
+
objectId: string,
|
|
385
|
+
packageId: string,
|
|
386
|
+
txDigest: string,
|
|
387
|
+
recipient: string, // SUI address
|
|
388
|
+
mintPrice?: number,
|
|
389
|
+
kioskId?: string,
|
|
390
|
+
},
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// NFT transferred
|
|
394
|
+
{
|
|
395
|
+
type: "nft_transferred",
|
|
396
|
+
actorId: senderId,
|
|
397
|
+
targetId: nftId,
|
|
398
|
+
timestamp: Date.now(),
|
|
399
|
+
metadata: {
|
|
400
|
+
network: "sui",
|
|
401
|
+
objectId: string,
|
|
402
|
+
from: string, // SUI address
|
|
403
|
+
to: string, // SUI address
|
|
404
|
+
txDigest: string,
|
|
405
|
+
transferType: "direct" | "kiosk_purchase" | "kiosk_transfer",
|
|
406
|
+
price?: number, // If sale
|
|
407
|
+
},
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Payment processed (SUI)
|
|
411
|
+
{
|
|
412
|
+
type: "payment_event",
|
|
413
|
+
actorId: buyerId,
|
|
414
|
+
targetId: paymentId,
|
|
415
|
+
timestamp: Date.now(),
|
|
416
|
+
metadata: {
|
|
417
|
+
network: "sui",
|
|
418
|
+
status: "completed",
|
|
419
|
+
amount: number,
|
|
420
|
+
coinType: string,
|
|
421
|
+
txDigest: string,
|
|
422
|
+
sender: string, // SUI address
|
|
423
|
+
recipient: string, // SUI address
|
|
424
|
+
productId?: Id<"entities">,
|
|
425
|
+
},
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Token staked
|
|
429
|
+
{
|
|
430
|
+
type: "tokens_staked",
|
|
431
|
+
actorId: userId,
|
|
432
|
+
targetId: tokenId,
|
|
433
|
+
timestamp: Date.now(),
|
|
434
|
+
metadata: {
|
|
435
|
+
network: "sui",
|
|
436
|
+
amount: number,
|
|
437
|
+
poolId: string, // Staking pool object
|
|
438
|
+
stakingObjectId: string,
|
|
439
|
+
txDigest: string,
|
|
440
|
+
lockPeriod?: number, // seconds
|
|
441
|
+
expectedApy: number,
|
|
442
|
+
},
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Tokens unstaked
|
|
446
|
+
{
|
|
447
|
+
type: "tokens_unstaked",
|
|
448
|
+
actorId: userId,
|
|
449
|
+
targetId: tokenId,
|
|
450
|
+
timestamp: Date.now(),
|
|
451
|
+
metadata: {
|
|
452
|
+
network: "sui",
|
|
453
|
+
amount: number,
|
|
454
|
+
rewards: number,
|
|
455
|
+
stakingObjectId: string,
|
|
456
|
+
txDigest: string,
|
|
457
|
+
stakedDuration: number, // seconds
|
|
458
|
+
},
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Smart contract deployed
|
|
462
|
+
{
|
|
463
|
+
type: "entity_created",
|
|
464
|
+
actorId: creatorId,
|
|
465
|
+
targetId: contractId,
|
|
466
|
+
timestamp: Date.now(),
|
|
467
|
+
metadata: {
|
|
468
|
+
network: "sui",
|
|
469
|
+
entityType: "token_contract",
|
|
470
|
+
packageId: string,
|
|
471
|
+
txDigest: string,
|
|
472
|
+
modules: string[],
|
|
473
|
+
upgradeCapability: string,
|
|
474
|
+
gasUsed: number,
|
|
475
|
+
},
|
|
476
|
+
}
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### 4. TAGS (Categories)
|
|
480
|
+
|
|
481
|
+
**SUI-Related Tags:**
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
// Network tags
|
|
485
|
+
{ name: "sui", category: "network" }
|
|
486
|
+
{ name: "sui-testnet", category: "network" }
|
|
487
|
+
{ name: "sui-devnet", category: "network" }
|
|
488
|
+
|
|
489
|
+
// Protocol tags
|
|
490
|
+
{ name: "sui-move", category: "protocol" }
|
|
491
|
+
{ name: "sui-kiosk", category: "protocol" }
|
|
492
|
+
|
|
493
|
+
// Payment method tags
|
|
494
|
+
{ name: "sui-coin", category: "payment_method" }
|
|
495
|
+
{ name: "sui-nft", category: "payment_method" }
|
|
496
|
+
|
|
497
|
+
// Capability tags
|
|
498
|
+
{ name: "staking", category: "capability" }
|
|
499
|
+
{ name: "governance", category: "capability" }
|
|
500
|
+
{ name: "nft-minting", category: "capability" }
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## SUI Move Smart Contract Patterns
|
|
506
|
+
|
|
507
|
+
### Pattern 1: Deploy Token Contract
|
|
508
|
+
|
|
509
|
+
```typescript
|
|
510
|
+
// 1. Create token_contract entity
|
|
511
|
+
const contractId = await db.insert("entities", {
|
|
512
|
+
type: "token_contract",
|
|
513
|
+
name: "Creator Token",
|
|
514
|
+
properties: {
|
|
515
|
+
network: "sui",
|
|
516
|
+
packageId: "0x123...",
|
|
517
|
+
coinType: "0x123::creator_token::CREATOR_TOKEN",
|
|
518
|
+
treasuryCap: "0xabc...",
|
|
519
|
+
metadata: "0xdef...",
|
|
520
|
+
totalSupply: 1_000_000,
|
|
521
|
+
decimals: 9,
|
|
522
|
+
symbol: "CREATOR",
|
|
523
|
+
description: "Creator economy token",
|
|
524
|
+
deployedBy: creatorId,
|
|
525
|
+
deployTxDigest: "9mKG...",
|
|
526
|
+
deployedAt: Date.now(),
|
|
527
|
+
upgradeCapability: "immutable",
|
|
528
|
+
},
|
|
529
|
+
status: "active",
|
|
530
|
+
createdAt: Date.now(),
|
|
531
|
+
updatedAt: Date.now(),
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
// 2. Create ownership connection
|
|
535
|
+
await db.insert("connections", {
|
|
536
|
+
fromThingId: creatorId,
|
|
537
|
+
toThingId: contractId,
|
|
538
|
+
relationshipType: "owns",
|
|
539
|
+
metadata: {
|
|
540
|
+
network: "sui",
|
|
541
|
+
deploymentRole: "deployer",
|
|
542
|
+
},
|
|
543
|
+
createdAt: Date.now(),
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
// 3. Log deployment event
|
|
547
|
+
await db.insert("events", {
|
|
548
|
+
type: "entity_created",
|
|
549
|
+
actorId: creatorId,
|
|
550
|
+
targetId: contractId,
|
|
551
|
+
timestamp: Date.now(),
|
|
552
|
+
metadata: {
|
|
553
|
+
network: "sui",
|
|
554
|
+
entityType: "token_contract",
|
|
555
|
+
packageId: "0x123...",
|
|
556
|
+
txDigest: "9mKG...",
|
|
557
|
+
},
|
|
558
|
+
});
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Pattern 2: Purchase Tokens with SUI
|
|
562
|
+
|
|
563
|
+
```typescript
|
|
564
|
+
// 1. Process blockchain transaction (Effect.ts service)
|
|
565
|
+
const txResult = await suiClient.executeTransaction({
|
|
566
|
+
sender: buyerAddress,
|
|
567
|
+
// ... transaction details
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
// 2. Create/update holds_tokens connection
|
|
571
|
+
const existing = await db
|
|
572
|
+
.query("connections")
|
|
573
|
+
.withIndex("from_type", q =>
|
|
574
|
+
q.eq("fromThingId", buyerId)
|
|
575
|
+
.eq("toThingId", tokenId)
|
|
576
|
+
.eq("relationshipType", "holds_tokens")
|
|
577
|
+
)
|
|
578
|
+
.first();
|
|
579
|
+
|
|
580
|
+
if (existing) {
|
|
581
|
+
await db.patch(existing._id, {
|
|
582
|
+
metadata: {
|
|
583
|
+
...existing.metadata,
|
|
584
|
+
balance: existing.metadata.balance + amount,
|
|
585
|
+
lastUpdatedAt: Date.now(),
|
|
586
|
+
},
|
|
587
|
+
});
|
|
588
|
+
} else {
|
|
589
|
+
await db.insert("connections", {
|
|
590
|
+
fromThingId: buyerId,
|
|
591
|
+
toThingId: tokenId,
|
|
592
|
+
relationshipType: "holds_tokens",
|
|
593
|
+
metadata: {
|
|
594
|
+
network: "sui",
|
|
595
|
+
balance: amount,
|
|
596
|
+
balanceObjectId: txResult.objectId,
|
|
597
|
+
walletAddress: buyerAddress,
|
|
598
|
+
acquiredAt: Date.now(),
|
|
599
|
+
},
|
|
600
|
+
createdAt: Date.now(),
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// 3. Log purchase event
|
|
605
|
+
await db.insert("events", {
|
|
606
|
+
type: "tokens_purchased",
|
|
607
|
+
actorId: buyerId,
|
|
608
|
+
targetId: tokenId,
|
|
609
|
+
timestamp: Date.now(),
|
|
610
|
+
metadata: {
|
|
611
|
+
network: "sui",
|
|
612
|
+
amount,
|
|
613
|
+
paidAmount: suiPaid,
|
|
614
|
+
paidCoinType: "0x2::sui::SUI",
|
|
615
|
+
txDigest: txResult.digest,
|
|
616
|
+
},
|
|
617
|
+
});
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
### Pattern 3: Mint NFT to Kiosk
|
|
621
|
+
|
|
622
|
+
```typescript
|
|
623
|
+
// 1. Mint NFT on-chain
|
|
624
|
+
const mintResult = await suiClient.executeTransaction({
|
|
625
|
+
// ... mint transaction
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
// 2. Create NFT entity
|
|
629
|
+
const nftId = await db.insert("entities", {
|
|
630
|
+
type: "nft",
|
|
631
|
+
name: `Creator NFT #${tokenNumber}`,
|
|
632
|
+
properties: {
|
|
633
|
+
blockchain: "sui",
|
|
634
|
+
network: "sui",
|
|
635
|
+
standard: "KIOSK",
|
|
636
|
+
objectId: mintResult.objectId,
|
|
637
|
+
packageId: nftPackageId,
|
|
638
|
+
moduleType: `${nftPackageId}::creator_nft::CreatorNFT`,
|
|
639
|
+
kioskId: kioskObjectId,
|
|
640
|
+
name: metadata.name,
|
|
641
|
+
description: metadata.description,
|
|
642
|
+
imageUrl: metadata.imageUrl,
|
|
643
|
+
attributes: metadata.attributes,
|
|
644
|
+
owner: recipientAddress,
|
|
645
|
+
transferrable: true,
|
|
646
|
+
royaltyBps: 500, // 5% royalty
|
|
647
|
+
creatorAddress: creatorWallet,
|
|
648
|
+
},
|
|
649
|
+
status: "active",
|
|
650
|
+
createdAt: Date.now(),
|
|
651
|
+
updatedAt: Date.now(),
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
// 3. Create ownership connection
|
|
655
|
+
await db.insert("connections", {
|
|
656
|
+
fromThingId: recipientId,
|
|
657
|
+
toThingId: nftId,
|
|
658
|
+
relationshipType: "owns",
|
|
659
|
+
metadata: {
|
|
660
|
+
network: "sui",
|
|
661
|
+
objectId: mintResult.objectId,
|
|
662
|
+
kioskId: kioskObjectId,
|
|
663
|
+
acquiredTxDigest: mintResult.digest,
|
|
664
|
+
acquiredAt: Date.now(),
|
|
665
|
+
},
|
|
666
|
+
createdAt: Date.now(),
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// 4. Log mint event
|
|
670
|
+
await db.insert("events", {
|
|
671
|
+
type: "nft_minted",
|
|
672
|
+
actorId: creatorId,
|
|
673
|
+
targetId: nftId,
|
|
674
|
+
timestamp: Date.now(),
|
|
675
|
+
metadata: {
|
|
676
|
+
network: "sui",
|
|
677
|
+
objectId: mintResult.objectId,
|
|
678
|
+
packageId: nftPackageId,
|
|
679
|
+
txDigest: mintResult.digest,
|
|
680
|
+
recipient: recipientAddress,
|
|
681
|
+
kioskId: kioskObjectId,
|
|
682
|
+
},
|
|
683
|
+
});
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
### Pattern 4: Stake Tokens
|
|
687
|
+
|
|
688
|
+
```typescript
|
|
689
|
+
// 1. Execute staking transaction
|
|
690
|
+
const stakeResult = await suiClient.executeTransaction({
|
|
691
|
+
// ... staking transaction
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
// 2. Create staking connection
|
|
695
|
+
await db.insert("connections", {
|
|
696
|
+
fromThingId: userId,
|
|
697
|
+
toThingId: stakingPoolId,
|
|
698
|
+
relationshipType: "staked_in",
|
|
699
|
+
metadata: {
|
|
700
|
+
network: "sui",
|
|
701
|
+
stakedAmount: amount,
|
|
702
|
+
stakedObjectId: stakeResult.stakingObject,
|
|
703
|
+
stakedAt: Date.now(),
|
|
704
|
+
unlockAt: lockPeriod ? Date.now() + lockPeriod * 1000 : undefined,
|
|
705
|
+
rewards: 0,
|
|
706
|
+
},
|
|
707
|
+
createdAt: Date.now(),
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
// 3. Update user's token balance connection
|
|
711
|
+
const balance = await db
|
|
712
|
+
.query("connections")
|
|
713
|
+
.withIndex("from_type", q =>
|
|
714
|
+
q.eq("fromThingId", userId)
|
|
715
|
+
.eq("toThingId", tokenId)
|
|
716
|
+
.eq("relationshipType", "holds_tokens")
|
|
717
|
+
)
|
|
718
|
+
.first();
|
|
719
|
+
|
|
720
|
+
await db.patch(balance._id, {
|
|
721
|
+
metadata: {
|
|
722
|
+
...balance.metadata,
|
|
723
|
+
balance: balance.metadata.balance - amount,
|
|
724
|
+
lastUpdatedAt: Date.now(),
|
|
725
|
+
},
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
// 4. Log staking event
|
|
729
|
+
await db.insert("events", {
|
|
730
|
+
type: "tokens_staked",
|
|
731
|
+
actorId: userId,
|
|
732
|
+
targetId: tokenId,
|
|
733
|
+
timestamp: Date.now(),
|
|
734
|
+
metadata: {
|
|
735
|
+
network: "sui",
|
|
736
|
+
amount,
|
|
737
|
+
poolId: stakingPoolId,
|
|
738
|
+
stakingObjectId: stakeResult.stakingObject,
|
|
739
|
+
txDigest: stakeResult.digest,
|
|
740
|
+
lockPeriod,
|
|
741
|
+
expectedApy: 12.5,
|
|
742
|
+
},
|
|
743
|
+
});
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
## Effect.ts Service Layer
|
|
749
|
+
|
|
750
|
+
**SUI Provider Pattern:**
|
|
751
|
+
|
|
752
|
+
```typescript
|
|
753
|
+
// convex/services/providers/sui.ts
|
|
754
|
+
import { Effect, Layer } from "effect";
|
|
755
|
+
import { SuiClient } from "@mysten/sui/client";
|
|
756
|
+
|
|
757
|
+
export class SuiProvider extends Effect.Service<SuiProvider>()("SuiProvider", {
|
|
758
|
+
effect: Effect.gen(function* () {
|
|
759
|
+
const client = new SuiClient({ url: process.env.SUI_RPC_URL });
|
|
760
|
+
|
|
761
|
+
return {
|
|
762
|
+
// Query methods
|
|
763
|
+
getObject: (objectId: string) =>
|
|
764
|
+
Effect.tryPromise({
|
|
765
|
+
try: () => client.getObject({ id: objectId }),
|
|
766
|
+
catch: (error) => new SuiError({ message: String(error) }),
|
|
767
|
+
}),
|
|
768
|
+
|
|
769
|
+
getCoinBalance: (owner: string, coinType: string) =>
|
|
770
|
+
Effect.tryPromise({
|
|
771
|
+
try: () => client.getBalance({ owner, coinType }),
|
|
772
|
+
catch: (error) => new SuiError({ message: String(error) }),
|
|
773
|
+
}),
|
|
774
|
+
|
|
775
|
+
// Transaction methods
|
|
776
|
+
executeTransaction: (transaction: Transaction) =>
|
|
777
|
+
Effect.tryPromise({
|
|
778
|
+
try: async () => {
|
|
779
|
+
const result = await client.signAndExecuteTransaction({
|
|
780
|
+
transaction,
|
|
781
|
+
signer: keypair,
|
|
782
|
+
});
|
|
783
|
+
return result;
|
|
784
|
+
},
|
|
785
|
+
catch: (error) => new SuiError({ message: String(error) }),
|
|
786
|
+
}),
|
|
787
|
+
|
|
788
|
+
// Event subscription
|
|
789
|
+
subscribeEvent: (filter: EventFilter) =>
|
|
790
|
+
Effect.tryPromise({
|
|
791
|
+
try: () => client.subscribeEvent({ filter }),
|
|
792
|
+
catch: (error) => new SuiError({ message: String(error) }),
|
|
793
|
+
}),
|
|
794
|
+
};
|
|
795
|
+
}),
|
|
796
|
+
dependencies: [],
|
|
797
|
+
}) {}
|
|
798
|
+
|
|
799
|
+
// Error types
|
|
800
|
+
export class SuiError extends Data.TaggedError("SuiError")<{
|
|
801
|
+
message: string;
|
|
802
|
+
}> {}
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
**Token Service with SUI:**
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
// convex/services/blockchain/token.ts
|
|
809
|
+
export class TokenService extends Effect.Service<TokenService>()(
|
|
810
|
+
"TokenService",
|
|
811
|
+
{
|
|
812
|
+
effect: Effect.gen(function* () {
|
|
813
|
+
const db = yield* ConvexDatabase;
|
|
814
|
+
const sui = yield* SuiProvider;
|
|
815
|
+
|
|
816
|
+
return {
|
|
817
|
+
purchase: (args: PurchaseTokenArgs) =>
|
|
818
|
+
Effect.gen(function* () {
|
|
819
|
+
// 1. Validate user and token
|
|
820
|
+
const user = yield* Effect.tryPromise(() => db.get(args.userId));
|
|
821
|
+
const token = yield* Effect.tryPromise(() => db.get(args.tokenId));
|
|
822
|
+
|
|
823
|
+
// 2. Execute SUI transaction
|
|
824
|
+
const tx = new Transaction();
|
|
825
|
+
// ... build transaction
|
|
826
|
+
const result = yield* sui.executeTransaction(tx);
|
|
827
|
+
|
|
828
|
+
// 3. Update connection
|
|
829
|
+
yield* Effect.tryPromise(() =>
|
|
830
|
+
db.insert("connections", {
|
|
831
|
+
fromThingId: args.userId,
|
|
832
|
+
toThingId: args.tokenId,
|
|
833
|
+
relationshipType: "holds_tokens",
|
|
834
|
+
metadata: {
|
|
835
|
+
network: "sui",
|
|
836
|
+
balance: args.amount,
|
|
837
|
+
balanceObjectId: result.objectChanges[0].objectId,
|
|
838
|
+
walletAddress: user.properties.walletAddress,
|
|
839
|
+
acquiredAt: Date.now(),
|
|
840
|
+
},
|
|
841
|
+
createdAt: Date.now(),
|
|
842
|
+
})
|
|
843
|
+
);
|
|
844
|
+
|
|
845
|
+
// 4. Log event
|
|
846
|
+
yield* Effect.tryPromise(() =>
|
|
847
|
+
db.insert("events", {
|
|
848
|
+
type: "tokens_purchased",
|
|
849
|
+
actorId: args.userId,
|
|
850
|
+
targetId: args.tokenId,
|
|
851
|
+
timestamp: Date.now(),
|
|
852
|
+
metadata: {
|
|
853
|
+
network: "sui",
|
|
854
|
+
amount: args.amount,
|
|
855
|
+
txDigest: result.digest,
|
|
856
|
+
},
|
|
857
|
+
})
|
|
858
|
+
);
|
|
859
|
+
|
|
860
|
+
return { success: true, txDigest: result.digest };
|
|
861
|
+
}),
|
|
862
|
+
};
|
|
863
|
+
}),
|
|
864
|
+
dependencies: [ConvexDatabase.Default, SuiProvider.Default],
|
|
865
|
+
}
|
|
866
|
+
) {}
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
---
|
|
870
|
+
|
|
871
|
+
## Integration Checklist
|
|
872
|
+
|
|
873
|
+
When integrating SUI Move smart contracts:
|
|
874
|
+
|
|
875
|
+
- [ ] Map contract entities to `token_contract` or `nft` types
|
|
876
|
+
- [ ] Store SUI-specific fields in entity `properties`
|
|
877
|
+
- [ ] Use `metadata.network: "sui"` in all events
|
|
878
|
+
- [ ] Create `external_connection` for RPC endpoints
|
|
879
|
+
- [ ] Tag entities with `network:sui`
|
|
880
|
+
- [ ] Use typed errors in Effect.ts services
|
|
881
|
+
- [ ] Log all on-chain transactions as events
|
|
882
|
+
- [ ] Store object IDs and transaction digests
|
|
883
|
+
- [ ] Handle SUI-specific types (Coin, Object, TransferPolicy)
|
|
884
|
+
- [ ] Subscribe to on-chain events for real-time updates
|
|
885
|
+
|
|
886
|
+
---
|
|
887
|
+
|
|
888
|
+
## Frontend Integration
|
|
889
|
+
|
|
890
|
+
**React Component:**
|
|
891
|
+
|
|
892
|
+
```typescript
|
|
893
|
+
// src/components/features/tokens/SuiTokenPurchase.tsx
|
|
894
|
+
import { useMutation, useQuery } from "convex/react";
|
|
895
|
+
import { api } from "@/convex/_generated/api";
|
|
896
|
+
import { Button } from "@/components/ui/button";
|
|
897
|
+
import { useWallet } from "@mysten/dapp-kit";
|
|
898
|
+
|
|
899
|
+
export function SuiTokenPurchase({ tokenId }: Props) {
|
|
900
|
+
const { address } = useWallet();
|
|
901
|
+
const purchase = useMutation(api.tokens.purchase);
|
|
902
|
+
const balance = useQuery(api.tokens.getBalance, {
|
|
903
|
+
userId: address,
|
|
904
|
+
tokenId
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
return (
|
|
908
|
+
<div>
|
|
909
|
+
<p>Your balance: {balance?.metadata.balance || 0}</p>
|
|
910
|
+
<Button onClick={() => purchase({ tokenId, amount: 100 })}>
|
|
911
|
+
Buy 100 Tokens
|
|
912
|
+
</Button>
|
|
913
|
+
</div>
|
|
914
|
+
);
|
|
915
|
+
}
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
**Astro Page:**
|
|
919
|
+
|
|
920
|
+
```astro
|
|
921
|
+
---
|
|
922
|
+
// src/pages/tokens/[id].astro
|
|
923
|
+
import { ConvexHttpClient } from "convex/browser";
|
|
924
|
+
import { api } from "@/convex/_generated/api";
|
|
925
|
+
import SuiTokenPurchase from "@/components/features/tokens/SuiTokenPurchase";
|
|
926
|
+
|
|
927
|
+
const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
|
|
928
|
+
const token = await convex.query(api.tokens.get, { id: Astro.params.id });
|
|
929
|
+
---
|
|
930
|
+
|
|
931
|
+
<Layout>
|
|
932
|
+
<h1>{token.name}</h1>
|
|
933
|
+
<p>Network: {token.properties.network}</p>
|
|
934
|
+
<p>Contract: {token.properties.packageId}</p>
|
|
935
|
+
|
|
936
|
+
<SuiTokenPurchase client:load tokenId={token._id} />
|
|
937
|
+
</Layout>
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
---
|
|
941
|
+
|
|
942
|
+
## Summary
|
|
943
|
+
|
|
944
|
+
SUI Move integrates with ONE Platform through:
|
|
945
|
+
|
|
946
|
+
1. **Things**: `token_contract`, `token`, `nft` with SUI-specific properties
|
|
947
|
+
2. **Connections**: `holds_tokens`, `owns`, `staked_in` with network metadata
|
|
948
|
+
3. **Events**: All token/NFT events with `metadata.network: "sui"`
|
|
949
|
+
4. **Knowledge**: `network:sui`, `protocol:sui-move` labels
|
|
950
|
+
5. **People**: Users with SUI wallets and on-chain identities
|
|
951
|
+
6. **Protocols**: SUI Move as a registered protocol with specific metadata
|
|
952
|
+
|
|
953
|
+
**Key Benefits:**
|
|
954
|
+
- Protocol-agnostic ontology (SUI is just metadata)
|
|
955
|
+
- Cross-chain analytics (query all networks via same schema)
|
|
956
|
+
- Future-proof (add new networks without schema changes)
|
|
957
|
+
- Type-safe (Effect.ts + TypeScript)
|
|
958
|
+
- Real-time (Convex subscriptions + SUI event subscriptions)
|
|
959
|
+
|
|
960
|
+
**This is how blockchain becomes just another data layer in the 6-dimension universe.**
|