@ottochain/sdk 2.2.5 → 2.4.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 +15 -8
- package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +89 -46
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +152 -45
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +40 -8
- package/dist/cjs/apps/corporate/index.js +2 -2
- package/dist/cjs/apps/corporate/state-machines/corp-board.js +169 -59
- package/dist/cjs/apps/corporate/state-machines/corp-entity.js +245 -47
- package/dist/cjs/apps/corporate/state-machines/corp-securities.js +407 -99
- package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +151 -37
- package/dist/cjs/apps/governance/index.js +14 -14
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +85 -43
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +73 -43
- package/dist/cjs/apps/governance/state-machines/dao-single.js +55 -14
- package/dist/cjs/apps/governance/state-machines/dao-token.js +103 -45
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +129 -65
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +29 -5
- package/dist/cjs/apps/identity/constants.js +55 -14
- package/dist/cjs/apps/identity/index.js +27 -11
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +57 -9
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +70 -27
- package/dist/cjs/apps/identity/state-machines/identity-registry.js +288 -0
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +30 -6
- package/dist/cjs/apps/identity/state-machines/index.js +3 -1
- package/dist/cjs/apps/index.js +19 -8
- package/dist/cjs/apps/lending/assets.js +223 -0
- package/dist/cjs/apps/lending/credit-scoring.js +87 -0
- package/dist/cjs/apps/lending/eligibility.js +121 -0
- package/dist/cjs/apps/lending/index.js +91 -0
- package/dist/cjs/apps/lending/state-machines/index.js +9 -0
- package/dist/cjs/apps/lending/state-machines/lending-zk-loan.js +412 -0
- package/dist/cjs/apps/markets/index.js +21 -11
- package/dist/cjs/apps/markets/state-machines/market-auction.js +44 -19
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +54 -29
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +53 -31
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +120 -61
- package/dist/cjs/apps/markets/state-machines/market-universal.js +50 -10
- package/dist/cjs/apps/oracles/index.js +2 -2
- package/dist/cjs/errors.js +3 -3
- package/dist/cjs/generated/google/protobuf/struct.js +4 -4
- package/dist/cjs/generated/index.js +11 -7
- package/dist/cjs/generated/openapi.js +6 -0
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +50 -50
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +19 -20
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +13 -13
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +4 -4
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +124 -130
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +107 -107
- package/dist/cjs/generated/ottochain/v1/common.js +1722 -1
- package/dist/cjs/generated/ottochain/v1/fiber.js +355 -5
- package/dist/cjs/generated/ottochain/v1/messages.js +775 -3
- package/dist/cjs/generated/ottochain/v1/records.js +350 -3
- package/dist/cjs/index.js +45 -7
- package/dist/cjs/openapi.js +2 -0
- package/dist/cjs/ottochain/drop-nulls.js +1 -2
- package/dist/cjs/ottochain/genesis-manifest.js +193 -0
- package/dist/cjs/ottochain/index.js +27 -13
- package/dist/cjs/ottochain/metagraph-client.js +65 -8
- package/dist/cjs/ottochain/snapshot.js +11 -12
- package/dist/cjs/ottochain/transaction.js +57 -14
- package/dist/cjs/ottochain/types.js +19 -1
- package/dist/cjs/privacy/index.js +14 -0
- package/dist/cjs/privacy/sealed-bid.js +210 -0
- package/dist/cjs/privacy/shield-app.js +131 -0
- package/dist/cjs/schema/effects.js +40 -0
- package/dist/cjs/schema/fiber-app.js +19 -13
- package/dist/cjs/schema/guard-lint.js +352 -0
- package/dist/cjs/schema/guards.js +246 -0
- package/dist/cjs/signing.js +80 -0
- package/dist/cjs/types.js +2 -3
- package/dist/cjs/validation.js +8 -8
- package/dist/cjs/verify.js +9 -4
- package/dist/cjs/zk/commit.js +53 -0
- package/dist/cjs/zk/guard.js +107 -0
- package/dist/cjs/zk/index.js +48 -0
- package/dist/cjs/zk/preimage.js +37 -0
- package/dist/cjs/zk/prover.js +87 -0
- package/dist/cjs/zk/registry.js +62 -0
- package/dist/cjs/zk/types.js +28 -0
- package/dist/cjs/zk/witness.js +19 -0
- package/dist/esm/apps/contracts/index.js +7 -3
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +89 -46
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +152 -45
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +40 -8
- package/dist/esm/apps/corporate/state-machines/corp-board.js +169 -59
- package/dist/esm/apps/corporate/state-machines/corp-entity.js +245 -47
- package/dist/esm/apps/corporate/state-machines/corp-securities.js +407 -99
- package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +151 -37
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +85 -43
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +73 -43
- package/dist/esm/apps/governance/state-machines/dao-single.js +55 -14
- package/dist/esm/apps/governance/state-machines/dao-token.js +103 -45
- package/dist/esm/apps/governance/state-machines/governance-simple.js +129 -65
- package/dist/esm/apps/governance/state-machines/governance-universal.js +29 -5
- package/dist/esm/apps/identity/constants.js +51 -12
- package/dist/esm/apps/identity/index.js +12 -7
- package/dist/esm/apps/identity/state-machines/identity-agent.js +57 -9
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +70 -27
- package/dist/esm/apps/identity/state-machines/identity-registry.js +285 -0
- package/dist/esm/apps/identity/state-machines/identity-universal.js +30 -6
- package/dist/esm/apps/identity/state-machines/index.js +1 -0
- package/dist/esm/apps/index.js +1 -0
- package/dist/esm/apps/lending/assets.js +207 -0
- package/dist/esm/apps/lending/credit-scoring.js +81 -0
- package/dist/esm/apps/lending/eligibility.js +115 -0
- package/dist/esm/apps/lending/index.js +69 -0
- package/dist/esm/apps/lending/state-machines/index.js +5 -0
- package/dist/esm/apps/lending/state-machines/lending-zk-loan.js +409 -0
- package/dist/esm/apps/markets/index.js +8 -4
- package/dist/esm/apps/markets/state-machines/market-auction.js +44 -19
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +54 -29
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +53 -31
- package/dist/esm/apps/markets/state-machines/market-prediction.js +120 -61
- package/dist/esm/apps/markets/state-machines/market-universal.js +50 -10
- package/dist/esm/generated/index.js +9 -5
- package/dist/esm/generated/openapi.js +5 -0
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +46 -46
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +114 -120
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +100 -100
- package/dist/esm/generated/ottochain/v1/common.js +1718 -0
- package/dist/esm/generated/ottochain/v1/fiber.js +351 -1
- package/dist/esm/generated/ottochain/v1/messages.js +774 -2
- package/dist/esm/generated/ottochain/v1/records.js +349 -2
- package/dist/esm/index.js +23 -2
- package/dist/esm/openapi.js +1 -0
- package/dist/esm/ottochain/genesis-manifest.js +189 -0
- package/dist/esm/ottochain/index.js +4 -3
- package/dist/esm/ottochain/metagraph-client.js +65 -8
- package/dist/esm/ottochain/snapshot.js +4 -4
- package/dist/esm/ottochain/transaction.js +43 -3
- package/dist/esm/ottochain/types.js +18 -0
- package/dist/esm/privacy/index.js +6 -0
- package/dist/esm/privacy/sealed-bid.js +206 -0
- package/dist/esm/privacy/shield-app.js +127 -0
- package/dist/esm/schema/effects.js +35 -0
- package/dist/esm/schema/fiber-app.js +13 -6
- package/dist/esm/schema/guard-lint.js +346 -0
- package/dist/esm/schema/guards.js +229 -0
- package/dist/esm/signing.js +74 -0
- package/dist/esm/verify.js +8 -2
- package/dist/esm/zk/commit.js +44 -0
- package/dist/esm/zk/guard.js +99 -0
- package/dist/esm/zk/index.js +19 -0
- package/dist/esm/zk/preimage.js +30 -0
- package/dist/esm/zk/prover.js +82 -0
- package/dist/esm/zk/registry.js +55 -0
- package/dist/esm/zk/types.js +25 -0
- package/dist/esm/zk/witness.js +15 -0
- package/dist/types/apps/contracts/index.d.ts +159 -227
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +50 -101
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +86 -120
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +20 -4
- package/dist/types/apps/corporate/index.d.ts +1040 -304
- package/dist/types/apps/corporate/state-machines/corp-board.d.ts +188 -52
- package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +267 -62
- package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +355 -131
- package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +225 -53
- package/dist/types/apps/governance/index.d.ts +396 -417
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +92 -95
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +57 -69
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +40 -50
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +80 -53
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +107 -121
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +17 -5
- package/dist/types/apps/identity/constants.d.ts +32 -4
- package/dist/types/apps/identity/index.d.ts +449 -100
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +30 -0
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +41 -87
- package/dist/types/apps/identity/state-machines/identity-registry.d.ts +379 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +15 -0
- package/dist/types/apps/identity/state-machines/index.d.ts +1 -0
- package/dist/types/apps/index.d.ts +1 -0
- package/dist/types/apps/lending/assets.d.ts +258 -0
- package/dist/types/apps/lending/credit-scoring.d.ts +80 -0
- package/dist/types/apps/lending/eligibility.d.ts +83 -0
- package/dist/types/apps/lending/index.d.ts +548 -0
- package/dist/types/apps/lending/state-machines/index.d.ts +5 -0
- package/dist/types/apps/lending/state-machines/lending-zk-loan.d.ts +528 -0
- package/dist/types/apps/markets/index.d.ts +184 -204
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +25 -37
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +26 -34
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +31 -43
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +67 -72
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +30 -10
- package/dist/types/generated/index.d.ts +5 -5
- package/dist/types/generated/openapi.d.ts +1257 -0
- package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +5 -5
- package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +12 -12
- package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +11 -11
- package/dist/types/generated/ottochain/v1/common.d.ts +228 -0
- package/dist/types/generated/ottochain/v1/fiber.d.ts +32 -1
- package/dist/types/generated/ottochain/v1/messages.d.ts +84 -0
- package/dist/types/generated/ottochain/v1/records.d.ts +34 -0
- package/dist/types/index.d.ts +8 -2
- package/dist/types/openapi.d.ts +22 -0
- package/dist/types/ottochain/genesis-manifest.d.ts +130 -0
- package/dist/types/ottochain/index.d.ts +6 -5
- package/dist/types/ottochain/metagraph-client.d.ts +49 -7
- package/dist/types/ottochain/snapshot.d.ts +6 -6
- package/dist/types/ottochain/transaction.d.ts +33 -1
- package/dist/types/ottochain/types.d.ts +602 -11
- package/dist/types/privacy/index.d.ts +6 -0
- package/dist/types/privacy/sealed-bid.d.ts +348 -0
- package/dist/types/privacy/shield-app.d.ts +48 -0
- package/dist/types/schema/effects.d.ts +34 -0
- package/dist/types/schema/fiber-app.d.ts +41 -3
- package/dist/types/schema/guard-lint.d.ts +111 -0
- package/dist/types/schema/guards.d.ts +134 -0
- package/dist/types/signing.d.ts +45 -0
- package/dist/types/validation.d.ts +22 -217
- package/dist/types/verify.d.ts +4 -0
- package/dist/types/zk/commit.d.ts +28 -0
- package/dist/types/zk/guard.d.ts +46 -0
- package/dist/types/zk/index.d.ts +19 -0
- package/dist/types/zk/preimage.d.ts +10 -0
- package/dist/types/zk/prover.d.ts +34 -0
- package/dist/types/zk/registry.d.ts +34 -0
- package/dist/types/zk/types.d.ts +33 -0
- package/dist/types/zk/witness.d.ts +40 -0
- package/package.json +52 -35
- package/dist/cjs/ottochain/normalize.js +0 -186
- package/dist/esm/ottochain/normalize.js +0 -179
- package/dist/types/ottochain/normalize.d.ts +0 -79
|
@@ -110,17 +110,29 @@ export declare const daoSingleDef: {
|
|
|
110
110
|
readonly ACTIVE: {
|
|
111
111
|
readonly id: "ACTIVE";
|
|
112
112
|
readonly isFinal: false;
|
|
113
|
-
readonly metadata:
|
|
113
|
+
readonly metadata: {
|
|
114
|
+
readonly label: "Active";
|
|
115
|
+
readonly description: "Single owner controls the DAO and may act or transfer ownership";
|
|
116
|
+
readonly category: "initial";
|
|
117
|
+
};
|
|
114
118
|
};
|
|
115
119
|
readonly TRANSFERRING: {
|
|
116
120
|
readonly id: "TRANSFERRING";
|
|
117
121
|
readonly isFinal: false;
|
|
118
|
-
readonly metadata:
|
|
122
|
+
readonly metadata: {
|
|
123
|
+
readonly label: "Transferring";
|
|
124
|
+
readonly description: "Ownership transfer proposed; awaiting acceptance";
|
|
125
|
+
readonly category: "pending";
|
|
126
|
+
};
|
|
119
127
|
};
|
|
120
128
|
readonly DISSOLVED: {
|
|
121
129
|
readonly id: "DISSOLVED";
|
|
122
130
|
readonly isFinal: true;
|
|
123
|
-
readonly metadata:
|
|
131
|
+
readonly metadata: {
|
|
132
|
+
readonly label: "Dissolved";
|
|
133
|
+
readonly description: "DAO dissolved by its owner (terminal)";
|
|
134
|
+
readonly category: "terminal";
|
|
135
|
+
};
|
|
124
136
|
};
|
|
125
137
|
};
|
|
126
138
|
readonly initialState: "ACTIVE";
|
|
@@ -128,13 +140,7 @@ export declare const daoSingleDef: {
|
|
|
128
140
|
readonly from: "ACTIVE";
|
|
129
141
|
readonly to: "ACTIVE";
|
|
130
142
|
readonly eventName: "execute";
|
|
131
|
-
readonly guard:
|
|
132
|
-
readonly "===": readonly [{
|
|
133
|
-
readonly var: "event.agent";
|
|
134
|
-
}, {
|
|
135
|
-
readonly var: "state.owner";
|
|
136
|
-
}];
|
|
137
|
-
};
|
|
143
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
138
144
|
readonly effect: {
|
|
139
145
|
readonly merge: readonly [{
|
|
140
146
|
readonly var: "state";
|
|
@@ -153,28 +159,27 @@ export declare const daoSingleDef: {
|
|
|
153
159
|
readonly var: "event.payload";
|
|
154
160
|
};
|
|
155
161
|
readonly executedAt: {
|
|
156
|
-
readonly var: "$
|
|
162
|
+
readonly var: "$ordinal";
|
|
157
163
|
};
|
|
158
164
|
}]];
|
|
159
165
|
};
|
|
166
|
+
readonly _emit: readonly [{
|
|
167
|
+
readonly name: "action_executed";
|
|
168
|
+
readonly data: {
|
|
169
|
+
readonly actionId: {
|
|
170
|
+
readonly var: "event.actionId";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly destination: "external";
|
|
174
|
+
}];
|
|
160
175
|
}];
|
|
161
176
|
};
|
|
162
|
-
readonly emits: readonly [{
|
|
163
|
-
readonly event: "action_executed";
|
|
164
|
-
readonly to: "external";
|
|
165
|
-
}];
|
|
166
177
|
readonly dependencies: readonly [];
|
|
167
178
|
}, {
|
|
168
179
|
readonly from: "ACTIVE";
|
|
169
180
|
readonly to: "TRANSFERRING";
|
|
170
181
|
readonly eventName: "transfer_ownership";
|
|
171
|
-
readonly guard:
|
|
172
|
-
readonly "===": readonly [{
|
|
173
|
-
readonly var: "event.agent";
|
|
174
|
-
}, {
|
|
175
|
-
readonly var: "state.owner";
|
|
176
|
-
}];
|
|
177
|
-
};
|
|
182
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
178
183
|
readonly effect: {
|
|
179
184
|
readonly merge: readonly [{
|
|
180
185
|
readonly var: "state";
|
|
@@ -183,7 +188,7 @@ export declare const daoSingleDef: {
|
|
|
183
188
|
readonly var: "event.newOwner";
|
|
184
189
|
};
|
|
185
190
|
readonly transferInitiatedAt: {
|
|
186
|
-
readonly var: "$
|
|
191
|
+
readonly var: "$ordinal";
|
|
187
192
|
};
|
|
188
193
|
}];
|
|
189
194
|
};
|
|
@@ -192,13 +197,7 @@ export declare const daoSingleDef: {
|
|
|
192
197
|
readonly from: "TRANSFERRING";
|
|
193
198
|
readonly to: "ACTIVE";
|
|
194
199
|
readonly eventName: "accept_ownership";
|
|
195
|
-
readonly guard:
|
|
196
|
-
readonly "===": readonly [{
|
|
197
|
-
readonly var: "event.agent";
|
|
198
|
-
}, {
|
|
199
|
-
readonly var: "state.pendingOwner";
|
|
200
|
-
}];
|
|
201
|
-
};
|
|
200
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
202
201
|
readonly effect: {
|
|
203
202
|
readonly merge: readonly [{
|
|
204
203
|
readonly var: "state";
|
|
@@ -219,28 +218,25 @@ export declare const daoSingleDef: {
|
|
|
219
218
|
readonly var: "state.pendingOwner";
|
|
220
219
|
};
|
|
221
220
|
readonly at: {
|
|
222
|
-
readonly var: "$
|
|
221
|
+
readonly var: "$ordinal";
|
|
223
222
|
};
|
|
224
223
|
}]];
|
|
225
224
|
};
|
|
225
|
+
readonly _emit: readonly [{
|
|
226
|
+
readonly name: "ownership_transferred";
|
|
227
|
+
readonly data: {
|
|
228
|
+
readonly var: "event";
|
|
229
|
+
};
|
|
230
|
+
readonly destination: "Identity";
|
|
231
|
+
}];
|
|
226
232
|
}];
|
|
227
233
|
};
|
|
228
|
-
readonly emits: readonly [{
|
|
229
|
-
readonly event: "ownership_transferred";
|
|
230
|
-
readonly to: "Identity";
|
|
231
|
-
}];
|
|
232
234
|
readonly dependencies: readonly [];
|
|
233
235
|
}, {
|
|
234
236
|
readonly from: "TRANSFERRING";
|
|
235
237
|
readonly to: "ACTIVE";
|
|
236
238
|
readonly eventName: "cancel_transfer";
|
|
237
|
-
readonly guard:
|
|
238
|
-
readonly "===": readonly [{
|
|
239
|
-
readonly var: "event.agent";
|
|
240
|
-
}, {
|
|
241
|
-
readonly var: "state.owner";
|
|
242
|
-
}];
|
|
243
|
-
};
|
|
239
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
244
240
|
readonly effect: {
|
|
245
241
|
readonly merge: readonly [{
|
|
246
242
|
readonly var: "state";
|
|
@@ -254,19 +250,13 @@ export declare const daoSingleDef: {
|
|
|
254
250
|
readonly from: "ACTIVE";
|
|
255
251
|
readonly to: "DISSOLVED";
|
|
256
252
|
readonly eventName: "dissolve";
|
|
257
|
-
readonly guard:
|
|
258
|
-
readonly "===": readonly [{
|
|
259
|
-
readonly var: "event.agent";
|
|
260
|
-
}, {
|
|
261
|
-
readonly var: "state.owner";
|
|
262
|
-
}];
|
|
263
|
-
};
|
|
253
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
264
254
|
readonly effect: {
|
|
265
255
|
readonly merge: readonly [{
|
|
266
256
|
readonly var: "state";
|
|
267
257
|
}, {
|
|
268
258
|
readonly dissolvedAt: {
|
|
269
|
-
readonly var: "$
|
|
259
|
+
readonly var: "$ordinal";
|
|
270
260
|
};
|
|
271
261
|
readonly status: "DISSOLVED";
|
|
272
262
|
}];
|
|
@@ -169,22 +169,38 @@ export declare const daoTokenDef: {
|
|
|
169
169
|
readonly ACTIVE: {
|
|
170
170
|
readonly id: "ACTIVE";
|
|
171
171
|
readonly isFinal: false;
|
|
172
|
-
readonly metadata:
|
|
172
|
+
readonly metadata: {
|
|
173
|
+
readonly label: "Active";
|
|
174
|
+
readonly description: "DAO is idle and ready to accept a proposal";
|
|
175
|
+
readonly category: "initial";
|
|
176
|
+
};
|
|
173
177
|
};
|
|
174
178
|
readonly VOTING: {
|
|
175
179
|
readonly id: "VOTING";
|
|
176
180
|
readonly isFinal: false;
|
|
177
|
-
readonly metadata:
|
|
181
|
+
readonly metadata: {
|
|
182
|
+
readonly label: "Voting";
|
|
183
|
+
readonly description: "Token holders are voting on the active proposal";
|
|
184
|
+
readonly category: "pending";
|
|
185
|
+
};
|
|
178
186
|
};
|
|
179
187
|
readonly QUEUED: {
|
|
180
188
|
readonly id: "QUEUED";
|
|
181
189
|
readonly isFinal: false;
|
|
182
|
-
readonly metadata:
|
|
190
|
+
readonly metadata: {
|
|
191
|
+
readonly label: "Queued";
|
|
192
|
+
readonly description: "Passed proposal queued in timelock before execution";
|
|
193
|
+
readonly category: "pending";
|
|
194
|
+
};
|
|
183
195
|
};
|
|
184
196
|
readonly DISSOLVED: {
|
|
185
197
|
readonly id: "DISSOLVED";
|
|
186
198
|
readonly isFinal: true;
|
|
187
|
-
readonly metadata:
|
|
199
|
+
readonly metadata: {
|
|
200
|
+
readonly label: "Dissolved";
|
|
201
|
+
readonly description: "Token DAO dissolved (terminal)";
|
|
202
|
+
readonly category: "terminal";
|
|
203
|
+
};
|
|
188
204
|
};
|
|
189
205
|
};
|
|
190
206
|
readonly initialState: "ACTIVE";
|
|
@@ -193,14 +209,22 @@ export declare const daoTokenDef: {
|
|
|
193
209
|
readonly to: "VOTING";
|
|
194
210
|
readonly eventName: "propose";
|
|
195
211
|
readonly guard: {
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
198
|
-
readonly var: "
|
|
212
|
+
readonly some: readonly [{
|
|
213
|
+
readonly map: readonly [{
|
|
214
|
+
readonly var: "proofs";
|
|
199
215
|
}, {
|
|
200
|
-
readonly var: "
|
|
216
|
+
readonly var: "address";
|
|
201
217
|
}];
|
|
202
218
|
}, {
|
|
203
|
-
readonly
|
|
219
|
+
readonly ">=": readonly [{
|
|
220
|
+
readonly get: readonly [{
|
|
221
|
+
readonly var: "state.balances";
|
|
222
|
+
}, {
|
|
223
|
+
readonly var: "";
|
|
224
|
+
}];
|
|
225
|
+
}, {
|
|
226
|
+
readonly var: "state.proposalThreshold";
|
|
227
|
+
}];
|
|
204
228
|
}];
|
|
205
229
|
};
|
|
206
230
|
readonly effect: {
|
|
@@ -227,11 +251,11 @@ export declare const daoTokenDef: {
|
|
|
227
251
|
readonly var: "event.agent";
|
|
228
252
|
};
|
|
229
253
|
readonly proposedAt: {
|
|
230
|
-
readonly var: "$
|
|
254
|
+
readonly var: "$ordinal";
|
|
231
255
|
};
|
|
232
256
|
readonly votingEndsAt: {
|
|
233
257
|
readonly "+": readonly [{
|
|
234
|
-
readonly var: "$
|
|
258
|
+
readonly var: "$ordinal";
|
|
235
259
|
}, {
|
|
236
260
|
readonly var: "state.votingPeriodMs";
|
|
237
261
|
}];
|
|
@@ -254,9 +278,9 @@ export declare const daoTokenDef: {
|
|
|
254
278
|
readonly to: "VOTING";
|
|
255
279
|
readonly eventName: "vote";
|
|
256
280
|
readonly guard: {
|
|
257
|
-
readonly and: readonly [{
|
|
281
|
+
readonly and: readonly [import("../../../schema/guards.js").GuardRule, {
|
|
258
282
|
readonly ">": readonly [{
|
|
259
|
-
readonly
|
|
283
|
+
readonly get: readonly [{
|
|
260
284
|
readonly var: "state.balances";
|
|
261
285
|
}, {
|
|
262
286
|
readonly var: "event.agent";
|
|
@@ -264,7 +288,7 @@ export declare const daoTokenDef: {
|
|
|
264
288
|
}, 0];
|
|
265
289
|
}, {
|
|
266
290
|
readonly "!": readonly [{
|
|
267
|
-
readonly
|
|
291
|
+
readonly has: readonly [{
|
|
268
292
|
readonly var: "state.votes.voters";
|
|
269
293
|
}, {
|
|
270
294
|
readonly var: "event.agent";
|
|
@@ -272,7 +296,7 @@ export declare const daoTokenDef: {
|
|
|
272
296
|
}];
|
|
273
297
|
}, {
|
|
274
298
|
readonly "<=": readonly [{
|
|
275
|
-
readonly var: "$
|
|
299
|
+
readonly var: "$ordinal";
|
|
276
300
|
}, {
|
|
277
301
|
readonly var: "state.proposal.votingEndsAt";
|
|
278
302
|
}];
|
|
@@ -295,7 +319,7 @@ export declare const daoTokenDef: {
|
|
|
295
319
|
readonly "+": readonly [{
|
|
296
320
|
readonly var: "state.votes.for";
|
|
297
321
|
}, {
|
|
298
|
-
readonly
|
|
322
|
+
readonly get: readonly [{
|
|
299
323
|
readonly var: "state.balances";
|
|
300
324
|
}, {
|
|
301
325
|
readonly var: "event.agent";
|
|
@@ -311,7 +335,7 @@ export declare const daoTokenDef: {
|
|
|
311
335
|
readonly "+": readonly [{
|
|
312
336
|
readonly var: "state.votes.against";
|
|
313
337
|
}, {
|
|
314
|
-
readonly
|
|
338
|
+
readonly get: readonly [{
|
|
315
339
|
readonly var: "state.balances";
|
|
316
340
|
}, {
|
|
317
341
|
readonly var: "event.agent";
|
|
@@ -323,7 +347,7 @@ export declare const daoTokenDef: {
|
|
|
323
347
|
readonly "+": readonly [{
|
|
324
348
|
readonly var: "state.votes.abstain";
|
|
325
349
|
}, {
|
|
326
|
-
readonly
|
|
350
|
+
readonly get: readonly [{
|
|
327
351
|
readonly var: "state.balances";
|
|
328
352
|
}, {
|
|
329
353
|
readonly var: "event.agent";
|
|
@@ -333,7 +357,7 @@ export declare const daoTokenDef: {
|
|
|
333
357
|
}];
|
|
334
358
|
}, {
|
|
335
359
|
readonly voters: {
|
|
336
|
-
readonly
|
|
360
|
+
readonly set: readonly [{
|
|
337
361
|
readonly var: "state.votes.voters";
|
|
338
362
|
}, {
|
|
339
363
|
readonly var: "event.agent";
|
|
@@ -342,14 +366,14 @@ export declare const daoTokenDef: {
|
|
|
342
366
|
readonly var: "event.vote";
|
|
343
367
|
};
|
|
344
368
|
readonly weight: {
|
|
345
|
-
readonly
|
|
369
|
+
readonly get: readonly [{
|
|
346
370
|
readonly var: "state.balances";
|
|
347
371
|
}, {
|
|
348
372
|
readonly var: "event.agent";
|
|
349
373
|
}];
|
|
350
374
|
};
|
|
351
375
|
readonly votedAt: {
|
|
352
|
-
readonly var: "$
|
|
376
|
+
readonly var: "$ordinal";
|
|
353
377
|
};
|
|
354
378
|
}];
|
|
355
379
|
};
|
|
@@ -365,7 +389,7 @@ export declare const daoTokenDef: {
|
|
|
365
389
|
readonly guard: {
|
|
366
390
|
readonly and: readonly [{
|
|
367
391
|
readonly ">": readonly [{
|
|
368
|
-
readonly var: "$
|
|
392
|
+
readonly var: "$ordinal";
|
|
369
393
|
}, {
|
|
370
394
|
readonly var: "state.proposal.votingEndsAt";
|
|
371
395
|
}];
|
|
@@ -398,11 +422,11 @@ export declare const daoTokenDef: {
|
|
|
398
422
|
readonly var: "state.proposal";
|
|
399
423
|
}, {
|
|
400
424
|
readonly queuedAt: {
|
|
401
|
-
readonly var: "$
|
|
425
|
+
readonly var: "$ordinal";
|
|
402
426
|
};
|
|
403
427
|
readonly executableAt: {
|
|
404
428
|
readonly "+": readonly [{
|
|
405
|
-
readonly var: "$
|
|
429
|
+
readonly var: "$ordinal";
|
|
406
430
|
}, {
|
|
407
431
|
readonly var: "state.timelockMs";
|
|
408
432
|
}];
|
|
@@ -418,7 +442,7 @@ export declare const daoTokenDef: {
|
|
|
418
442
|
readonly eventName: "execute";
|
|
419
443
|
readonly guard: {
|
|
420
444
|
readonly ">=": readonly [{
|
|
421
|
-
readonly var: "$
|
|
445
|
+
readonly var: "$ordinal";
|
|
422
446
|
}, {
|
|
423
447
|
readonly var: "state.proposal.executableAt";
|
|
424
448
|
}];
|
|
@@ -438,19 +462,24 @@ export declare const daoTokenDef: {
|
|
|
438
462
|
readonly var: "state.votes";
|
|
439
463
|
};
|
|
440
464
|
readonly executedAt: {
|
|
441
|
-
readonly var: "$
|
|
465
|
+
readonly var: "$ordinal";
|
|
442
466
|
};
|
|
443
467
|
}];
|
|
444
468
|
}]];
|
|
445
469
|
};
|
|
446
470
|
readonly proposal: null;
|
|
447
471
|
readonly votes: null;
|
|
472
|
+
readonly _emit: readonly [{
|
|
473
|
+
readonly name: "proposal_executed";
|
|
474
|
+
readonly data: {
|
|
475
|
+
readonly proposalId: {
|
|
476
|
+
readonly var: "state.proposal.id";
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
readonly destination: "external";
|
|
480
|
+
}];
|
|
448
481
|
}];
|
|
449
482
|
};
|
|
450
|
-
readonly emits: readonly [{
|
|
451
|
-
readonly event: "proposal_executed";
|
|
452
|
-
readonly to: "external";
|
|
453
|
-
}];
|
|
454
483
|
readonly dependencies: readonly [];
|
|
455
484
|
}, {
|
|
456
485
|
readonly from: "VOTING";
|
|
@@ -459,7 +488,7 @@ export declare const daoTokenDef: {
|
|
|
459
488
|
readonly guard: {
|
|
460
489
|
readonly and: readonly [{
|
|
461
490
|
readonly ">": readonly [{
|
|
462
|
-
readonly var: "$
|
|
491
|
+
readonly var: "$ordinal";
|
|
463
492
|
}, {
|
|
464
493
|
readonly var: "state.proposal.votingEndsAt";
|
|
465
494
|
}];
|
|
@@ -500,7 +529,7 @@ export declare const daoTokenDef: {
|
|
|
500
529
|
readonly var: "state.votes";
|
|
501
530
|
};
|
|
502
531
|
readonly rejectedAt: {
|
|
503
|
-
readonly var: "$
|
|
532
|
+
readonly var: "$ordinal";
|
|
504
533
|
};
|
|
505
534
|
}];
|
|
506
535
|
}]];
|
|
@@ -514,13 +543,7 @@ export declare const daoTokenDef: {
|
|
|
514
543
|
readonly from: "QUEUED";
|
|
515
544
|
readonly to: "ACTIVE";
|
|
516
545
|
readonly eventName: "cancel";
|
|
517
|
-
readonly guard:
|
|
518
|
-
readonly "===": readonly [{
|
|
519
|
-
readonly var: "event.agent";
|
|
520
|
-
}, {
|
|
521
|
-
readonly var: "state.proposal.proposer";
|
|
522
|
-
}];
|
|
523
|
-
};
|
|
546
|
+
readonly guard: import("../../../schema/guards.js").GuardRule;
|
|
524
547
|
readonly effect: {
|
|
525
548
|
readonly merge: readonly [{
|
|
526
549
|
readonly var: "state";
|
|
@@ -533,7 +556,7 @@ export declare const daoTokenDef: {
|
|
|
533
556
|
readonly var: "state.proposal";
|
|
534
557
|
}, {
|
|
535
558
|
readonly cancelledAt: {
|
|
536
|
-
readonly var: "$
|
|
559
|
+
readonly var: "$ordinal";
|
|
537
560
|
};
|
|
538
561
|
}];
|
|
539
562
|
}]];
|
|
@@ -548,20 +571,22 @@ export declare const daoTokenDef: {
|
|
|
548
571
|
readonly to: "ACTIVE";
|
|
549
572
|
readonly eventName: "delegate";
|
|
550
573
|
readonly guard: {
|
|
551
|
-
readonly
|
|
552
|
-
readonly
|
|
553
|
-
readonly
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
574
|
+
readonly and: readonly [import("../../../schema/guards.js").GuardRule, {
|
|
575
|
+
readonly ">": readonly [{
|
|
576
|
+
readonly get: readonly [{
|
|
577
|
+
readonly var: "state.balances";
|
|
578
|
+
}, {
|
|
579
|
+
readonly var: "event.agent";
|
|
580
|
+
}];
|
|
581
|
+
}, 0];
|
|
582
|
+
}];
|
|
558
583
|
};
|
|
559
584
|
readonly effect: {
|
|
560
585
|
readonly merge: readonly [{
|
|
561
586
|
readonly var: "state";
|
|
562
587
|
}, {
|
|
563
588
|
readonly delegations: {
|
|
564
|
-
readonly
|
|
589
|
+
readonly set: readonly [{
|
|
565
590
|
readonly var: "state.delegations";
|
|
566
591
|
}, {
|
|
567
592
|
readonly var: "event.agent";
|
|
@@ -577,10 +602,12 @@ export declare const daoTokenDef: {
|
|
|
577
602
|
readonly to: "ACTIVE";
|
|
578
603
|
readonly eventName: "undelegate";
|
|
579
604
|
readonly guard: {
|
|
580
|
-
readonly
|
|
581
|
-
readonly
|
|
582
|
-
|
|
583
|
-
|
|
605
|
+
readonly and: readonly [import("../../../schema/guards.js").GuardRule, {
|
|
606
|
+
readonly has: readonly [{
|
|
607
|
+
readonly var: "state.delegations";
|
|
608
|
+
}, {
|
|
609
|
+
readonly var: "event.agent";
|
|
610
|
+
}];
|
|
584
611
|
}];
|
|
585
612
|
};
|
|
586
613
|
readonly effect: {
|
|
@@ -588,7 +615,7 @@ export declare const daoTokenDef: {
|
|
|
588
615
|
readonly var: "state";
|
|
589
616
|
}, {
|
|
590
617
|
readonly delegations: {
|
|
591
|
-
readonly
|
|
618
|
+
readonly unset: readonly [{
|
|
592
619
|
readonly var: "state.delegations";
|
|
593
620
|
}, {
|
|
594
621
|
readonly var: "event.agent";
|