@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.
- package/BRAND.md +16 -0
- package/CHANGELOG.md +25 -0
- package/README.md +189 -4
- package/dist/bwalletx-connect.global.js +41 -3
- package/dist/bwalletx-connect.global.js.map +1 -1
- package/dist/bwalletx-shell.global.js +54 -0
- package/dist/bwalletx-shell.global.js.map +1 -0
- package/dist/chunk-7NAKOJGZ.js +442 -0
- package/dist/chunk-7NAKOJGZ.js.map +1 -0
- package/dist/chunk-FUQ46RJV.js +404 -0
- package/dist/chunk-FUQ46RJV.js.map +1 -0
- package/dist/chunk-OMEKHKMM.js +530 -0
- package/dist/chunk-OMEKHKMM.js.map +1 -0
- package/dist/index.cjs +425 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -62
- package/dist/index.d.ts +23 -62
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest-Caj_Raqm.d.cts +81 -0
- package/dist/manifest-Caj_Raqm.d.ts +81 -0
- package/dist/next.cjs +415 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +48 -0
- package/dist/next.d.ts +48 -0
- package/dist/next.js +107 -0
- package/dist/next.js.map +1 -0
- package/dist/react.cjs +586 -36
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +74 -28
- package/dist/react.d.ts +74 -28
- package/dist/react.js +175 -3
- package/dist/react.js.map +1 -1
- package/dist/server.cjs +339 -4
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +204 -2
- package/dist/server.d.ts +204 -2
- package/dist/server.js +36 -107
- package/dist/server.js.map +1 -1
- package/dist/shell-react.cjs +361 -0
- package/dist/shell-react.cjs.map +1 -0
- package/dist/shell-react.d.cts +58 -0
- package/dist/shell-react.d.ts +58 -0
- package/dist/shell-react.js +52 -0
- package/dist/shell-react.js.map +1 -0
- package/dist/shell.cjs +578 -0
- package/dist/shell.cjs.map +1 -0
- package/dist/shell.d.cts +132 -0
- package/dist/shell.d.ts +132 -0
- package/dist/shell.js +51 -0
- package/dist/shell.js.map +1 -0
- package/dist/wallets-VOKIKBbO.d.cts +250 -0
- package/dist/wallets-VOKIKBbO.d.ts +250 -0
- package/package.json +65 -14
- 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
|
+
}
|