@xyo-network/xl1-protocol 1.13.8 → 1.13.10
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/dist/neutral/block/AllowedBlockPayload.d.ts +3 -3
- package/dist/neutral/index.mjs +57 -13
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts +9 -45
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts +16 -80
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts +8 -40
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts +9 -45
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Time.d.ts +44 -16
- package/dist/neutral/payload/elevatable/Time.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/TransferPayload.d.ts +37 -5
- package/dist/neutral/payload/elevatable/TransferPayload.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/payload/elevatable/Time.ts +20 -14
- package/src/payload/elevatable/TransferPayload.ts +20 -7
|
@@ -3,26 +3,10 @@ import z from 'zod';
|
|
|
3
3
|
* Represents a transfer destination
|
|
4
4
|
*/
|
|
5
5
|
export declare const BridgeDetailsDestinationFieldsZod: z.ZodObject<{
|
|
6
|
-
dest: z.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>, unknown>>;
|
|
11
|
-
destAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
12
|
-
readonly __hex: true;
|
|
13
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
14
|
-
readonly __hex: true;
|
|
15
|
-
}>, unknown>>;
|
|
16
|
-
destAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
17
|
-
readonly __hex: true;
|
|
18
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
19
|
-
readonly __hex: true;
|
|
20
|
-
}>, unknown>>;
|
|
21
|
-
destToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
22
|
-
readonly __hex: true;
|
|
23
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
24
|
-
readonly __hex: true;
|
|
25
|
-
}>, unknown>>;
|
|
6
|
+
dest: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
7
|
+
destAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
8
|
+
destAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
9
|
+
destToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
26
10
|
}, z.z.core.$strip>;
|
|
27
11
|
/**
|
|
28
12
|
* Represents a transfer destination
|
|
@@ -32,26 +16,10 @@ export type BridgeDetailsDestinationFields = z.infer<typeof BridgeDetailsDestina
|
|
|
32
16
|
* Represents a transfer source
|
|
33
17
|
*/
|
|
34
18
|
export declare const BridgeDetailsSourceFieldsZod: z.ZodObject<{
|
|
35
|
-
src: z.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}>, unknown>>;
|
|
40
|
-
srcAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
41
|
-
readonly __hex: true;
|
|
42
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
43
|
-
readonly __hex: true;
|
|
44
|
-
}>, unknown>>;
|
|
45
|
-
srcAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
46
|
-
readonly __hex: true;
|
|
47
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
48
|
-
readonly __hex: true;
|
|
49
|
-
}>, unknown>>;
|
|
50
|
-
srcToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
51
|
-
readonly __hex: true;
|
|
52
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
53
|
-
readonly __hex: true;
|
|
54
|
-
}>, unknown>>;
|
|
19
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
20
|
+
srcAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
21
|
+
srcAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
22
|
+
srcToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
55
23
|
}, z.z.core.$strip>;
|
|
56
24
|
/**
|
|
57
25
|
* Represents a transfer source
|
|
@@ -61,46 +29,14 @@ export type BridgeDetailsSourceFields = z.infer<typeof BridgeDetailsSourceFields
|
|
|
61
29
|
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
62
30
|
*/
|
|
63
31
|
export declare const BridgeDetailsFieldsZod: z.ZodObject<{
|
|
64
|
-
src: z.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
readonly __hex: true;
|
|
73
|
-
}>, unknown>>;
|
|
74
|
-
srcAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
75
|
-
readonly __hex: true;
|
|
76
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
77
|
-
readonly __hex: true;
|
|
78
|
-
}>, unknown>>;
|
|
79
|
-
srcToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
80
|
-
readonly __hex: true;
|
|
81
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
82
|
-
readonly __hex: true;
|
|
83
|
-
}>, unknown>>;
|
|
84
|
-
dest: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
85
|
-
readonly __hex: true;
|
|
86
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
87
|
-
readonly __hex: true;
|
|
88
|
-
}>, unknown>>;
|
|
89
|
-
destAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
90
|
-
readonly __hex: true;
|
|
91
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
92
|
-
readonly __hex: true;
|
|
93
|
-
}>, unknown>>;
|
|
94
|
-
destAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
95
|
-
readonly __hex: true;
|
|
96
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
97
|
-
readonly __hex: true;
|
|
98
|
-
}>, unknown>>;
|
|
99
|
-
destToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
100
|
-
readonly __hex: true;
|
|
101
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
102
|
-
readonly __hex: true;
|
|
103
|
-
}>, unknown>>;
|
|
32
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
33
|
+
srcAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
34
|
+
srcAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
35
|
+
srcToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
36
|
+
dest: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
37
|
+
destAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
38
|
+
destAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
39
|
+
destToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
104
40
|
}, z.z.core.$strip>;
|
|
105
41
|
/**
|
|
106
42
|
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeDetails.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeDetails.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;GAEG;AACH,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"BridgeDetails.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeDetails.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;mBAiB5C,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAE9F;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;mBAkBvC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEpF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;mBAElC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -6,46 +6,14 @@ export type BridgeIntentSchema = typeof BridgeIntentSchema;
|
|
|
6
6
|
* Represents an Address's intent to initiate a token bridge.
|
|
7
7
|
*/
|
|
8
8
|
export declare const BridgeIntentFieldsZod: z.ZodObject<{
|
|
9
|
-
src: z.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly __hex: true;
|
|
18
|
-
}>, unknown>>;
|
|
19
|
-
srcAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
20
|
-
readonly __hex: true;
|
|
21
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
22
|
-
readonly __hex: true;
|
|
23
|
-
}>, unknown>>;
|
|
24
|
-
srcToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
25
|
-
readonly __hex: true;
|
|
26
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
27
|
-
readonly __hex: true;
|
|
28
|
-
}>, unknown>>;
|
|
29
|
-
dest: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
30
|
-
readonly __hex: true;
|
|
31
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
32
|
-
readonly __hex: true;
|
|
33
|
-
}>, unknown>>;
|
|
34
|
-
destAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
35
|
-
readonly __hex: true;
|
|
36
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
37
|
-
readonly __hex: true;
|
|
38
|
-
}>, unknown>>;
|
|
39
|
-
destAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
40
|
-
readonly __hex: true;
|
|
41
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
42
|
-
readonly __hex: true;
|
|
43
|
-
}>, unknown>>;
|
|
44
|
-
destToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
45
|
-
readonly __hex: true;
|
|
46
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
47
|
-
readonly __hex: true;
|
|
48
|
-
}>, unknown>>;
|
|
9
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
10
|
+
srcAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
11
|
+
srcAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
12
|
+
srcToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
13
|
+
dest: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
14
|
+
destAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
15
|
+
destAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
16
|
+
destToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
49
17
|
nonce: z.ZodString;
|
|
50
18
|
}, z.z.core.$strip>;
|
|
51
19
|
export type BridgeIntentFields = z.infer<typeof BridgeIntentFieldsZod>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeIntent.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeIntent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,CAAC,MAAM,KAAK,CAAA;AAInB,eAAO,MAAM,kBAAkB,EAAG,iCAA0C,CAAA;AAC5E,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"BridgeIntent.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeIntent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,CAAC,MAAM,KAAK,CAAA;AAInB,eAAO,MAAM,kBAAkB,EAAG,iCAA0C,CAAA;AAC5E,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;mBAKhC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;AAE1E,eAAO,MAAM,cAAc,2CAG1B,CAAA;AAED,eAAO,MAAM,cAAc,uDAAyC,CAAA"}
|
|
@@ -6,51 +6,15 @@ export type BridgeSourceObservationSchema = typeof BridgeSourceObservationSchema
|
|
|
6
6
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
7
7
|
*/
|
|
8
8
|
export declare const BridgeSourceObservationFieldsZod: z.ZodObject<{
|
|
9
|
-
src: z.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}>, unknown>>;
|
|
19
|
-
srcAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
20
|
-
readonly __hex: true;
|
|
21
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
22
|
-
readonly __hex: true;
|
|
23
|
-
}>, unknown>>;
|
|
24
|
-
srcToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
25
|
-
readonly __hex: true;
|
|
26
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
27
|
-
readonly __hex: true;
|
|
28
|
-
}>, unknown>>;
|
|
29
|
-
dest: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
30
|
-
readonly __hex: true;
|
|
31
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
32
|
-
readonly __hex: true;
|
|
33
|
-
}>, unknown>>;
|
|
34
|
-
destAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
35
|
-
readonly __hex: true;
|
|
36
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
37
|
-
readonly __hex: true;
|
|
38
|
-
}>, unknown>>;
|
|
39
|
-
destAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
40
|
-
readonly __hex: true;
|
|
41
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
42
|
-
readonly __hex: true;
|
|
43
|
-
}>, unknown>>;
|
|
44
|
-
destToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
45
|
-
readonly __hex: true;
|
|
46
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
47
|
-
readonly __hex: true;
|
|
48
|
-
}>, unknown>>;
|
|
49
|
-
srcConfirmation: z.ZodOptional<z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
50
|
-
readonly __hex: true;
|
|
51
|
-
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
52
|
-
readonly __hex: true;
|
|
53
|
-
}>, unknown>>>;
|
|
9
|
+
src: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
10
|
+
srcAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
11
|
+
srcAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
12
|
+
srcToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
13
|
+
dest: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
14
|
+
destAddress: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
15
|
+
destAmount: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
16
|
+
destToken: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
|
|
17
|
+
srcConfirmation: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>>;
|
|
54
18
|
}, z.z.core.$strip>;
|
|
55
19
|
export type BridgeSourceObservationFields = z.infer<typeof BridgeSourceObservationFieldsZod>;
|
|
56
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeSourceObservation.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeSourceObservation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,eAAO,MAAM,6BAA6B,EAAG,6CAAsD,CAAA;AACnG,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"BridgeSourceObservation.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeSourceObservation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,eAAO,MAAM,6BAA6B,EAAG,6CAAsD,CAAA;AACnG,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;mBAK3C,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAC5F;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAA;AAE3G,eAAO,MAAM,yBAAyB,sDAGrC,CAAA;AAED,eAAO,MAAM,yBAAyB,kEAAoD,CAAA"}
|
|
@@ -1,22 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import z from 'zod';
|
|
3
2
|
export type TimeDomain = 'xl1' | 'epoch' | 'ethereum';
|
|
4
3
|
export declare const TimeSchema: "network.xyo.time";
|
|
5
4
|
export type TimeSchema = typeof TimeSchema;
|
|
6
|
-
export
|
|
7
|
-
xl1
|
|
8
|
-
xl1Hash
|
|
9
|
-
}
|
|
10
|
-
export
|
|
11
|
-
ethereum
|
|
12
|
-
ethereumHash
|
|
13
|
-
}
|
|
14
|
-
export
|
|
15
|
-
epoch:
|
|
16
|
-
}
|
|
17
|
-
export
|
|
5
|
+
export declare const XL1TimeFieldsZod: z.ZodObject<{
|
|
6
|
+
xl1: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
xl1Hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
8
|
+
}, z.z.core.$strip>;
|
|
9
|
+
export declare const EthereumTimeFieldsZod: z.ZodObject<{
|
|
10
|
+
ethereum: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
ethereumHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
12
|
+
}, z.z.core.$strip>;
|
|
13
|
+
export declare const EpochTimeFieldsZod: z.ZodObject<{
|
|
14
|
+
epoch: z.ZodNumber;
|
|
15
|
+
}, z.z.core.$strip>;
|
|
16
|
+
export declare const TimeFieldsZod: z.ZodObject<{
|
|
17
|
+
xl1: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
xl1Hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
19
|
+
ethereum: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
ethereumHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
21
|
+
epoch: z.ZodNumber;
|
|
22
|
+
}, z.z.core.$strip>;
|
|
23
|
+
export declare const TimePayloadZod: z.ZodObject<{
|
|
24
|
+
schema: z.ZodLiteral<"network.xyo.time">;
|
|
25
|
+
xl1: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
xl1Hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
27
|
+
ethereum: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
ethereumHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
|
|
29
|
+
epoch: z.ZodNumber;
|
|
30
|
+
}, z.z.core.$strip>;
|
|
31
|
+
export type TimePayload = z.infer<typeof TimePayloadZod>;
|
|
18
32
|
export declare const isSafeEpoch: (value: unknown) => value is number;
|
|
19
33
|
export declare const isTimePayload: (value: unknown) => value is TimePayload;
|
|
20
|
-
export declare const asTimePayload: import("@xylabs/object").AsTypeFunction<
|
|
21
|
-
|
|
34
|
+
export declare const asTimePayload: import("@xylabs/object").AsTypeFunction<{
|
|
35
|
+
schema: "network.xyo.time";
|
|
36
|
+
epoch: number;
|
|
37
|
+
xl1?: number | undefined;
|
|
38
|
+
xl1Hash?: import("@xylabs/hex").Hash | undefined;
|
|
39
|
+
ethereum?: number | undefined;
|
|
40
|
+
ethereumHash?: import("@xylabs/hex").Hash | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const asTimePayloadWithStorageMeta: import("@xylabs/object").AsTypeFunction<{
|
|
43
|
+
schema: "network.xyo.time";
|
|
44
|
+
epoch: number;
|
|
45
|
+
xl1?: number | undefined;
|
|
46
|
+
xl1Hash?: import("@xylabs/hex").Hash | undefined;
|
|
47
|
+
ethereum?: number | undefined;
|
|
48
|
+
ethereumHash?: import("@xylabs/hex").Hash | undefined;
|
|
49
|
+
}>;
|
|
22
50
|
//# sourceMappingURL=Time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/payload/elevatable/Time.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/payload/elevatable/Time.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,KAAK,CAAA;AAKnB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAA;AAErD,eAAO,MAAM,UAAU,EAAG,kBAA2B,CAAA;AACrD,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAE1C,eAAO,MAAM,gBAAgB;;;mBAK3B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;mBAKhC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;mBAG7B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;mBAAuH,CAAA;AAEjJ,eAAO,MAAM,cAAc;;;;;;;mBAA6D,CAAA;AAExF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAGxD,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAErD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,WAEvD,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;EAAwC,CAAA;AAClE,eAAO,MAAM,4BAA4B;;;;;;;EAAwC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
1
|
+
import { type Address, type Hex } from '@xylabs/hex';
|
|
2
|
+
import z from 'zod';
|
|
3
3
|
import type { FromFields } from './Executable.ts';
|
|
4
4
|
export declare const TransferSchema: "network.xyo.transfer";
|
|
5
5
|
export type TransferSchema = typeof TransferSchema;
|
|
@@ -8,7 +8,39 @@ export interface TransferFields<TContext extends {} = {}> extends FromFields {
|
|
|
8
8
|
epoch: number;
|
|
9
9
|
transfers: Partial<Record<Address, Hex>>;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export declare const TransferFieldsZod: z.ZodObject<{
|
|
12
|
+
$opCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
14
|
+
epoch: z.ZodNumber;
|
|
15
|
+
from: z.ZodPipe<z.ZodString, z.ZodTransform<Address, string>>;
|
|
16
|
+
transfers: z.ZodRecord<z.ZodPipe<z.ZodString, z.ZodTransform<Address, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<Hex, string>>>;
|
|
17
|
+
}, z.z.core.$strip>;
|
|
18
|
+
export declare const PayloadZodOfSchema: <S extends string>(schema: S) => z.ZodObject<{
|
|
19
|
+
schema: z.ZodLiteral<S>;
|
|
20
|
+
}, z.z.core.$strip>;
|
|
21
|
+
export declare const TransferZod: z.ZodObject<{
|
|
22
|
+
schema: z.ZodLiteral<"network.xyo.transfer">;
|
|
23
|
+
$opCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
25
|
+
epoch: z.ZodNumber;
|
|
26
|
+
from: z.ZodPipe<z.ZodString, z.ZodTransform<Address, string>>;
|
|
27
|
+
transfers: z.ZodRecord<z.ZodPipe<z.ZodString, z.ZodTransform<Address, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<Hex, string>>>;
|
|
28
|
+
}, z.z.core.$strip>;
|
|
29
|
+
export type Transfer = z.infer<typeof TransferZod>;
|
|
30
|
+
export declare const isTransfer: (x?: unknown | null) => x is {
|
|
31
|
+
schema: "network.xyo.transfer";
|
|
32
|
+
epoch: number;
|
|
33
|
+
from: Address;
|
|
34
|
+
transfers: Record<Address, Hex>;
|
|
35
|
+
$opCodes?: string[] | undefined;
|
|
36
|
+
context?: Record<string, z.z.core.util.JSONType> | undefined;
|
|
37
|
+
};
|
|
38
|
+
export declare const asTransfer: import("@xylabs/object").AsTypeFunction<{
|
|
39
|
+
schema: "network.xyo.transfer";
|
|
40
|
+
epoch: number;
|
|
41
|
+
from: Address;
|
|
42
|
+
transfers: Record<Address, Hex>;
|
|
43
|
+
$opCodes?: string[] | undefined;
|
|
44
|
+
context?: Record<string, z.z.core.util.JSONType> | undefined;
|
|
45
|
+
}>;
|
|
14
46
|
//# sourceMappingURL=TransferPayload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferPayload.d.ts","sourceRoot":"","sources":["../../../../src/payload/elevatable/TransferPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TransferPayload.d.ts","sourceRoot":"","sources":["../../../../src/payload/elevatable/TransferPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,GAAG,EAET,MAAM,aAAa,CAAA;AAGpB,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO,MAAM,cAAc,EAAG,sBAA+B,CAAA;AAC7D,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA;AAElD,MAAM,WAAW,cAAc,CAAC,QAAQ,SAAS,EAAE,GAAG,EAAE,CAAE,SAAQ,UAAU;IAC1E,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IAEb,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;CACzC;AAED,eAAO,MAAM,iBAAiB;;;;;;mBAM5B,CAAA;AAEF,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,CAAC;;mBAAqD,CAAA;AAEnH,eAAO,MAAM,WAAW;;;;;;;mBAAqE,CAAA;AAE7F,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAElD,eAAO,MAAM,UAAU;;;;;;;CAAkD,CAAA;AAEzE,eAAO,MAAM,UAAU;;;;;;;EAAqC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/xl1-protocol",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.10",
|
|
5
5
|
"description": "XYO Layer One Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -37,35 +37,35 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@opentelemetry/api": "~1.9.0",
|
|
40
|
-
"@xylabs/assert": "~5.0.
|
|
41
|
-
"@xylabs/hex": "~5.0.
|
|
42
|
-
"@xylabs/logger": "~5.0.
|
|
43
|
-
"@xylabs/object": "~5.0.
|
|
44
|
-
"@xylabs/promise": "~5.0.
|
|
45
|
-
"@xylabs/typeof": "~5.0.
|
|
46
|
-
"@xyo-network/archivist-model": "~5.1.
|
|
47
|
-
"@xyo-network/boundwitness-model": "~5.1.
|
|
48
|
-
"@xyo-network/payload-model": "~5.1.
|
|
49
|
-
"@xyo-network/schema-payload-plugin": "~5.1.
|
|
40
|
+
"@xylabs/assert": "~5.0.25",
|
|
41
|
+
"@xylabs/hex": "~5.0.25",
|
|
42
|
+
"@xylabs/logger": "~5.0.25",
|
|
43
|
+
"@xylabs/object": "~5.0.25",
|
|
44
|
+
"@xylabs/promise": "~5.0.25",
|
|
45
|
+
"@xylabs/typeof": "~5.0.25",
|
|
46
|
+
"@xyo-network/archivist-model": "~5.1.21",
|
|
47
|
+
"@xyo-network/boundwitness-model": "~5.1.21",
|
|
48
|
+
"@xyo-network/payload-model": "~5.1.21",
|
|
49
|
+
"@xyo-network/schema-payload-plugin": "~5.1.21",
|
|
50
50
|
"zod": "~4.1.12"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@types/node": "~24.10.
|
|
54
|
-
"@typescript-eslint/types": "~8.46.
|
|
55
|
-
"@xylabs/creatable": "~5.0.
|
|
56
|
-
"@xylabs/eslint-config-flat": "~7.2.
|
|
57
|
-
"@xylabs/ts-scripts-yarn3": "~7.2.
|
|
58
|
-
"@xylabs/tsconfig": "~7.2.
|
|
59
|
-
"@xyo-network/account-model": "~5.1.
|
|
53
|
+
"@types/node": "~24.10.1",
|
|
54
|
+
"@typescript-eslint/types": "~8.46.4",
|
|
55
|
+
"@xylabs/creatable": "~5.0.25",
|
|
56
|
+
"@xylabs/eslint-config-flat": "~7.2.8",
|
|
57
|
+
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
58
|
+
"@xylabs/tsconfig": "~7.2.8",
|
|
59
|
+
"@xyo-network/account-model": "~5.1.21",
|
|
60
60
|
"dependency-cruiser": "~17.2.0",
|
|
61
61
|
"dotenv": "~17.2.3",
|
|
62
62
|
"eslint": "~9.39.1",
|
|
63
63
|
"eslint-import-resolver-typescript": "~4.4.4",
|
|
64
|
-
"knip": "~5.
|
|
64
|
+
"knip": "~5.69.1",
|
|
65
65
|
"typescript": "~5.9.3",
|
|
66
66
|
"vite": "~7.2.2",
|
|
67
67
|
"vite-tsconfig-paths": "~5.1.4",
|
|
68
|
-
"vitest": "~4.0.
|
|
68
|
+
"vitest": "~4.0.9"
|
|
69
69
|
},
|
|
70
70
|
"packageManager": "yarn@4.10.3",
|
|
71
71
|
"engines": {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HashZod } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
|
-
import type { Payload } from '@xyo-network/payload-model'
|
|
4
3
|
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
4
|
+
import z from 'zod'
|
|
5
|
+
|
|
6
|
+
import { PayloadZodOfSchema } from './TransferPayload.ts'
|
|
5
7
|
|
|
6
8
|
// xl1 = xl1 block number, epoch = epoch number, ethereum = ethereum block number
|
|
7
9
|
export type TimeDomain = 'xl1' | 'epoch' | 'ethereum'
|
|
@@ -9,26 +11,30 @@ export type TimeDomain = 'xl1' | 'epoch' | 'ethereum'
|
|
|
9
11
|
export const TimeSchema = 'network.xyo.time' as const
|
|
10
12
|
export type TimeSchema = typeof TimeSchema
|
|
11
13
|
|
|
12
|
-
export
|
|
14
|
+
export const XL1TimeFieldsZod = z.object({
|
|
13
15
|
// block number
|
|
14
|
-
xl1
|
|
16
|
+
xl1: z.number().optional(),
|
|
15
17
|
// block hash
|
|
16
|
-
xl1Hash
|
|
17
|
-
}
|
|
18
|
+
xl1Hash: HashZod.optional(),
|
|
19
|
+
})
|
|
18
20
|
|
|
19
|
-
export
|
|
21
|
+
export const EthereumTimeFieldsZod = z.object({
|
|
20
22
|
// block number
|
|
21
|
-
ethereum
|
|
23
|
+
ethereum: z.number().optional(),
|
|
22
24
|
// block hash
|
|
23
|
-
ethereumHash
|
|
24
|
-
}
|
|
25
|
+
ethereumHash: HashZod.optional(),
|
|
26
|
+
})
|
|
25
27
|
|
|
26
|
-
export
|
|
28
|
+
export const EpochTimeFieldsZod = z.object({
|
|
27
29
|
// in milliseconds
|
|
28
|
-
epoch: number
|
|
29
|
-
}
|
|
30
|
+
epoch: z.number(),
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export const TimeFieldsZod = XL1TimeFieldsZod.extend(XL1TimeFieldsZod.shape).extend(EthereumTimeFieldsZod.shape).extend(EpochTimeFieldsZod.shape)
|
|
34
|
+
|
|
35
|
+
export const TimePayloadZod = PayloadZodOfSchema(TimeSchema).extend(TimeFieldsZod.shape)
|
|
30
36
|
|
|
31
|
-
export type TimePayload =
|
|
37
|
+
export type TimePayload = z.infer<typeof TimePayloadZod>
|
|
32
38
|
|
|
33
39
|
// to prevent scaling problems, we use double the current time as a max safe epoch
|
|
34
40
|
export const isSafeEpoch = (value: unknown): value is number => {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
Address,
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
type Address,
|
|
3
|
+
AddressZod,
|
|
4
|
+
type Hex,
|
|
5
|
+
HexZod,
|
|
4
6
|
} from '@xylabs/hex'
|
|
5
7
|
import { AsObjectFactory } from '@xylabs/object'
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
+
import { isPayloadOfSchemaType, PayloadZod } from '@xyo-network/payload-model'
|
|
9
|
+
import z from 'zod'
|
|
8
10
|
|
|
9
11
|
import type { FromFields } from './Executable.ts'
|
|
10
12
|
|
|
@@ -18,8 +20,19 @@ export interface TransferFields<TContext extends {} = {}> extends FromFields {
|
|
|
18
20
|
transfers: Partial<Record<Address, Hex>>
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
export const TransferFieldsZod = z.object({
|
|
24
|
+
$opCodes: z.array(z.string()).optional(),
|
|
25
|
+
context: z.record(z.string(), z.json()).optional(),
|
|
26
|
+
epoch: z.number(),
|
|
27
|
+
from: AddressZod,
|
|
28
|
+
transfers: z.record(AddressZod, HexZod),
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export const PayloadZodOfSchema = <S extends string>(schema: S) => PayloadZod.extend({ schema: z.literal(schema) })
|
|
32
|
+
|
|
33
|
+
export const TransferZod = PayloadZodOfSchema(TransferSchema).extend(TransferFieldsZod.shape)
|
|
34
|
+
|
|
35
|
+
export type Transfer = z.infer<typeof TransferZod>
|
|
23
36
|
|
|
24
37
|
export const isTransfer = isPayloadOfSchemaType<Transfer>(TransferSchema)
|
|
25
38
|
|