oneie 3.6.39 → 3.6.40

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.
Files changed (46) hide show
  1. package/.claude/commands/deploy.md +187 -17
  2. package/.claude/commands/media-upload.md +186 -0
  3. package/.claude/hooks/.last-news-context +1 -1
  4. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  5. package/one/README.md +1 -2
  6. package/one/knowledge/one-protocol-ai-agents.md +892 -0
  7. package/one/knowledge/one-protocol-executive-report.md +617 -0
  8. package/one/knowledge/one-protocol-standard.md +869 -0
  9. package/one/knowledge/one-protocol-whitepaper.md +756 -0
  10. package/one/knowledge/ontology-education-game.md +1654 -0
  11. package/one/knowledge/ontology-v2.md +4449 -0
  12. package/one/knowledge/ontology.md +1 -1
  13. package/one/things/contracts/Move.toml +12 -0
  14. package/one/things/contracts/README.md +288 -0
  15. package/one/things/contracts/one.move +762 -0
  16. package/one/things/contracts/sdk.ts +578 -0
  17. package/one/things/crypto/FEATURES.md +78 -0
  18. package/one/things/crypto/ONECORE.md +62 -0
  19. package/one/things/crypto/ONECOREFAQ.md +22 -0
  20. package/one/things/crypto/ONECOREHOW.md +46 -0
  21. package/one/things/crypto/ONEENTERPRISE.md +64 -0
  22. package/one/things/crypto/ONEENTERPRISEFAQ.md +64 -0
  23. package/one/things/crypto/ONEENTERPRISEHOW.md +53 -0
  24. package/one/things/crypto/ONEPRO.md +60 -0
  25. package/one/things/crypto/ONEPROFAQ.md +22 -0
  26. package/one/things/crypto/ONEPROHOW.md +53 -0
  27. package/one/things/crypto/READMEAGENCY.md +64 -0
  28. package/one/things/crypto/VSL.md +45 -0
  29. package/one/things/crypto/WebsiteCopy.md +176 -0
  30. package/one/things/design-system.md +832 -0
  31. package/one/things/pay.one.ie.md +53 -0
  32. package/one/things/plans/one-protocol-and-payone-usage.md +82 -0
  33. package/one/things/plans/plan-connect-to-api.md +146 -0
  34. package/one/things/plans-u.md +905 -0
  35. package/one/things/products/Blockchain Products.md +6278 -0
  36. package/one/things/scripts-clean-mac.sh +409 -0
  37. package/one/things/todo-release.md +654 -0
  38. package/one/things/todo.md +9 -642
  39. package/one/things/video-script-backup.md +318 -0
  40. package/one/things/video-script-demo.md +382 -0
  41. package/one/things/video-script-ontology.md +0 -1
  42. package/one/things/video-script.md +361 -0
  43. package/package.json +6 -5
  44. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  45. package/.claude/hooks/__pycache__/todo.cpython-311.pyc +0 -0
  46. package/llms.txt +0 -257
@@ -18,7 +18,7 @@ ai_context: |
18
18
 
19
19
  # ONE Platform - Ontology Specification
20
20
 
21
- **Version:** 3.0.0 (Reality as DSL - The Universal Code Generation Language)
21
+ **Version:** 1.0.0 (Reality as DSL - The Universal Code Generation Language)
22
22
  **Status:** Complete - Reality-Aware Architecture
23
23
  **Design Principle:** This isn't just a data model. It's a Domain-Specific Language (DSL) that models reality itself, enabling 98% AI code generation accuracy through compound structure.
24
24
 
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "one_protocol"
3
+ edition = "2024"
4
+ version = "1.0.0"
5
+ authors = ["ONE Platform <contracts@one.ie>"]
6
+ license = "MIT"
7
+
8
+ [dependencies]
9
+ Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" }
10
+
11
+ [addresses]
12
+ one_protocol = "0x0"
@@ -0,0 +1,288 @@
1
+ # ONE Contracts - Universal Smart Contract Platform
2
+
3
+ > **Note**: The production Sui smart contracts are located at `apps/one-core/contracts/sui/`
4
+ > This directory contains the universal entity contract specification that integrates with the ONE Protocol.
5
+
6
+ ## Related Files
7
+
8
+ - **Production Contracts**: `apps/one-core/contracts/sui/`
9
+ - `gateway.move` - Payment verification gateway (1% protocol fee)
10
+ - `merchant.move` - HD wallet merchant authorization
11
+ - `subscription.move` - Recurring payment management
12
+ - `credits.move` - Prepaid credit system
13
+ - `verifier.move` - Signature verification
14
+
15
+ - **TypeScript SDK**: `apps/one-core/packages/one-protocol/`
16
+ - Full TypeScript SDK with Zod schemas
17
+ - Protocol definitions for Sui, EVM, Solana
18
+ - Published as `one-protocol` on npm
19
+
20
+ ## Philosophy: Sui as a Database
21
+
22
+ The ONE Contract represents a paradigm shift in how we think about smart contracts. Instead of building specialized contracts for each use case (NFT contract, token contract, marketplace contract), we've created a **universal container** that can represent ANY entity.
23
+
24
+ **Why Sui?**
25
+
26
+ Sui's object model is revolutionary because:
27
+ 1. **Objects exist in parallel** - No global state bottleneck
28
+ 2. **Objects ARE the database** - Each object has a unique ID, can be queried, transferred
29
+ 3. **Composability** - Objects can contain other objects
30
+ 4. **Instant finality** - Sub-second transactions
31
+ 5. **Low cost** - Parallel execution = lower fees
32
+
33
+ ## The Universal Entity Model
34
+
35
+ ```
36
+ ┌─────────────────────────────────────────────────────────────┐
37
+ │ ONE CONTRACT │
38
+ ├─────────────────────────────────────────────────────────────┤
39
+ │ │
40
+ │ Entity { │
41
+ │ entity_type: product | subscription | lesson | ... │
42
+ │ name: String │
43
+ │ price: u64 │
44
+ │ metadata: JSON (flexible attributes) │
45
+ │ } │
46
+ │ │
47
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
48
+ │ │ Product │ │Subscription │ │ Lesson │ │
49
+ │ │ type: 1 │ │ type: 2 │ │ type: 3 │ │
50
+ │ └─────────────┘ └─────────────┘ └─────────────┘ │
51
+ │ │
52
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
53
+ │ │ Membership │ │ Credential │ │Event Ticket │ │
54
+ │ │ type: 4 │ │ type: 5 │ │ type: 9 │ │
55
+ │ └─────────────┘ └─────────────┘ └─────────────┘ │
56
+ │ │
57
+ └─────────────────────────────────────────────────────────────┘
58
+ ```
59
+
60
+ ## Supported Entity Types
61
+
62
+ | Type | ID | Use Case |
63
+ |------|-----|----------|
64
+ | Product | 1 | Physical/digital goods, downloads, files |
65
+ | Subscription | 2 | Recurring access, SaaS, memberships |
66
+ | Lesson | 3 | Courses, tutorials, educational content |
67
+ | Membership | 4 | Club access, community membership |
68
+ | Credential | 5 | Certificates, badges, achievements |
69
+ | Token | 6 | Fungible tokens, loyalty points |
70
+ | NFT | 7 | Unique collectibles, art, 1/1s |
71
+ | Access Pass | 8 | Gated content, premium features |
72
+ | Event Ticket | 9 | Concerts, conferences, meetups |
73
+ | Digital Good | 10 | Software, plugins, templates |
74
+ | Service | 11 | Consulting, support, services |
75
+ | License | 12 | Software licenses, usage rights |
76
+
77
+ ## How It Works
78
+
79
+ ### 1. Merchant Registration
80
+ ```move
81
+ register_merchant(registry, "Acme Store", metadata, clock, ctx)
82
+ // Returns: Merchant object + MerchantCap (ownership proof)
83
+ ```
84
+
85
+ ### 2. Create Any Entity
86
+ ```move
87
+ // Universal function - just change entity_type
88
+ create_entity(merchant, cap, ENTITY_PRODUCT, "Cool Thing", desc, price, supply, metadata, clock, ctx)
89
+
90
+ // Or use typed helpers
91
+ create_product(merchant, cap, "Cool Product", ...)
92
+ create_subscription(merchant, cap, "Pro Plan", ...)
93
+ create_lesson(merchant, cap, "Learn Move", ...)
94
+ create_event_ticket(merchant, cap, "SuiCon 2025", ...)
95
+ ```
96
+
97
+ ### 3. Purchase & Ownership
98
+ ```move
99
+ purchase_entity(registry, merchant, entity, payment, expires_in_ms, clock, ctx)
100
+ // Returns: Ownership object to buyer
101
+ ```
102
+
103
+ ### 4. Secondary Market
104
+ ```move
105
+ list_for_sale(ownership, price, clock, ctx)
106
+ buy_listing(listing, payment, clock, ctx)
107
+ ```
108
+
109
+ ## Metadata Flexibility
110
+
111
+ The `metadata` field is a JSON string that allows ANY attributes. Examples:
112
+
113
+ **Product:**
114
+ ```json
115
+ {
116
+ "image_url": "https://...",
117
+ "category": "electronics",
118
+ "weight_kg": 0.5,
119
+ "dimensions": { "w": 10, "h": 5, "d": 2 }
120
+ }
121
+ ```
122
+
123
+ **Subscription:**
124
+ ```json
125
+ {
126
+ "duration_ms": 2592000000,
127
+ "features": ["feature1", "feature2"],
128
+ "tier": "pro",
129
+ "auto_renew": true
130
+ }
131
+ ```
132
+
133
+ **Lesson:**
134
+ ```json
135
+ {
136
+ "duration_minutes": 90,
137
+ "instructor": "John Doe",
138
+ "materials": ["pdf", "video"],
139
+ "difficulty": "intermediate"
140
+ }
141
+ ```
142
+
143
+ **Event Ticket:**
144
+ ```json
145
+ {
146
+ "event_date": 1735689600000,
147
+ "venue": "Moscone Center",
148
+ "seat": "A-123",
149
+ "vip": true
150
+ }
151
+ ```
152
+
153
+ ## Integration with ONE Platform
154
+
155
+ The ONE Contract maps directly to the 6-dimension ontology:
156
+
157
+ | Dimension | Contract Mapping |
158
+ |-----------|-----------------|
159
+ | **Things** | Entity, Ownership, Merchant |
160
+ | **People** | Merchant (creators), Buyers (owners) |
161
+ | **Groups** | Merchant = Group of products |
162
+ | **Connections** | Ownership = Connection between buyer and entity |
163
+ | **Events** | All on-chain events (Created, Purchased, Listed) |
164
+ | **Knowledge** | Metadata fields, entity types |
165
+
166
+ ## Convex Integration
167
+
168
+ ```typescript
169
+ // Store entity reference in Convex
170
+ await db.insert("entities", {
171
+ type: "product",
172
+ name: "Cool Product",
173
+ properties: {
174
+ network: "sui",
175
+ objectId: entity.id,
176
+ packageId: "0x...",
177
+ merchantId: merchant.id,
178
+ price: 1000000000,
179
+ metadata: JSON.parse(entity.metadata)
180
+ },
181
+ status: "active"
182
+ });
183
+
184
+ // Query owned items
185
+ const ownerships = await suiClient.getOwnedObjects({
186
+ owner: userAddress,
187
+ filter: { StructType: "one::one::Ownership" }
188
+ });
189
+ ```
190
+
191
+ ## SDK Usage (one-protocol)
192
+
193
+ ```typescript
194
+ import {
195
+ sui_create_entity,
196
+ sui_purchase_entity,
197
+ sui_get_ownerships,
198
+ ONE_ENTITY_TYPES,
199
+ getEntityTypeName
200
+ } from 'one-protocol/protocols';
201
+
202
+ // Create a product
203
+ const result = await registry.execute({
204
+ protocol: 'sui_create_entity',
205
+ data: {
206
+ packageId: '0x...',
207
+ merchantId: '0x...',
208
+ merchantCapId: '0x...',
209
+ entityType: ONE_ENTITY_TYPES.PRODUCT,
210
+ name: 'Premium Course',
211
+ description: 'Learn Move development',
212
+ price: '1000000000', // 1 SUI
213
+ maxSupply: '100',
214
+ metadata: {
215
+ image_url: 'https://...',
216
+ category: 'education'
217
+ }
218
+ }
219
+ });
220
+
221
+ // Purchase an entity
222
+ const purchase = await registry.execute({
223
+ protocol: 'sui_purchase_entity',
224
+ data: {
225
+ packageId: '0x...',
226
+ registryId: '0x...',
227
+ merchantId: '0x...',
228
+ entityId: result.entityId,
229
+ paymentCoinId: '0x...',
230
+ }
231
+ });
232
+
233
+ // Get user's ownerships
234
+ const ownerships = await registry.execute({
235
+ protocol: 'sui_get_ownerships',
236
+ data: {
237
+ owner: userAddress,
238
+ packageId: '0x...',
239
+ entityType: ONE_ENTITY_TYPES.SUBSCRIPTION,
240
+ }
241
+ });
242
+ ```
243
+
244
+ ## Why This Design?
245
+
246
+ 1. **One Contract to Rule Them All** - No need to deploy separate contracts for each product type
247
+ 2. **Sui as Database** - Object IDs are like primary keys, queryable and transferable
248
+ 3. **Parallel Execution** - Each entity is independent, no bottlenecks
249
+ 4. **Composable** - Entities can reference other entities via metadata
250
+ 5. **Flexible** - JSON metadata allows any attributes without contract upgrades
251
+ 6. **Efficient** - Single purchase function handles all entity types
252
+
253
+ ## Files
254
+
255
+ - `one.move` - Main universal contract
256
+ - `one::one` - Core entity, merchant, ownership logic
257
+ - `one::market` - Secondary marketplace
258
+
259
+ ## Deployment
260
+
261
+ ```bash
262
+ # Build
263
+ sui move build
264
+
265
+ # Test
266
+ sui move test
267
+
268
+ # Deploy to testnet
269
+ sui client publish --gas-budget 100000000
270
+
271
+ # Deploy to mainnet
272
+ sui client publish --gas-budget 100000000 --network mainnet
273
+ ```
274
+
275
+ ## Events for Indexing
276
+
277
+ All events include timestamps and can be subscribed to for real-time updates:
278
+
279
+ - `MerchantCreated` - New seller registered
280
+ - `EntityCreated` - New product/subscription/etc created
281
+ - `EntityPurchased` - Someone bought something
282
+ - `ItemListed` - Secondary market listing
283
+ - `ItemSold` - Secondary market sale
284
+ - `ListingCanceled` - Seller canceled listing
285
+
286
+ ---
287
+
288
+ *The ONE Contract: Because everything is just a Thing with attributes.*