@ottochain/sdk 2.2.5 → 2.3.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/state-machines/contract-agreement.js +54 -6
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +72 -8
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +36 -4
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +27 -3
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +27 -3
- package/dist/cjs/apps/governance/state-machines/dao-single.js +27 -3
- package/dist/cjs/apps/governance/state-machines/dao-token.js +36 -4
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +36 -4
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +27 -3
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +54 -6
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +45 -5
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +27 -3
- package/dist/cjs/apps/markets/state-machines/market-auction.js +30 -6
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +25 -5
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +29 -5
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +40 -8
- package/dist/cjs/apps/markets/state-machines/market-universal.js +45 -5
- package/dist/cjs/generated/ottochain/v1/common.js +1722 -1
- package/dist/cjs/generated/ottochain/v1/fiber.js +352 -2
- 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 +5 -1
- package/dist/cjs/ottochain/genesis-manifest.js +193 -0
- package/dist/cjs/ottochain/index.js +5 -1
- package/dist/cjs/ottochain/types.js +4 -0
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +54 -6
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +72 -8
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +36 -4
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +27 -3
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +27 -3
- package/dist/esm/apps/governance/state-machines/dao-single.js +27 -3
- package/dist/esm/apps/governance/state-machines/dao-token.js +36 -4
- package/dist/esm/apps/governance/state-machines/governance-simple.js +36 -4
- package/dist/esm/apps/governance/state-machines/governance-universal.js +27 -3
- package/dist/esm/apps/identity/state-machines/identity-agent.js +54 -6
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +45 -5
- package/dist/esm/apps/identity/state-machines/identity-universal.js +27 -3
- package/dist/esm/apps/markets/state-machines/market-auction.js +30 -6
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +25 -5
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +29 -5
- package/dist/esm/apps/markets/state-machines/market-prediction.js +40 -8
- package/dist/esm/apps/markets/state-machines/market-universal.js +45 -5
- 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 +2 -0
- package/dist/esm/ottochain/genesis-manifest.js +189 -0
- package/dist/esm/ottochain/index.js +2 -0
- package/dist/esm/ottochain/types.js +4 -0
- package/dist/types/apps/contracts/index.d.ts +90 -18
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +30 -6
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +40 -8
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +20 -4
- package/dist/types/apps/governance/index.d.ts +114 -33
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +15 -3
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +15 -3
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +15 -3
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +20 -4
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +20 -4
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +15 -3
- package/dist/types/apps/identity/index.d.ts +71 -6
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +30 -0
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +25 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +15 -0
- package/dist/types/apps/markets/index.d.ts +80 -5
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +12 -0
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +10 -0
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +14 -0
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +16 -0
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +25 -5
- 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 +3 -1
- package/dist/types/ottochain/genesis-manifest.d.ts +130 -0
- package/dist/types/ottochain/index.d.ts +3 -1
- package/dist/types/ottochain/types.d.ts +288 -2
- package/dist/types/schema/fiber-app.d.ts +40 -1
- package/dist/types/validation.d.ts +17 -17
- package/package.json +30 -27
|
@@ -49,9 +49,33 @@ export const govUniversalDef = defineFiberApp({
|
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
states: {
|
|
52
|
-
ACTIVE: {
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
ACTIVE: {
|
|
53
|
+
id: "ACTIVE",
|
|
54
|
+
isFinal: false,
|
|
55
|
+
metadata: {
|
|
56
|
+
label: "Active",
|
|
57
|
+
description: "Governance is idle and ready to accept a proposal",
|
|
58
|
+
category: "initial",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
VOTING: {
|
|
62
|
+
id: "VOTING",
|
|
63
|
+
isFinal: false,
|
|
64
|
+
metadata: {
|
|
65
|
+
label: "Voting",
|
|
66
|
+
description: "A proposal is open for voting",
|
|
67
|
+
category: "pending",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
DISSOLVED: {
|
|
71
|
+
id: "DISSOLVED",
|
|
72
|
+
isFinal: true,
|
|
73
|
+
metadata: {
|
|
74
|
+
label: "Dissolved",
|
|
75
|
+
description: "Governance entity dissolved (terminal)",
|
|
76
|
+
category: "terminal",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
55
79
|
},
|
|
56
80
|
initialState: "ACTIVE",
|
|
57
81
|
transitions: [
|
|
@@ -129,12 +129,60 @@ export const identityAgentDef = defineFiberApp({
|
|
|
129
129
|
},
|
|
130
130
|
},
|
|
131
131
|
states: {
|
|
132
|
-
REGISTERED: {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
REGISTERED: {
|
|
133
|
+
id: "REGISTERED",
|
|
134
|
+
isFinal: false,
|
|
135
|
+
metadata: {
|
|
136
|
+
label: "Registered",
|
|
137
|
+
description: "Agent registered but not yet activated",
|
|
138
|
+
category: "initial",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
ACTIVE: {
|
|
142
|
+
id: "ACTIVE",
|
|
143
|
+
isFinal: false,
|
|
144
|
+
metadata: {
|
|
145
|
+
label: "Active",
|
|
146
|
+
description: "Agent is active and accruing reputation",
|
|
147
|
+
category: "active",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
CHALLENGED: {
|
|
151
|
+
id: "CHALLENGED",
|
|
152
|
+
isFinal: false,
|
|
153
|
+
metadata: {
|
|
154
|
+
label: "Challenged",
|
|
155
|
+
description: "A challenge has been raised; awaiting resolution",
|
|
156
|
+
category: "pending",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
SUSPENDED: {
|
|
160
|
+
id: "SUSPENDED",
|
|
161
|
+
isFinal: false,
|
|
162
|
+
metadata: {
|
|
163
|
+
label: "Suspended",
|
|
164
|
+
description: "Agent suspended after an upheld challenge",
|
|
165
|
+
category: "pending",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
PROBATION: {
|
|
169
|
+
id: "PROBATION",
|
|
170
|
+
isFinal: false,
|
|
171
|
+
metadata: {
|
|
172
|
+
label: "Probation",
|
|
173
|
+
description: "Conditional reinstatement under monitoring",
|
|
174
|
+
category: "active",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
WITHDRAWN: {
|
|
178
|
+
id: "WITHDRAWN",
|
|
179
|
+
isFinal: true,
|
|
180
|
+
metadata: {
|
|
181
|
+
label: "Withdrawn",
|
|
182
|
+
description: "Agent withdrawn from the registry (terminal)",
|
|
183
|
+
category: "terminal",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
138
186
|
},
|
|
139
187
|
initialState: "REGISTERED",
|
|
140
188
|
transitions: [
|
|
@@ -129,11 +129,51 @@ export const identityOracleDef = defineFiberApp({
|
|
|
129
129
|
},
|
|
130
130
|
},
|
|
131
131
|
states: {
|
|
132
|
-
UNREGISTERED: {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
UNREGISTERED: {
|
|
133
|
+
id: "UNREGISTERED",
|
|
134
|
+
isFinal: false,
|
|
135
|
+
metadata: {
|
|
136
|
+
label: "Unregistered",
|
|
137
|
+
description: "Oracle not yet registered; awaiting stake",
|
|
138
|
+
category: "initial",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
REGISTERED: {
|
|
142
|
+
id: "REGISTERED",
|
|
143
|
+
isFinal: false,
|
|
144
|
+
metadata: {
|
|
145
|
+
label: "Registered",
|
|
146
|
+
description: "Oracle staked and registered but not yet active",
|
|
147
|
+
category: "pending",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
ACTIVE: {
|
|
151
|
+
id: "ACTIVE",
|
|
152
|
+
isFinal: false,
|
|
153
|
+
metadata: {
|
|
154
|
+
label: "Active",
|
|
155
|
+
description: "Oracle is active and may submit resolutions",
|
|
156
|
+
category: "active",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
SLASHED: {
|
|
160
|
+
id: "SLASHED",
|
|
161
|
+
isFinal: false,
|
|
162
|
+
metadata: {
|
|
163
|
+
label: "Slashed",
|
|
164
|
+
description: "Oracle penalized for a lost dispute; stake reduced",
|
|
165
|
+
category: "pending",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
WITHDRAWN: {
|
|
169
|
+
id: "WITHDRAWN",
|
|
170
|
+
isFinal: true,
|
|
171
|
+
metadata: {
|
|
172
|
+
label: "Withdrawn",
|
|
173
|
+
description: "Oracle withdrawn and stake reclaimed (terminal)",
|
|
174
|
+
category: "terminal",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
137
177
|
},
|
|
138
178
|
initialState: "UNREGISTERED",
|
|
139
179
|
transitions: [
|
|
@@ -54,9 +54,33 @@ export const identityUniversalDef = defineFiberApp({
|
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
states: {
|
|
57
|
-
CREATED: {
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
CREATED: {
|
|
58
|
+
id: "CREATED",
|
|
59
|
+
isFinal: false,
|
|
60
|
+
metadata: {
|
|
61
|
+
label: "Created",
|
|
62
|
+
description: "Identity registered but not yet activated",
|
|
63
|
+
category: "initial",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
ACTIVE: {
|
|
67
|
+
id: "ACTIVE",
|
|
68
|
+
isFinal: false,
|
|
69
|
+
metadata: {
|
|
70
|
+
label: "Active",
|
|
71
|
+
description: "Identity is active and can be updated",
|
|
72
|
+
category: "active",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
INACTIVE: {
|
|
76
|
+
id: "INACTIVE",
|
|
77
|
+
isFinal: true,
|
|
78
|
+
metadata: {
|
|
79
|
+
label: "Inactive",
|
|
80
|
+
description: "Identity deactivated by its owner (terminal)",
|
|
81
|
+
category: "terminal",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
60
84
|
},
|
|
61
85
|
initialState: "CREATED",
|
|
62
86
|
transitions: [
|
|
@@ -70,32 +70,56 @@ export const marketAuctionDef = defineFiberApp({
|
|
|
70
70
|
PROPOSED: {
|
|
71
71
|
id: "PROPOSED",
|
|
72
72
|
isFinal: false,
|
|
73
|
-
metadata: {
|
|
73
|
+
metadata: {
|
|
74
|
+
label: "Proposed",
|
|
75
|
+
description: "Auction created but not yet open",
|
|
76
|
+
category: "initial",
|
|
77
|
+
},
|
|
74
78
|
},
|
|
75
79
|
OPEN: {
|
|
76
80
|
id: "OPEN",
|
|
77
81
|
isFinal: false,
|
|
78
|
-
metadata: {
|
|
82
|
+
metadata: {
|
|
83
|
+
label: "Open",
|
|
84
|
+
description: "Accepting bids",
|
|
85
|
+
category: "active",
|
|
86
|
+
},
|
|
79
87
|
},
|
|
80
88
|
CLOSING: {
|
|
81
89
|
id: "CLOSING",
|
|
82
90
|
isFinal: false,
|
|
83
|
-
metadata: {
|
|
91
|
+
metadata: {
|
|
92
|
+
label: "Closing",
|
|
93
|
+
description: "Bid period ended, determining winner",
|
|
94
|
+
category: "pending",
|
|
95
|
+
},
|
|
84
96
|
},
|
|
85
97
|
SETTLED: {
|
|
86
98
|
id: "SETTLED",
|
|
87
99
|
isFinal: true,
|
|
88
|
-
metadata: {
|
|
100
|
+
metadata: {
|
|
101
|
+
label: "Settled",
|
|
102
|
+
description: "Winner determined, transfer complete",
|
|
103
|
+
category: "terminal",
|
|
104
|
+
},
|
|
89
105
|
},
|
|
90
106
|
NO_SALE: {
|
|
91
107
|
id: "NO_SALE",
|
|
92
108
|
isFinal: true,
|
|
93
|
-
metadata: {
|
|
109
|
+
metadata: {
|
|
110
|
+
label: "No sale",
|
|
111
|
+
description: "Reserve not met or no valid bids",
|
|
112
|
+
category: "terminal",
|
|
113
|
+
},
|
|
94
114
|
},
|
|
95
115
|
CANCELLED: {
|
|
96
116
|
id: "CANCELLED",
|
|
97
117
|
isFinal: true,
|
|
98
|
-
metadata: {
|
|
118
|
+
metadata: {
|
|
119
|
+
label: "Cancelled",
|
|
120
|
+
description: "Auction cancelled by seller",
|
|
121
|
+
category: "terminal",
|
|
122
|
+
},
|
|
99
123
|
},
|
|
100
124
|
},
|
|
101
125
|
initialState: "PROPOSED",
|
|
@@ -78,27 +78,47 @@ export const marketCrowdfundDef = defineFiberApp({
|
|
|
78
78
|
PROPOSED: {
|
|
79
79
|
id: "PROPOSED",
|
|
80
80
|
isFinal: false,
|
|
81
|
-
metadata: {
|
|
81
|
+
metadata: {
|
|
82
|
+
label: "Proposed",
|
|
83
|
+
description: "Campaign created but not yet open",
|
|
84
|
+
category: "initial",
|
|
85
|
+
},
|
|
82
86
|
},
|
|
83
87
|
OPEN: {
|
|
84
88
|
id: "OPEN",
|
|
85
89
|
isFinal: false,
|
|
86
|
-
metadata: {
|
|
90
|
+
metadata: {
|
|
91
|
+
label: "Open",
|
|
92
|
+
description: "Accepting pledges",
|
|
93
|
+
category: "active",
|
|
94
|
+
},
|
|
87
95
|
},
|
|
88
96
|
FUNDED: {
|
|
89
97
|
id: "FUNDED",
|
|
90
98
|
isFinal: true,
|
|
91
|
-
metadata: {
|
|
99
|
+
metadata: {
|
|
100
|
+
label: "Funded",
|
|
101
|
+
description: "Threshold met, funds released to creator",
|
|
102
|
+
category: "terminal",
|
|
103
|
+
},
|
|
92
104
|
},
|
|
93
105
|
REFUNDED: {
|
|
94
106
|
id: "REFUNDED",
|
|
95
107
|
isFinal: true,
|
|
96
|
-
metadata: {
|
|
108
|
+
metadata: {
|
|
109
|
+
label: "Refunded",
|
|
110
|
+
description: "Threshold not met, all pledges refunded",
|
|
111
|
+
category: "terminal",
|
|
112
|
+
},
|
|
97
113
|
},
|
|
98
114
|
CANCELLED: {
|
|
99
115
|
id: "CANCELLED",
|
|
100
116
|
isFinal: true,
|
|
101
|
-
metadata: {
|
|
117
|
+
metadata: {
|
|
118
|
+
label: "Cancelled",
|
|
119
|
+
description: "Campaign cancelled by creator",
|
|
120
|
+
category: "terminal",
|
|
121
|
+
},
|
|
102
122
|
},
|
|
103
123
|
},
|
|
104
124
|
initialState: "PROPOSED",
|
|
@@ -80,41 +80,65 @@ export const marketGroupBuyDef = defineFiberApp({
|
|
|
80
80
|
PROPOSED: {
|
|
81
81
|
id: "PROPOSED",
|
|
82
82
|
isFinal: false,
|
|
83
|
-
metadata: {
|
|
83
|
+
metadata: {
|
|
84
|
+
label: "Proposed",
|
|
85
|
+
description: "Group buy created but not yet open",
|
|
86
|
+
category: "initial",
|
|
87
|
+
},
|
|
84
88
|
},
|
|
85
89
|
OPEN: {
|
|
86
90
|
id: "OPEN",
|
|
87
91
|
isFinal: false,
|
|
88
|
-
metadata: {
|
|
92
|
+
metadata: {
|
|
93
|
+
label: "Open",
|
|
94
|
+
description: "Accepting orders",
|
|
95
|
+
category: "active",
|
|
96
|
+
},
|
|
89
97
|
},
|
|
90
98
|
THRESHOLD_MET: {
|
|
91
99
|
id: "THRESHOLD_MET",
|
|
92
100
|
isFinal: false,
|
|
93
101
|
metadata: {
|
|
102
|
+
label: "Threshold met",
|
|
94
103
|
description: "Minimum quantity reached, continuing for better tier",
|
|
104
|
+
category: "active",
|
|
95
105
|
},
|
|
96
106
|
},
|
|
97
107
|
PROCESSING: {
|
|
98
108
|
id: "PROCESSING",
|
|
99
109
|
isFinal: false,
|
|
100
110
|
metadata: {
|
|
111
|
+
label: "Processing",
|
|
101
112
|
description: "Order placed with vendor, awaiting fulfillment",
|
|
113
|
+
category: "pending",
|
|
102
114
|
},
|
|
103
115
|
},
|
|
104
116
|
FULFILLED: {
|
|
105
117
|
id: "FULFILLED",
|
|
106
118
|
isFinal: true,
|
|
107
|
-
metadata: {
|
|
119
|
+
metadata: {
|
|
120
|
+
label: "Fulfilled",
|
|
121
|
+
description: "All items delivered to buyers",
|
|
122
|
+
category: "terminal",
|
|
123
|
+
},
|
|
108
124
|
},
|
|
109
125
|
REFUNDED: {
|
|
110
126
|
id: "REFUNDED",
|
|
111
127
|
isFinal: true,
|
|
112
|
-
metadata: {
|
|
128
|
+
metadata: {
|
|
129
|
+
label: "Refunded",
|
|
130
|
+
description: "Threshold not met, all orders refunded",
|
|
131
|
+
category: "terminal",
|
|
132
|
+
},
|
|
113
133
|
},
|
|
114
134
|
CANCELLED: {
|
|
115
135
|
id: "CANCELLED",
|
|
116
136
|
isFinal: true,
|
|
117
|
-
metadata: {
|
|
137
|
+
metadata: {
|
|
138
|
+
label: "Cancelled",
|
|
139
|
+
description: "Group buy cancelled",
|
|
140
|
+
category: "terminal",
|
|
141
|
+
},
|
|
118
142
|
},
|
|
119
143
|
},
|
|
120
144
|
initialState: "PROPOSED",
|
|
@@ -108,42 +108,74 @@ export const marketPredictionDef = defineFiberApp({
|
|
|
108
108
|
PROPOSED: {
|
|
109
109
|
id: "PROPOSED",
|
|
110
110
|
isFinal: false,
|
|
111
|
-
metadata: {
|
|
111
|
+
metadata: {
|
|
112
|
+
label: "Proposed",
|
|
113
|
+
description: "Market created but not yet open for trading",
|
|
114
|
+
category: "initial",
|
|
115
|
+
},
|
|
112
116
|
},
|
|
113
117
|
OPEN: {
|
|
114
118
|
id: "OPEN",
|
|
115
119
|
isFinal: false,
|
|
116
|
-
metadata: {
|
|
120
|
+
metadata: {
|
|
121
|
+
label: "Open",
|
|
122
|
+
description: "Accepting positions on outcomes",
|
|
123
|
+
category: "active",
|
|
124
|
+
},
|
|
117
125
|
},
|
|
118
126
|
CLOSED: {
|
|
119
127
|
id: "CLOSED",
|
|
120
128
|
isFinal: false,
|
|
121
|
-
metadata: {
|
|
129
|
+
metadata: {
|
|
130
|
+
label: "Closed",
|
|
131
|
+
description: "No more positions, awaiting resolution",
|
|
132
|
+
category: "pending",
|
|
133
|
+
},
|
|
122
134
|
},
|
|
123
135
|
RESOLVING: {
|
|
124
136
|
id: "RESOLVING",
|
|
125
137
|
isFinal: false,
|
|
126
|
-
metadata: {
|
|
138
|
+
metadata: {
|
|
139
|
+
label: "Resolving",
|
|
140
|
+
description: "Oracle(s) submitting resolution",
|
|
141
|
+
category: "pending",
|
|
142
|
+
},
|
|
127
143
|
},
|
|
128
144
|
DISPUTED: {
|
|
129
145
|
id: "DISPUTED",
|
|
130
146
|
isFinal: false,
|
|
131
|
-
metadata: {
|
|
147
|
+
metadata: {
|
|
148
|
+
label: "Disputed",
|
|
149
|
+
description: "Resolution challenged, awaiting arbitration",
|
|
150
|
+
category: "pending",
|
|
151
|
+
},
|
|
132
152
|
},
|
|
133
153
|
SETTLED: {
|
|
134
154
|
id: "SETTLED",
|
|
135
155
|
isFinal: true,
|
|
136
|
-
metadata: {
|
|
156
|
+
metadata: {
|
|
157
|
+
label: "Settled",
|
|
158
|
+
description: "Outcome finalized, payouts available",
|
|
159
|
+
category: "terminal",
|
|
160
|
+
},
|
|
137
161
|
},
|
|
138
162
|
REFUNDED: {
|
|
139
163
|
id: "REFUNDED",
|
|
140
164
|
isFinal: true,
|
|
141
|
-
metadata: {
|
|
165
|
+
metadata: {
|
|
166
|
+
label: "Refunded",
|
|
167
|
+
description: "Market invalidated, all positions refunded",
|
|
168
|
+
category: "terminal",
|
|
169
|
+
},
|
|
142
170
|
},
|
|
143
171
|
CANCELLED: {
|
|
144
172
|
id: "CANCELLED",
|
|
145
173
|
isFinal: true,
|
|
146
|
-
metadata: {
|
|
174
|
+
metadata: {
|
|
175
|
+
label: "Cancelled",
|
|
176
|
+
description: "Market cancelled before opening",
|
|
177
|
+
category: "terminal",
|
|
178
|
+
},
|
|
147
179
|
},
|
|
148
180
|
},
|
|
149
181
|
initialState: "PROPOSED",
|
|
@@ -32,11 +32,51 @@ export const marketUniversalDef = defineFiberApp({
|
|
|
32
32
|
settle: { description: "Settle the market" },
|
|
33
33
|
},
|
|
34
34
|
states: {
|
|
35
|
-
PROPOSED: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
PROPOSED: {
|
|
36
|
+
id: "PROPOSED",
|
|
37
|
+
isFinal: false,
|
|
38
|
+
metadata: {
|
|
39
|
+
label: "Proposed",
|
|
40
|
+
description: "Market created but not yet open",
|
|
41
|
+
category: "initial",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
OPEN: {
|
|
45
|
+
id: "OPEN",
|
|
46
|
+
isFinal: false,
|
|
47
|
+
metadata: {
|
|
48
|
+
label: "Open",
|
|
49
|
+
description: "Market is open for participation",
|
|
50
|
+
category: "active",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
CLOSED: {
|
|
54
|
+
id: "CLOSED",
|
|
55
|
+
isFinal: false,
|
|
56
|
+
metadata: {
|
|
57
|
+
label: "Closed",
|
|
58
|
+
description: "Participation closed; awaiting settlement",
|
|
59
|
+
category: "pending",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
SETTLED: {
|
|
63
|
+
id: "SETTLED",
|
|
64
|
+
isFinal: true,
|
|
65
|
+
metadata: {
|
|
66
|
+
label: "Settled",
|
|
67
|
+
description: "Market settled and payouts available (terminal)",
|
|
68
|
+
category: "terminal",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
CANCELLED: {
|
|
72
|
+
id: "CANCELLED",
|
|
73
|
+
isFinal: true,
|
|
74
|
+
metadata: {
|
|
75
|
+
label: "Cancelled",
|
|
76
|
+
description: "Market cancelled before settlement (terminal)",
|
|
77
|
+
category: "terminal",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
40
80
|
},
|
|
41
81
|
initialState: "PROPOSED",
|
|
42
82
|
transitions: [
|