@polygonlabs/staker-pool-allocations-schemas 0.1.0

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.
Files changed (114) hide show
  1. package/MIGRATION.md +5 -0
  2. package/dist/allocation-history.d.ts +30 -0
  3. package/dist/allocation-history.d.ts.map +1 -0
  4. package/dist/allocation-history.js +29 -0
  5. package/dist/allocation-history.js.map +1 -0
  6. package/dist/allocation.d.ts +31 -0
  7. package/dist/allocation.d.ts.map +1 -0
  8. package/dist/allocation.js +40 -0
  9. package/dist/allocation.js.map +1 -0
  10. package/dist/codegen.d.ts +6 -0
  11. package/dist/codegen.d.ts.map +1 -0
  12. package/dist/codegen.js +32 -0
  13. package/dist/codegen.js.map +1 -0
  14. package/dist/common.d.ts +19 -0
  15. package/dist/common.d.ts.map +1 -0
  16. package/dist/common.js +63 -0
  17. package/dist/common.js.map +1 -0
  18. package/dist/distribution.d.ts +60 -0
  19. package/dist/distribution.d.ts.map +1 -0
  20. package/dist/distribution.js +43 -0
  21. package/dist/distribution.js.map +1 -0
  22. package/dist/error.d.ts +10 -0
  23. package/dist/error.d.ts.map +1 -0
  24. package/dist/error.js +15 -0
  25. package/dist/error.js.map +1 -0
  26. package/dist/index.d.ts +13 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +17 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/management.d.ts +80 -0
  31. package/dist/management.d.ts.map +1 -0
  32. package/dist/management.js +126 -0
  33. package/dist/management.js.map +1 -0
  34. package/dist/proof.d.ts +10 -0
  35. package/dist/proof.d.ts.map +1 -0
  36. package/dist/proof.js +25 -0
  37. package/dist/proof.js.map +1 -0
  38. package/dist/registry-management.d.ts +525 -0
  39. package/dist/registry-management.d.ts.map +1 -0
  40. package/dist/registry-management.js +33 -0
  41. package/dist/registry-management.js.map +1 -0
  42. package/dist/registry-public.d.ts +1323 -0
  43. package/dist/registry-public.d.ts.map +1 -0
  44. package/dist/registry-public.js +31 -0
  45. package/dist/registry-public.js.map +1 -0
  46. package/dist/routes-management/distributions.d.ts +137 -0
  47. package/dist/routes-management/distributions.d.ts.map +1 -0
  48. package/dist/routes-management/distributions.js +72 -0
  49. package/dist/routes-management/distributions.js.map +1 -0
  50. package/dist/routes-management/excluded-addresses.d.ts +132 -0
  51. package/dist/routes-management/excluded-addresses.d.ts.map +1 -0
  52. package/dist/routes-management/excluded-addresses.js +84 -0
  53. package/dist/routes-management/excluded-addresses.js.map +1 -0
  54. package/dist/routes-management/operational.d.ts +48 -0
  55. package/dist/routes-management/operational.d.ts.map +1 -0
  56. package/dist/routes-management/operational.js +47 -0
  57. package/dist/routes-management/operational.js.map +1 -0
  58. package/dist/routes-public/addresses.d.ts +79 -0
  59. package/dist/routes-public/addresses.d.ts.map +1 -0
  60. package/dist/routes-public/addresses.js +45 -0
  61. package/dist/routes-public/addresses.js.map +1 -0
  62. package/dist/routes-public/allocations.d.ts +155 -0
  63. package/dist/routes-public/allocations.d.ts.map +1 -0
  64. package/dist/routes-public/allocations.js +81 -0
  65. package/dist/routes-public/allocations.js.map +1 -0
  66. package/dist/routes-public/distributions.d.ts +123 -0
  67. package/dist/routes-public/distributions.d.ts.map +1 -0
  68. package/dist/routes-public/distributions.js +55 -0
  69. package/dist/routes-public/distributions.js.map +1 -0
  70. package/dist/routes-public/operational.d.ts +46 -0
  71. package/dist/routes-public/operational.d.ts.map +1 -0
  72. package/dist/routes-public/operational.js +36 -0
  73. package/dist/routes-public/operational.js.map +1 -0
  74. package/dist/routes-public/proofs.d.ts +50 -0
  75. package/dist/routes-public/proofs.d.ts.map +1 -0
  76. package/dist/routes-public/proofs.js +34 -0
  77. package/dist/routes-public/proofs.js.map +1 -0
  78. package/dist/routes-public/wire.d.ts +60 -0
  79. package/dist/routes-public/wire.d.ts.map +1 -0
  80. package/dist/routes-public/wire.js +62 -0
  81. package/dist/routes-public/wire.js.map +1 -0
  82. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  83. package/dist/unclaimed-proofs.d.ts +20 -0
  84. package/dist/unclaimed-proofs.d.ts.map +1 -0
  85. package/dist/unclaimed-proofs.js +22 -0
  86. package/dist/unclaimed-proofs.js.map +1 -0
  87. package/dist/zod.d.ts +3 -0
  88. package/dist/zod.d.ts.map +1 -0
  89. package/dist/zod.js +8 -0
  90. package/dist/zod.js.map +1 -0
  91. package/openapi.json +1215 -0
  92. package/package.json +49 -0
  93. package/src/allocation-history.ts +35 -0
  94. package/src/allocation.ts +51 -0
  95. package/src/codegen.ts +50 -0
  96. package/src/common.ts +76 -0
  97. package/src/distribution.ts +52 -0
  98. package/src/error.ts +17 -0
  99. package/src/index.ts +16 -0
  100. package/src/management.ts +158 -0
  101. package/src/proof.ts +27 -0
  102. package/src/registry-management.ts +36 -0
  103. package/src/registry-public.ts +33 -0
  104. package/src/routes-management/distributions.ts +87 -0
  105. package/src/routes-management/excluded-addresses.ts +103 -0
  106. package/src/routes-management/operational.ts +60 -0
  107. package/src/routes-public/addresses.ts +58 -0
  108. package/src/routes-public/allocations.ts +104 -0
  109. package/src/routes-public/distributions.ts +69 -0
  110. package/src/routes-public/operational.ts +55 -0
  111. package/src/routes-public/proofs.ts +46 -0
  112. package/src/routes-public/wire.ts +74 -0
  113. package/src/unclaimed-proofs.ts +27 -0
  114. package/src/zod.ts +9 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-public.d.ts","sourceRoot":"","sources":["../src/registry-public.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAQ9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMP,CAAC"}
@@ -0,0 +1,31 @@
1
+ // Registry composition for the public REST API (`packages/rest-api`).
2
+ //
3
+ // `TypedRegistry` accumulates registered operations into its type via
4
+ // chained method returns — `registerPath` and `with(fn)` each return a
5
+ // `TypedRegistry` narrowed with what was just registered. The chain's
6
+ // final value is what `buildPublicRegistry` returns; the rest-api service
7
+ // derives its typed handler map from it via
8
+ // `HandlerMapFor<typeof buildPublicRegistry>` and the OpenAPI document is
9
+ // generated from the same registry's `definitions`, so the served spec
10
+ // and the mounted routes cannot drift.
11
+ //
12
+ // To add a route: append a `.registerPath({...})` call inside the relevant
13
+ // per-domain helper under `./routes-public/`, or add a new domain helper
14
+ // and `.with(addNewDomainRoutes)` here. Always chain or capture every
15
+ // registration — see `@polygonlabs/openapi-registry`'s "The one rule".
16
+ //
17
+ // The worker's management surface composes its own registry; this one
18
+ // carries only the read-only public endpoints.
19
+ import { TypedRegistry } from '@polygonlabs/openapi-registry';
20
+ import { addAddressRoutes } from "./routes-public/addresses.js";
21
+ import { addAllocationRoutes } from "./routes-public/allocations.js";
22
+ import { addDistributionRoutes } from "./routes-public/distributions.js";
23
+ import { addOperationalRoutes } from "./routes-public/operational.js";
24
+ import { addProofRoutes } from "./routes-public/proofs.js";
25
+ export const buildPublicRegistry = () => new TypedRegistry()
26
+ .with(addOperationalRoutes)
27
+ .with(addDistributionRoutes)
28
+ .with(addAllocationRoutes)
29
+ .with(addAddressRoutes)
30
+ .with(addProofRoutes);
31
+ //# sourceMappingURL=registry-public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-public.js","sourceRoot":"","sources":["../src/registry-public.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,uEAAuE;AACvE,sEAAsE;AACtE,0EAA0E;AAC1E,4CAA4C;AAC5C,0EAA0E;AAC1E,uEAAuE;AACvE,uCAAuC;AACvC,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,sEAAsE;AACtE,uEAAuE;AACvE,EAAE;AACF,sEAAsE;AACtE,+CAA+C;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CACtC,IAAI,aAAa,EAAE;KAChB,IAAI,CAAC,oBAAoB,CAAC;KAC1B,IAAI,CAAC,qBAAqB,CAAC;KAC3B,IAAI,CAAC,mBAAmB,CAAC;KACzB,IAAI,CAAC,gBAAgB,CAAC;KACtB,IAAI,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,137 @@
1
+ import type { RouteWithOpId, TypedRegistry } from '@polygonlabs/openapi-registry';
2
+ import { z } from '../zod.ts';
3
+ export declare const addManagementDistributionRoutes: <Ops extends Record<string, RouteWithOpId>, Schemes extends Record<string, true>>(r: TypedRegistry<Ops, Schemes>) => TypedRegistry<Ops & {
4
+ triggerDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
5
+ readonly operationId: "triggerDistribution";
6
+ readonly method: "post";
7
+ readonly path: "/v1/{network}/management/distributions";
8
+ readonly summary: "Trigger a new distribution run";
9
+ readonly description: string;
10
+ readonly security: [{
11
+ readonly ApiKeyAuth: [];
12
+ }];
13
+ readonly request: {
14
+ readonly params: z.ZodObject<{
15
+ network: z.ZodEnum<{
16
+ mainnet: "mainnet";
17
+ amoy: "amoy";
18
+ }>;
19
+ }, z.core.$strip>;
20
+ readonly body: {
21
+ readonly content: {
22
+ readonly 'application/json': {
23
+ readonly schema: z.ZodObject<{
24
+ startPoSBlock: z.ZodString;
25
+ endPoSBlock: z.ZodString;
26
+ distributionId: z.ZodOptional<z.ZodString>;
27
+ force: z.ZodOptional<z.ZodBoolean>;
28
+ polUsdPrice: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ };
31
+ };
32
+ };
33
+ };
34
+ readonly responses: {
35
+ readonly 202: {
36
+ readonly description: "Trigger accepted. Status reflects the row at the moment of acceptance.";
37
+ readonly content: {
38
+ readonly 'application/json': {
39
+ readonly schema: z.ZodObject<{
40
+ network: z.ZodEnum<{
41
+ mainnet: "mainnet";
42
+ amoy: "amoy";
43
+ }>;
44
+ distributionId: z.ZodString;
45
+ status: z.ZodEnum<{
46
+ pending: "pending";
47
+ running: "running";
48
+ completed: "completed";
49
+ failed: "failed";
50
+ }>;
51
+ }, z.core.$strip>;
52
+ };
53
+ };
54
+ };
55
+ readonly 409: {
56
+ readonly description: "`force: true` on a non-terminal distribution.";
57
+ readonly content: {
58
+ readonly 'application/json': {
59
+ readonly schema: z.ZodObject<{
60
+ error: z.ZodLiteral<true>;
61
+ message: z.ZodString;
62
+ info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
63
+ }, z.core.$strip>;
64
+ };
65
+ };
66
+ };
67
+ };
68
+ }>;
69
+ } & {
70
+ deleteDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
71
+ readonly operationId: "deleteDistribution";
72
+ readonly method: "delete";
73
+ readonly path: "/v1/{network}/management/distributions/{distributionId}";
74
+ readonly summary: "Remove a stale distribution";
75
+ readonly description: string;
76
+ readonly security: [{
77
+ readonly ApiKeyAuth: [];
78
+ }];
79
+ readonly request: {
80
+ readonly params: z.ZodObject<{
81
+ network: z.ZodEnum<{
82
+ mainnet: "mainnet";
83
+ amoy: "amoy";
84
+ }>;
85
+ distributionId: z.ZodString;
86
+ }, z.core.$strip>;
87
+ };
88
+ readonly responses: {
89
+ readonly 200: {
90
+ readonly description: "The distribution and its allocations were removed.";
91
+ readonly content: {
92
+ readonly 'application/json': {
93
+ readonly schema: z.ZodObject<{
94
+ network: z.ZodEnum<{
95
+ mainnet: "mainnet";
96
+ amoy: "amoy";
97
+ }>;
98
+ distributionId: z.ZodString;
99
+ removed: z.ZodBoolean;
100
+ priorStatus: z.ZodEnum<{
101
+ pending: "pending";
102
+ running: "running";
103
+ failed: "failed";
104
+ }>;
105
+ deletedAllocations: z.ZodNumber;
106
+ }, z.core.$strip>;
107
+ };
108
+ };
109
+ };
110
+ readonly 404: {
111
+ readonly description: "No distribution with that (network, id).";
112
+ readonly content: {
113
+ readonly 'application/json': {
114
+ readonly schema: z.ZodObject<{
115
+ error: z.ZodLiteral<true>;
116
+ message: z.ZodString;
117
+ info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
118
+ }, z.core.$strip>;
119
+ };
120
+ };
121
+ };
122
+ readonly 409: {
123
+ readonly description: "The distribution is `completed` and cannot be deleted.";
124
+ readonly content: {
125
+ readonly 'application/json': {
126
+ readonly schema: z.ZodObject<{
127
+ error: z.ZodLiteral<true>;
128
+ message: z.ZodString;
129
+ info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
130
+ }, z.core.$strip>;
131
+ };
132
+ };
133
+ };
134
+ };
135
+ }>;
136
+ }, Schemes>;
137
+ //# sourceMappingURL=distributions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distributions.d.ts","sourceRoot":"","sources":["../../src/routes-management/distributions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAUlF,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAQ9B,eAAO,MAAM,+BAA+B,GAC1C,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAEpC,GAAG,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgE1B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { ErrorResponseSchema } from '@polygonlabs/openapi-registry/error-schemas';
2
+ import { NetworkSchema, DistributionIdSchema } from "../common.js";
3
+ import { DistributionDeleteResponseSchema, DistributionTriggerRequestSchema, DistributionTriggerResponseSchema } from "../management.js";
4
+ import { z } from "../zod.js";
5
+ // Management distribution routes. Both carry `security: [{ ApiKeyAuth: [] }]`
6
+ // — the registry-driven router runs the ApiKeyAuth handler before request
7
+ // validation, so an unauthenticated request 401s without parsing the body.
8
+ // 400 (validation), 401 (auth), and 500 are auto-injected by TypedRegistry
9
+ // from the declared request/security shape; only the handler-emitted codes
10
+ // (404, 409) are declared explicitly here.
11
+ export const addManagementDistributionRoutes = (r) => r
12
+ .registerPath({
13
+ operationId: 'triggerDistribution',
14
+ method: 'post',
15
+ path: '/v1/{network}/management/distributions',
16
+ summary: 'Trigger a new distribution run',
17
+ description: 'Kicks off the in-process worker against the specified PoS block range. ' +
18
+ "Async — returns 202 with the row's current status and the worker runs " +
19
+ 'out-of-band on the same pod. Operators poll the public distributions ' +
20
+ 'endpoint (or the management :id view, Phase 1 follow-up) for terminal ' +
21
+ 'state.\n\n' +
22
+ 'Requires `x-api-key` header. Idempotent on `distributionId` when supplied. ' +
23
+ 'Set `force: true` to re-run a completed/failed distribution covering the ' +
24
+ 'same range — the prior row + allocations are hard-deleted before the ' +
25
+ 'worker enqueues a new run.',
26
+ security: [{ ApiKeyAuth: [] }],
27
+ request: {
28
+ params: z.object({ network: NetworkSchema }),
29
+ body: {
30
+ content: { 'application/json': { schema: DistributionTriggerRequestSchema } }
31
+ }
32
+ },
33
+ responses: {
34
+ 202: {
35
+ description: 'Trigger accepted. Status reflects the row at the moment of acceptance.',
36
+ content: { 'application/json': { schema: DistributionTriggerResponseSchema } }
37
+ },
38
+ 409: {
39
+ description: '`force: true` on a non-terminal distribution.',
40
+ content: { 'application/json': { schema: ErrorResponseSchema } }
41
+ }
42
+ }
43
+ })
44
+ .registerPath({
45
+ operationId: 'deleteDistribution',
46
+ method: 'delete',
47
+ path: '/v1/{network}/management/distributions/{distributionId}',
48
+ summary: 'Remove a stale distribution',
49
+ description: 'Requires `x-api-key`. Hard-deletes a `pending` / `running` / `failed` distribution ' +
50
+ 'and its allocations — recovery for an orphaned run (e.g. a worker OOM-killed mid-run ' +
51
+ 'leaves the row stuck at `running`). Refuses `completed` distributions (409): those are ' +
52
+ 'published merkle roots claimers depend on — replace one via a force re-run instead.',
53
+ security: [{ ApiKeyAuth: [] }],
54
+ request: {
55
+ params: z.object({ network: NetworkSchema, distributionId: DistributionIdSchema })
56
+ },
57
+ responses: {
58
+ 200: {
59
+ description: 'The distribution and its allocations were removed.',
60
+ content: { 'application/json': { schema: DistributionDeleteResponseSchema } }
61
+ },
62
+ 404: {
63
+ description: 'No distribution with that (network, id).',
64
+ content: { 'application/json': { schema: ErrorResponseSchema } }
65
+ },
66
+ 409: {
67
+ description: 'The distribution is `completed` and cannot be deleted.',
68
+ content: { 'application/json': { schema: ErrorResponseSchema } }
69
+ }
70
+ }
71
+ });
72
+ //# sourceMappingURL=distributions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distributions.js","sourceRoot":"","sources":["../../src/routes-management/distributions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EACL,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,kBAAkB,CAAC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,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAC9B,OAAO,EAAE;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC;KACnF;IACD,SAAS,EAAE;QACT,GAAG,EAAE;YACH,WAAW,EAAE,oDAAoD;YACjE,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,gCAAgC,EAAE,EAAE;SAC9E;QACD,GAAG,EAAE;YACH,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE;SACjE;QACD,GAAG,EAAE;YACH,WAAW,EAAE,wDAAwD;YACrE,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE;SACjE;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,132 @@
1
+ import type { RouteWithOpId, TypedRegistry } from '@polygonlabs/openapi-registry';
2
+ import { z } from '../zod.ts';
3
+ export declare const addExcludedAddressRoutes: <Ops extends Record<string, RouteWithOpId>, Schemes extends Record<string, true>>(r: TypedRegistry<Ops, Schemes>) => TypedRegistry<Ops & {
4
+ listExcludedAddresses: import("@polygonlabs/openapi-registry").MergedRoute<{
5
+ readonly operationId: "listExcludedAddresses";
6
+ readonly method: "get";
7
+ readonly path: "/v1/{network}/management/excluded-addresses";
8
+ readonly summary: "List addresses excluded from the merkle tree (settled off-chain)";
9
+ readonly description: "Requires `x-api-key`. Returns the curated excluded-address list for the network.";
10
+ readonly security: [{
11
+ readonly ApiKeyAuth: [];
12
+ }];
13
+ readonly request: {
14
+ readonly params: z.ZodObject<{
15
+ network: z.ZodEnum<{
16
+ mainnet: "mainnet";
17
+ amoy: "amoy";
18
+ }>;
19
+ }, z.core.$strip>;
20
+ };
21
+ readonly responses: {
22
+ readonly 200: {
23
+ readonly description: "The excluded-address list.";
24
+ readonly content: {
25
+ readonly 'application/json': {
26
+ readonly schema: z.ZodObject<{
27
+ items: z.ZodArray<z.ZodObject<{
28
+ network: z.ZodEnum<{
29
+ mainnet: "mainnet";
30
+ amoy: "amoy";
31
+ }>;
32
+ label: z.ZodString;
33
+ createdBy: z.ZodString;
34
+ createdAt: z.ZodISODateTime;
35
+ updatedAt: z.ZodISODateTime;
36
+ address: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ }>;
44
+ } & {
45
+ addExcludedAddress: import("@polygonlabs/openapi-registry").MergedRoute<{
46
+ readonly operationId: "addExcludedAddress";
47
+ readonly method: "post";
48
+ readonly path: "/v1/{network}/management/excluded-addresses";
49
+ readonly summary: "Add (or re-label) an excluded address";
50
+ readonly description: string;
51
+ readonly security: [{
52
+ readonly ApiKeyAuth: [];
53
+ }];
54
+ readonly request: {
55
+ readonly params: z.ZodObject<{
56
+ network: z.ZodEnum<{
57
+ mainnet: "mainnet";
58
+ amoy: "amoy";
59
+ }>;
60
+ }, z.core.$strip>;
61
+ readonly body: {
62
+ readonly content: {
63
+ readonly 'application/json': {
64
+ readonly schema: z.ZodObject<{
65
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
66
+ label: z.ZodString;
67
+ createdBy: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ };
70
+ };
71
+ };
72
+ };
73
+ readonly responses: {
74
+ readonly 200: {
75
+ readonly description: "The upserted excluded-address row.";
76
+ readonly content: {
77
+ readonly 'application/json': {
78
+ readonly schema: z.ZodObject<{
79
+ network: z.ZodEnum<{
80
+ mainnet: "mainnet";
81
+ amoy: "amoy";
82
+ }>;
83
+ label: z.ZodString;
84
+ createdBy: z.ZodString;
85
+ createdAt: z.ZodISODateTime;
86
+ updatedAt: z.ZodISODateTime;
87
+ address: z.ZodString;
88
+ }, z.core.$strip>;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ }>;
94
+ } & {
95
+ removeExcludedAddress: import("@polygonlabs/openapi-registry").MergedRoute<{
96
+ readonly operationId: "removeExcludedAddress";
97
+ readonly method: "delete";
98
+ readonly path: "/v1/{network}/management/excluded-addresses/{address}";
99
+ readonly summary: "Remove an excluded address";
100
+ readonly description: "Requires `x-api-key`. Idempotent — `removed: false` when the address was not present.";
101
+ readonly security: [{
102
+ readonly ApiKeyAuth: [];
103
+ }];
104
+ readonly request: {
105
+ readonly params: z.ZodObject<{
106
+ network: z.ZodEnum<{
107
+ mainnet: "mainnet";
108
+ amoy: "amoy";
109
+ }>;
110
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
111
+ }, z.core.$strip>;
112
+ };
113
+ readonly responses: {
114
+ readonly 200: {
115
+ readonly description: "Removal result.";
116
+ readonly content: {
117
+ readonly 'application/json': {
118
+ readonly schema: z.ZodObject<{
119
+ network: z.ZodEnum<{
120
+ mainnet: "mainnet";
121
+ amoy: "amoy";
122
+ }>;
123
+ removed: z.ZodBoolean;
124
+ address: z.ZodString;
125
+ }, z.core.$strip>;
126
+ };
127
+ };
128
+ };
129
+ };
130
+ }>;
131
+ }, Schemes>;
132
+ //# sourceMappingURL=excluded-addresses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"excluded-addresses.d.ts","sourceRoot":"","sources":["../../src/routes-management/excluded-addresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAQlF,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAoC9B,eAAO,MAAM,wBAAwB,GACnC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAEpC,GAAG,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAsD1B,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { AddressSchema, NetworkSchema } from "../common.js";
2
+ import { AddExcludedAddressRequestSchema, ManagedExcludedAddressSchema, RemoveExcludedAddressResponseSchema } from "../management.js";
3
+ import { z } from "../zod.js";
4
+ // Response-side variants of the excluded-address schemas.
5
+ //
6
+ // The registry-driven router re-encodes every response via `z.encode`
7
+ // against the declared schema, and `z.encode` rejects unidirectional
8
+ // `.transform()`s ("Encountered unidirectional transform during encode").
9
+ // `AddressSchema` lowercases via a one-way transform, so the shared
10
+ // response schemas that embed it can't sit in a response slot. These
11
+ // variants swap the address field for a plain lowercase-only validator —
12
+ // handlers always emit the normalised form, so the constraint tightens
13
+ // nothing on the wire. Same OpenAPI component names as the originals, so
14
+ // the served spec is unchanged. Request-side use of `AddressSchema`
15
+ // (body, path params) is unaffected: request validation decodes forward.
16
+ const AddressOutputSchema = z
17
+ .string()
18
+ .regex(/^0x[0-9a-f]{40}$/)
19
+ .openapi({ example: '0xabc0000000000000000000000000000000000001' });
20
+ const ManagedExcludedAddressOutputSchema = ManagedExcludedAddressSchema.extend({
21
+ address: AddressOutputSchema
22
+ }).openapi('ManagedExcludedAddress');
23
+ const ExcludedAddressListOutputSchema = z
24
+ .object({
25
+ items: z.array(ManagedExcludedAddressOutputSchema)
26
+ })
27
+ .openapi('ExcludedAddressListResponse');
28
+ const RemoveExcludedAddressOutputSchema = RemoveExcludedAddressResponseSchema.extend({
29
+ address: AddressOutputSchema
30
+ }).openapi('RemoveExcludedAddressResponse');
31
+ // Excluded-address CRUD. All three carry `security: [{ ApiKeyAuth: [] }]`;
32
+ // 400/401/500 are auto-injected by TypedRegistry from the declared
33
+ // request/security shape.
34
+ export const addExcludedAddressRoutes = (r) => r
35
+ .registerPath({
36
+ operationId: 'listExcludedAddresses',
37
+ method: 'get',
38
+ path: '/v1/{network}/management/excluded-addresses',
39
+ summary: 'List addresses excluded from the merkle tree (settled off-chain)',
40
+ description: 'Requires `x-api-key`. Returns the curated excluded-address list for the network.',
41
+ security: [{ ApiKeyAuth: [] }],
42
+ request: { params: z.object({ network: NetworkSchema }) },
43
+ responses: {
44
+ 200: {
45
+ description: 'The excluded-address list.',
46
+ content: { 'application/json': { schema: ExcludedAddressListOutputSchema } }
47
+ }
48
+ }
49
+ })
50
+ .registerPath({
51
+ operationId: 'addExcludedAddress',
52
+ method: 'post',
53
+ path: '/v1/{network}/management/excluded-addresses',
54
+ summary: 'Add (or re-label) an excluded address',
55
+ description: 'Requires `x-api-key`. Upserts on (network, address) — re-POSTing an existing ' +
56
+ 'address updates its label. Takes effect on the next distribution run.',
57
+ security: [{ ApiKeyAuth: [] }],
58
+ request: {
59
+ params: z.object({ network: NetworkSchema }),
60
+ body: { content: { 'application/json': { schema: AddExcludedAddressRequestSchema } } }
61
+ },
62
+ responses: {
63
+ 200: {
64
+ description: 'The upserted excluded-address row.',
65
+ content: { 'application/json': { schema: ManagedExcludedAddressOutputSchema } }
66
+ }
67
+ }
68
+ })
69
+ .registerPath({
70
+ operationId: 'removeExcludedAddress',
71
+ method: 'delete',
72
+ path: '/v1/{network}/management/excluded-addresses/{address}',
73
+ summary: 'Remove an excluded address',
74
+ description: 'Requires `x-api-key`. Idempotent — `removed: false` when the address was not present.',
75
+ security: [{ ApiKeyAuth: [] }],
76
+ request: { params: z.object({ network: NetworkSchema, address: AddressSchema }) },
77
+ responses: {
78
+ 200: {
79
+ description: 'Removal result.',
80
+ content: { 'application/json': { schema: RemoveExcludedAddressOutputSchema } }
81
+ }
82
+ }
83
+ });
84
+ //# sourceMappingURL=excluded-addresses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"excluded-addresses.js","sourceRoot":"","sources":["../../src/routes-management/excluded-addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,aAAa,EAA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iB;YAC9B,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,iCAAiC,EAAE,EAAE;SAC/E;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { RouteWithOpId, TypedRegistry } from '@polygonlabs/openapi-registry';
2
+ import { z } from '../zod.ts';
3
+ export declare const OperationalStatusResponseSchema: z.ZodObject<{
4
+ status: z.ZodLiteral<"ok">;
5
+ }, z.core.$strip>;
6
+ export type OperationalStatusResponse = z.infer<typeof OperationalStatusResponseSchema>;
7
+ export declare const addOperationalRoutes: <Ops extends Record<string, RouteWithOpId>, Schemes extends Record<string, true>>(r: TypedRegistry<Ops, Schemes>) => TypedRegistry<Ops & {
8
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
9
+ readonly operationId: "getHealthCheck";
10
+ readonly method: "get";
11
+ readonly path: "/health-check";
12
+ readonly summary: "Liveness probe";
13
+ readonly description: string;
14
+ readonly responses: {
15
+ readonly 200: {
16
+ readonly description: "Service is alive.";
17
+ readonly content: {
18
+ readonly 'application/json': {
19
+ readonly schema: z.ZodObject<{
20
+ status: z.ZodLiteral<"ok">;
21
+ }, z.core.$strip>;
22
+ };
23
+ };
24
+ };
25
+ };
26
+ }>;
27
+ } & {
28
+ getReadiness: import("@polygonlabs/openapi-registry").MergedRoute<{
29
+ readonly operationId: "getReadiness";
30
+ readonly method: "get";
31
+ readonly path: "/readiness";
32
+ readonly summary: "Readiness probe";
33
+ readonly description: string;
34
+ readonly responses: {
35
+ readonly 200: {
36
+ readonly description: "Service is ready.";
37
+ readonly content: {
38
+ readonly 'application/json': {
39
+ readonly schema: z.ZodObject<{
40
+ status: z.ZodLiteral<"ok">;
41
+ }, z.core.$strip>;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ }>;
47
+ }, Schemes>;
48
+ //# sourceMappingURL=operational.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operational.d.ts","sourceRoot":"","sources":["../../src/routes-management/operational.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAW9B,eAAO,MAAM,+BAA+B;;iBAEL,CAAC;AAExC,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAKxF,eAAO,MAAM,oBAAoB,GAC/B,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAEpC,GAAG,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAiC1B,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { z } from "../zod.js";
2
+ // /health-check is the K8s liveness probe — answers as long as the process
3
+ // can serve HTTP at all. Registered at root (no /v1 prefix) because dry-dock
4
+ // pod specs declare the probe path as `/health-check`, not `/v1/...`.
5
+ //
6
+ // /readiness is the degraded-mode signal — distinguishes "fully ready" from
7
+ // "partially degraded but still serving" once dependencies are wired (DB +
8
+ // subgraphs). Still a 200 stub; path matches the lst-api precedent.
9
+ //
10
+ // Neither carries `security` — pod probes are unauthenticated by design.
11
+ export const OperationalStatusResponseSchema = z
12
+ .object({ status: z.literal('ok') })
13
+ .openapi('OperationalStatusResponse');
14
+ // Generic over the parent's `Ops` and `Schemes` so the helper preserves
15
+ // everything the caller had already registered; the chained `registerPath`
16
+ // returns carry the cumulative narrow back through `.with(...)`.
17
+ export const addOperationalRoutes = (r) => r
18
+ .registerPath({
19
+ operationId: 'getHealthCheck',
20
+ method: 'get',
21
+ path: '/health-check',
22
+ summary: 'Liveness probe',
23
+ description: 'K8s liveness probe — answers as long as the process can serve HTTP. ' +
24
+ 'Unauthenticated; dry-dock pod specs hit this exact root path.',
25
+ responses: {
26
+ 200: {
27
+ description: 'Service is alive.',
28
+ content: { 'application/json': { schema: OperationalStatusResponseSchema } }
29
+ }
30
+ }
31
+ })
32
+ .registerPath({
33
+ operationId: 'getReadiness',
34
+ method: 'get',
35
+ path: '/readiness',
36
+ summary: 'Readiness probe',
37
+ description: 'Degraded-mode signal — distinguishes "fully ready" from "partially ' +
38
+ 'degraded but still serving". Currently a 200 stub; the real DB + ' +
39
+ 'subgraph reachability probe is outstanding work. Unauthenticated.',
40
+ responses: {
41
+ 200: {
42
+ description: 'Service is ready.',
43
+ content: { 'application/json': { schema: OperationalStatusResponseSchema } }
44
+ }
45
+ }
46
+ });
47
+ //# sourceMappingURL=operational.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operational.js","sourceRoot":"","sources":["../../src/routes-management/operational.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,2EAA2E;AAC3E,6EAA6E;AAC7E,sEAAsE;AACtE,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,oEAAoE;AACpE,EAAE;AACF,yEAAyE;AACzE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;KACnC,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAIxC,wEAAwE;AACxE,2EAA2E;AAC3E,iEAAiE;AACjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAIlC,CAA8B,EAC9B,EAAE,CACF,CAAC;KACE,YAAY,CAAC;IACZ,WAAW,EAAE,gBAAgB;IAC7B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,gBAAgB;IACzB,WAAW,EACT,sEAAsE;QACtE,+DAA+D;IACjE,SAAS,EAAE;QACT,GAAG,EAAE;YACH,WAAW,EAAE,mBAAmB;YAChC,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,+BAA+B,EAAE,EAAE;SAC7E;KACF;CACF,CAAC;KACD,YAAY,CAAC;IACZ,WAAW,EAAE,cAAc;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EACT,qEAAqE;QACrE,mEAAmE;QACnE,mEAAmE;IACrE,SAAS,EAAE;QACT,GAAG,EAAE;YACH,WAAW,EAAE,mBAAmB;YAChC,OAAO,EAAE,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,+BAA+B,EAAE,EAAE;SAC7E;KACF;CACF,CAAC,CAAC"}