@layerzerolabs/dw-model 0.2.12 → 0.2.15
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/.turbo/turbo-build.log +78 -70
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +2 -2
- package/dist/AB7BJRWS.js +63 -0
- package/dist/AB7BJRWS.js.map +1 -0
- package/dist/{722WUAS6.cjs → EXN4H4R3.cjs} +25 -25
- package/dist/EXN4H4R3.cjs.map +1 -0
- package/dist/{PP5TDTMN.cjs → FI3AZVUW.cjs} +2 -2
- package/dist/FI3AZVUW.cjs.map +1 -0
- package/dist/{EQTOSW62.js → I5L5NLZY.js} +3 -3
- package/dist/{EQTOSW62.js.map → I5L5NLZY.js.map} +1 -1
- package/dist/{MLHJKQTG.cjs → MIREQZRR.cjs} +5 -5
- package/dist/MIREQZRR.cjs.map +1 -0
- package/dist/NLDQ72XO.js +3 -0
- package/dist/NLDQ72XO.js.map +1 -0
- package/dist/{JEBKWD5F.js → NYPXCJOJ.js} +4 -4
- package/dist/NYPXCJOJ.js.map +1 -0
- package/dist/QLEJL4UB.cjs +54 -0
- package/dist/QLEJL4UB.cjs.map +1 -0
- package/dist/{U463T6CN.js → RDYET6CZ.js} +3 -3
- package/dist/RDYET6CZ.js.map +1 -0
- package/dist/TY2SXEDC.cjs +4 -0
- package/dist/TY2SXEDC.cjs.map +1 -0
- package/dist/{YAFQX433.js → UE2N6Q3B.js} +3 -3
- package/dist/UE2N6Q3B.js.map +1 -0
- package/dist/VZP4VEYJ.cjs +73 -0
- package/dist/VZP4VEYJ.cjs.map +1 -0
- package/dist/{UU3GEL4Y.js → WR5OHKNE.js} +2 -2
- package/dist/WR5OHKNE.js.map +1 -0
- package/dist/{W3NEISER.cjs → WYAGX6NX.cjs} +3 -3
- package/dist/WYAGX6NX.cjs.map +1 -0
- package/dist/{RMW3UTVK.js → ZQQ6EIFU.js} +12 -44
- package/dist/ZQQ6EIFU.js.map +1 -0
- package/dist/ZTLVAMWX.cjs +112 -0
- package/dist/ZTLVAMWX.cjs.map +1 -0
- package/dist/deploy/artifact.cjs +45 -0
- package/dist/deploy/artifact.cjs.map +1 -0
- package/dist/deploy/artifact.d.ts +86 -0
- package/dist/deploy/artifact.d.ts.map +1 -0
- package/dist/deploy/artifact.js +4 -0
- package/dist/deploy/artifact.js.map +1 -0
- package/dist/deploy/index.cjs +71 -54
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/index.js +6 -5
- package/dist/deploy/resourceBuilder.cjs +2 -2
- package/dist/deploy/resourceBuilder.d.ts +1 -1
- package/dist/deploy/resourceBuilder.d.ts.map +1 -1
- package/dist/deploy/resourceBuilder.js +1 -1
- package/dist/deploy/resources.cjs +16 -16
- package/dist/deploy/resources.d.ts +2 -2
- package/dist/deploy/resources.d.ts.map +1 -1
- package/dist/deploy/resources.js +2 -2
- package/dist/deploy/workflow.cjs +17 -36
- package/dist/deploy/workflow.d.ts +58 -461
- package/dist/deploy/workflow.d.ts.map +1 -1
- package/dist/deploy/workflow.js +2 -1
- package/dist/index.cjs +100 -83
- package/dist/index.js +8 -7
- package/dist/role-management/index.cjs +19 -19
- package/dist/role-management/index.js +1 -1
- package/dist/role-management/schemata.cjs +6 -6
- package/dist/role-management/schemata.d.ts +1 -1
- package/dist/role-management/schemata.d.ts.map +1 -1
- package/dist/role-management/schemata.js +1 -1
- package/dist/upgrade/index.cjs +10 -10
- package/dist/upgrade/index.js +1 -1
- package/dist/upgrade/types.cjs +10 -10
- package/dist/upgrade/types.d.ts +2 -2
- package/dist/upgrade/types.d.ts.map +1 -1
- package/dist/upgrade/types.js +1 -1
- package/dist/wire/index.cjs +6 -6
- package/dist/wire/index.js +1 -1
- package/dist/wire/schemata.cjs +6 -6
- package/dist/wire/schemata.d.ts +3 -3
- package/dist/wire/schemata.d.ts.map +1 -1
- package/dist/wire/schemata.js +1 -1
- package/package.json +9 -9
- package/src/deploy/artifact.ts +93 -0
- package/src/deploy/index.ts +1 -0
- package/src/deploy/resourceBuilder.ts +1 -1
- package/src/deploy/resources.ts +1 -1
- package/src/deploy/workflow.ts +31 -57
- package/src/role-management/schemata.ts +1 -1
- package/src/upgrade/types.ts +1 -1
- package/src/wire/schemata.ts +1 -1
- package/dist/5KVLMWQW.cjs +0 -54
- package/dist/5KVLMWQW.cjs.map +0 -1
- package/dist/722WUAS6.cjs.map +0 -1
- package/dist/JEBKWD5F.js.map +0 -1
- package/dist/MLHJKQTG.cjs.map +0 -1
- package/dist/N5NQRAA2.js +0 -3
- package/dist/N5NQRAA2.js.map +0 -1
- package/dist/OKS5GGII.cjs +0 -149
- package/dist/OKS5GGII.cjs.map +0 -1
- package/dist/PP5TDTMN.cjs.map +0 -1
- package/dist/RMW3UTVK.js.map +0 -1
- package/dist/U463T6CN.js.map +0 -1
- package/dist/UU3GEL4Y.js.map +0 -1
- package/dist/W3NEISER.cjs.map +0 -1
- package/dist/YAFQX433.js.map +0 -1
- package/dist/ZQEYO4LO.cjs +0 -4
- package/dist/ZQEYO4LO.cjs.map +0 -1
package/dist/upgrade/types.cjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var WYAGX6NX_cjs = require('../WYAGX6NX.cjs');
|
|
4
4
|
require('../YJF4D23A.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "EvmProxyType", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return WYAGX6NX_cjs.EvmProxyType; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "ProxyType", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return WYAGX6NX_cjs.ProxyType; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "UpgradeType", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return WYAGX6NX_cjs.UpgradeType; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "codeUpgradeableConfigSchema", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return WYAGX6NX_cjs.codeUpgradeableConfigSchema; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "notUpgradeableConfigSchema", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return WYAGX6NX_cjs.notUpgradeableConfigSchema; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "proxyConfigSchema", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return WYAGX6NX_cjs.proxyConfigSchema; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "proxyTypeSchema", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return WYAGX6NX_cjs.proxyTypeSchema; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "upgradeTypeSchema", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return WYAGX6NX_cjs.upgradeTypeSchema; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "upgradeableConfigSchema", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return WYAGX6NX_cjs.upgradeableConfigSchema; }
|
|
43
43
|
});
|
|
44
44
|
//# sourceMappingURL=types.cjs.map
|
|
45
45
|
//# sourceMappingURL=types.cjs.map
|
package/dist/upgrade/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from 'zod
|
|
1
|
+
import z from 'zod';
|
|
2
2
|
export declare enum UpgradeType {
|
|
3
3
|
NOT_UPGRADEABLE = "NOT_UPGRADEABLE",
|
|
4
4
|
PROXY = "PROXY",
|
|
@@ -44,6 +44,6 @@ export declare const upgradeableConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
44
44
|
upgradeType: z.ZodLiteral<UpgradeType.NOT_UPGRADEABLE>;
|
|
45
45
|
}, z.core.$strip>, z.ZodObject<{
|
|
46
46
|
upgradeType: z.ZodLiteral<UpgradeType.CODE_UPGRADE>;
|
|
47
|
-
}, z.core.$strip>]>;
|
|
47
|
+
}, z.core.$strip>], "upgradeType">;
|
|
48
48
|
export type UpgradeableConfig = z.infer<typeof upgradeableConfigSchema>;
|
|
49
49
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upgrade/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upgrade/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,oBAAY,WAAW;IAEnB,eAAe,oBAAoB;IAEnC,KAAK,UAAU;IAEf,YAAY,iBAAiB;CAChC;AAED,oBAAY,YAAY;IAEpB,uBAAuB,4BAA4B;IAEnD,qBAAqB,0BAA0B;CAClD;AAED,eAAO,MAAM,SAAS;;;CAErB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,eAAO,MAAM,iBAAiB,+BAAsB,CAAC;AAErD,eAAO,MAAM,eAAe;;;EAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB;;;;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEvE,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,uBAAuB;;;;;;;;;;kCAIlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/upgrade/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EvmProxyType, ProxyType, UpgradeType, codeUpgradeableConfigSchema, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, upgradeTypeSchema, upgradeableConfigSchema } from '../
|
|
1
|
+
export { EvmProxyType, ProxyType, UpgradeType, codeUpgradeableConfigSchema, notUpgradeableConfigSchema, proxyConfigSchema, proxyTypeSchema, upgradeTypeSchema, upgradeableConfigSchema } from '../RDYET6CZ.js';
|
|
2
2
|
import '../VUOMXK5T.js';
|
|
3
3
|
//# sourceMappingURL=types.js.map
|
|
4
4
|
//# sourceMappingURL=types.js.map
|
package/dist/wire/index.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../X4ZNR5GZ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var QLEJL4UB_cjs = require('../QLEJL4UB.cjs');
|
|
5
5
|
require('../YJF4D23A.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "wireWorkflowChainResultSchema", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowChainResultSchema; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "wireWorkflowChainStateSchema", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowChainStateSchema; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "wireWorkflowFilterArgsSchema", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowFilterArgsSchema; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "wireWorkflowOrchestratorResultSchema", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowOrchestratorResultSchema; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "wireWorkflowOrchestratorStateSchema", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowOrchestratorStateSchema; }
|
|
28
28
|
});
|
|
29
29
|
//# sourceMappingURL=index.cjs.map
|
|
30
30
|
//# sourceMappingURL=index.cjs.map
|
package/dist/wire/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../N5VNZXZB.js';
|
|
2
|
-
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from '../
|
|
2
|
+
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from '../I5L5NLZY.js';
|
|
3
3
|
import '../VUOMXK5T.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/wire/schemata.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var QLEJL4UB_cjs = require('../QLEJL4UB.cjs');
|
|
4
4
|
require('../YJF4D23A.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "wireWorkflowChainResultSchema", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowChainResultSchema; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "wireWorkflowChainStateSchema", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowChainStateSchema; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "wireWorkflowFilterArgsSchema", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowFilterArgsSchema; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "wireWorkflowOrchestratorResultSchema", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowOrchestratorResultSchema; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "wireWorkflowOrchestratorStateSchema", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return QLEJL4UB_cjs.wireWorkflowOrchestratorStateSchema; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=schemata.cjs.map
|
|
29
29
|
//# sourceMappingURL=schemata.cjs.map
|
package/dist/wire/schemata.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { ChainName } from '@layerzerolabs/layerzero-definitions';
|
|
3
3
|
export declare const wireWorkflowFilterArgsSchema: {
|
|
4
4
|
onlyFrom: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof ChainName>>>;
|
|
@@ -35,7 +35,7 @@ export declare const wireWorkflowChainStateSchema: z.ZodObject<{
|
|
|
35
35
|
export type WireWorkflowChainState = z.infer<typeof wireWorkflowChainStateSchema>;
|
|
36
36
|
export type WireWorkflowChainResult = z.infer<typeof wireWorkflowChainResultSchema>;
|
|
37
37
|
export declare const wireWorkflowOrchestratorResultSchema: z.ZodObject<{
|
|
38
|
-
stateByChain: z.ZodDefault<z.ZodRecord<z.
|
|
38
|
+
stateByChain: z.ZodDefault<z.ZodRecord<z.ZodEnum<typeof ChainName> & z.core.$partial, z.ZodObject<{
|
|
39
39
|
results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
40
40
|
name: z.ZodString;
|
|
41
41
|
success: z.ZodLiteral<false>;
|
|
@@ -48,7 +48,7 @@ export declare const wireWorkflowOrchestratorResultSchema: z.ZodObject<{
|
|
|
48
48
|
}, z.core.$strip>>>;
|
|
49
49
|
}, z.core.$strip>;
|
|
50
50
|
export declare const wireWorkflowOrchestratorStateSchema: z.ZodObject<{
|
|
51
|
-
stateByChain: z.ZodDefault<z.ZodRecord<z.
|
|
51
|
+
stateByChain: z.ZodDefault<z.ZodRecord<z.ZodEnum<typeof ChainName> & z.core.$partial, z.ZodObject<{
|
|
52
52
|
results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
53
53
|
name: z.ZodString;
|
|
54
54
|
success: z.ZodLiteral<false>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemata.d.ts","sourceRoot":"","sources":["../../src/wire/schemata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"schemata.d.ts","sourceRoot":"","sources":["../../src/wire/schemata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,eAAO,MAAM,4BAA4B;;;;;;;CAsBxC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;iBAexC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;iBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;iBAE/C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;iBAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
package/dist/wire/schemata.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from '../
|
|
1
|
+
export { wireWorkflowChainResultSchema, wireWorkflowChainStateSchema, wireWorkflowFilterArgsSchema, wireWorkflowOrchestratorResultSchema, wireWorkflowOrchestratorStateSchema } from '../I5L5NLZY.js';
|
|
2
2
|
import '../VUOMXK5T.js';
|
|
3
3
|
//# sourceMappingURL=schemata.js.map
|
|
4
4
|
//# sourceMappingURL=schemata.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/dw-model",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
"module": "./dist/index.js",
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"zod": "3.
|
|
18
|
-
"@layerzerolabs/
|
|
19
|
-
"@layerzerolabs/
|
|
20
|
-
"@layerzerolabs/layerzero-definitions": "0.2.
|
|
21
|
-
"@layerzerolabs/typescript-utils": "0.2.
|
|
22
|
-
"@layerzerolabs/
|
|
17
|
+
"zod": "4.3.5",
|
|
18
|
+
"@layerzerolabs/common-chain-model": "0.2.15",
|
|
19
|
+
"@layerzerolabs/gated-transaction": "0.2.15",
|
|
20
|
+
"@layerzerolabs/layerzero-definitions": "0.2.15",
|
|
21
|
+
"@layerzerolabs/typescript-utils": "0.2.15",
|
|
22
|
+
"@layerzerolabs/zod-utils": "0.2.15"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@mysten/sui": "^1.35.0",
|
|
26
26
|
"tsup": "^8.4.0",
|
|
27
27
|
"vitest": "^3.2.3",
|
|
28
|
-
"@layerzerolabs/tsup-configuration": "0.2.
|
|
29
|
-
"@layerzerolabs/typescript-configuration": "0.2.
|
|
28
|
+
"@layerzerolabs/tsup-configuration": "0.2.15",
|
|
29
|
+
"@layerzerolabs/typescript-configuration": "0.2.15"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "restricted",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { SuiObjectChange } from '@mysten/sui/client';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { hexSchema, normalizedHexSchema } from '@layerzerolabs/common-chain-model';
|
|
5
|
+
import { ChainName } from '@layerzerolabs/layerzero-definitions';
|
|
6
|
+
export type { ChainName };
|
|
7
|
+
|
|
8
|
+
export type { SuiObjectChange };
|
|
9
|
+
|
|
10
|
+
export enum ArtifactType {
|
|
11
|
+
// should merge deployment, verification artifacts
|
|
12
|
+
|
|
13
|
+
// full record from deployment on-chain
|
|
14
|
+
DEPLOYMENT = 'deployment',
|
|
15
|
+
// information to verify contracts
|
|
16
|
+
VERIFICATION = 'verification',
|
|
17
|
+
// record of a successful push to lz metadata
|
|
18
|
+
METADATA = 'metadata',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Chain-specific extra deployment info schemas
|
|
22
|
+
export const solanaDeploymentArtifactExtraInfoSchema = z.object({
|
|
23
|
+
accounts: z.record(z.string(), normalizedHexSchema),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export type SolanaDeploymentArtifactExtraInfo = z.infer<
|
|
27
|
+
typeof solanaDeploymentArtifactExtraInfoSchema
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export const suiDeploymentArtifactExtraInfoSchema = z.object({
|
|
31
|
+
digest: z.string(),
|
|
32
|
+
objectChanges: z.array(z.custom<SuiObjectChange>()),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type SuiDeploymentArtifactExtraInfo = z.infer<typeof suiDeploymentArtifactExtraInfoSchema>;
|
|
36
|
+
|
|
37
|
+
export const identityOnlyDeploymentArtifactSchema = z.object({
|
|
38
|
+
contractName: z.string(),
|
|
39
|
+
chainName: z.enum(ChainName),
|
|
40
|
+
address: normalizedHexSchema,
|
|
41
|
+
});
|
|
42
|
+
export type IdentityOnlyDeploymentArtifact = z.infer<typeof identityOnlyDeploymentArtifactSchema>;
|
|
43
|
+
|
|
44
|
+
// FIXME also include verification info in this
|
|
45
|
+
export const fullDeploymentArtifactSchema = z.object({
|
|
46
|
+
...identityOnlyDeploymentArtifactSchema.shape,
|
|
47
|
+
contractName: z.string(),
|
|
48
|
+
chainName: z.enum(ChainName),
|
|
49
|
+
address: normalizedHexSchema,
|
|
50
|
+
nativeAddress: z.string(),
|
|
51
|
+
bytecodeHash: z.string().optional(),
|
|
52
|
+
deploymentTimestamp: z.number(),
|
|
53
|
+
deployerAddress: normalizedHexSchema,
|
|
54
|
+
txHash: z.string(),
|
|
55
|
+
// should probably remove this
|
|
56
|
+
abiEncodedConstructorArguments: hexSchema.optional(),
|
|
57
|
+
extraDeploymentInfo: z.any().optional(),
|
|
58
|
+
});
|
|
59
|
+
export type FullDeploymentArtifact = z.infer<typeof fullDeploymentArtifactSchema>;
|
|
60
|
+
|
|
61
|
+
export const deploymentArtifactSchema = z.union([
|
|
62
|
+
// check this first since it's a superset
|
|
63
|
+
fullDeploymentArtifactSchema,
|
|
64
|
+
identityOnlyDeploymentArtifactSchema,
|
|
65
|
+
]);
|
|
66
|
+
|
|
67
|
+
export type DeploymentArtifact = z.infer<typeof deploymentArtifactSchema>;
|
|
68
|
+
|
|
69
|
+
export const verificationArtifactSchema = z.any();
|
|
70
|
+
|
|
71
|
+
export type VerificationArtifact = z.infer<typeof verificationArtifactSchema>;
|
|
72
|
+
|
|
73
|
+
export const metadataArtifactSchema = z.void();
|
|
74
|
+
|
|
75
|
+
export type MetadataArtifact = z.infer<typeof metadataArtifactSchema>;
|
|
76
|
+
|
|
77
|
+
export const artifactWithTypeSchema = z.discriminatedUnion('artifactType', [
|
|
78
|
+
z.object({
|
|
79
|
+
artifactType: z.literal(ArtifactType.DEPLOYMENT),
|
|
80
|
+
artifact: deploymentArtifactSchema,
|
|
81
|
+
}),
|
|
82
|
+
z.object({
|
|
83
|
+
artifactType: z.literal(ArtifactType.VERIFICATION),
|
|
84
|
+
artifact: z.any(),
|
|
85
|
+
}),
|
|
86
|
+
z.object({
|
|
87
|
+
artifactType: z.literal(ArtifactType.METADATA),
|
|
88
|
+
// not implemented yet
|
|
89
|
+
artifact: z.never(),
|
|
90
|
+
}),
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
export type ArtifactWithType = z.infer<typeof artifactWithTypeSchema>;
|
package/src/deploy/index.ts
CHANGED
package/src/deploy/resources.ts
CHANGED
package/src/deploy/workflow.ts
CHANGED
|
@@ -1,55 +1,37 @@
|
|
|
1
1
|
import type { SuiObjectChange } from '@mysten/sui/client';
|
|
2
|
-
import { z } from 'zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
import { hexSchema, normalizedHexSchema } from '@layerzerolabs/common-chain-model';
|
|
5
|
-
// FIXME move this type into here
|
|
6
5
|
import { ChainName } from '@layerzerolabs/layerzero-definitions';
|
|
7
6
|
import { functionSchema } from '@layerzerolabs/zod-utils';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export const SolanaDeploymentSchema = createDeploymentInfoSchema(SolanaExtraSchema);
|
|
37
|
-
export const SuiDeploymentSchema = createDeploymentInfoSchema(SuiExtraSchema);
|
|
38
|
-
|
|
39
|
-
export type DeploymentInfo = z.infer<typeof DeploymentInfoSchema>;
|
|
40
|
-
export type SolanaDeploymentInfo = z.infer<typeof SolanaDeploymentSchema>;
|
|
41
|
-
export type SuiDeploymentInfo = z.infer<typeof SuiDeploymentSchema>;
|
|
42
|
-
export type BaseDeploymentInfo = z.infer<typeof BaseDeploymentSchema>;
|
|
43
|
-
|
|
44
|
-
export const DeploymentInfoSchema = z.union([
|
|
45
|
-
BaseDeploymentSchema,
|
|
46
|
-
SolanaDeploymentSchema,
|
|
47
|
-
SuiDeploymentSchema,
|
|
48
|
-
]);
|
|
49
|
-
|
|
50
|
-
export const VerificationInfoSchema = BaseDeploymentSchema.pick({
|
|
51
|
-
contractName: true,
|
|
52
|
-
address: true,
|
|
8
|
+
import type { DeploymentArtifact, SolanaDeploymentArtifactExtraInfo } from './artifact';
|
|
9
|
+
import {
|
|
10
|
+
deploymentArtifactSchema,
|
|
11
|
+
fullDeploymentArtifactSchema,
|
|
12
|
+
identityOnlyDeploymentArtifactSchema,
|
|
13
|
+
} from './artifact';
|
|
14
|
+
|
|
15
|
+
export type { SuiObjectChange };
|
|
16
|
+
|
|
17
|
+
// exported for backwards compatibility, should use the new schemas
|
|
18
|
+
/** @deprecated use deploymentArtifactSchema */
|
|
19
|
+
export const BaseDeploymentSchema = deploymentArtifactSchema;
|
|
20
|
+
|
|
21
|
+
/** @deprecated use DeploymentArtifact */
|
|
22
|
+
export type DeploymentInfo = DeploymentArtifact;
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
export type SolanaDeploymentInfo = Omit<DeploymentArtifact, 'extraDeploymentInfo'> & {
|
|
25
|
+
extraDeploymentInfo: SolanaDeploymentArtifactExtraInfo;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @deprecated use deploymentArtifactSchema */
|
|
29
|
+
export const DeploymentInfoSchema = BaseDeploymentSchema;
|
|
30
|
+
|
|
31
|
+
// FIXME clean this up to use the new artifact schema
|
|
32
|
+
export const VerificationInfoSchema = z.object({
|
|
33
|
+
contractName: z.enum(ChainName),
|
|
34
|
+
address: normalizedHexSchema,
|
|
53
35
|
abiEncodedConstructorArguments: true,
|
|
54
36
|
});
|
|
55
37
|
|
|
@@ -70,14 +52,6 @@ export const deployWorkflowChainResultItemSchema = z.union([
|
|
|
70
52
|
successfulDeployment,
|
|
71
53
|
]);
|
|
72
54
|
|
|
73
|
-
export const verificationArgumentsSchema = z.union([
|
|
74
|
-
failedDeployment,
|
|
75
|
-
z.object({
|
|
76
|
-
...successfulDeployment.shape,
|
|
77
|
-
deploymentInfo: VerificationInfoSchema,
|
|
78
|
-
}),
|
|
79
|
-
]);
|
|
80
|
-
|
|
81
55
|
export const deployWorkflowChainResultSchema = z.object({
|
|
82
56
|
results: z.array(deployWorkflowChainResultItemSchema).default([]),
|
|
83
57
|
});
|
|
@@ -109,7 +83,7 @@ export type GetDeploymentBaseArgs = z.infer<typeof getDeploymentBaseArgs>;
|
|
|
109
83
|
|
|
110
84
|
export const saveDeploymentBaseArgs = z.object({
|
|
111
85
|
contractName: z.string(),
|
|
112
|
-
deploymentInfo:
|
|
86
|
+
deploymentInfo: identityOnlyDeploymentArtifactSchema,
|
|
113
87
|
});
|
|
114
88
|
export type SaveDeploymentBaseArgs = z.infer<typeof saveDeploymentBaseArgs>;
|
|
115
89
|
|
|
@@ -128,7 +102,7 @@ export type VerificationDataFromDeploymentTransaction = z.infer<
|
|
|
128
102
|
|
|
129
103
|
export const createVerificationInfoBaseArgs = z.object({
|
|
130
104
|
deployedBytecode: hexSchema.optional(),
|
|
131
|
-
deploymentInfo:
|
|
105
|
+
deploymentInfo: fullDeploymentArtifactSchema,
|
|
132
106
|
nonVerifyable: z.boolean().optional(),
|
|
133
107
|
});
|
|
134
108
|
export type CreateVerificationInfoBaseArgs = z.infer<typeof createVerificationInfoBaseArgs>;
|
|
@@ -140,7 +114,7 @@ export type SaveVerificationInfoBaseArgs = z.infer<typeof saveVerificationInfoBa
|
|
|
140
114
|
export const BaseDeploymentSavingArtifactsSchema = z.object({
|
|
141
115
|
getDeployment: functionSchema({
|
|
142
116
|
input: z.tuple([getDeploymentBaseArgs]),
|
|
143
|
-
output: z.promise(
|
|
117
|
+
output: z.promise(deploymentArtifactSchema.optional()),
|
|
144
118
|
}),
|
|
145
119
|
saveDeployment: functionSchema({
|
|
146
120
|
input: z.tuple([saveDeploymentBaseArgs]),
|
package/src/upgrade/types.ts
CHANGED
package/src/wire/schemata.ts
CHANGED
package/dist/5KVLMWQW.cjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var v4 = require('zod/v4');
|
|
4
|
-
var layerzeroDefinitions = require('@layerzerolabs/layerzero-definitions');
|
|
5
|
-
|
|
6
|
-
// src/wire/schemata.ts
|
|
7
|
-
var wireWorkflowFilterArgsSchema = {
|
|
8
|
-
// chain filters
|
|
9
|
-
onlyFrom: v4.z.array(v4.z.enum(layerzeroDefinitions.ChainName)).optional().describe("Only wire pathways originating FROM these chains"),
|
|
10
|
-
onlyTo: v4.z.array(v4.z.enum(layerzeroDefinitions.ChainName)).optional().describe("Only wire pathways going TO these chains"),
|
|
11
|
-
excludeFrom: v4.z.array(v4.z.enum(layerzeroDefinitions.ChainName)).optional().describe("Exclude wiring pathways originating FROM these chains"),
|
|
12
|
-
excludeTo: v4.z.array(v4.z.enum(layerzeroDefinitions.ChainName)).optional().describe("Exclude wiring pathways going TO these chains"),
|
|
13
|
-
// operation filters
|
|
14
|
-
onlyOperations: v4.z.array(v4.z.string()).optional().describe("Only perform these operations"),
|
|
15
|
-
excludeOperations: v4.z.array(v4.z.string()).optional().describe("Exclude these operations")
|
|
16
|
-
};
|
|
17
|
-
var wireWorkflowChainResultSchema = v4.z.object({
|
|
18
|
-
results: v4.z.array(v4.z.union([
|
|
19
|
-
v4.z.object({
|
|
20
|
-
name: v4.z.string(),
|
|
21
|
-
success: v4.z.literal(false),
|
|
22
|
-
error: v4.z.string()
|
|
23
|
-
}),
|
|
24
|
-
v4.z.object({
|
|
25
|
-
name: v4.z.string(),
|
|
26
|
-
success: v4.z.literal(true),
|
|
27
|
-
txHash: v4.z.string()
|
|
28
|
-
})
|
|
29
|
-
]))
|
|
30
|
-
});
|
|
31
|
-
var wireWorkflowChainStateSchema = wireWorkflowChainResultSchema.extend({
|
|
32
|
-
srcChain: v4.z.enum(layerzeroDefinitions.ChainName).optional(),
|
|
33
|
-
status: v4.z.union([
|
|
34
|
-
v4.z.literal("RUNNING"),
|
|
35
|
-
v4.z.literal("COMPLETE")
|
|
36
|
-
]).default("RUNNING")
|
|
37
|
-
});
|
|
38
|
-
var wireWorkflowOrchestratorResultSchema = v4.z.object({
|
|
39
|
-
stateByChain: v4.z.partialRecord(v4.z.enum(layerzeroDefinitions.ChainName), wireWorkflowChainResultSchema).default({})
|
|
40
|
-
});
|
|
41
|
-
var wireWorkflowOrchestratorStateSchema = wireWorkflowOrchestratorResultSchema.extend({
|
|
42
|
-
status: v4.z.union([
|
|
43
|
-
v4.z.literal("RUNNING"),
|
|
44
|
-
v4.z.literal("COMPLETE")
|
|
45
|
-
]).default("RUNNING")
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
exports.wireWorkflowChainResultSchema = wireWorkflowChainResultSchema;
|
|
49
|
-
exports.wireWorkflowChainStateSchema = wireWorkflowChainStateSchema;
|
|
50
|
-
exports.wireWorkflowFilterArgsSchema = wireWorkflowFilterArgsSchema;
|
|
51
|
-
exports.wireWorkflowOrchestratorResultSchema = wireWorkflowOrchestratorResultSchema;
|
|
52
|
-
exports.wireWorkflowOrchestratorStateSchema = wireWorkflowOrchestratorStateSchema;
|
|
53
|
-
//# sourceMappingURL=5KVLMWQW.cjs.map
|
|
54
|
-
//# sourceMappingURL=5KVLMWQW.cjs.map
|
package/dist/5KVLMWQW.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/wire/schemata.ts"],"names":["wireWorkflowFilterArgsSchema","onlyFrom","z","array","enum","ChainName","optional","describe","onlyTo","excludeFrom","excludeTo","onlyOperations","string","excludeOperations","wireWorkflowChainResultSchema","object","results","union","name","success","literal","error","txHash","wireWorkflowChainStateSchema","extend","srcChain","status","default","wireWorkflowOrchestratorResultSchema","stateByChain","partialRecord","wireWorkflowOrchestratorStateSchema"],"mappings":";;;;;;AAIO,IAAMA,4BAAAA,GAA+B;;EAExCC,QAAAA,EAAUC,IAAAA,CACLC,KAAAA,CAAMD,IAAAA,CAAEE,IAAAA,CAAKC,8BAAAA,CAAAA,CAAAA,CACbC,QAAAA,EAAQ,CACRC,QAAAA,CAAS,kDAAA,CAAA;EACdC,MAAAA,EAAQN,IAAAA,CACHC,KAAAA,CAAMD,IAAAA,CAAEE,IAAAA,CAAKC,8BAAAA,CAAAA,CAAAA,CACbC,QAAAA,EAAQ,CACRC,QAAAA,CAAS,0CAAA,CAAA;EACdE,WAAAA,EAAaP,IAAAA,CACRC,KAAAA,CA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CoB,EAAAA,MAAAA,EAAQxB,KAAEe,KAAAA,CAAM;AAACf,IAAAA,IAAAA,CAAEkB,QAAQ,SAAA,CAAA;AAAYlB,IAAAA,IAAAA,CAAEkB,QAAQ,UAAA;AAAY,GAAA,CAAA,CAAEO,QAAQ,SAAA;AAC3E,CAAA;AAKO,IAAMC,oCAAAA,GAAuC1B,KAAEa,MAAAA,CAAO;EACzDc,YAAAA,EAAc3B,IAAAA,CAAE4B,aAAAA,CAAc5B,IAAAA,CAAEE,IAAAA,CAAKC,8BAAAA,GAAYS,6BAAAA,CAAAA,CAA+Ba,OAAAA,CAAQ,EAAC;AAC7F,CAAA;AAEO,IAAMI,mCAAAA,GAAsCH,qCAAqCJ,MAAAA,CAAO;AAC3FE,EAAAA,MAAAA,EAAQxB,KAAEe,KAAAA,CAAM;AAACf,IAAAA,IAAAA,CAAEkB,QAAQ,SAAA,CAAA;AAAYlB,IAAAA,IAAAA,CAAEkB,QAAQ,UAAA;AAAY,GAAA,CAAA,CAAEO,QAAQ,SAAA;AAC3E,CAAA","file":"5KVLMWQW.cjs","sourcesContent":["import { z } from 'zod/v4';\n\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\n\nexport const wireWorkflowFilterArgsSchema = {\n // chain filters\n onlyFrom: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Only wire pathways originating FROM these chains'),\n onlyTo: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Only wire pathways going TO these chains'),\n excludeFrom: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Exclude wiring pathways originating FROM these chains'),\n excludeTo: z\n .array(z.enum(ChainName))\n .optional()\n .describe('Exclude wiring pathways going TO these chains'),\n\n // operation filters\n onlyOperations: z.array(z.string()).optional().describe('Only perform these operations'),\n excludeOperations: z.array(z.string()).optional().describe('Exclude these operations'),\n};\n\nexport const wireWorkflowChainResultSchema = z.object({\n results: z.array(\n z.union([\n z.object({\n name: z.string(),\n success: z.literal(false),\n error: z.string(),\n }),\n z.object({\n name: z.string(),\n success: z.literal(true),\n txHash: z.string(),\n }),\n ]),\n ),\n});\n\nexport const wireWorkflowChainStateSchema = wireWorkflowChainResultSchema.extend({\n srcChain: z.enum(ChainName).optional(),\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type WireWorkflowChainState = z.infer<typeof wireWorkflowChainStateSchema>;\nexport type WireWorkflowChainResult = z.infer<typeof wireWorkflowChainResultSchema>;\n\nexport const wireWorkflowOrchestratorResultSchema = z.object({\n stateByChain: z.partialRecord(z.enum(ChainName), wireWorkflowChainResultSchema).default({}),\n});\n\nexport const wireWorkflowOrchestratorStateSchema = wireWorkflowOrchestratorResultSchema.extend({\n status: z.union([z.literal('RUNNING'), z.literal('COMPLETE')]).default('RUNNING'),\n});\n\nexport type WireWorkflowOrchestratorState = z.infer<typeof wireWorkflowOrchestratorStateSchema>;\nexport type WireWorkflowOrchestratorResult = z.infer<typeof wireWorkflowOrchestratorResultSchema>;\n"]}
|
package/dist/722WUAS6.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/role-management/schemata.ts"],"names":["generateCreateSetRoleTransactionsSchema","__name","roles","functionSchema","input","z","tuple","object","role","enum","accountAddress","normalizedHexSchema","shouldGrant","boolean","output","promise","gatedTransactionSchema","name","string","transactionSchema","array","generateHasRoleSchema","generateRoleManagementSchemas","createSetRoleTransactions","hasRole","createSetRoleTransactionsWithSpecializedInputSchema","address","hasRoleWithSpecializedInputSchema"],"mappings":";;;;;;;;AAMO,IAAMA,uCAAAA,mBAA0CC,mBAAA,CAAA,CAGnDC,KAAAA,KAEAC,uBAAAA,CAAe;AACXC,EAAAA,KAAAA,EAAOC,KAAEC,KAAAA,CAAM;AACXD,IAAAA,IAAAA,CAAEE,MAAAA,CAAO;MACLC,IAAAA,EAAMH,IAAAA,CAAEI,KAAKP,KAAAA,CAAAA;MACbQ,cAAAA,EAAgBC,oCAAAA;AAChBC,MAAAA,WA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A,EAAMZ,KAAEa,MAAAA,EAAM;AACdC,uBAAAA;GACJ,CAAA,CAAGC,OAAK;AAEhB,CAAA;AAEO,IAAMO,oCAAoCxB,uBAAAA,CAAe;AAC5DC,EAAAA,KAAAA,EAAOC,KAAEC,KAAAA,CAAM;AACXD,IAAAA,IAAAA,CAAEE,MAAAA,CAAO;MACLmB,OAAAA,EAASf;KACb,CAAA;AACAN,IAAAA,IAAAA,CAAEE,MAAAA,CAAO;AACLC,MAAAA,IAAAA,EAAMH,KAAEa,MAAAA,EAAM;MACdR,cAAAA,EAAgBC;KACpB;AACH,GAAA,CAAA;AACDG,EAAAA,MAAAA,EAAQT,IAAAA,CAAEU,OAAAA,CAAQV,IAAAA,CAAEQ,OAAAA,EAAO;AAC/B,CAAA","file":"722WUAS6.cjs","sourcesContent":["import { z } from 'zod/v4';\n\nimport { normalizedHexSchema, transactionSchema } from '@layerzerolabs/common-chain-model';\nimport { gatedTransactionSchema } from '@layerzerolabs/gated-transaction';\nimport { functionSchema } from '@layerzerolabs/zod-utils';\n\nexport const generateCreateSetRoleTransactionsSchema = <\n const T extends readonly [string, ...string[]],\n>(\n roles: T,\n) =>\n functionSchema({\n input: z.tuple([\n z.object({\n role: z.enum(roles),\n accountAddress: normalizedHexSchema,\n shouldGrant: z.boolean(),\n }),\n ]),\n output: z.promise(\n gatedTransactionSchema({\n name: z.string(),\n transactionSchema: transactionSchema,\n }).array(),\n ),\n });\n\nexport const generateHasRoleSchema = <const T extends readonly [string, ...string[]]>(roles: T) =>\n functionSchema({\n input: z.tuple([\n z.object({\n role: z.enum(roles),\n accountAddress: normalizedHexSchema,\n }),\n ]),\n output: z.promise(z.boolean()),\n });\n\nexport const generateRoleManagementSchemas = <const T extends readonly [string, ...string[]]>(\n roles: T,\n) => ({\n createSetRoleTransactions: generateCreateSetRoleTransactionsSchema(roles),\n hasRole: generateHasRoleSchema(roles),\n});\n\nexport const createSetRoleTransactionsWithSpecializedInputSchema = functionSchema({\n input: z.tuple([\n z.object({\n address: normalizedHexSchema,\n }),\n z.object({\n role: z.string(),\n accountAddress: normalizedHexSchema,\n shouldGrant: z.boolean(),\n }),\n ]),\n output: z.promise(\n gatedTransactionSchema({\n name: z.string(),\n transactionSchema: transactionSchema,\n }).array(),\n ),\n});\n\nexport const hasRoleWithSpecializedInputSchema = functionSchema({\n input: z.tuple([\n z.object({\n address: normalizedHexSchema,\n }),\n z.object({\n role: z.string(),\n accountAddress: normalizedHexSchema,\n }),\n ]),\n output: z.promise(z.boolean()),\n});\n\nexport type CreateSetRoleTransactionsWithSpecializedInput = z.infer<\n typeof createSetRoleTransactionsWithSpecializedInputSchema\n>;\nexport type HasRoleWithSpecializedInput = z.infer<typeof hasRoleWithSpecializedInputSchema>;\n"]}
|
package/dist/JEBKWD5F.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/deploy/resources.ts"],"names":["baseResourceSchema","z","object","id","string","name","optional","resourceBaseType","baseMeshResourceSchema","shape","literal","baseContractResourceSchema","chainName","enum","ChainName","upgradeConfig","upgradeableConfigSchema","verifyContract","boolean","chainConfig","any","isContractResourceDependency","o","__CONTRACT_RESOURCE_DEPENDENCY","contractResourceDependencySchema","custom","contractResourceDependencySchemaFor","_resource","resolvedContractResourceDependencySchema","isMeshResourceDependency","__MESH_RESOURCE_DEPENDENCY","meshResourceDependencySchema","meshResourceDependencySchemaFor","resolvedMeshResourceDependencySchema","extractContractResourceDependencyIds","resource","Object","entries","filter","extractMeshResourceDependencyIds","createResolvedResourceSchema"],"mappings":";;;;;AAQO,IAAMA,kBAAAA,GAAqBC,EAAEC,MAAAA,CAAO;AACvCC,EAAAA,EAAAA,EAAIF,EAAEG,MAAAA,EAAM;EACZC,IAAAA,EAAMJ,CAAAA,CAAEG,MAAAA,EAAM,CAAGE,QAAAA,EAAQ;AACzBC,EAAAA,gBAAAA,EAAkBN,EAAEG,MAAAA;AACxB,CAAA;AAEO,IAAMI,sBAAAA,GAAyBP,EAAEC,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AAAA,EAJF,iCAAA;AAgBxC,IAAMI,oCAAAA,GACThC,EAAEwB,MAAAA;AA6CC,IAAMS,uDAAuC,MAAA,CAAA,CAChDC,QAAAA,KAEAC,MAAAA,CAAOC,OAAAA,CAAQF,QAAAA,CAAAA,CAAUG,MAAAA,CAAO,CAAC,GAAGnC,EAAAA,CAAAA,KAAQkB,4BAAAA,CAA6BlB,EAAAA,CAAAA,CAAAA,EAHzB,sCAAA;AAQ7C,IAAMoC,mDAAmC,MAAA,CAAA,CAC5CJ,QAAAA,KAEAC,MAAAA,CAAOC,OAAAA,CAAQF,QAAAA,CAAAA,CAAUG,MAAAA,CAAO,CAAC,GAAGnC,EAAAA,CAAAA,KAAQ0B,wBAAAA,CAAyB1B,EAAAA,CAAAA,CAAAA,EAHzB,kCAAA;AASzC,IAAMqC,4BAAAA,mBAA+B,MAAA,CAAA,CACxCL,QAAAA,KACCA,QAAAA,EAFuC,8BAAA","file":"JEBKWD5F.js","sourcesContent":["import z from 'zod/v4';\n\nimport type { NormalizedHexString } from '@layerzerolabs/common-chain-model';\nimport { ChainName } from '@layerzerolabs/layerzero-definitions';\nimport type { IsAny } from '@layerzerolabs/typescript-utils';\n\nimport { upgradeableConfigSchema } from '../upgrade';\n\nexport const baseResourceSchema = z.object({\n id: z.string(), // account-unique ID for this resource\n name: z.string().optional(), // display name for this resource\n resourceBaseType: z.string() as z.ZodString | z.ZodLiteral,\n});\n\nexport const baseMeshResourceSchema = z.object({\n ...baseResourceSchema.shape,\n resourceBaseType: z.literal('MESH'),\n});\n\nexport const baseContractResourceSchema = z.object({\n ...baseResourceSchema.shape,\n resourceBaseType: z.literal('CONTRACT'),\n chainName: z.enum(ChainName),\n upgradeConfig: upgradeableConfigSchema.optional(),\n verifyContract: z.boolean().optional(),\n\n chainConfig: z.any().optional(),\n});\n\nexport type BaseResource = z.infer<typeof baseResourceSchema>;\nexport type BaseMeshResource = z.infer<typeof baseMeshResourceSchema>;\nexport type BaseContractResource = z.infer<typeof baseContractResourceSchema>;\n\nexport type ContractResourceDependency<T extends BaseContractResource = BaseContractResource> = {\n id: string;\n /** WARNING: this field is not present at runtime */\n __dependencyType: T;\n ['__CONTRACT_RESOURCE_DEPENDENCY']: true;\n};\n\nexport const isContractResourceDependency = (o: any): o is ContractResourceDependency =>\n o != null &&\n typeof o === 'object' &&\n (o as ContractResourceDependency).__CONTRACT_RESOURCE_DEPENDENCY;\n\nexport type ContractResourceDependencySchema<T extends typeof baseContractResourceSchema> =\n z.ZodType<ContractResourceDependency<z.infer<T>>>;\n\nexport const contractResourceDependencySchema: ContractResourceDependencySchema<\n typeof baseContractResourceSchema\n> = z.custom<ContractResourceDependency>(isContractResourceDependency);\n\nexport const contractResourceDependencySchemaFor = <T extends typeof baseContractResourceSchema>(\n // FIXME use this to generate a real schema\n _resource: T,\n): ContractResourceDependencySchema<T> =>\n z.custom<ContractResourceDependency<z.infer<T>>>(isContractResourceDependency);\n\nexport type ResolvedContractResourceDependency<T extends BaseContractResource> = {\n id: string;\n resource: T;\n address: NormalizedHexString;\n};\n\nexport type ResolvedContractResourceDependencySchema<T extends typeof baseContractResourceSchema> =\n z.ZodType<ResolvedContractResourceDependency<z.infer<T>>>;\n\nexport const resolvedContractResourceDependencySchema: ResolvedContractResourceDependencySchema<any> =\n // FIXME could be a real schema\n z.custom<ResolvedContractResourceDependency<any>>();\n\nexport type MeshResourceDependency<T extends BaseMeshResource = BaseMeshResource> = {\n id: string;\n /** WARNING: this field is not present at runtime */\n __dependencyType: T;\n ['__MESH_RESOURCE_DEPENDENCY']: true;\n};\n\nexport const isMeshResourceDependency = (o: any): o is MeshResourceDependency =>\n o != null && typeof o === 'object' && (o as MeshResourceDependency).__MESH_RESOURCE_DEPENDENCY;\n\nexport type MeshResourceDependencySchema<T extends typeof baseMeshResourceSchema> = z.ZodType<\n MeshResourceDependency<z.infer<T>>\n>;\n\nexport const meshResourceDependencySchema: MeshResourceDependencySchema<\n typeof baseMeshResourceSchema\n> = z.custom<MeshResourceDependency>(isMeshResourceDependency);\n\nexport const meshResourceDependencySchemaFor = <T extends typeof baseMeshResourceSchema>(\n // FIXME use this to generate a real schema\n _resource: T,\n): MeshResourceDependencySchema<T> =>\n z.custom<MeshResourceDependency<z.infer<T>>>(isMeshResourceDependency);\n\nexport type ResolvedMeshResourceDependency<T extends BaseMeshResource> = {\n id: string;\n resource: T;\n // TODO: is there any other resolved information we want to inject here?\n};\n\nexport type ResolvedMeshResourceDependencySchema<T extends typeof baseMeshResourceSchema> =\n // FIXME could be a real schema\n z.ZodType<ResolvedMeshResourceDependency<z.infer<T>>>;\n\nexport const resolvedMeshResourceDependencySchema: ResolvedMeshResourceDependencySchema<any> =\n z.custom<ResolvedMeshResourceDependency<any>>();\n\n// FIXME this could be recursive, probably overkill\nexport type ResolvedResourceSchema<Resource extends typeof baseResourceSchema> = z.ZodObject<\n {\n [K in keyof Resource['shape']]: Resource['shape'][K] extends infer R extends z.ZodType\n ? R extends z.ZodAny\n ? R\n : R extends z.ZodOptional<z.ZodAny>\n ? R\n : R extends ContractResourceDependencySchema<infer I>\n ? ResolvedContractResourceDependencySchema<I>\n : R extends z.ZodOptional<ContractResourceDependencySchema<infer I>>\n ? z.ZodOptional<ResolvedContractResourceDependencySchema<I>>\n : R extends MeshResourceDependencySchema<infer I>\n ? ResolvedMeshResourceDependencySchema<I>\n : R extends z.ZodOptional<MeshResourceDependencySchema<infer I>>\n ? z.ZodOptional<ResolvedMeshResourceDependencySchema<I>>\n : R\n : never;\n },\n z.core.$strip\n>;\n\n// FIXME this could be recursive, probably overkill\nexport type ResolvedResource<Resource extends BaseResource> = {\n [K in keyof Resource]: Resource[K] extends infer R\n ? R extends undefined\n ? R\n : IsAny<R> extends true\n ? R\n : IsAny<Exclude<R, undefined>> extends true\n ? R\n : R extends ContractResourceDependency<infer I>\n ? ResolvedContractResourceDependency<I>\n : R extends ContractResourceDependency<infer I> | undefined\n ? ResolvedContractResourceDependency<I> | undefined\n : R extends MeshResourceDependency<infer I>\n ? ResolvedMeshResourceDependency<I>\n : R extends MeshResourceDependency<infer I> | undefined\n ? ResolvedMeshResourceDependency<I> | undefined\n : R\n : never;\n};\n\nexport const extractContractResourceDependencyIds = <Resource extends BaseResource>(\n resource: Resource,\n) =>\n Object.entries(resource).filter(([, id]) => isContractResourceDependency(id)) as unknown as [\n prop: string,\n id: ContractResourceDependency,\n ][];\n\nexport const extractMeshResourceDependencyIds = <Resource extends BaseResource>(\n resource: Resource,\n) =>\n Object.entries(resource).filter(([, id]) => isMeshResourceDependency(id)) as unknown as [\n prop: string,\n id: MeshResourceDependency,\n ][];\n\n// FIXME implement runtime\nexport const createResolvedResourceSchema = <Resource extends typeof baseResourceSchema>(\n resource: Resource,\n) => resource as ResolvedResourceSchema<Resource>;\n"]}
|