@bwalletx/connect 0.2.0 → 0.4.1

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 (55) hide show
  1. package/BRAND.md +16 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +189 -4
  4. package/dist/bwalletx-connect.global.js +41 -3
  5. package/dist/bwalletx-connect.global.js.map +1 -1
  6. package/dist/bwalletx-shell.global.js +54 -0
  7. package/dist/bwalletx-shell.global.js.map +1 -0
  8. package/dist/chunk-7NAKOJGZ.js +442 -0
  9. package/dist/chunk-7NAKOJGZ.js.map +1 -0
  10. package/dist/chunk-FUQ46RJV.js +404 -0
  11. package/dist/chunk-FUQ46RJV.js.map +1 -0
  12. package/dist/chunk-OMEKHKMM.js +530 -0
  13. package/dist/chunk-OMEKHKMM.js.map +1 -0
  14. package/dist/index.cjs +425 -5
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +23 -62
  17. package/dist/index.d.ts +23 -62
  18. package/dist/index.js +35 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/manifest-Caj_Raqm.d.cts +81 -0
  21. package/dist/manifest-Caj_Raqm.d.ts +81 -0
  22. package/dist/next.cjs +415 -0
  23. package/dist/next.cjs.map +1 -0
  24. package/dist/next.d.cts +48 -0
  25. package/dist/next.d.ts +48 -0
  26. package/dist/next.js +107 -0
  27. package/dist/next.js.map +1 -0
  28. package/dist/react.cjs +586 -36
  29. package/dist/react.cjs.map +1 -1
  30. package/dist/react.d.cts +74 -28
  31. package/dist/react.d.ts +74 -28
  32. package/dist/react.js +175 -3
  33. package/dist/react.js.map +1 -1
  34. package/dist/server.cjs +339 -4
  35. package/dist/server.cjs.map +1 -1
  36. package/dist/server.d.cts +204 -2
  37. package/dist/server.d.ts +204 -2
  38. package/dist/server.js +36 -107
  39. package/dist/server.js.map +1 -1
  40. package/dist/shell-react.cjs +361 -0
  41. package/dist/shell-react.cjs.map +1 -0
  42. package/dist/shell-react.d.cts +58 -0
  43. package/dist/shell-react.d.ts +58 -0
  44. package/dist/shell-react.js +52 -0
  45. package/dist/shell-react.js.map +1 -0
  46. package/dist/shell.cjs +578 -0
  47. package/dist/shell.cjs.map +1 -0
  48. package/dist/shell.d.cts +132 -0
  49. package/dist/shell.d.ts +132 -0
  50. package/dist/shell.js +51 -0
  51. package/dist/shell.js.map +1 -0
  52. package/dist/wallets-VOKIKBbO.d.cts +250 -0
  53. package/dist/wallets-VOKIKBbO.d.ts +250 -0
  54. package/package.json +65 -14
  55. package/schema/bapp.schema.json +95 -0
@@ -0,0 +1,95 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://bwalletx.com/schema/bapp.schema.json",
4
+ "title": "bApp manifest (/.well-known/bapp.json)",
5
+ "description": "Declares a bApp's five scoped slots (Wallet, Exchange, (b), Feed, Chat), its drawer and like-to-fund config. All paths are same-origin. Validate in code with validateManifest() from @bwalletx/connect/shell, which also enforces the rules JSON Schema cannot (URL origin check, amount <= cap).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "name", "icon", "slots"],
9
+ "$defs": {
10
+ "path": {
11
+ "type": "string",
12
+ "description": "Same-origin path: one leading slash, no scheme, no protocol-relative //, no backslash or whitespace.",
13
+ "pattern": "^/(?![/\\\\])[^\\s\\\\]*$",
14
+ "maxLength": 512
15
+ },
16
+ "slot": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["enabled"],
20
+ "properties": {
21
+ "path": { "$ref": "#/$defs/path" },
22
+ "label": { "type": "string", "minLength": 1, "maxLength": 12 },
23
+ "enabled": { "type": "boolean", "description": "false = greyed out and not clickable. Slots are never hidden." }
24
+ }
25
+ },
26
+ "pathSlot": {
27
+ "allOf": [
28
+ { "$ref": "#/$defs/slot" },
29
+ { "if": { "properties": { "enabled": { "const": true } } }, "then": { "required": ["path"] } }
30
+ ]
31
+ },
32
+ "fieldName": { "type": "string", "minLength": 1, "maxLength": 64 }
33
+ },
34
+ "properties": {
35
+ "$schema": { "type": "string" },
36
+ "version": { "const": 1 },
37
+ "name": { "type": "string", "minLength": 1, "maxLength": 40 },
38
+ "icon": { "$ref": "#/$defs/path" },
39
+ "home": { "$ref": "#/$defs/path", "default": "/" },
40
+ "theme": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "properties": { "accent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "default": "#FFD24D" } }
44
+ },
45
+ "slots": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["wallet", "exchange", "b", "feed", "chat"],
49
+ "properties": {
50
+ "wallet": { "$ref": "#/$defs/pathSlot" },
51
+ "exchange": { "$ref": "#/$defs/pathSlot" },
52
+ "b": { "$ref": "#/$defs/slot" },
53
+ "feed": { "$ref": "#/$defs/pathSlot" },
54
+ "chat": { "$ref": "#/$defs/pathSlot" }
55
+ }
56
+ },
57
+ "drawer": {
58
+ "type": "array",
59
+ "maxItems": 24,
60
+ "items": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["label", "path"],
64
+ "properties": {
65
+ "label": { "type": "string", "minLength": 1, "maxLength": 40 },
66
+ "path": { "$ref": "#/$defs/path" },
67
+ "icon": { "$ref": "#/$defs/path" }
68
+ }
69
+ }
70
+ },
71
+ "like": {
72
+ "type": "object",
73
+ "description": "Like-to-fund config (config only in Phase 1). A Like is a small purchase of the item's utility token.",
74
+ "additionalProperties": false,
75
+ "required": ["fields"],
76
+ "properties": {
77
+ "fields": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["id", "token"],
81
+ "properties": {
82
+ "id": { "$ref": "#/$defs/fieldName" },
83
+ "token": { "$ref": "#/$defs/fieldName" },
84
+ "payee": { "$ref": "#/$defs/fieldName" },
85
+ "title": { "$ref": "#/$defs/fieldName" },
86
+ "media": { "$ref": "#/$defs/fieldName" }
87
+ }
88
+ },
89
+ "amountCents": { "type": "integer", "minimum": 1, "default": 1 },
90
+ "currency": { "enum": ["PNEE", "BSV"], "default": "PNEE" },
91
+ "dailyCapCents": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 }
92
+ }
93
+ }
94
+ }
95
+ }