@xyo-network/manifest 2.89.0-rc.8 → 2.89.0

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/package.json CHANGED
@@ -10,12 +10,13 @@
10
10
  },
11
11
  "description": "Primary SDK for using XYO Protocol 2.0",
12
12
  "dependencies": {
13
- "@xyo-network/manifest-model": "~2.89.0-rc.8",
14
- "@xyo-network/manifest-wrapper": "~2.89.0-rc.8"
13
+ "@xyo-network/manifest-model": "~2.89.0",
14
+ "@xyo-network/manifest-wrapper": "~2.89.0"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@xylabs/ts-scripts-yarn3": "^3.2.42",
18
18
  "@xylabs/tsconfig": "^3.2.42",
19
+ "ajv": "^8.12.0",
19
20
  "typescript": "^5.3.3"
20
21
  },
21
22
  "types": "dist/node/index.d.ts",
@@ -60,7 +61,6 @@
60
61
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
61
62
  },
62
63
  "sideEffects": false,
63
- "version": "2.89.0-rc.8",
64
- "type": "module",
65
- "stableVersion": "2.88.3"
64
+ "version": "2.89.0",
65
+ "type": "module"
66
66
  }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://xyo.network/schemas/dapp-package-manifest-schema.json",
4
+ "properties": {
5
+ "description": {
6
+ "type": "string"
7
+ },
8
+ "external": {
9
+ "$ref": "definitions-schema.json#/definitions/external",
10
+ "description": "The list of permission requests made by the dApp"
11
+ },
12
+ "nodes": {
13
+ "$ref": "definitions-schema.json#/definitions/nodes",
14
+ "description": "The list of Nodes that are defined in the manifest"
15
+ },
16
+ "schema": {
17
+ "pattern": "^network.xyo.dapp.manifest$",
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "nodes",
23
+ "schema"
24
+ ],
25
+ "title": "XYO Dapp Manifest",
26
+ "type": "object"
27
+ }
package/src/schema.json CHANGED
@@ -1,217 +1,14 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://xyo.network/schemas/package-manifest-schema.json",
3
4
  "additionalProperties": false,
4
- "definitions": {
5
- "architecture": {
6
- "description": "Architecture",
7
- "enum": [
8
- "386",
9
- "amd64",
10
- "arm",
11
- "arm64",
12
- "loong64",
13
- "mips",
14
- "mipsle",
15
- "mips64",
16
- "mips64le",
17
- "ppc64",
18
- "ppc64le",
19
- "riscv64",
20
- "s390x",
21
- "wasm"
22
- ],
23
- "type": "string"
24
- },
25
- "config": {
26
- "additionalProperties": true,
27
- "description": "Config for a module",
28
- "id": {
29
- "type": "string"
30
- },
31
- "properties": {
32
- "accountPath": {
33
- "description": "HDWallet path to derive account",
34
- "type": "string"
35
- },
36
- "architecture": {
37
- "$ref": "#/definitions/architecture"
38
- },
39
- "description": {
40
- "type": "string"
41
- },
42
- "features": {
43
- "items": {
44
- "$ref": "#/definitions/feature"
45
- },
46
- "type": "array"
47
- },
48
- "language": {
49
- "$ref": "#/definitions/language"
50
- },
51
- "name": {
52
- "type": "string"
53
- },
54
- "os": {
55
- "$ref": "#/definitions/os"
56
- },
57
- "schema": {
58
- "type": "string"
59
- }
60
- },
61
- "required": [
62
- "name",
63
- "schema"
64
- ],
65
- "type": "object"
66
- },
67
- "feature": {
68
- "description": "Framework",
69
- "enum": [
70
- "angular",
71
- "asp.net",
72
- "browser",
73
- "cryengine",
74
- "corona",
75
- "django",
76
- "flutter",
77
- "ionic",
78
- "jquery",
79
- "nodejs",
80
- "phonegap",
81
- "react",
82
- "react-native",
83
- "spring",
84
- "unity",
85
- "unreal",
86
- "vue",
87
- "xamarin"
88
- ],
89
- "type": "string"
90
- },
91
- "language": {
92
- "description": "Language",
93
- "enum": [
94
- "c",
95
- "c++",
96
- "c#",
97
- "go",
98
- "java",
99
- "javascript",
100
- "kotlin",
101
- "lua",
102
- "python",
103
- "ruby",
104
- "rust",
105
- "scala",
106
- "solidity",
107
- "swift"
108
- ],
109
- "type": "string"
110
- },
111
- "module": {
112
- "additionalProperties": false,
113
- "description": "Module Definition",
114
- "properties": {
115
- "config": {
116
- "$ref": "#/definitions/config"
117
- },
118
- "description": {
119
- "type": "string"
120
- }
121
- },
122
- "required": [
123
- "config"
124
- ],
125
- "type": "object"
126
- },
127
- "modules": {
128
- "description": "List of Modules",
129
- "items": {
130
- "$ref": "#/definitions/module"
131
- },
132
- "nullable": true,
133
- "type": "array"
134
- },
135
- "node": {
136
- "additionalProperties": false,
137
- "description": "Node Definition - Generally loaded into an existing or new Node Module",
138
- "id": {
139
- "type": "string"
140
- },
141
- "properties": {
142
- "config": {
143
- "$ref": "#/definitions/config"
144
- },
145
- "description": {
146
- "type": "string"
147
- },
148
- "modules": {
149
- "additionalProperties": false,
150
- "description": "Modules in the Node",
151
- "properties": {
152
- "private": {
153
- "$ref": "#/definitions/modules"
154
- },
155
- "public": {
156
- "$ref": "#/definitions/modules"
157
- }
158
- },
159
- "required": [],
160
- "type": "object"
161
- },
162
- "name": {
163
- "type": "string"
164
- }
165
- },
166
- "required": [],
167
- "type": "object"
168
- },
169
- "nodes": {
170
- "description": "List of Node Manifests",
171
- "items": {
172
- "$ref": "#/definitions/node"
173
- },
174
- "type": "array"
175
- },
176
- "os": {
177
- "description": "Operating System",
178
- "enum": [
179
- "aix",
180
- "android",
181
- "darwin",
182
- "dragonfly",
183
- "freebsd",
184
- "illumos",
185
- "ios",
186
- "linux",
187
- "netbsd",
188
- "openbsd",
189
- "osx",
190
- "plan9",
191
- "solaris",
192
- "windows"
193
- ],
194
- "type": "string"
195
- },
196
- "payloads": {
197
- "description": "List of Modules",
198
- "items": {
199
- "$ref": "#/definitions/module"
200
- },
201
- "nullable": true,
202
- "type": "array"
203
- }
204
- },
205
5
  "description": "Describes an XYO Package which is a collection of XYO Modules",
206
6
  "properties": {
207
- "$schema": {
208
- "type": "string"
209
- },
210
7
  "description": {
211
8
  "type": "string"
212
9
  },
213
10
  "nodes": {
214
- "$ref": "#/definitions/nodes",
11
+ "$ref": "shared/definitions-schema.json#/definitions/nodes",
215
12
  "description": "The list of Nodes that are defined in the manifest"
216
13
  },
217
14
  "schema": {
@@ -0,0 +1,228 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://xyo.network/schemas/definitions-schema.json",
4
+ "definitions": {
5
+ "architecture": {
6
+ "description": "Architecture",
7
+ "enum": [
8
+ "386",
9
+ "amd64",
10
+ "arm",
11
+ "arm64",
12
+ "loong64",
13
+ "mips",
14
+ "mipsle",
15
+ "mips64",
16
+ "mips64le",
17
+ "ppc64",
18
+ "ppc64le",
19
+ "riscv64",
20
+ "s390x",
21
+ "wasm"
22
+ ],
23
+ "type": "string"
24
+ },
25
+ "config": {
26
+ "additionalProperties": true,
27
+ "description": "Config for a module",
28
+ "properties": {
29
+ "accountPath": {
30
+ "description": "HDWallet path to derive account",
31
+ "type": "string"
32
+ },
33
+ "architecture": {
34
+ "$ref": "#/definitions/architecture"
35
+ },
36
+ "description": {
37
+ "type": "string"
38
+ },
39
+ "features": {
40
+ "items": {
41
+ "$ref": "#/definitions/feature"
42
+ },
43
+ "type": "array"
44
+ },
45
+ "language": {
46
+ "$ref": "#/definitions/language"
47
+ },
48
+ "name": {
49
+ "type": "string"
50
+ },
51
+ "os": {
52
+ "$ref": "#/definitions/os"
53
+ },
54
+ "schema": {
55
+ "type": "string"
56
+ }
57
+ },
58
+ "required": [
59
+ "name",
60
+ "schema"
61
+ ],
62
+ "type": "object"
63
+ },
64
+ "external": {
65
+ "additionalProperties": false,
66
+ "definitions": {
67
+ "modules": {
68
+ "description": "A List of module permissions requests",
69
+ "items": {
70
+ "$ref": "#/definitions/external/definitions/moduleRequest"
71
+ },
72
+ "type": "array"
73
+ },
74
+ "moduleRequest": {
75
+ "description": "A module permissions request",
76
+ "additionalProperties": false,
77
+ "properties": {
78
+ "name": {
79
+ "description": "Name of the module the dApp is requesting permission to access",
80
+ "type": "string"
81
+ }
82
+ },
83
+ "type": "object"
84
+ }
85
+ },
86
+ "properties": {
87
+ "modules": {
88
+ "$ref": "#/definitions/external/definitions/modules"
89
+ }
90
+ },
91
+ "type": "object"
92
+ },
93
+ "feature": {
94
+ "description": "Framework",
95
+ "enum": [
96
+ "angular",
97
+ "asp.net",
98
+ "browser",
99
+ "cryengine",
100
+ "corona",
101
+ "django",
102
+ "flutter",
103
+ "ionic",
104
+ "jquery",
105
+ "nodejs",
106
+ "phonegap",
107
+ "react",
108
+ "react-native",
109
+ "spring",
110
+ "unity",
111
+ "unreal",
112
+ "vue",
113
+ "xamarin"
114
+ ],
115
+ "type": "string"
116
+ },
117
+ "language": {
118
+ "description": "Language",
119
+ "enum": [
120
+ "c",
121
+ "c++",
122
+ "c#",
123
+ "go",
124
+ "java",
125
+ "javascript",
126
+ "kotlin",
127
+ "lua",
128
+ "python",
129
+ "ruby",
130
+ "rust",
131
+ "scala",
132
+ "solidity",
133
+ "swift"
134
+ ],
135
+ "type": "string"
136
+ },
137
+ "module": {
138
+ "additionalProperties": false,
139
+ "description": "Module Definition",
140
+ "properties": {
141
+ "config": {
142
+ "$ref": "#/definitions/config"
143
+ },
144
+ "description": {
145
+ "type": "string"
146
+ }
147
+ },
148
+ "required": [
149
+ "config"
150
+ ],
151
+ "type": "object"
152
+ },
153
+ "modules": {
154
+ "description": "List of Modules",
155
+ "items": {
156
+ "$ref": "#/definitions/module"
157
+ },
158
+ "nullable": true,
159
+ "type": "array"
160
+ },
161
+ "node": {
162
+ "additionalProperties": false,
163
+ "description": "Node Definition - Generally loaded into an existing or new Node Module",
164
+ "properties": {
165
+ "config": {
166
+ "$ref": "#/definitions/config"
167
+ },
168
+ "description": {
169
+ "type": "string"
170
+ },
171
+ "modules": {
172
+ "additionalProperties": false,
173
+ "description": "Modules in the Node",
174
+ "properties": {
175
+ "private": {
176
+ "$ref": "#/definitions/modules"
177
+ },
178
+ "public": {
179
+ "$ref": "#/definitions/modules"
180
+ }
181
+ },
182
+ "required": [],
183
+ "type": "object"
184
+ },
185
+ "name": {
186
+ "type": "string"
187
+ }
188
+ },
189
+ "required": [],
190
+ "type": "object"
191
+ },
192
+ "nodes": {
193
+ "description": "List of Node Manifests",
194
+ "items": {
195
+ "$ref": "#/definitions/node"
196
+ },
197
+ "type": "array"
198
+ },
199
+ "os": {
200
+ "description": "Operating System",
201
+ "enum": [
202
+ "aix",
203
+ "android",
204
+ "darwin",
205
+ "dragonfly",
206
+ "freebsd",
207
+ "illumos",
208
+ "ios",
209
+ "linux",
210
+ "netbsd",
211
+ "openbsd",
212
+ "osx",
213
+ "plan9",
214
+ "solaris",
215
+ "windows"
216
+ ],
217
+ "type": "string"
218
+ },
219
+ "payloads": {
220
+ "description": "List of Modules",
221
+ "items": {
222
+ "$ref": "#/definitions/module"
223
+ },
224
+ "nullable": true,
225
+ "type": "array"
226
+ }
227
+ }
228
+ }
@@ -0,0 +1,2 @@
1
+ export * from './invalidCase'
2
+ export * from './validCase'
@@ -0,0 +1,30 @@
1
+ export const invalidDappPackageManifestSchema = {
2
+ external: {
3
+ modules1: [
4
+ {
5
+ name: 'SomeModule',
6
+ },
7
+ ],
8
+ },
9
+ nodes: [
10
+ {
11
+ config: {
12
+ accountPath: "0'",
13
+ name: 1,
14
+ schema: 'network.xyo.node.config',
15
+ },
16
+ modules: {
17
+ public1: [
18
+ {
19
+ config: {
20
+ accountPath: "1'",
21
+ name: 'SomeArchivist',
22
+ schema: 'network.xyo.archivist.config',
23
+ },
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ ],
29
+ schema: 'network.xyo.foo.manifest',
30
+ }
@@ -0,0 +1,30 @@
1
+ export const validDappPackageManifestSchema = {
2
+ external: {
3
+ modules: [
4
+ {
5
+ name: 'SomeModule',
6
+ },
7
+ ],
8
+ },
9
+ nodes: [
10
+ {
11
+ config: {
12
+ accountPath: "0'",
13
+ name: 'DappNode',
14
+ schema: 'network.xyo.node.config',
15
+ },
16
+ modules: {
17
+ public: [
18
+ {
19
+ config: {
20
+ accountPath: "1'",
21
+ name: 'SomeArchivist',
22
+ schema: 'network.xyo.archivist.config',
23
+ },
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ ],
29
+ schema: 'network.xyo.dapp.manifest',
30
+ }