@poa-box/core 0.1.0 → 1.0.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 (95) hide show
  1. package/README.md +2 -0
  2. package/dist/abis/AuthorityRouter.d.ts +448 -0
  3. package/dist/abis/AuthorityRouter.js +584 -0
  4. package/dist/abis/CutoverVerifier.d.ts +194 -0
  5. package/dist/abis/CutoverVerifier.js +259 -0
  6. package/dist/abis/DirectDemocracyVotingNew.d.ts +168 -30
  7. package/dist/abis/DirectDemocracyVotingNew.js +214 -35
  8. package/dist/abis/EducationHubNew.d.ts +32 -75
  9. package/dist/abis/EducationHubNew.js +38 -94
  10. package/dist/abis/Executor.d.ts +56 -86
  11. package/dist/abis/Executor.js +68 -104
  12. package/dist/abis/HybridVotingNew.d.ts +279 -35
  13. package/dist/abis/HybridVotingNew.js +357 -40
  14. package/dist/abis/{EligibilityModuleNew.d.ts → MembershipAuthority.d.ts} +1437 -718
  15. package/dist/abis/{EligibilityModuleNew.js → MembershipAuthority.js} +1821 -899
  16. package/dist/abis/OrgDeployerNew.d.ts +193 -127
  17. package/dist/abis/OrgDeployerNew.js +244 -160
  18. package/dist/abis/OrgRegistry.d.ts +40 -0
  19. package/dist/abis/OrgRegistry.js +51 -0
  20. package/dist/abis/ParticipationToken.d.ts +32 -75
  21. package/dist/abis/ParticipationToken.js +38 -94
  22. package/dist/abis/PasskeyAccount.d.ts +28 -0
  23. package/dist/abis/PasskeyAccount.js +35 -0
  24. package/dist/abis/PaymasterHub.d.ts +527 -47
  25. package/dist/abis/PaymasterHub.js +750 -135
  26. package/dist/abis/QuickJoinNew.d.ts +59 -170
  27. package/dist/abis/QuickJoinNew.js +71 -215
  28. package/dist/abis/TaskManagerNew.d.ts +27 -44
  29. package/dist/abis/TaskManagerNew.js +31 -52
  30. package/dist/abis/UniversalAccountRegistry.d.ts +24 -0
  31. package/dist/abis/UniversalAccountRegistry.js +30 -0
  32. package/dist/abis/ZkEmailInvites.d.ts +44 -0
  33. package/dist/abis/ZkEmailInvites.js +55 -0
  34. package/dist/abis/index.d.ts +6 -4
  35. package/dist/abis/index.js +10 -7
  36. package/dist/chains.js +3 -3
  37. package/dist/error-catalog.js +125 -7
  38. package/dist/graph/documents/activity.d.ts +3 -1
  39. package/dist/graph/documents/activity.js +19 -14
  40. package/dist/graph/documents/org.d.ts +4 -4
  41. package/dist/graph/documents/org.js +10 -4
  42. package/dist/graph/documents/task.d.ts +10 -1
  43. package/dist/graph/documents/task.js +157 -3
  44. package/dist/graph/documents/user.d.ts +5 -30
  45. package/dist/graph/documents/user.js +2 -42
  46. package/dist/graph/documents/voting-classes.d.ts +23 -2
  47. package/dist/graph/documents/voting-classes.js +119 -10
  48. package/dist/metadata/index.d.ts +0 -1
  49. package/dist/metadata/index.js +1 -2
  50. package/dist/perms.d.ts +0 -15
  51. package/dist/perms.js +1 -21
  52. package/dist/preflight.d.ts +2 -2
  53. package/dist/preflight.js +14 -22
  54. package/dist/reads/authority.d.ts +33 -0
  55. package/dist/reads/authority.js +196 -0
  56. package/dist/reads/index.d.ts +1 -1
  57. package/dist/reads/index.js +2 -2
  58. package/dist/reads/org.d.ts +20 -20
  59. package/dist/reads/org.js +94 -28
  60. package/dist/reads/project.js +3 -3
  61. package/dist/reads/resolve.d.ts +1 -1
  62. package/dist/reads/resolve.js +12 -3
  63. package/dist/reads/task.d.ts +44 -22
  64. package/dist/reads/task.js +126 -67
  65. package/dist/reads/user.d.ts +8 -43
  66. package/dist/reads/user.js +27 -44
  67. package/dist/reads/vote.d.ts +26 -2
  68. package/dist/reads/vote.js +104 -23
  69. package/dist/tx/authority.d.ts +33 -0
  70. package/dist/tx/authority.js +62 -0
  71. package/dist/tx/governance.d.ts +6 -0
  72. package/dist/tx/governance.js +20 -2
  73. package/dist/tx/index.d.ts +1 -1
  74. package/dist/tx/index.js +2 -2
  75. package/dist/tx/org.d.ts +23 -18
  76. package/dist/tx/org.js +203 -67
  77. package/dist/tx/project.d.ts +3 -2
  78. package/dist/tx/project.js +28 -10
  79. package/dist/tx/task.d.ts +13 -24
  80. package/dist/tx/task.js +45 -85
  81. package/dist/tx/user.d.ts +2 -40
  82. package/dist/tx/user.js +2 -76
  83. package/dist/tx/vote.d.ts +5 -0
  84. package/dist/tx/vote.js +54 -43
  85. package/dist/version.d.ts +0 -5
  86. package/dist/version.js +1 -13
  87. package/package.json +1 -1
  88. package/dist/abis/ToggleModule.d.ts +0 -193
  89. package/dist/abis/ToggleModule.js +0 -255
  90. package/dist/metadata/role.d.ts +0 -38
  91. package/dist/metadata/role.js +0 -35
  92. package/dist/reads/eligibility.d.ts +0 -377
  93. package/dist/reads/eligibility.js +0 -687
  94. package/dist/tx/eligibility.d.ts +0 -511
  95. package/dist/tx/eligibility.js +0 -818
@@ -1,255 +0,0 @@
1
- "use strict";
2
- // GENERATED by packages/core/scripts/gen-abis.mjs — do not edit.
3
- // Source of truth: src/abi/*.json at the repo root (see scripts/extract-abis.mjs).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.ToggleModuleAbi = void 0;
6
- exports.ToggleModuleAbi = [
7
- {
8
- "type": "constructor",
9
- "inputs": [],
10
- "stateMutability": "nonpayable"
11
- },
12
- {
13
- "type": "function",
14
- "name": "admin",
15
- "inputs": [],
16
- "outputs": [
17
- {
18
- "name": "",
19
- "type": "address",
20
- "internalType": "address"
21
- }
22
- ],
23
- "stateMutability": "view"
24
- },
25
- {
26
- "type": "function",
27
- "name": "batchSetHatStatus",
28
- "inputs": [
29
- {
30
- "name": "hatIds",
31
- "type": "uint256[]",
32
- "internalType": "uint256[]"
33
- },
34
- {
35
- "name": "actives",
36
- "type": "bool[]",
37
- "internalType": "bool[]"
38
- }
39
- ],
40
- "outputs": [],
41
- "stateMutability": "nonpayable"
42
- },
43
- {
44
- "type": "function",
45
- "name": "eligibilityModule",
46
- "inputs": [],
47
- "outputs": [
48
- {
49
- "name": "",
50
- "type": "address",
51
- "internalType": "address"
52
- }
53
- ],
54
- "stateMutability": "view"
55
- },
56
- {
57
- "type": "function",
58
- "name": "getHatStatus",
59
- "inputs": [
60
- {
61
- "name": "hatId",
62
- "type": "uint256",
63
- "internalType": "uint256"
64
- }
65
- ],
66
- "outputs": [
67
- {
68
- "name": "status",
69
- "type": "uint256",
70
- "internalType": "uint256"
71
- }
72
- ],
73
- "stateMutability": "view"
74
- },
75
- {
76
- "type": "function",
77
- "name": "hatActive",
78
- "inputs": [
79
- {
80
- "name": "hatId",
81
- "type": "uint256",
82
- "internalType": "uint256"
83
- }
84
- ],
85
- "outputs": [
86
- {
87
- "name": "",
88
- "type": "bool",
89
- "internalType": "bool"
90
- }
91
- ],
92
- "stateMutability": "view"
93
- },
94
- {
95
- "type": "function",
96
- "name": "initialize",
97
- "inputs": [
98
- {
99
- "name": "_admin",
100
- "type": "address",
101
- "internalType": "address"
102
- }
103
- ],
104
- "outputs": [],
105
- "stateMutability": "nonpayable"
106
- },
107
- {
108
- "type": "function",
109
- "name": "setEligibilityModule",
110
- "inputs": [
111
- {
112
- "name": "_eligibilityModule",
113
- "type": "address",
114
- "internalType": "address"
115
- }
116
- ],
117
- "outputs": [],
118
- "stateMutability": "nonpayable"
119
- },
120
- {
121
- "type": "function",
122
- "name": "setHatStatus",
123
- "inputs": [
124
- {
125
- "name": "hatId",
126
- "type": "uint256",
127
- "internalType": "uint256"
128
- },
129
- {
130
- "name": "_active",
131
- "type": "bool",
132
- "internalType": "bool"
133
- }
134
- ],
135
- "outputs": [],
136
- "stateMutability": "nonpayable"
137
- },
138
- {
139
- "type": "function",
140
- "name": "transferAdmin",
141
- "inputs": [
142
- {
143
- "name": "newAdmin",
144
- "type": "address",
145
- "internalType": "address"
146
- }
147
- ],
148
- "outputs": [],
149
- "stateMutability": "nonpayable"
150
- },
151
- {
152
- "type": "event",
153
- "name": "AdminTransferred",
154
- "inputs": [
155
- {
156
- "name": "oldAdmin",
157
- "type": "address",
158
- "indexed": true,
159
- "internalType": "address"
160
- },
161
- {
162
- "name": "newAdmin",
163
- "type": "address",
164
- "indexed": true,
165
- "internalType": "address"
166
- }
167
- ],
168
- "anonymous": false
169
- },
170
- {
171
- "type": "event",
172
- "name": "EligibilityModuleSet",
173
- "inputs": [
174
- {
175
- "name": "oldModule",
176
- "type": "address",
177
- "indexed": true,
178
- "internalType": "address"
179
- },
180
- {
181
- "name": "newModule",
182
- "type": "address",
183
- "indexed": true,
184
- "internalType": "address"
185
- }
186
- ],
187
- "anonymous": false
188
- },
189
- {
190
- "type": "event",
191
- "name": "HatToggled",
192
- "inputs": [
193
- {
194
- "name": "hatId",
195
- "type": "uint256",
196
- "indexed": true,
197
- "internalType": "uint256"
198
- },
199
- {
200
- "name": "newStatus",
201
- "type": "bool",
202
- "indexed": false,
203
- "internalType": "bool"
204
- }
205
- ],
206
- "anonymous": false
207
- },
208
- {
209
- "type": "event",
210
- "name": "Initialized",
211
- "inputs": [
212
- {
213
- "name": "version",
214
- "type": "uint64",
215
- "indexed": false,
216
- "internalType": "uint64"
217
- }
218
- ],
219
- "anonymous": false
220
- },
221
- {
222
- "type": "event",
223
- "name": "ToggleModuleInitialized",
224
- "inputs": [
225
- {
226
- "name": "admin",
227
- "type": "address",
228
- "indexed": true,
229
- "internalType": "address"
230
- }
231
- ],
232
- "anonymous": false
233
- },
234
- {
235
- "type": "error",
236
- "name": "InvalidInitialization",
237
- "inputs": []
238
- },
239
- {
240
- "type": "error",
241
- "name": "NotInitializing",
242
- "inputs": []
243
- },
244
- {
245
- "type": "error",
246
- "name": "NotToggleAdmin",
247
- "inputs": []
248
- },
249
- {
250
- "type": "error",
251
- "name": "ZeroAddress",
252
- "inputs": []
253
- }
254
- ];
255
- exports.default = exports.ToggleModuleAbi;
@@ -1,38 +0,0 @@
1
- /**
2
- * Role application metadata — the canonical document `pop role apply` pins to
3
- * IPFS before calling EligibilityModuleNew.applyForRole(hatId, applicationHash).
4
- *
5
- * KEY ORDER IS A PROTOCOL CONTRACT. The subgraph and frontend read this
6
- * document by shape, and the CLI has always pinned exactly
7
- * `{ notes, experience, appliedAt }` in that order
8
- * (src/commands/role/apply.ts — "key order preserved for frontend/subgraph
9
- * parity"). Do not reorder, rename, or interleave keys.
10
- */
11
- /** The pinned document shape. Key order matches the CLI byte-for-byte. */
12
- export interface RoleApplicationMetadata {
13
- /** Application notes; empty string when the applicant provided none. */
14
- notes: string;
15
- /** Relevant experience; empty string when the applicant provided none. */
16
- experience: string;
17
- /** Unix MILLISECONDS (Date.now() in the CLI), not seconds. */
18
- appliedAt: number;
19
- }
20
- export interface RoleApplicationMetadataInput {
21
- notes?: string;
22
- experience?: string;
23
- /** Override the timestamp (unix ms). Default: Date.now(), as the CLI does. */
24
- appliedAt?: number;
25
- }
26
- /**
27
- * Port of `pop role apply`'s metadata construction —
28
- * src/commands/role/apply.ts (`applicationData`).
29
- *
30
- * Key order is load-bearing (see module header): the object literal below is
31
- * the canonical order and must not change.
32
- */
33
- export declare function buildRoleApplicationMetadata(input?: RoleApplicationMetadataInput): RoleApplicationMetadata;
34
- /**
35
- * The exact serialization the CLI pins: bare JSON.stringify with no spacing.
36
- * `applicationHash` on chain is ipfsCidToBytes32(pinJson(this)).
37
- */
38
- export declare function serializeRoleApplicationMetadata(metadata: RoleApplicationMetadata): string;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- /**
3
- * Role application metadata — the canonical document `pop role apply` pins to
4
- * IPFS before calling EligibilityModuleNew.applyForRole(hatId, applicationHash).
5
- *
6
- * KEY ORDER IS A PROTOCOL CONTRACT. The subgraph and frontend read this
7
- * document by shape, and the CLI has always pinned exactly
8
- * `{ notes, experience, appliedAt }` in that order
9
- * (src/commands/role/apply.ts — "key order preserved for frontend/subgraph
10
- * parity"). Do not reorder, rename, or interleave keys.
11
- */
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.buildRoleApplicationMetadata = buildRoleApplicationMetadata;
14
- exports.serializeRoleApplicationMetadata = serializeRoleApplicationMetadata;
15
- /**
16
- * Port of `pop role apply`'s metadata construction —
17
- * src/commands/role/apply.ts (`applicationData`).
18
- *
19
- * Key order is load-bearing (see module header): the object literal below is
20
- * the canonical order and must not change.
21
- */
22
- function buildRoleApplicationMetadata(input = {}) {
23
- return {
24
- notes: input.notes || '',
25
- experience: input.experience || '',
26
- appliedAt: input.appliedAt ?? Date.now(),
27
- };
28
- }
29
- /**
30
- * The exact serialization the CLI pins: bare JSON.stringify with no spacing.
31
- * `applicationHash` on chain is ipfsCidToBytes32(pinJson(this)).
32
- */
33
- function serializeRoleApplicationMetadata(metadata) {
34
- return JSON.stringify(metadata);
35
- }