@xyo-network/xl1-schema 1.26.12 → 1.26.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/xl1-schema",
3
- "version": "1.26.12",
3
+ "version": "1.26.13",
4
4
  "description": "XYO Layer One SDK Schema",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -22,7 +22,6 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
- "source": "./src/index.ts",
26
25
  "default": "./dist/neutral/index.mjs"
27
26
  },
28
27
  "./package.json": "./package.json"
@@ -32,29 +31,44 @@
32
31
  "types": "./dist/neutral/index.d.ts",
33
32
  "files": [
34
33
  "dist",
35
- "src",
36
34
  "!**/*.bench.*",
37
35
  "!**/*.spec.*",
38
36
  "!**/*.test.*",
39
37
  "README.md"
40
38
  ],
41
39
  "dependencies": {
42
- "@xyo-network/xl1-protocol-lib": "~1.26.12",
40
+ "@xyo-network/xl1-protocol-lib": "~1.26.13",
43
41
  "ajv": "~8.18.0"
44
42
  },
45
43
  "devDependencies": {
44
+ "@firebase/app": "0.x",
45
+ "@firebase/app-compat": "0.x",
46
+ "@firebase/app-types": "0.x",
47
+ "@firebase/util": "1.x",
48
+ "@metamask/providers": "^22",
46
49
  "@opentelemetry/api": "^1.9.1",
47
50
  "@types/node": "^25.5.0",
51
+ "@xylabs/geo": "^5",
48
52
  "@xylabs/sdk-js": "^5.0.91",
49
- "@xylabs/ts-scripts-common": "~7.6.2",
50
- "@xylabs/ts-scripts-yarn3": "~7.6.2",
51
- "@xylabs/tsconfig": "~7.6.2",
52
- "@xyo-network/sdk-js": "^5.3.20",
53
- "axios": "^1.13.6",
53
+ "@xylabs/ts-scripts-common": "~7.6.13",
54
+ "@xylabs/ts-scripts-yarn3": "~7.6.13",
55
+ "@xylabs/tsconfig": "~7.6.13",
56
+ "@xyo-network/sdk-js": "^5.3.22",
57
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0",
58
+ "axios": "^1.14.0",
59
+ "cosmiconfig": ">=9",
60
+ "esbuild": ">=0.18",
61
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0",
54
62
  "ethers": "^6.16.0",
63
+ "firebase": "^12",
64
+ "lru-cache": "^11",
65
+ "mapbox-gl": "^3",
66
+ "rollup": "^3.29.4 || ^4",
67
+ "tslib": "^2.8.1",
55
68
  "typescript": "~5.9.3",
56
- "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
69
+ "vite": "^8.0.3",
57
70
  "vitest": "~4.1.2",
71
+ "webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0",
58
72
  "zod": "~4.3.6"
59
73
  },
60
74
  "peerDependencies": {
package/src/Executable.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Executable } from '@xyo-network/xl1-protocol-lib'
2
- import type { JSONSchemaType } from 'ajv'
3
-
4
- /** JSON schema for validating Executable payloads containing elevation scripts. */
5
- export const ExecutableJsonSchema: JSONSchemaType<Executable> = {
6
- $id: 'https://schemas.xyo.network/2.0/executable',
7
- additionalProperties: true,
8
- properties: { script: { items: { type: 'string', pattern: String.raw`^elevate\|` }, type: 'array' } },
9
- required: ['script'],
10
- type: 'object',
11
- } as const
@@ -1,15 +0,0 @@
1
- import { HashRegEx, HexRegEx } from '@xylabs/sdk-js'
2
- import type { StorageMeta } from '@xyo-network/sdk-js'
3
- import type { JSONSchemaType } from 'ajv'
4
-
5
- /** JSON schema for validating storage metadata fields (_sequence, _hash, _dataHash). */
6
- export const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {
7
- $id: 'https://schemas.xyo.network/2.0/storage-meta',
8
- properties: {
9
- _sequence: { type: 'string', pattern: HexRegEx.source },
10
- _hash: { type: 'string', pattern: HashRegEx.source },
11
- _dataHash: { type: 'string', pattern: HashRegEx.source },
12
- },
13
- required: ['_sequence', '_hash', '_dataHash'],
14
- type: 'object',
15
- } as const
@@ -1,34 +0,0 @@
1
- import { AddressRegEx, HashRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,
5
- PayloadBuilder, SchemaSchema,
6
- } from '@xyo-network/sdk-js'
7
- import type { BlockBoundWitness } from '@xyo-network/xl1-protocol-lib'
8
- import type { JSONSchemaType } from 'ajv'
9
-
10
- /** JSON schema for validating BlockBoundWitness payloads. */
11
- export const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {
12
- ...boundWitnessJsonSchema,
13
- $id: 'https://schemas.xyo.network/2.0/block',
14
- properties: {
15
- ...boundWitnessProperties,
16
- block: { type: 'integer' },
17
- chain: { type: 'string', pattern: AddressRegEx.source },
18
- previous: {
19
- type: 'string', pattern: HashRegEx.source, nullable: true,
20
- },
21
- step_hashes: {
22
- items: { type: 'string', pattern: HashRegEx.source },
23
- type: 'array',
24
- },
25
- $epoch: { type: 'integer' },
26
- schema: { type: 'string', pattern: BoundWitnessSchema },
27
- },
28
- required: [...boundWitnessJsonSchema.required, 'block', 'chain', 'step_hashes', 'previous', '$epoch'],
29
- type: 'object',
30
- } as const
31
-
32
- /** Pre-built schema payload for BlockBoundWitness validation. */
33
- export const BlockBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
34
- .fields({ definition: BlockBoundWitnessJsonSchema }).build()
@@ -1,27 +0,0 @@
1
- import type { SchemaPayload, WithStorageMeta } from '@xyo-network/sdk-js'
2
- import {
3
- boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,
4
- PayloadBuilder, SchemaSchema,
5
- } from '@xyo-network/sdk-js'
6
- import type { BlockBoundWitness } from '@xyo-network/xl1-protocol-lib'
7
- import type { JSONSchemaType } from 'ajv'
8
-
9
- import { StorageMetaJsonSchema } from '../StorageMeta.ts'
10
- import { BlockBoundWitnessJsonSchema } from './BlockBoundWitness.ts'
11
-
12
- /** JSON schema for validating BlockBoundWitness payloads including storage metadata. */
13
- export const BlockBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<WithStorageMeta<BlockBoundWitness>> = {
14
- $id: 'https://schemas.xyo.network/2.0/block-with-storage-meta',
15
- properties: {
16
- ...boundWitnessProperties,
17
- ...BlockBoundWitnessJsonSchema.properties,
18
- ...StorageMetaJsonSchema.properties,
19
- schema: { type: 'string', pattern: BoundWitnessSchema },
20
- },
21
- required: [...new Set([...boundWitnessJsonSchema.required, ...BlockBoundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required])],
22
- type: 'object',
23
- } as const
24
-
25
- /** Pre-built schema payload for BlockBoundWitness with storage meta validation. */
26
- export const BlockBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
27
- .fields({ definition: BlockBoundWitnessWithStorageMetaJsonSchema }).build()
@@ -1,44 +0,0 @@
1
- import { AddressRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- boundWitnessJsonSchema, BoundWitnessSchema,
5
- PayloadBuilder, SchemaSchema,
6
- Uint256RegEx,
7
- } from '@xyo-network/sdk-js'
8
- import type { TransactionBoundWitness } from '@xyo-network/xl1-protocol-lib'
9
- import type { JSONSchemaType } from 'ajv'
10
-
11
- import { ExecutableJsonSchema } from '../Executable.ts'
12
-
13
- /** JSON schema for validating TransactionBoundWitness payloads. */
14
- export const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundWitness> = {
15
- ...boundWitnessJsonSchema,
16
- $id: 'https://schemas.xyo.network/2.0/transaction',
17
- additionalProperties: false,
18
- properties: {
19
- ...boundWitnessJsonSchema.properties,
20
- ...ExecutableJsonSchema.properties,
21
- chain: { type: 'string', pattern: AddressRegEx.source },
22
- fees: {
23
- type: 'object',
24
- properties: {
25
- base: { type: 'string', pattern: Uint256RegEx.source },
26
- gasLimit: { type: 'string', pattern: Uint256RegEx.source },
27
- gasPrice: { type: 'string', pattern: Uint256RegEx.source },
28
- priority: { type: 'string', pattern: Uint256RegEx.source },
29
- },
30
- required: ['base'],
31
- additionalProperties: false,
32
- },
33
- from: { type: 'string', pattern: AddressRegEx.source },
34
- nbf: { type: 'integer' },
35
- exp: { type: 'integer' },
36
- schema: { type: 'string', pattern: BoundWitnessSchema },
37
- },
38
- required: [...boundWitnessJsonSchema.required, 'chain', 'fees', 'nbf', 'exp'],
39
- type: 'object',
40
- } as const
41
-
42
- /** Pre-built schema payload for TransactionBoundWitness validation. */
43
- export const TransactionBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
44
- .fields({ definition: TransactionBoundWitnessJsonSchema }).build()
@@ -1,33 +0,0 @@
1
- import { AddressRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- boundWitnessJsonSchema, BoundWitnessSchema,
5
- PayloadBuilder, SchemaSchema,
6
- Uint256RegEx,
7
- } from '@xyo-network/sdk-js'
8
- import type { TransactionBoundWitness } from '@xyo-network/xl1-protocol-lib'
9
- import type { JSONSchemaType } from 'ajv'
10
-
11
- import { StorageMetaJsonSchema } from '../StorageMeta.ts'
12
-
13
- /** JSON schema for validating TransactionBoundWitness payloads including storage metadata. */
14
- export const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<TransactionBoundWitness> = {
15
- ...boundWitnessJsonSchema,
16
- $id: 'https://schemas.xyo.network/2.0/transaction-with-storage-meta',
17
- additionalProperties: false,
18
- properties: {
19
- ...boundWitnessJsonSchema.properties,
20
- ...StorageMetaJsonSchema.properties,
21
- chain: { type: 'string', pattern: AddressRegEx.source },
22
- gas: { type: 'string', pattern: Uint256RegEx.source },
23
- nbf: { type: 'integer' },
24
- exp: { type: 'integer' },
25
- schema: { type: 'string', pattern: BoundWitnessSchema },
26
- },
27
- required: [...boundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required, 'chain', 'gas', 'nbf', 'exp'],
28
- type: 'object',
29
- } as const
30
-
31
- /** Pre-built schema payload for TransactionBoundWitness with storage meta validation. */
32
- export const TransactionBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
33
- .fields({ definition: TransactionBoundWitnessWithStorageMetaJsonSchema }).build()
@@ -1,4 +0,0 @@
1
- export * from './BlockBoundWitness.ts'
2
- export * from './BlockBoundWitnessWithStorageMeta.ts'
3
- export * from './TransactionBoundWitness.ts'
4
- export * from './TransactionBoundWitnessWithStorageMeta.ts'
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './boundwitness/index.ts'
2
- export * from './Executable.ts'
3
- export * from './payload/index.ts'
4
- export * from './StorageMeta.ts'
@@ -1,27 +0,0 @@
1
- import { AddressRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- PayloadBuilder, payloadJsonSchema, SchemaSchema,
5
- } from '@xyo-network/sdk-js'
6
- import type { ChainStakeIntent } from '@xyo-network/xl1-protocol-lib'
7
- import { ChainStakeIntentSchema } from '@xyo-network/xl1-protocol-lib'
8
- import type { JSONSchemaType } from 'ajv'
9
-
10
- /** JSON schema for validating ChainStakeIntent payloads. */
11
- export const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent> = {
12
- ...payloadJsonSchema,
13
- $id: 'https://schemas.xyo.network/2.0/payload/chain-stake-intent',
14
- additionalProperties: false,
15
- properties: {
16
- ...payloadJsonSchema.properties,
17
- from: { type: 'string', pattern: AddressRegEx.source },
18
- intent: { type: 'string', enum: ['producer'] },
19
- schema: { type: 'string', pattern: ChainStakeIntentSchema },
20
- },
21
- required: [...payloadJsonSchema.required, 'intent'],
22
- type: 'object',
23
- }
24
-
25
- /** Pre-built schema payload for ChainStakeIntent validation. */
26
- export const ChainStakeIntentPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
27
- .fields({ definition: ChainStakeIntentPayloadJsonSchema }).build()
@@ -1,26 +0,0 @@
1
- import { HashRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- PayloadBuilder, payloadJsonSchema, SchemaSchema,
5
- } from '@xyo-network/sdk-js'
6
- import type { HashPayload } from '@xyo-network/xl1-protocol-lib'
7
- import { HashSchema } from '@xyo-network/xl1-protocol-lib'
8
- import type { JSONSchemaType } from 'ajv'
9
-
10
- /** JSON schema for validating Hash payloads. */
11
- export const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {
12
- ...payloadJsonSchema,
13
- $id: 'https://schemas.xyo.network/2.0/payload/hash',
14
- additionalProperties: false,
15
- properties: {
16
- ...payloadJsonSchema.properties,
17
- hash: { type: 'string', pattern: HashRegEx.source },
18
- schema: { type: 'string', pattern: HashSchema },
19
- },
20
- required: [...payloadJsonSchema.required, 'hash'],
21
- type: 'object',
22
- }
23
-
24
- /** Pre-built schema payload for Hash validation. */
25
- export const HashPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
26
- .fields({ definition: HashPayloadJsonSchema }).build()
@@ -1,33 +0,0 @@
1
- import { AddressRegEx } from '@xylabs/sdk-js'
2
- import type { SchemaPayload } from '@xyo-network/sdk-js'
3
- import {
4
- PayloadBuilder, payloadJsonSchema, SchemaSchema,
5
- Uint256RegEx,
6
- } from '@xyo-network/sdk-js'
7
- import type { Transfer } from '@xyo-network/xl1-protocol-lib'
8
- import { TransferSchema } from '@xyo-network/xl1-protocol-lib'
9
- import type { JSONSchemaType } from 'ajv'
10
-
11
- /** JSON schema for validating Transfer payloads. */
12
- export const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {
13
- ...payloadJsonSchema,
14
- $id: 'https://schemas.xyo.network/2.0/payload/transfer',
15
- additionalProperties: false,
16
- properties: {
17
- ...payloadJsonSchema.properties,
18
- from: { type: 'string', pattern: AddressRegEx.source },
19
- epoch: { type: 'number' },
20
- transfers: {
21
- type: 'object',
22
- propertyNames: { pattern: AddressRegEx.source },
23
- patternProperties: { [AddressRegEx.source]: { type: 'string', pattern: Uint256RegEx.source } },
24
- },
25
- schema: { type: 'string', pattern: TransferSchema },
26
- },
27
- required: [...payloadJsonSchema.required, 'transfers', 'epoch'],
28
- type: 'object',
29
- }
30
-
31
- /** Pre-built schema payload for Transfer validation. */
32
- export const TransferPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })
33
- .fields({ definition: TransferPayloadJsonSchema }).build()
@@ -1,3 +0,0 @@
1
- export * from './ChainStakeIntent.ts'
2
- export * from './HashPayload.ts'
3
- export * from './TransferPayload.ts'