@ottochain/sdk 2.0.0 → 2.2.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.
- package/dist/cjs/apps/contracts/index.js +1 -1
- package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +272 -0
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +284 -0
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +93 -0
- package/dist/cjs/apps/contracts/state-machines/index.js +177 -1
- package/dist/cjs/apps/corporate/state-machines/corp-board.js +1022 -0
- package/dist/cjs/apps/corporate/state-machines/corp-entity.js +671 -0
- package/dist/cjs/apps/corporate/state-machines/corp-securities.js +998 -0
- package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +1102 -0
- package/dist/cjs/apps/corporate/state-machines/index.js +20 -4440
- package/dist/cjs/apps/governance/index.js +7 -7
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +467 -0
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +458 -0
- package/dist/cjs/apps/governance/state-machines/dao-single.js +199 -0
- package/dist/cjs/apps/governance/state-machines/dao-token.js +503 -0
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +482 -0
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +138 -0
- package/dist/cjs/apps/governance/state-machines/index.js +16 -2934
- package/dist/cjs/apps/identity/constants.js +28 -14
- package/dist/cjs/apps/identity/index.js +27 -12
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +256 -0
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +321 -0
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +106 -0
- package/dist/cjs/apps/identity/state-machines/index.js +15 -784
- package/dist/cjs/apps/markets/index.js +1 -1
- package/dist/cjs/apps/markets/state-machines/index.js +14 -2298
- package/dist/cjs/apps/markets/state-machines/market-auction.js +283 -0
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +312 -0
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +407 -0
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +485 -0
- package/dist/cjs/apps/markets/state-machines/market-universal.js +129 -0
- package/dist/cjs/apps/oracles/index.js +36 -0
- package/dist/cjs/generated/google/protobuf/struct.js +1 -1
- package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
- package/dist/cjs/generated/index.js +26 -22
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +12 -12
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +1688 -0
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/cjs/generated/ottochain/v1/common.js +1 -1
- package/dist/cjs/generated/ottochain/v1/fiber.js +1 -1
- package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
- package/dist/cjs/generated/ottochain/v1/records.js +1 -1
- package/dist/cjs/schema/fiber-app.js +95 -0
- package/dist/cjs/schema/index.js +20 -0
- package/dist/esm/apps/contracts/index.js +3 -3
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +269 -0
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +281 -0
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +90 -0
- package/dist/esm/apps/contracts/state-machines/index.js +177 -1
- package/dist/esm/apps/corporate/index.js +3 -3
- package/dist/esm/apps/corporate/state-machines/corp-board.js +1019 -0
- package/dist/esm/apps/corporate/state-machines/corp-entity.js +668 -0
- package/dist/esm/apps/corporate/state-machines/corp-securities.js +995 -0
- package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +1099 -0
- package/dist/esm/apps/corporate/state-machines/index.js +15 -4439
- package/dist/esm/apps/governance/index.js +9 -9
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +464 -0
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +455 -0
- package/dist/esm/apps/governance/state-machines/dao-single.js +196 -0
- package/dist/esm/apps/governance/state-machines/dao-token.js +500 -0
- package/dist/esm/apps/governance/state-machines/governance-simple.js +479 -0
- package/dist/esm/apps/governance/state-machines/governance-universal.js +135 -0
- package/dist/esm/apps/governance/state-machines/index.js +9 -2933
- package/dist/esm/apps/identity/constants.js +28 -14
- package/dist/esm/apps/identity/index.js +7 -5
- package/dist/esm/apps/identity/state-machines/identity-agent.js +253 -0
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +318 -0
- package/dist/esm/apps/identity/state-machines/identity-universal.js +103 -0
- package/dist/esm/apps/identity/state-machines/index.js +11 -783
- package/dist/esm/apps/index.js +5 -5
- package/dist/esm/apps/markets/index.js +3 -3
- package/dist/esm/apps/markets/state-machines/index.js +8 -2297
- package/dist/esm/apps/markets/state-machines/market-auction.js +280 -0
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +309 -0
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +404 -0
- package/dist/esm/apps/markets/state-machines/market-prediction.js +482 -0
- package/dist/esm/apps/markets/state-machines/market-universal.js +126 -0
- package/dist/esm/apps/oracles/index.js +21 -0
- package/dist/esm/generated/google/protobuf/struct.js +1 -1
- package/dist/esm/generated/google/protobuf/timestamp.js +1 -1
- package/dist/esm/generated/index.js +8 -4
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +2 -2
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +1676 -0
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/esm/generated/ottochain/v1/common.js +1 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +1 -1
- package/dist/esm/generated/ottochain/v1/messages.js +1 -1
- package/dist/esm/generated/ottochain/v1/records.js +1 -1
- package/dist/esm/schema/fiber-app.js +86 -0
- package/dist/esm/schema/index.js +4 -0
- package/dist/types/apps/contracts/index.d.ts +151 -2
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +462 -0
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +511 -0
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +147 -0
- package/dist/types/apps/contracts/state-machines/index.d.ts +149 -0
- package/dist/types/apps/corporate/index.d.ts +5263 -3825
- package/dist/types/apps/corporate/state-machines/corp-board.d.ts +1479 -0
- package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +970 -0
- package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +1381 -0
- package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +1631 -0
- package/dist/types/apps/corporate/state-machines/index.d.ts +5245 -3802
- package/dist/types/apps/governance/index.d.ts +875 -37
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +644 -0
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +610 -0
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +276 -0
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +601 -0
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +652 -0
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +181 -0
- package/dist/types/apps/governance/state-machines/index.d.ts +9 -2136
- package/dist/types/apps/identity/constants.d.ts +8 -6
- package/dist/types/apps/identity/index.d.ts +1078 -577
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +401 -0
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +550 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +151 -0
- package/dist/types/apps/identity/state-machines/index.d.ts +1069 -567
- package/dist/types/apps/index.d.ts +5 -5
- package/dist/types/apps/markets/index.d.ts +535 -7
- package/dist/types/apps/markets/state-machines/index.d.ts +8 -1678
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +392 -0
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +443 -0
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +539 -0
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +651 -0
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +191 -0
- package/dist/types/apps/oracles/index.d.ts +18 -0
- package/dist/types/generated/index.d.ts +3 -2
- package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +1 -1
- package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +187 -0
- package/dist/types/schema/fiber-app.d.ts +172 -0
- package/dist/types/schema/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +0 -619
- package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +0 -1223
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +0 -610
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +0 -1217
- package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +0 -94
- package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +0 -150
|
@@ -19,16 +19,79 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @packageDocumentation
|
|
21
21
|
*/
|
|
22
|
-
export { DAOType, DAOStatus, ProposalStatus, VoteChoice, DAOMetadata, Proposal, Vote, VoteTally, SingleOwnerDAO, SingleOwnerAction, OwnershipTransfer, MultisigDAO, MultisigAction, TokenDAO, TokenProposalResult, ThresholdDAO, ThresholdVotes, ThresholdHistoryEntry, CreateDAORequest, ProposeRequest, VoteRequest, ExecuteRequest, dAOTypeFromJSON, dAOTypeToJSON, dAOStatusFromJSON, dAOStatusToJSON, proposalStatusFromJSON, proposalStatusToJSON, voteChoiceFromJSON, voteChoiceToJSON, } from
|
|
23
|
-
import { govUniversalDef, govSimpleDef, daoSingleDef, daoMultisigDef, daoTokenDef, daoReputationDef } from
|
|
22
|
+
export { DAOType, DAOStatus, ProposalStatus, VoteChoice, DAOMetadata, Proposal, Vote, VoteTally, SingleOwnerDAO, SingleOwnerAction, OwnershipTransfer, MultisigDAO, MultisigAction, TokenDAO, TokenProposalResult, ThresholdDAO, ThresholdVotes, ThresholdHistoryEntry, CreateDAORequest, ProposeRequest, VoteRequest, ExecuteRequest, dAOTypeFromJSON, dAOTypeToJSON, dAOStatusFromJSON, dAOStatusToJSON, proposalStatusFromJSON, proposalStatusToJSON, voteChoiceFromJSON, voteChoiceToJSON, } from "../../generated/ottochain/apps/governance/v1/governance.js";
|
|
23
|
+
import { govUniversalDef, govSimpleDef, daoSingleDef, daoMultisigDef, daoTokenDef, daoReputationDef } from "./state-machines/index.js";
|
|
24
24
|
export { govUniversalDef, govSimpleDef, daoSingleDef, daoMultisigDef, daoTokenDef, daoReputationDef, };
|
|
25
25
|
/** All governance state machine definitions */
|
|
26
26
|
export declare const GOVERNANCE_DEFINITIONS: {
|
|
27
27
|
readonly universal: {
|
|
28
28
|
readonly metadata: {
|
|
29
29
|
readonly name: "GovernanceUniversal";
|
|
30
|
-
readonly
|
|
30
|
+
readonly app: "governance";
|
|
31
|
+
readonly type: "universal";
|
|
31
32
|
readonly version: "1.0.0";
|
|
33
|
+
readonly description: "Minimal governance state machine - extend for custom use cases";
|
|
34
|
+
};
|
|
35
|
+
readonly createSchema: {
|
|
36
|
+
readonly properties: {};
|
|
37
|
+
};
|
|
38
|
+
readonly stateSchema: {
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly status: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
readonly proposal: {
|
|
44
|
+
readonly type: "object";
|
|
45
|
+
};
|
|
46
|
+
readonly proposedAt: {
|
|
47
|
+
readonly type: "timestamp";
|
|
48
|
+
};
|
|
49
|
+
readonly votes: {
|
|
50
|
+
readonly type: "object";
|
|
51
|
+
readonly computed: true;
|
|
52
|
+
};
|
|
53
|
+
readonly lastProposal: {
|
|
54
|
+
readonly type: "object";
|
|
55
|
+
};
|
|
56
|
+
readonly lastResult: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
};
|
|
59
|
+
readonly dissolvedAt: {
|
|
60
|
+
readonly type: "timestamp";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly eventSchemas: {
|
|
65
|
+
readonly propose: {
|
|
66
|
+
readonly description: "Submit a new proposal";
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly proposal: {
|
|
69
|
+
readonly type: "object";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly vote: {
|
|
74
|
+
readonly description: "Cast a vote on the active proposal";
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly agent: {
|
|
77
|
+
readonly type: "address";
|
|
78
|
+
};
|
|
79
|
+
readonly vote: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly finalize: {
|
|
85
|
+
readonly description: "Finalize the current proposal";
|
|
86
|
+
readonly properties: {
|
|
87
|
+
readonly result: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly dissolve: {
|
|
93
|
+
readonly description: "Dissolve the governance entity";
|
|
94
|
+
};
|
|
32
95
|
};
|
|
33
96
|
readonly states: {
|
|
34
97
|
readonly ACTIVE: {
|
|
@@ -142,8 +205,195 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
142
205
|
readonly simple: {
|
|
143
206
|
readonly metadata: {
|
|
144
207
|
readonly name: "Governance";
|
|
145
|
-
readonly
|
|
208
|
+
readonly app: "governance";
|
|
209
|
+
readonly type: "simple";
|
|
146
210
|
readonly version: "1.0.0";
|
|
211
|
+
readonly description: "Simple org governance: manage members, update rules, resolve disputes";
|
|
212
|
+
};
|
|
213
|
+
readonly createSchema: {
|
|
214
|
+
readonly required: readonly ["admins", "passingThreshold", "disputeQuorum", "votingPeriodMs"];
|
|
215
|
+
readonly properties: {
|
|
216
|
+
readonly admins: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly description: "Initial admin addresses";
|
|
219
|
+
readonly immutable: false;
|
|
220
|
+
};
|
|
221
|
+
readonly passingThreshold: {
|
|
222
|
+
readonly type: "number";
|
|
223
|
+
readonly description: "Fraction of members required to pass (0-1)";
|
|
224
|
+
};
|
|
225
|
+
readonly disputeQuorum: {
|
|
226
|
+
readonly type: "number";
|
|
227
|
+
readonly description: "Min votes to resolve a dispute";
|
|
228
|
+
};
|
|
229
|
+
readonly votingPeriodMs: {
|
|
230
|
+
readonly type: "number";
|
|
231
|
+
readonly description: "Voting window in milliseconds";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly stateSchema: {
|
|
236
|
+
readonly properties: {
|
|
237
|
+
readonly admins: {
|
|
238
|
+
readonly type: "array";
|
|
239
|
+
readonly immutable: false;
|
|
240
|
+
};
|
|
241
|
+
readonly members: {
|
|
242
|
+
readonly type: "object";
|
|
243
|
+
readonly computed: true;
|
|
244
|
+
};
|
|
245
|
+
readonly rules: {
|
|
246
|
+
readonly type: "object";
|
|
247
|
+
readonly computed: true;
|
|
248
|
+
};
|
|
249
|
+
readonly history: {
|
|
250
|
+
readonly type: "array";
|
|
251
|
+
readonly computed: true;
|
|
252
|
+
};
|
|
253
|
+
readonly proposal: {
|
|
254
|
+
readonly type: "object";
|
|
255
|
+
};
|
|
256
|
+
readonly votes: {
|
|
257
|
+
readonly type: "object";
|
|
258
|
+
readonly computed: true;
|
|
259
|
+
};
|
|
260
|
+
readonly dispute: {
|
|
261
|
+
readonly type: "object";
|
|
262
|
+
};
|
|
263
|
+
readonly passingThreshold: {
|
|
264
|
+
readonly type: "number";
|
|
265
|
+
};
|
|
266
|
+
readonly disputeQuorum: {
|
|
267
|
+
readonly type: "number";
|
|
268
|
+
};
|
|
269
|
+
readonly votingPeriodMs: {
|
|
270
|
+
readonly type: "number";
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
readonly eventSchemas: {
|
|
275
|
+
readonly add_member: {
|
|
276
|
+
readonly description: "Add a member (admin only)";
|
|
277
|
+
readonly required: readonly ["member", "role"];
|
|
278
|
+
readonly properties: {
|
|
279
|
+
readonly agent: {
|
|
280
|
+
readonly type: "address";
|
|
281
|
+
};
|
|
282
|
+
readonly member: {
|
|
283
|
+
readonly type: "address";
|
|
284
|
+
};
|
|
285
|
+
readonly role: {
|
|
286
|
+
readonly type: "string";
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
readonly remove_member: {
|
|
291
|
+
readonly description: "Remove a member (admin only)";
|
|
292
|
+
readonly required: readonly ["member"];
|
|
293
|
+
readonly properties: {
|
|
294
|
+
readonly agent: {
|
|
295
|
+
readonly type: "address";
|
|
296
|
+
};
|
|
297
|
+
readonly member: {
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly propose: {
|
|
303
|
+
readonly description: "Submit a rule change proposal";
|
|
304
|
+
readonly required: readonly ["proposalId", "type", "changes"];
|
|
305
|
+
readonly properties: {
|
|
306
|
+
readonly agent: {
|
|
307
|
+
readonly type: "address";
|
|
308
|
+
};
|
|
309
|
+
readonly proposalId: {
|
|
310
|
+
readonly type: "string";
|
|
311
|
+
};
|
|
312
|
+
readonly type: {
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
};
|
|
315
|
+
readonly changes: {
|
|
316
|
+
readonly type: "object";
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly vote: {
|
|
321
|
+
readonly description: "Cast a vote on the active proposal or dispute";
|
|
322
|
+
readonly required: readonly ["vote"];
|
|
323
|
+
readonly properties: {
|
|
324
|
+
readonly agent: {
|
|
325
|
+
readonly type: "address";
|
|
326
|
+
};
|
|
327
|
+
readonly vote: {
|
|
328
|
+
readonly type: "string";
|
|
329
|
+
};
|
|
330
|
+
readonly ruling: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
readonly finalize: {
|
|
336
|
+
readonly description: "Finalize the voting period";
|
|
337
|
+
readonly required: readonly ["forCount"];
|
|
338
|
+
readonly properties: {
|
|
339
|
+
readonly forCount: {
|
|
340
|
+
readonly type: "number";
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
readonly file_dispute: {
|
|
345
|
+
readonly description: "File a dispute against a member";
|
|
346
|
+
readonly required: readonly ["disputeId", "defendant", "claim"];
|
|
347
|
+
readonly properties: {
|
|
348
|
+
readonly agent: {
|
|
349
|
+
readonly type: "address"; /**
|
|
350
|
+
* Check if multisig has enough signatures to execute
|
|
351
|
+
*/
|
|
352
|
+
};
|
|
353
|
+
readonly disputeId: {
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
};
|
|
356
|
+
readonly defendant: {
|
|
357
|
+
readonly type: "address";
|
|
358
|
+
};
|
|
359
|
+
readonly claim: {
|
|
360
|
+
readonly type: "string";
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
readonly submit_evidence: {
|
|
365
|
+
readonly description: "Submit evidence in a dispute";
|
|
366
|
+
readonly required: readonly ["content"];
|
|
367
|
+
readonly properties: {
|
|
368
|
+
readonly agent: {
|
|
369
|
+
readonly type: "address";
|
|
370
|
+
};
|
|
371
|
+
readonly content: {
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
readonly resolve: {
|
|
377
|
+
readonly description: "Resolve the active dispute";
|
|
378
|
+
readonly required: readonly ["ruling", "remedy"];
|
|
379
|
+
readonly properties: {
|
|
380
|
+
readonly ruling: {
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
};
|
|
383
|
+
readonly remedy: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
readonly dissolve: {
|
|
389
|
+
readonly description: "Dissolve the organization (requires 90% approval)";
|
|
390
|
+
readonly required: readonly ["approvalCount"];
|
|
391
|
+
readonly properties: {
|
|
392
|
+
readonly approvalCount: {
|
|
393
|
+
readonly type: "number";
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
147
397
|
};
|
|
148
398
|
readonly states: {
|
|
149
399
|
readonly ACTIVE: {
|
|
@@ -233,6 +483,9 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
233
483
|
readonly getKey: readonly [{
|
|
234
484
|
readonly var: "state.members";
|
|
235
485
|
}, {
|
|
486
|
+
/**
|
|
487
|
+
* Check if threshold proposal has quorum
|
|
488
|
+
*/
|
|
236
489
|
readonly var: "event.agent";
|
|
237
490
|
}];
|
|
238
491
|
};
|
|
@@ -606,9 +859,107 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
606
859
|
readonly daoSingle: {
|
|
607
860
|
readonly metadata: {
|
|
608
861
|
readonly name: "SingleOwnerDAO";
|
|
609
|
-
readonly
|
|
862
|
+
readonly app: "governance";
|
|
863
|
+
readonly type: "daoSingle";
|
|
610
864
|
readonly version: "1.0.0";
|
|
865
|
+
readonly description: "Single owner controls all actions. Simplest governance model.";
|
|
611
866
|
readonly category: "governance/dao";
|
|
867
|
+
readonly crossReferences: {
|
|
868
|
+
readonly Identity: "owner registration";
|
|
869
|
+
readonly Contract: "action execution targets";
|
|
870
|
+
readonly Treasury: "fund management";
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
readonly createSchema: {
|
|
874
|
+
readonly required: readonly ["owner"];
|
|
875
|
+
readonly properties: {
|
|
876
|
+
readonly owner: {
|
|
877
|
+
readonly type: "address";
|
|
878
|
+
readonly description: "DAG address of the initial owner";
|
|
879
|
+
readonly immutable: false;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
readonly stateSchema: {
|
|
884
|
+
readonly properties: {
|
|
885
|
+
readonly owner: {
|
|
886
|
+
readonly type: "address";
|
|
887
|
+
};
|
|
888
|
+
readonly pendingOwner: {
|
|
889
|
+
readonly type: "address";
|
|
890
|
+
};
|
|
891
|
+
readonly transferInitiatedAt: {
|
|
892
|
+
readonly type: "timestamp";
|
|
893
|
+
};
|
|
894
|
+
readonly ownershipHistory: {
|
|
895
|
+
readonly type: "array";
|
|
896
|
+
readonly computed: true;
|
|
897
|
+
};
|
|
898
|
+
readonly actions: {
|
|
899
|
+
readonly type: "array";
|
|
900
|
+
readonly computed: true;
|
|
901
|
+
};
|
|
902
|
+
readonly status: {
|
|
903
|
+
readonly type: "string";
|
|
904
|
+
readonly computed: true;
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
readonly eventSchemas: {
|
|
909
|
+
readonly execute: {
|
|
910
|
+
readonly description: "Execute an action (owner only)";
|
|
911
|
+
readonly required: readonly ["actionId", "actionType", "payload"];
|
|
912
|
+
readonly properties: {
|
|
913
|
+
readonly agent: {
|
|
914
|
+
readonly type: "address";
|
|
915
|
+
};
|
|
916
|
+
readonly actionId: {
|
|
917
|
+
readonly type: "string";
|
|
918
|
+
};
|
|
919
|
+
readonly actionType: {
|
|
920
|
+
readonly type: "string";
|
|
921
|
+
};
|
|
922
|
+
readonly payload: {
|
|
923
|
+
readonly type: "object";
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
readonly transfer_ownership: {
|
|
928
|
+
readonly description: "Initiate ownership transfer (owner only)";
|
|
929
|
+
readonly required: readonly ["newOwner"];
|
|
930
|
+
readonly properties: {
|
|
931
|
+
readonly agent: {
|
|
932
|
+
readonly type: "address";
|
|
933
|
+
};
|
|
934
|
+
readonly newOwner: {
|
|
935
|
+
readonly type: "address";
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
readonly accept_ownership: {
|
|
940
|
+
readonly description: "Accept ownership (pending owner only)";
|
|
941
|
+
readonly properties: {
|
|
942
|
+
readonly agent: {
|
|
943
|
+
readonly type: "address";
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
readonly cancel_transfer: {
|
|
948
|
+
readonly description: "Cancel pending ownership transfer (owner only)";
|
|
949
|
+
readonly properties: {
|
|
950
|
+
readonly agent: {
|
|
951
|
+
readonly type: "address";
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
readonly dissolve: {
|
|
956
|
+
readonly description: "Dissolve the DAO (owner only)";
|
|
957
|
+
readonly properties: {
|
|
958
|
+
readonly agent: {
|
|
959
|
+
readonly type: "address";
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
};
|
|
612
963
|
};
|
|
613
964
|
readonly states: {
|
|
614
965
|
readonly ACTIVE: {
|
|
@@ -664,6 +1015,9 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
664
1015
|
}];
|
|
665
1016
|
};
|
|
666
1017
|
readonly emits: readonly [{
|
|
1018
|
+
/**
|
|
1019
|
+
* Get remaining signatures needed
|
|
1020
|
+
*/
|
|
667
1021
|
readonly event: "action_executed";
|
|
668
1022
|
readonly to: "external";
|
|
669
1023
|
}];
|
|
@@ -777,22 +1131,186 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
777
1131
|
};
|
|
778
1132
|
readonly dependencies: readonly [];
|
|
779
1133
|
}];
|
|
780
|
-
readonly crossReferences: {
|
|
781
|
-
readonly Identity: "owner registration";
|
|
782
|
-
readonly Contract: "action execution targets";
|
|
783
|
-
readonly Treasury: "fund management";
|
|
784
|
-
};
|
|
785
1134
|
};
|
|
786
1135
|
readonly daoMultisig: {
|
|
787
1136
|
readonly metadata: {
|
|
788
1137
|
readonly name: "MultisigDAO";
|
|
789
|
-
readonly
|
|
1138
|
+
readonly app: "governance";
|
|
1139
|
+
readonly type: "daoMultisig";
|
|
790
1140
|
readonly version: "1.0.0";
|
|
1141
|
+
readonly description: "N-of-M multisig governance. Requires threshold signatures for actions.";
|
|
791
1142
|
readonly category: "governance/dao";
|
|
1143
|
+
readonly crossReferences: {
|
|
1144
|
+
readonly Identity: "signer verification";
|
|
1145
|
+
readonly Contract: "action execution targets";
|
|
1146
|
+
readonly Treasury: "fund management";
|
|
1147
|
+
readonly Escrow: "controlled release";
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
readonly createSchema: {
|
|
1151
|
+
readonly required: readonly ["signers", "threshold", "proposalTTLMs"];
|
|
1152
|
+
readonly properties: {
|
|
1153
|
+
readonly signers: {
|
|
1154
|
+
readonly type: "array";
|
|
1155
|
+
readonly description: "Authorized signer addresses";
|
|
1156
|
+
readonly immutable: false;
|
|
1157
|
+
};
|
|
1158
|
+
readonly threshold: {
|
|
1159
|
+
readonly type: "number";
|
|
1160
|
+
readonly description: "Number of signatures required to execute";
|
|
1161
|
+
};
|
|
1162
|
+
readonly proposalTTLMs: {
|
|
1163
|
+
readonly type: "number";
|
|
1164
|
+
readonly description: "Proposal expiry window in milliseconds";
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
readonly stateSchema: {
|
|
1169
|
+
readonly properties: {
|
|
1170
|
+
readonly signers: {
|
|
1171
|
+
readonly type: "array";
|
|
1172
|
+
};
|
|
1173
|
+
readonly threshold: {
|
|
1174
|
+
readonly type: "number";
|
|
1175
|
+
};
|
|
1176
|
+
readonly proposalTTLMs: {
|
|
1177
|
+
readonly type: "number";
|
|
1178
|
+
};
|
|
1179
|
+
readonly proposal: {
|
|
1180
|
+
readonly type: "object";
|
|
1181
|
+
};
|
|
1182
|
+
readonly signatures: {
|
|
1183
|
+
readonly type: "object";
|
|
1184
|
+
readonly computed: true;
|
|
1185
|
+
};
|
|
1186
|
+
readonly actions: {
|
|
1187
|
+
readonly type: "array";
|
|
1188
|
+
readonly computed: true;
|
|
1189
|
+
};
|
|
1190
|
+
readonly cancelledProposals: {
|
|
1191
|
+
readonly type: "array";
|
|
1192
|
+
readonly computed: true;
|
|
1193
|
+
};
|
|
1194
|
+
readonly status: {
|
|
1195
|
+
readonly type: "string";
|
|
1196
|
+
readonly computed: true;
|
|
1197
|
+
};
|
|
1198
|
+
};
|
|
1199
|
+
};
|
|
1200
|
+
readonly eventSchemas: {
|
|
1201
|
+
readonly propose: {
|
|
1202
|
+
readonly description: "Propose an action (signer only)";
|
|
1203
|
+
readonly required: readonly ["proposalId", "actionType", "payload"];
|
|
1204
|
+
readonly properties: {
|
|
1205
|
+
readonly agent: {
|
|
1206
|
+
readonly type: "address";
|
|
1207
|
+
};
|
|
1208
|
+
readonly proposalId: {
|
|
1209
|
+
readonly type: "string";
|
|
1210
|
+
};
|
|
1211
|
+
readonly actionType: {
|
|
1212
|
+
readonly type: "string";
|
|
1213
|
+
};
|
|
1214
|
+
readonly payload: {
|
|
1215
|
+
readonly type: "object";
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
readonly sign: {
|
|
1220
|
+
readonly description: "Sign the current proposal (signer only, no double-signing)";
|
|
1221
|
+
readonly properties: {
|
|
1222
|
+
readonly agent: {
|
|
1223
|
+
readonly type: "address";
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
readonly execute: {
|
|
1228
|
+
readonly description: "Execute once threshold signatures collected";
|
|
1229
|
+
readonly properties: {
|
|
1230
|
+
readonly agent: {
|
|
1231
|
+
readonly type: "address";
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
readonly cancel: {
|
|
1236
|
+
readonly description: "Cancel proposal (expired or proposer)";
|
|
1237
|
+
readonly properties: {
|
|
1238
|
+
readonly agent: {
|
|
1239
|
+
readonly type: "address";
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1243
|
+
readonly propose_add_signer: {
|
|
1244
|
+
readonly description: "Propose adding a new signer (signer only)";
|
|
1245
|
+
readonly required: readonly ["proposalId", "newSigner"];
|
|
1246
|
+
readonly properties: {
|
|
1247
|
+
readonly agent: {
|
|
1248
|
+
readonly type: "address";
|
|
1249
|
+
};
|
|
1250
|
+
readonly proposalId: {
|
|
1251
|
+
readonly type: "string";
|
|
1252
|
+
};
|
|
1253
|
+
readonly newSigner: {
|
|
1254
|
+
readonly type: "address";
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1258
|
+
readonly propose_remove_signer: {
|
|
1259
|
+
readonly description: "Propose removing a signer (signer only, must keep > threshold signers)";
|
|
1260
|
+
readonly required: readonly ["proposalId", "removeSigner"];
|
|
1261
|
+
readonly properties: {
|
|
1262
|
+
readonly agent: {
|
|
1263
|
+
readonly type: "address";
|
|
1264
|
+
};
|
|
1265
|
+
readonly proposalId: {
|
|
1266
|
+
readonly type: "string";
|
|
1267
|
+
};
|
|
1268
|
+
readonly removeSigner: {
|
|
1269
|
+
readonly type: "address";
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
/**
|
|
1274
|
+
* Check if multisig has enough signatures to execute
|
|
1275
|
+
*/
|
|
1276
|
+
readonly propose_change_threshold: {
|
|
1277
|
+
readonly description: "Propose changing the signature threshold";
|
|
1278
|
+
readonly required: readonly ["proposalId", "newThreshold"];
|
|
1279
|
+
readonly properties: {
|
|
1280
|
+
readonly agent: {
|
|
1281
|
+
readonly type: "address";
|
|
1282
|
+
};
|
|
1283
|
+
readonly proposalId: {
|
|
1284
|
+
readonly type: "string";
|
|
1285
|
+
};
|
|
1286
|
+
readonly newThreshold: {
|
|
1287
|
+
readonly type: "number";
|
|
1288
|
+
readonly minimum: 1;
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
};
|
|
1292
|
+
readonly apply_signer_change: {
|
|
1293
|
+
readonly description: "Apply approved signer-set or threshold change";
|
|
1294
|
+
readonly properties: {
|
|
1295
|
+
readonly agent: {
|
|
1296
|
+
readonly type: "address";
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
readonly dissolve: {
|
|
1301
|
+
readonly description: "Dissolve the DAO (requires unanimous signer count)";
|
|
1302
|
+
readonly properties: {
|
|
1303
|
+
readonly signatureCount: {
|
|
1304
|
+
readonly type: "number";
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
792
1308
|
};
|
|
793
1309
|
readonly states: {
|
|
794
1310
|
readonly ACTIVE: {
|
|
795
|
-
readonly id: "ACTIVE";
|
|
1311
|
+
readonly id: "ACTIVE"; /**
|
|
1312
|
+
* Get effective voting power (includes delegation)
|
|
1313
|
+
*/
|
|
796
1314
|
readonly isFinal: false;
|
|
797
1315
|
readonly metadata: null;
|
|
798
1316
|
};
|
|
@@ -903,9 +1421,7 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
903
1421
|
};
|
|
904
1422
|
readonly dependencies: readonly [];
|
|
905
1423
|
}, {
|
|
906
|
-
readonly from: "PENDING";
|
|
907
|
-
* Check if agent has signed current proposal
|
|
908
|
-
*/
|
|
1424
|
+
readonly from: "PENDING";
|
|
909
1425
|
readonly to: "ACTIVE";
|
|
910
1426
|
readonly eventName: "execute";
|
|
911
1427
|
readonly guard: {
|
|
@@ -1261,19 +1777,173 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
1261
1777
|
};
|
|
1262
1778
|
readonly dependencies: readonly [];
|
|
1263
1779
|
}];
|
|
1264
|
-
readonly crossReferences: {
|
|
1265
|
-
readonly Identity: "signer verification";
|
|
1266
|
-
readonly Contract: "action execution targets";
|
|
1267
|
-
readonly Treasury: "fund management";
|
|
1268
|
-
readonly Escrow: "controlled release";
|
|
1269
|
-
};
|
|
1270
1780
|
};
|
|
1271
1781
|
readonly daoToken: {
|
|
1272
1782
|
readonly metadata: {
|
|
1273
1783
|
readonly name: "TokenDAO";
|
|
1274
|
-
readonly
|
|
1784
|
+
readonly app: "governance";
|
|
1785
|
+
readonly type: "daoToken";
|
|
1275
1786
|
readonly version: "1.0.0";
|
|
1787
|
+
readonly description: "Token-weighted voting. Voting power proportional to token holdings.";
|
|
1276
1788
|
readonly category: "governance/dao";
|
|
1789
|
+
readonly crossReferences: {
|
|
1790
|
+
readonly Identity: "voter verification";
|
|
1791
|
+
readonly Token: "balance snapshots";
|
|
1792
|
+
readonly Contract: "action execution";
|
|
1793
|
+
readonly Treasury: "fund management";
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
readonly createSchema: {
|
|
1797
|
+
readonly required: readonly ["balances", "proposalThreshold", "quorum", "votingPeriodMs", "timelockMs"];
|
|
1798
|
+
readonly properties: {
|
|
1799
|
+
readonly balances: {
|
|
1800
|
+
readonly type: "object";
|
|
1801
|
+
readonly description: "Initial token balances by address";
|
|
1802
|
+
};
|
|
1803
|
+
readonly proposalThreshold: {
|
|
1804
|
+
readonly type: "number";
|
|
1805
|
+
readonly description: "Min token balance to submit a proposal";
|
|
1806
|
+
};
|
|
1807
|
+
readonly quorum: {
|
|
1808
|
+
readonly type: "number";
|
|
1809
|
+
readonly description: "Min total votes (weighted) to pass";
|
|
1810
|
+
};
|
|
1811
|
+
readonly votingPeriodMs: {
|
|
1812
|
+
readonly type: "number";
|
|
1813
|
+
readonly description: "Voting window in milliseconds";
|
|
1814
|
+
};
|
|
1815
|
+
readonly timelockMs: {
|
|
1816
|
+
readonly type: "number";
|
|
1817
|
+
readonly description: "Time-lock delay before execution";
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
readonly stateSchema: {
|
|
1822
|
+
readonly properties: {
|
|
1823
|
+
readonly balances: {
|
|
1824
|
+
readonly type: "object";
|
|
1825
|
+
};
|
|
1826
|
+
readonly delegations: {
|
|
1827
|
+
readonly type: "object";
|
|
1828
|
+
readonly computed: true;
|
|
1829
|
+
};
|
|
1830
|
+
readonly proposalThreshold: {
|
|
1831
|
+
readonly type: "number";
|
|
1832
|
+
};
|
|
1833
|
+
readonly quorum: {
|
|
1834
|
+
readonly type: "number";
|
|
1835
|
+
};
|
|
1836
|
+
readonly votingPeriodMs: {
|
|
1837
|
+
readonly type: "number";
|
|
1838
|
+
};
|
|
1839
|
+
readonly timelockMs: {
|
|
1840
|
+
readonly type: "number";
|
|
1841
|
+
};
|
|
1842
|
+
readonly proposal: {
|
|
1843
|
+
readonly type: "object";
|
|
1844
|
+
};
|
|
1845
|
+
readonly votes: {
|
|
1846
|
+
readonly type: "object";
|
|
1847
|
+
readonly computed: true;
|
|
1848
|
+
};
|
|
1849
|
+
readonly executedProposals: {
|
|
1850
|
+
readonly type: "array";
|
|
1851
|
+
readonly computed: true;
|
|
1852
|
+
};
|
|
1853
|
+
readonly rejectedProposals: {
|
|
1854
|
+
readonly type: "array";
|
|
1855
|
+
readonly computed: true;
|
|
1856
|
+
};
|
|
1857
|
+
readonly cancelledProposals: {
|
|
1858
|
+
readonly type: "array";
|
|
1859
|
+
readonly computed: true;
|
|
1860
|
+
};
|
|
1861
|
+
};
|
|
1862
|
+
};
|
|
1863
|
+
readonly eventSchemas: {
|
|
1864
|
+
readonly propose: {
|
|
1865
|
+
readonly description: "Submit a proposal (requires >= proposalThreshold tokens)";
|
|
1866
|
+
readonly required: readonly ["proposalId", "title", "description", "actionType", "payload"];
|
|
1867
|
+
readonly properties: {
|
|
1868
|
+
readonly agent: {
|
|
1869
|
+
readonly type: "address";
|
|
1870
|
+
};
|
|
1871
|
+
readonly proposalId: {
|
|
1872
|
+
readonly type: "string";
|
|
1873
|
+
};
|
|
1874
|
+
readonly title: {
|
|
1875
|
+
readonly type: "string";
|
|
1876
|
+
};
|
|
1877
|
+
readonly description: {
|
|
1878
|
+
readonly type: "string";
|
|
1879
|
+
};
|
|
1880
|
+
readonly actionType: {
|
|
1881
|
+
readonly type: "string";
|
|
1882
|
+
};
|
|
1883
|
+
readonly payload: {
|
|
1884
|
+
readonly type: "object";
|
|
1885
|
+
};
|
|
1886
|
+
readonly snapshotBlock: {
|
|
1887
|
+
readonly type: "string";
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
};
|
|
1891
|
+
readonly vote: {
|
|
1892
|
+
readonly description: "Cast a token-weighted vote (must hold tokens, no double-vote, within window)";
|
|
1893
|
+
readonly required: readonly ["vote"];
|
|
1894
|
+
readonly properties: {
|
|
1895
|
+
readonly agent: {
|
|
1896
|
+
readonly type: "address";
|
|
1897
|
+
};
|
|
1898
|
+
readonly vote: {
|
|
1899
|
+
readonly type: "string";
|
|
1900
|
+
readonly description: "\"for\" | \"against\" | \"abstain\"";
|
|
1901
|
+
};
|
|
1902
|
+
};
|
|
1903
|
+
};
|
|
1904
|
+
readonly queue: {
|
|
1905
|
+
readonly description: "Queue passing proposal into timelock (voting ended, for > against, quorum met)";
|
|
1906
|
+
readonly properties: {};
|
|
1907
|
+
};
|
|
1908
|
+
readonly execute: {
|
|
1909
|
+
readonly description: "Execute queued proposal after timelock expires";
|
|
1910
|
+
readonly properties: {};
|
|
1911
|
+
};
|
|
1912
|
+
readonly reject: {
|
|
1913
|
+
readonly description: "Formally reject a failed proposal (voting ended, failed conditions)";
|
|
1914
|
+
/**
|
|
1915
|
+
* Get remaining signatures needed
|
|
1916
|
+
*/
|
|
1917
|
+
readonly properties: {};
|
|
1918
|
+
};
|
|
1919
|
+
readonly cancel: {
|
|
1920
|
+
readonly description: "Cancel a queued proposal (proposer only)";
|
|
1921
|
+
readonly properties: {
|
|
1922
|
+
readonly agent: {
|
|
1923
|
+
readonly type: "address";
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
readonly delegate: {
|
|
1928
|
+
readonly description: "Delegate voting power to another address";
|
|
1929
|
+
readonly required: readonly ["delegateTo"];
|
|
1930
|
+
readonly properties: {
|
|
1931
|
+
readonly agent: {
|
|
1932
|
+
readonly type: "address";
|
|
1933
|
+
};
|
|
1934
|
+
readonly delegateTo: {
|
|
1935
|
+
readonly type: "address";
|
|
1936
|
+
};
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
readonly undelegate: {
|
|
1940
|
+
readonly description: "Revoke delegation";
|
|
1941
|
+
readonly properties: {
|
|
1942
|
+
readonly agent: {
|
|
1943
|
+
readonly type: "address";
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1277
1947
|
};
|
|
1278
1948
|
readonly states: {
|
|
1279
1949
|
readonly ACTIVE: {
|
|
@@ -1313,6 +1983,9 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
1313
1983
|
readonly var: "state.proposalThreshold";
|
|
1314
1984
|
}];
|
|
1315
1985
|
};
|
|
1986
|
+
/**
|
|
1987
|
+
* Check if proposal is passing
|
|
1988
|
+
*/
|
|
1316
1989
|
readonly effect: {
|
|
1317
1990
|
readonly merge: readonly [{
|
|
1318
1991
|
readonly var: "state";
|
|
@@ -1708,19 +2381,183 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
1708
2381
|
};
|
|
1709
2382
|
readonly dependencies: readonly [];
|
|
1710
2383
|
}];
|
|
1711
|
-
readonly crossReferences: {
|
|
1712
|
-
readonly Identity: "voter verification";
|
|
1713
|
-
readonly Token: "balance snapshots";
|
|
1714
|
-
readonly Contract: "action execution";
|
|
1715
|
-
readonly Treasury: "fund management";
|
|
1716
|
-
};
|
|
1717
2384
|
};
|
|
1718
2385
|
readonly daoReputation: {
|
|
1719
2386
|
readonly metadata: {
|
|
1720
2387
|
readonly name: "DAOReputation";
|
|
1721
|
-
readonly
|
|
2388
|
+
readonly app: "governance";
|
|
2389
|
+
readonly type: "daoReputation";
|
|
1722
2390
|
readonly version: "1.0.0";
|
|
2391
|
+
readonly description: "Reputation-based governance. Minimum reputation required for participation.";
|
|
1723
2392
|
readonly category: "governance/dao";
|
|
2393
|
+
readonly crossReferences: {
|
|
2394
|
+
readonly Identity: "member verification";
|
|
2395
|
+
readonly Reputation: "threshold checks";
|
|
2396
|
+
readonly Contract: "action execution";
|
|
2397
|
+
};
|
|
2398
|
+
};
|
|
2399
|
+
readonly createSchema: {
|
|
2400
|
+
readonly required: readonly ["memberThreshold", "voteThreshold", "proposeThreshold", "quorum", "votingPeriodMs"];
|
|
2401
|
+
readonly properties: {
|
|
2402
|
+
readonly memberThreshold: {
|
|
2403
|
+
readonly type: "number";
|
|
2404
|
+
readonly description: "Min reputation to join as a member";
|
|
2405
|
+
};
|
|
2406
|
+
readonly voteThreshold: {
|
|
2407
|
+
readonly type: "number";
|
|
2408
|
+
readonly description: "Min reputation to vote";
|
|
2409
|
+
};
|
|
2410
|
+
readonly proposeThreshold: {
|
|
2411
|
+
readonly type: "number";
|
|
2412
|
+
readonly description: "Min reputation to submit a proposal";
|
|
2413
|
+
};
|
|
2414
|
+
readonly quorum: {
|
|
2415
|
+
readonly type: "number";
|
|
2416
|
+
readonly description: "Min total votes (count) to execute";
|
|
2417
|
+
};
|
|
2418
|
+
readonly votingPeriodMs: {
|
|
2419
|
+
readonly type: "number";
|
|
2420
|
+
readonly description: "Voting window in milliseconds";
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
readonly stateSchema: {
|
|
2425
|
+
readonly properties: {
|
|
2426
|
+
readonly members: {
|
|
2427
|
+
readonly type: "array";
|
|
2428
|
+
readonly computed: true;
|
|
2429
|
+
};
|
|
2430
|
+
readonly memberJoinedAt: {
|
|
2431
|
+
readonly type: "object";
|
|
2432
|
+
readonly computed: true;
|
|
2433
|
+
};
|
|
2434
|
+
readonly memberThreshold: {
|
|
2435
|
+
readonly type: "number";
|
|
2436
|
+
};
|
|
2437
|
+
readonly voteThreshold: {
|
|
2438
|
+
readonly type: "number";
|
|
2439
|
+
};
|
|
2440
|
+
readonly proposeThreshold: {
|
|
2441
|
+
readonly type: "number";
|
|
2442
|
+
};
|
|
2443
|
+
readonly quorum: {
|
|
2444
|
+
readonly type: "number";
|
|
2445
|
+
};
|
|
2446
|
+
readonly votingPeriodMs: {
|
|
2447
|
+
readonly type: "number";
|
|
2448
|
+
};
|
|
2449
|
+
readonly proposal: {
|
|
2450
|
+
readonly type: "object";
|
|
2451
|
+
};
|
|
2452
|
+
readonly votes: {
|
|
2453
|
+
readonly type: "object";
|
|
2454
|
+
readonly computed: true;
|
|
2455
|
+
};
|
|
2456
|
+
readonly history: {
|
|
2457
|
+
readonly type: "array";
|
|
2458
|
+
readonly computed: true;
|
|
2459
|
+
};
|
|
2460
|
+
};
|
|
2461
|
+
};
|
|
2462
|
+
readonly eventSchemas: {
|
|
2463
|
+
readonly propose: {
|
|
2464
|
+
readonly description: "Submit a proposal (requires >= proposeThreshold reputation)";
|
|
2465
|
+
readonly required: readonly ["proposalId", "title", "description", "actionType", "payload", "agentReputation"];
|
|
2466
|
+
readonly properties: {
|
|
2467
|
+
readonly agent: {
|
|
2468
|
+
readonly type: "address";
|
|
2469
|
+
};
|
|
2470
|
+
readonly agentReputation: {
|
|
2471
|
+
readonly type: "number";
|
|
2472
|
+
};
|
|
2473
|
+
readonly proposalId: {
|
|
2474
|
+
readonly type: "string";
|
|
2475
|
+
};
|
|
2476
|
+
readonly title: {
|
|
2477
|
+
readonly type: "string";
|
|
2478
|
+
};
|
|
2479
|
+
readonly description: {
|
|
2480
|
+
readonly type: "string";
|
|
2481
|
+
};
|
|
2482
|
+
readonly actionType: {
|
|
2483
|
+
readonly type: "string";
|
|
2484
|
+
};
|
|
2485
|
+
readonly payload: {
|
|
2486
|
+
readonly type: "object";
|
|
2487
|
+
};
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
readonly vote: {
|
|
2491
|
+
readonly description: "Cast a vote (requires >= voteThreshold, no double-vote, within window)";
|
|
2492
|
+
readonly required: readonly ["vote", "agentReputation"];
|
|
2493
|
+
readonly properties: {
|
|
2494
|
+
readonly agent: {
|
|
2495
|
+
readonly type: "address";
|
|
2496
|
+
};
|
|
2497
|
+
readonly agentReputation: {
|
|
2498
|
+
readonly type: "number";
|
|
2499
|
+
};
|
|
2500
|
+
readonly vote: {
|
|
2501
|
+
readonly type: "string";
|
|
2502
|
+
readonly description: "\"for\" | \"against\" | \"abstain\"";
|
|
2503
|
+
};
|
|
2504
|
+
};
|
|
2505
|
+
};
|
|
2506
|
+
readonly execute: {
|
|
2507
|
+
readonly description: "Execute a passing proposal after voting ends";
|
|
2508
|
+
readonly properties: {};
|
|
2509
|
+
};
|
|
2510
|
+
readonly reject: {
|
|
2511
|
+
readonly description: "Formally reject a failed proposal";
|
|
2512
|
+
readonly properties: {};
|
|
2513
|
+
};
|
|
2514
|
+
readonly join: {
|
|
2515
|
+
readonly description: "Join the DAO (requires >= memberThreshold reputation)";
|
|
2516
|
+
readonly required: readonly ["agentReputation"];
|
|
2517
|
+
readonly properties: {
|
|
2518
|
+
/**
|
|
2519
|
+
* Get remaining signatures needed
|
|
2520
|
+
*/
|
|
2521
|
+
readonly agent: {
|
|
2522
|
+
readonly type: "address";
|
|
2523
|
+
};
|
|
2524
|
+
readonly agentReputation: {
|
|
2525
|
+
readonly type: "number";
|
|
2526
|
+
};
|
|
2527
|
+
};
|
|
2528
|
+
};
|
|
2529
|
+
readonly leave: {
|
|
2530
|
+
readonly description: "Leave the DAO voluntarily";
|
|
2531
|
+
readonly properties: {
|
|
2532
|
+
readonly agent: {
|
|
2533
|
+
readonly type: "address";
|
|
2534
|
+
};
|
|
2535
|
+
};
|
|
2536
|
+
};
|
|
2537
|
+
readonly propose_threshold_change: {
|
|
2538
|
+
readonly description: "Propose changing reputation thresholds";
|
|
2539
|
+
readonly required: readonly ["proposalId", "agentReputation"];
|
|
2540
|
+
readonly properties: {
|
|
2541
|
+
readonly agent: {
|
|
2542
|
+
readonly type: "address";
|
|
2543
|
+
};
|
|
2544
|
+
readonly agentReputation: {
|
|
2545
|
+
readonly type: "number";
|
|
2546
|
+
};
|
|
2547
|
+
readonly proposalId: {
|
|
2548
|
+
readonly type: "string";
|
|
2549
|
+
};
|
|
2550
|
+
readonly memberThreshold: {
|
|
2551
|
+
readonly type: "number";
|
|
2552
|
+
};
|
|
2553
|
+
readonly voteThreshold: {
|
|
2554
|
+
readonly type: "number";
|
|
2555
|
+
};
|
|
2556
|
+
readonly proposeThreshold: {
|
|
2557
|
+
readonly type: "number";
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
1724
2561
|
};
|
|
1725
2562
|
readonly states: {
|
|
1726
2563
|
readonly ACTIVE: {
|
|
@@ -1739,6 +2576,9 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
1739
2576
|
readonly metadata: null;
|
|
1740
2577
|
};
|
|
1741
2578
|
};
|
|
2579
|
+
/**
|
|
2580
|
+
* Check if proposal has quorum
|
|
2581
|
+
*/
|
|
1742
2582
|
readonly initialState: "ACTIVE";
|
|
1743
2583
|
readonly transitions: readonly [{
|
|
1744
2584
|
readonly from: "ACTIVE";
|
|
@@ -1760,6 +2600,9 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
1760
2600
|
readonly var: "event.proposalId";
|
|
1761
2601
|
};
|
|
1762
2602
|
readonly title: {
|
|
2603
|
+
/**
|
|
2604
|
+
* Check if agent can propose
|
|
2605
|
+
*/
|
|
1763
2606
|
readonly var: "event.title";
|
|
1764
2607
|
};
|
|
1765
2608
|
readonly description: {
|
|
@@ -2154,11 +2997,6 @@ export declare const GOVERNANCE_DEFINITIONS: {
|
|
|
2154
2997
|
};
|
|
2155
2998
|
readonly dependencies: readonly [];
|
|
2156
2999
|
}];
|
|
2157
|
-
readonly crossReferences: {
|
|
2158
|
-
readonly Identity: "member verification";
|
|
2159
|
-
readonly Reputation: "threshold checks";
|
|
2160
|
-
readonly Contract: "action execution";
|
|
2161
|
-
};
|
|
2162
3000
|
};
|
|
2163
3001
|
};
|
|
2164
3002
|
export type GovernanceType = keyof typeof GOVERNANCE_DEFINITIONS;
|
|
@@ -2168,8 +3006,8 @@ export type GovernanceType = keyof typeof GOVERNANCE_DEFINITIONS;
|
|
|
2168
3006
|
*/
|
|
2169
3007
|
export declare function getGovernanceDefinition(type: GovernanceType): unknown;
|
|
2170
3008
|
/** @deprecated Use getGovernanceDefinition('daoSingle' | 'daoMultisig' | 'daoToken' | 'daoReputation') */
|
|
2171
|
-
export declare function getDAODefinition(daoType:
|
|
2172
|
-
import type { MultisigDAO, TokenDAO, ThresholdDAO } from
|
|
3009
|
+
export declare function getDAODefinition(daoType: "Single" | "Multisig" | "Threshold" | "Token"): unknown;
|
|
3010
|
+
import type { MultisigDAO, TokenDAO, ThresholdDAO } from "../../generated/ottochain/apps/governance/v1/governance.js";
|
|
2173
3011
|
/**
|
|
2174
3012
|
* Check if multisig has enough signatures to execute
|
|
2175
3013
|
*/
|
|
@@ -2205,7 +3043,7 @@ export declare function canPropose(state: TokenDAO, agent: string): boolean;
|
|
|
2205
3043
|
/**
|
|
2206
3044
|
* Check if agent meets threshold for action
|
|
2207
3045
|
*/
|
|
2208
|
-
export declare function meetsThreshold(state: ThresholdDAO, reputation: number, action:
|
|
3046
|
+
export declare function meetsThreshold(state: ThresholdDAO, reputation: number, action: "member" | "vote" | "propose"): boolean;
|
|
2209
3047
|
/**
|
|
2210
3048
|
* Check if agent is a member
|
|
2211
3049
|
*/
|