@xyo-network/xl1-protocol 1.12.56 → 1.12.58
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/index.mjs +105 -24
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/interfaces/view/NetworkStakeStepReward.d.ts +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts +49 -8
- package/dist/neutral/payload/elevatable/Bridge/BridgeDestinationObservation.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts +95 -39
- package/dist/neutral/payload/elevatable/Bridge/BridgeDetails.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts +46 -8
- package/dist/neutral/payload/elevatable/Bridge/BridgeIntent.d.ts.map +1 -1
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts +49 -8
- package/dist/neutral/payload/elevatable/Bridge/BridgeSourceObservation.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/interfaces/view/NetworkStakeStepReward.ts +1 -1
- package/src/payload/elevatable/Bridge/BridgeDestinationObservation.ts +13 -7
- package/src/payload/elevatable/Bridge/BridgeDetails.ts +28 -20
- package/src/payload/elevatable/Bridge/BridgeIntent.ts +13 -7
- package/src/payload/elevatable/Bridge/BridgeSourceObservation.ts +12 -7
|
@@ -1,49 +1,105 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a transfer destination
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
destToken:
|
|
22
|
-
|
|
5
|
+
export declare const BridgeDetailsDestinationFieldsZod: z.ZodObject<{
|
|
6
|
+
dest: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
7
|
+
readonly __hex: true;
|
|
8
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
9
|
+
readonly __hex: true;
|
|
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>>;
|
|
26
|
+
}, z.z.core.$strip>;
|
|
27
|
+
/**
|
|
28
|
+
* Represents a transfer destination
|
|
29
|
+
*/
|
|
30
|
+
export type BridgeDetailsDestinationFields = z.infer<typeof BridgeDetailsDestinationFieldsZod>;
|
|
23
31
|
/**
|
|
24
32
|
* Represents a transfer source
|
|
25
33
|
*/
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
srcToken:
|
|
43
|
-
|
|
34
|
+
export declare const BridgeDetailsSourceFieldsZod: z.ZodObject<{
|
|
35
|
+
src: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
36
|
+
readonly __hex: true;
|
|
37
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
38
|
+
readonly __hex: true;
|
|
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>>;
|
|
55
|
+
}, z.z.core.$strip>;
|
|
56
|
+
/**
|
|
57
|
+
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
58
|
+
*/
|
|
59
|
+
export declare const BridgeDetailsFieldsZod: z.ZodObject<{
|
|
60
|
+
src: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
61
|
+
readonly __hex: true;
|
|
62
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
63
|
+
readonly __hex: true;
|
|
64
|
+
}>, unknown>>;
|
|
65
|
+
srcAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
66
|
+
readonly __hex: true;
|
|
67
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
68
|
+
readonly __hex: true;
|
|
69
|
+
}>, unknown>>;
|
|
70
|
+
srcAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
71
|
+
readonly __hex: true;
|
|
72
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
73
|
+
readonly __hex: true;
|
|
74
|
+
}>, unknown>>;
|
|
75
|
+
srcToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
76
|
+
readonly __hex: true;
|
|
77
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
78
|
+
readonly __hex: true;
|
|
79
|
+
}>, unknown>>;
|
|
80
|
+
dest: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
81
|
+
readonly __hex: true;
|
|
82
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
83
|
+
readonly __hex: true;
|
|
84
|
+
}>, unknown>>;
|
|
85
|
+
destAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
86
|
+
readonly __hex: true;
|
|
87
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
88
|
+
readonly __hex: true;
|
|
89
|
+
}>, unknown>>;
|
|
90
|
+
destAmount: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
91
|
+
readonly __hex: true;
|
|
92
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
93
|
+
readonly __hex: true;
|
|
94
|
+
}>, unknown>>;
|
|
95
|
+
destToken: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
96
|
+
readonly __hex: true;
|
|
97
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
98
|
+
readonly __hex: true;
|
|
99
|
+
}>, unknown>>;
|
|
100
|
+
}, z.z.core.$strip>;
|
|
44
101
|
/**
|
|
45
102
|
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
46
103
|
*/
|
|
47
|
-
export
|
|
48
|
-
}
|
|
104
|
+
export type BridgeDetailsFields = z.infer<typeof BridgeDetailsFieldsZod>;
|
|
49
105
|
//# sourceMappingURL=BridgeDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeDetails.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeDetails.ts"],"names":[],"mappings":"
|
|
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,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAElC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -1,16 +1,54 @@
|
|
|
1
1
|
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
import
|
|
2
|
+
import z from 'zod';
|
|
3
3
|
export declare const BridgeIntentSchema: "network.xyo.chain.bridge.intent";
|
|
4
4
|
export type BridgeIntentSchema = typeof BridgeIntentSchema;
|
|
5
5
|
/**
|
|
6
|
-
* Represents an
|
|
6
|
+
* Represents an Address's intent to initiate a token bridge.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
8
|
+
export declare const BridgeIntentFieldsZod: z.ZodObject<{
|
|
9
|
+
src: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
10
|
+
readonly __hex: true;
|
|
11
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
12
|
+
readonly __hex: true;
|
|
13
|
+
}>, unknown>>;
|
|
14
|
+
srcAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
15
|
+
readonly __hex: true;
|
|
16
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
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>>;
|
|
49
|
+
nonce: z.ZodString;
|
|
50
|
+
}, z.z.core.$strip>;
|
|
51
|
+
export type BridgeIntentFields = z.infer<typeof BridgeIntentFieldsZod>;
|
|
14
52
|
export type BridgeIntent = Payload<BridgeIntentFields, BridgeIntentSchema>;
|
|
15
53
|
export declare const isBridgeIntent: (x?: unknown | null) => x is BridgeIntent;
|
|
16
54
|
export declare const asBridgeIntent: import("@xylabs/object").AsTypeFunction<BridgeIntent>;
|
|
@@ -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;
|
|
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"}
|
|
@@ -1,17 +1,58 @@
|
|
|
1
|
-
import type { Hex } from '@xylabs/hex';
|
|
2
1
|
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import type
|
|
2
|
+
import type z from 'zod';
|
|
4
3
|
export declare const BridgeSourceObservationSchema: "network.xyo.chain.bridge.observation.source";
|
|
5
4
|
export type BridgeSourceObservationSchema = typeof BridgeSourceObservationSchema;
|
|
6
5
|
/**
|
|
7
6
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
8
7
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
8
|
+
export declare const BridgeSourceObservationFieldsZod: z.ZodObject<{
|
|
9
|
+
src: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
10
|
+
readonly __hex: true;
|
|
11
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
12
|
+
readonly __hex: true;
|
|
13
|
+
}>, unknown>>;
|
|
14
|
+
srcAddress: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
15
|
+
readonly __hex: true;
|
|
16
|
+
}>, unknown, z.z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
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>>;
|
|
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>>>;
|
|
54
|
+
}, z.z.core.$strip>;
|
|
55
|
+
export type BridgeSourceObservationFields = z.infer<typeof BridgeSourceObservationFieldsZod>;
|
|
15
56
|
/**
|
|
16
57
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
17
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeSourceObservation.d.ts","sourceRoot":"","sources":["../../../../../src/payload/elevatable/Bridge/BridgeSourceObservation.ts"],"names":[],"mappings":"
|
|
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"}
|
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.12.
|
|
4
|
+
"version": "1.12.58",
|
|
5
5
|
"description": "XYO Layer One Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@xylabs/object": "~5.0.11",
|
|
46
46
|
"@xylabs/promise": "~5.0.11",
|
|
47
47
|
"@xylabs/typeof": "~5.0.11",
|
|
48
|
-
"@xyo-network/archivist-model": "~5.1.
|
|
49
|
-
"@xyo-network/boundwitness-model": "~5.1.
|
|
50
|
-
"@xyo-network/payload-model": "~5.1.
|
|
51
|
-
"@xyo-network/schema-payload-plugin": "~5.1.
|
|
48
|
+
"@xyo-network/archivist-model": "~5.1.5",
|
|
49
|
+
"@xyo-network/boundwitness-model": "~5.1.5",
|
|
50
|
+
"@xyo-network/payload-model": "~5.1.5",
|
|
51
|
+
"@xyo-network/schema-payload-plugin": "~5.1.5",
|
|
52
52
|
"zod": "~4.1.12"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@xylabs/eslint-config-flat": "~7.1.8",
|
|
59
59
|
"@xylabs/ts-scripts-yarn3": "~7.1.8",
|
|
60
60
|
"@xylabs/tsconfig": "~7.1.8",
|
|
61
|
-
"@xyo-network/account-model": "~5.1.
|
|
61
|
+
"@xyo-network/account-model": "~5.1.5",
|
|
62
62
|
"dependency-cruiser": "~17.0.2",
|
|
63
63
|
"dotenv": "~17.2.3",
|
|
64
64
|
"eslint": "~9.37.0",
|
|
@@ -31,7 +31,7 @@ export interface NetworkStakeStepPoolRewardViewInterface {
|
|
|
31
31
|
|
|
32
32
|
export interface NetworkStakeStepRewardPositionViewInterface {
|
|
33
33
|
// estimate the current weight for a given position at a given step
|
|
34
|
-
networkStakeStepRewardPositionWeight(context: StepContext, position: number): Promisable<
|
|
34
|
+
networkStakeStepRewardPositionWeight(context: StepContext, position: number): Promisable<bigint>
|
|
35
35
|
|
|
36
36
|
// estimate the potential loss for removing a given position at a given step
|
|
37
37
|
networkStakeStepRewardPotentialPositionLoss(context: StepContext, position: number): Promisable<bigint>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HexZod } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model'
|
|
4
|
-
import {
|
|
4
|
+
import { isPayloadOfZodType } from '@xyo-network/payload-model'
|
|
5
|
+
import type z from 'zod'
|
|
5
6
|
|
|
6
|
-
import
|
|
7
|
+
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
8
|
|
|
8
9
|
export const BridgeDestinationObservationSchema = 'network.xyo.chain.bridge.observation.destination' as const
|
|
9
10
|
export type BridgeDestinationObservationSchema = typeof BridgeDestinationObservationSchema
|
|
@@ -11,18 +12,23 @@ export type BridgeDestinationObservationSchema = typeof BridgeDestinationObserva
|
|
|
11
12
|
/**
|
|
12
13
|
* Represents an observation that confirms a bridge action occurred on the destination chain.
|
|
13
14
|
*/
|
|
14
|
-
export
|
|
15
|
+
export const BridgeDestinationObservationFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
15
16
|
/**
|
|
16
17
|
* Destination chain confirmation
|
|
17
18
|
*/
|
|
18
|
-
destConfirmation
|
|
19
|
-
}
|
|
19
|
+
destConfirmation: HexZod.optional().describe('Destination chain confirmation'),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export type BridgeDestinationObservationFields = z.infer<typeof BridgeDestinationObservationFieldsZod>
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
25
|
* Represents an observation that confirms a bridge action occurred on the destination chain.
|
|
23
26
|
*/
|
|
24
27
|
export type BridgeDestinationObservation = Payload<BridgeDestinationObservationFields, BridgeDestinationObservationSchema>
|
|
25
28
|
|
|
26
|
-
export const isBridgeDestinationObservation =
|
|
29
|
+
export const isBridgeDestinationObservation = isPayloadOfZodType<BridgeDestinationObservation>(
|
|
30
|
+
BridgeDestinationObservationFieldsZod,
|
|
31
|
+
BridgeDestinationObservationSchema,
|
|
32
|
+
)
|
|
27
33
|
|
|
28
34
|
export const asBridgeDestinationObservation = AsObjectFactory.create(isBridgeDestinationObservation)
|
|
@@ -1,56 +1,64 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HexZod } from '@xylabs/hex'
|
|
2
|
+
import z from 'zod'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Represents a transfer destination
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
+
export const BridgeDetailsDestinationFieldsZod = z.object({
|
|
7
8
|
/**
|
|
8
9
|
* Destination network
|
|
9
10
|
*/
|
|
10
|
-
dest:
|
|
11
|
-
|
|
11
|
+
dest: HexZod.describe('The destination network identifier'),
|
|
12
12
|
/**
|
|
13
13
|
* Destination address (EOA or contract)
|
|
14
14
|
*/
|
|
15
|
-
destAddress:
|
|
16
|
-
|
|
15
|
+
destAddress: HexZod.describe('The destination address (EOA or contract)'),
|
|
17
16
|
/**
|
|
18
17
|
* Token amount to bridge to destination
|
|
19
18
|
*/
|
|
20
|
-
destAmount:
|
|
21
|
-
|
|
19
|
+
destAmount: HexZod.describe('The token amount to bridge to destination'),
|
|
22
20
|
/**
|
|
23
21
|
* Token being bridged to
|
|
24
22
|
*/
|
|
25
|
-
destToken:
|
|
26
|
-
}
|
|
23
|
+
destToken: HexZod.describe('The token being bridged to'),
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents a transfer destination
|
|
28
|
+
*/
|
|
29
|
+
export type BridgeDetailsDestinationFields = z.infer<typeof BridgeDetailsDestinationFieldsZod>
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* Represents a transfer source
|
|
30
33
|
*/
|
|
31
|
-
export
|
|
34
|
+
export const BridgeDetailsSourceFieldsZod = z.object({
|
|
32
35
|
/**
|
|
33
36
|
* Source network
|
|
34
37
|
*/
|
|
35
|
-
src:
|
|
38
|
+
src: HexZod.describe('The source network identifier'),
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* Source address (EOA or contract)
|
|
39
42
|
*/
|
|
40
|
-
srcAddress:
|
|
41
|
-
|
|
43
|
+
srcAddress: HexZod.describe('The source address (EOA or contract)'),
|
|
42
44
|
/**
|
|
43
|
-
* Token amount to bridge
|
|
45
|
+
* Token amount to bridge from source
|
|
44
46
|
*/
|
|
45
|
-
srcAmount:
|
|
46
|
-
|
|
47
|
+
srcAmount: HexZod.describe('The token amount to bridge from source'),
|
|
47
48
|
/**
|
|
48
49
|
* Token being bridged from
|
|
49
50
|
*/
|
|
50
|
-
srcToken:
|
|
51
|
-
}
|
|
51
|
+
srcToken: HexZod.describe('The token being bridged from'),
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
56
|
+
*/
|
|
57
|
+
export const BridgeDetailsFieldsZod = BridgeDetailsSourceFieldsZod.extend(
|
|
58
|
+
BridgeDetailsDestinationFieldsZod.shape,
|
|
59
|
+
)
|
|
52
60
|
|
|
53
61
|
/**
|
|
54
62
|
* Represents a transfer from a source chain/token/address/amount to a destination chain/token/address/amount.
|
|
55
63
|
*/
|
|
56
|
-
export
|
|
64
|
+
export type BridgeDetailsFields = z.infer<typeof BridgeDetailsFieldsZod>
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import type { Payload } from '@xyo-network/payload-model'
|
|
3
|
-
import {
|
|
3
|
+
import { isPayloadOfZodType } from '@xyo-network/payload-model'
|
|
4
|
+
import z from 'zod'
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
+
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
6
7
|
|
|
7
8
|
export const BridgeIntentSchema = 'network.xyo.chain.bridge.intent' as const
|
|
8
9
|
export type BridgeIntentSchema = typeof BridgeIntentSchema
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* Represents an
|
|
12
|
+
* Represents an Address's intent to initiate a token bridge.
|
|
12
13
|
*/
|
|
13
|
-
export
|
|
14
|
+
export const BridgeIntentFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
14
15
|
/**
|
|
15
16
|
* Unique identifier for replay protection
|
|
16
17
|
*/
|
|
17
|
-
nonce: string
|
|
18
|
-
}
|
|
18
|
+
nonce: z.string().describe('Unique identifier for replay protection'),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export type BridgeIntentFields = z.infer<typeof BridgeIntentFieldsZod>
|
|
19
22
|
|
|
20
23
|
export type BridgeIntent = Payload<BridgeIntentFields, BridgeIntentSchema>
|
|
21
24
|
|
|
22
|
-
export const isBridgeIntent =
|
|
25
|
+
export const isBridgeIntent = isPayloadOfZodType<BridgeIntent>(
|
|
26
|
+
BridgeIntentFieldsZod,
|
|
27
|
+
BridgeIntentSchema,
|
|
28
|
+
)
|
|
23
29
|
|
|
24
30
|
export const asBridgeIntent = AsObjectFactory.create(isBridgeIntent)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HexZod } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
3
|
import type { Payload } from '@xyo-network/payload-model'
|
|
4
|
-
import {
|
|
4
|
+
import { isPayloadOfZodType } from '@xyo-network/payload-model'
|
|
5
|
+
import type z from 'zod'
|
|
5
6
|
|
|
6
|
-
import
|
|
7
|
+
import { BridgeDetailsFieldsZod } from './BridgeDetails.ts'
|
|
7
8
|
|
|
8
9
|
export const BridgeSourceObservationSchema = 'network.xyo.chain.bridge.observation.source' as const
|
|
9
10
|
export type BridgeSourceObservationSchema = typeof BridgeSourceObservationSchema
|
|
@@ -11,18 +12,22 @@ export type BridgeSourceObservationSchema = typeof BridgeSourceObservationSchema
|
|
|
11
12
|
/**
|
|
12
13
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
13
14
|
*/
|
|
14
|
-
export
|
|
15
|
+
export const BridgeSourceObservationFieldsZod = BridgeDetailsFieldsZod.extend({
|
|
15
16
|
/**
|
|
16
17
|
* Source chain confirmation
|
|
17
18
|
*/
|
|
18
|
-
srcConfirmation
|
|
19
|
-
}
|
|
19
|
+
srcConfirmation: HexZod.optional().describe('Source chain confirmation'),
|
|
20
|
+
})
|
|
20
21
|
|
|
22
|
+
export type BridgeSourceObservationFields = z.infer<typeof BridgeSourceObservationFieldsZod>
|
|
21
23
|
/**
|
|
22
24
|
* Represents an observation that confirms a bridge action occurred on the source chain.
|
|
23
25
|
*/
|
|
24
26
|
export type BridgeSourceObservation = Payload<BridgeSourceObservationFields, BridgeSourceObservationSchema>
|
|
25
27
|
|
|
26
|
-
export const isBridgeSourceObservation =
|
|
28
|
+
export const isBridgeSourceObservation = isPayloadOfZodType<BridgeSourceObservation>(
|
|
29
|
+
BridgeSourceObservationFieldsZod,
|
|
30
|
+
BridgeSourceObservationSchema,
|
|
31
|
+
)
|
|
27
32
|
|
|
28
33
|
export const asBridgeSourceObservation = AsObjectFactory.create(isBridgeSourceObservation)
|