@crediolabs/policy-synth 0.1.6 → 0.1.7

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.
@@ -36,6 +36,13 @@ export const ScValSchema = z.lazy(() => z.union([
36
36
  z.object({ type: z.literal('u32'), value: z.string().regex(/^[0-9]+$/) }),
37
37
  z.object({ type: z.literal('symbol'), value: z.string() }),
38
38
  z.object({ type: z.literal('vec'), value: z.array(ScValSchema) }),
39
+ // Map mirrors the core ScVal. Real Blend `submit` calls carry a vec of maps
40
+ // as the request argument, so omitting it here made the synthesizer reject a
41
+ // recording its own recorder had just produced at full confidence.
42
+ z.object({
43
+ type: z.literal('map'),
44
+ value: z.array(z.object({ key: z.string(), val: ScValSchema })),
45
+ }),
39
46
  z.object({ type: z.literal('bytes'), value: z.string() }),
40
47
  z.object({ type: z.literal('other'), value: z.string() }),
41
48
  ]));
@@ -39,6 +39,13 @@ exports.ScValSchema = zod_1.z.lazy(() => zod_1.z.union([
39
39
  zod_1.z.object({ type: zod_1.z.literal('u32'), value: zod_1.z.string().regex(/^[0-9]+$/) }),
40
40
  zod_1.z.object({ type: zod_1.z.literal('symbol'), value: zod_1.z.string() }),
41
41
  zod_1.z.object({ type: zod_1.z.literal('vec'), value: zod_1.z.array(exports.ScValSchema) }),
42
+ // Map mirrors the core ScVal. Real Blend `submit` calls carry a vec of maps
43
+ // as the request argument, so omitting it here made the synthesizer reject a
44
+ // recording its own recorder had just produced at full confidence.
45
+ zod_1.z.object({
46
+ type: zod_1.z.literal('map'),
47
+ value: zod_1.z.array(zod_1.z.object({ key: zod_1.z.string(), val: exports.ScValSchema })),
48
+ }),
42
49
  zod_1.z.object({ type: zod_1.z.literal('bytes'), value: zod_1.z.string() }),
43
50
  zod_1.z.object({ type: zod_1.z.literal('other'), value: zod_1.z.string() }),
44
51
  ]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crediolabs/policy-synth",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "license": "MIT",
5
5
  "description": "Off-chain TypeScript synthesis core for the OZ Accounts Policy Builder. Records Soroban transactions, synthesises the minimal policy that permits exactly that flow, verifies it, and returns an unsigned install transaction.",
6
6
  "type": "module",
@@ -42,6 +42,13 @@ export const ScValSchema: z.ZodType<unknown> = z.lazy(() =>
42
42
  z.object({ type: z.literal('u32'), value: z.string().regex(/^[0-9]+$/) }),
43
43
  z.object({ type: z.literal('symbol'), value: z.string() }),
44
44
  z.object({ type: z.literal('vec'), value: z.array(ScValSchema) }),
45
+ // Map mirrors the core ScVal. Real Blend `submit` calls carry a vec of maps
46
+ // as the request argument, so omitting it here made the synthesizer reject a
47
+ // recording its own recorder had just produced at full confidence.
48
+ z.object({
49
+ type: z.literal('map'),
50
+ value: z.array(z.object({ key: z.string(), val: ScValSchema })),
51
+ }),
45
52
  z.object({ type: z.literal('bytes'), value: z.string() }),
46
53
  z.object({ type: z.literal('other'), value: z.string() }),
47
54
  ])