@ottochain/sdk 2.2.4 → 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.
Files changed (85) hide show
  1. package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +54 -6
  2. package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +72 -8
  3. package/dist/cjs/apps/contracts/state-machines/contract-universal.js +36 -4
  4. package/dist/cjs/apps/governance/state-machines/dao-multisig.js +27 -3
  5. package/dist/cjs/apps/governance/state-machines/dao-reputation.js +27 -3
  6. package/dist/cjs/apps/governance/state-machines/dao-single.js +27 -3
  7. package/dist/cjs/apps/governance/state-machines/dao-token.js +36 -4
  8. package/dist/cjs/apps/governance/state-machines/governance-simple.js +36 -4
  9. package/dist/cjs/apps/governance/state-machines/governance-universal.js +27 -3
  10. package/dist/cjs/apps/identity/state-machines/identity-agent.js +54 -6
  11. package/dist/cjs/apps/identity/state-machines/identity-oracle.js +45 -5
  12. package/dist/cjs/apps/identity/state-machines/identity-universal.js +27 -3
  13. package/dist/cjs/apps/markets/state-machines/market-auction.js +30 -6
  14. package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +25 -5
  15. package/dist/cjs/apps/markets/state-machines/market-group-buy.js +29 -5
  16. package/dist/cjs/apps/markets/state-machines/market-prediction.js +40 -8
  17. package/dist/cjs/apps/markets/state-machines/market-universal.js +45 -5
  18. package/dist/cjs/generated/ottochain/v1/common.js +1722 -1
  19. package/dist/cjs/generated/ottochain/v1/fiber.js +352 -2
  20. package/dist/cjs/generated/ottochain/v1/messages.js +775 -3
  21. package/dist/cjs/generated/ottochain/v1/records.js +350 -3
  22. package/dist/cjs/index.js +5 -1
  23. package/dist/cjs/ottochain/genesis-manifest.js +193 -0
  24. package/dist/cjs/ottochain/index.js +5 -1
  25. package/dist/cjs/ottochain/normalize.js +26 -48
  26. package/dist/cjs/ottochain/types.js +4 -0
  27. package/dist/esm/apps/contracts/state-machines/contract-agreement.js +54 -6
  28. package/dist/esm/apps/contracts/state-machines/contract-escrow.js +72 -8
  29. package/dist/esm/apps/contracts/state-machines/contract-universal.js +36 -4
  30. package/dist/esm/apps/governance/state-machines/dao-multisig.js +27 -3
  31. package/dist/esm/apps/governance/state-machines/dao-reputation.js +27 -3
  32. package/dist/esm/apps/governance/state-machines/dao-single.js +27 -3
  33. package/dist/esm/apps/governance/state-machines/dao-token.js +36 -4
  34. package/dist/esm/apps/governance/state-machines/governance-simple.js +36 -4
  35. package/dist/esm/apps/governance/state-machines/governance-universal.js +27 -3
  36. package/dist/esm/apps/identity/state-machines/identity-agent.js +54 -6
  37. package/dist/esm/apps/identity/state-machines/identity-oracle.js +45 -5
  38. package/dist/esm/apps/identity/state-machines/identity-universal.js +27 -3
  39. package/dist/esm/apps/markets/state-machines/market-auction.js +30 -6
  40. package/dist/esm/apps/markets/state-machines/market-crowdfund.js +25 -5
  41. package/dist/esm/apps/markets/state-machines/market-group-buy.js +29 -5
  42. package/dist/esm/apps/markets/state-machines/market-prediction.js +40 -8
  43. package/dist/esm/apps/markets/state-machines/market-universal.js +45 -5
  44. package/dist/esm/generated/ottochain/v1/common.js +1718 -0
  45. package/dist/esm/generated/ottochain/v1/fiber.js +351 -1
  46. package/dist/esm/generated/ottochain/v1/messages.js +774 -2
  47. package/dist/esm/generated/ottochain/v1/records.js +349 -2
  48. package/dist/esm/index.js +2 -0
  49. package/dist/esm/ottochain/genesis-manifest.js +189 -0
  50. package/dist/esm/ottochain/index.js +2 -0
  51. package/dist/esm/ottochain/normalize.js +26 -48
  52. package/dist/esm/ottochain/types.js +4 -0
  53. package/dist/types/apps/contracts/index.d.ts +90 -18
  54. package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +30 -6
  55. package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +40 -8
  56. package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +20 -4
  57. package/dist/types/apps/governance/index.d.ts +114 -33
  58. package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +15 -3
  59. package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +15 -3
  60. package/dist/types/apps/governance/state-machines/dao-single.d.ts +15 -3
  61. package/dist/types/apps/governance/state-machines/dao-token.d.ts +20 -4
  62. package/dist/types/apps/governance/state-machines/governance-simple.d.ts +20 -4
  63. package/dist/types/apps/governance/state-machines/governance-universal.d.ts +15 -3
  64. package/dist/types/apps/identity/index.d.ts +71 -6
  65. package/dist/types/apps/identity/state-machines/identity-agent.d.ts +30 -0
  66. package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +25 -0
  67. package/dist/types/apps/identity/state-machines/identity-universal.d.ts +15 -0
  68. package/dist/types/apps/markets/index.d.ts +80 -5
  69. package/dist/types/apps/markets/state-machines/market-auction.d.ts +12 -0
  70. package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +10 -0
  71. package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +14 -0
  72. package/dist/types/apps/markets/state-machines/market-prediction.d.ts +16 -0
  73. package/dist/types/apps/markets/state-machines/market-universal.d.ts +25 -5
  74. package/dist/types/generated/ottochain/v1/common.d.ts +228 -0
  75. package/dist/types/generated/ottochain/v1/fiber.d.ts +32 -1
  76. package/dist/types/generated/ottochain/v1/messages.d.ts +84 -0
  77. package/dist/types/generated/ottochain/v1/records.d.ts +34 -0
  78. package/dist/types/index.d.ts +3 -1
  79. package/dist/types/ottochain/genesis-manifest.d.ts +130 -0
  80. package/dist/types/ottochain/index.d.ts +3 -1
  81. package/dist/types/ottochain/normalize.d.ts +17 -25
  82. package/dist/types/ottochain/types.d.ts +288 -2
  83. package/dist/types/schema/fiber-app.d.ts +40 -1
  84. package/dist/types/validation.d.ts +17 -17
  85. package/package.json +30 -27
@@ -87,12 +87,60 @@ exports.contractAgreementDef = (0, fiber_app_js_1.defineFiberApp)({
87
87
  },
88
88
  },
89
89
  states: {
90
- PROPOSED: { id: "PROPOSED", isFinal: false, metadata: null },
91
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
92
- COMPLETED: { id: "COMPLETED", isFinal: true, metadata: null },
93
- DISPUTED: { id: "DISPUTED", isFinal: false, metadata: null },
94
- REJECTED: { id: "REJECTED", isFinal: true, metadata: null },
95
- CANCELLED: { id: "CANCELLED", isFinal: true, metadata: null },
90
+ PROPOSED: {
91
+ id: "PROPOSED",
92
+ isFinal: false,
93
+ metadata: {
94
+ label: "Proposed",
95
+ description: "Agreement proposed; awaiting the counterparty",
96
+ category: "initial",
97
+ },
98
+ },
99
+ ACTIVE: {
100
+ id: "ACTIVE",
101
+ isFinal: false,
102
+ metadata: {
103
+ label: "Active",
104
+ description: "Agreement accepted and in effect",
105
+ category: "active",
106
+ },
107
+ },
108
+ COMPLETED: {
109
+ id: "COMPLETED",
110
+ isFinal: true,
111
+ metadata: {
112
+ label: "Completed",
113
+ description: "Agreement completed and attested (terminal)",
114
+ category: "terminal",
115
+ },
116
+ },
117
+ DISPUTED: {
118
+ id: "DISPUTED",
119
+ isFinal: false,
120
+ metadata: {
121
+ label: "Disputed",
122
+ description: "A party has raised a dispute; awaiting resolution",
123
+ category: "pending",
124
+ },
125
+ },
126
+ REJECTED: {
127
+ id: "REJECTED",
128
+ isFinal: true,
129
+ metadata: {
130
+ label: "Rejected",
131
+ description: "Proposal rejected by the counterparty (terminal)",
132
+ category: "terminal",
133
+ },
134
+ },
135
+ CANCELLED: {
136
+ id: "CANCELLED",
137
+ isFinal: true,
138
+ metadata: {
139
+ label: "Cancelled",
140
+ description: "Agreement cancelled before completion (terminal)",
141
+ category: "terminal",
142
+ },
143
+ },
96
144
  },
97
145
  initialState: "PROPOSED",
98
146
  transitions: [
@@ -124,14 +124,78 @@ exports.contractEscrowDef = (0, fiber_app_js_1.defineFiberApp)({
124
124
  cancel: {},
125
125
  },
126
126
  states: {
127
- CREATED: { id: "CREATED", isFinal: false, metadata: null },
128
- FUNDED: { id: "FUNDED", isFinal: false, metadata: null },
129
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
130
- RELEASING: { id: "RELEASING", isFinal: false, metadata: null },
131
- DISPUTED: { id: "DISPUTED", isFinal: false, metadata: null },
132
- RELEASED: { id: "RELEASED", isFinal: true, metadata: null },
133
- REFUNDED: { id: "REFUNDED", isFinal: true, metadata: null },
134
- SPLIT: { id: "SPLIT", isFinal: true, metadata: null },
127
+ CREATED: {
128
+ id: "CREATED",
129
+ isFinal: false,
130
+ metadata: {
131
+ label: "Created",
132
+ description: "Escrow created; awaiting funding",
133
+ category: "initial",
134
+ },
135
+ },
136
+ FUNDED: {
137
+ id: "FUNDED",
138
+ isFinal: false,
139
+ metadata: {
140
+ label: "Funded",
141
+ description: "Funds deposited into escrow",
142
+ category: "active",
143
+ },
144
+ },
145
+ ACTIVE: {
146
+ id: "ACTIVE",
147
+ isFinal: false,
148
+ metadata: {
149
+ label: "Active",
150
+ description: "Escrow in effect while work is performed",
151
+ category: "active",
152
+ },
153
+ },
154
+ RELEASING: {
155
+ id: "RELEASING",
156
+ isFinal: false,
157
+ metadata: {
158
+ label: "Releasing",
159
+ description: "Release approved; payout in progress",
160
+ category: "pending",
161
+ },
162
+ },
163
+ DISPUTED: {
164
+ id: "DISPUTED",
165
+ isFinal: false,
166
+ metadata: {
167
+ label: "Disputed",
168
+ description: "A party disputed the escrow; awaiting arbitration",
169
+ category: "pending",
170
+ },
171
+ },
172
+ RELEASED: {
173
+ id: "RELEASED",
174
+ isFinal: true,
175
+ metadata: {
176
+ label: "Released",
177
+ description: "Funds released to the beneficiary (terminal)",
178
+ category: "terminal",
179
+ },
180
+ },
181
+ REFUNDED: {
182
+ id: "REFUNDED",
183
+ isFinal: true,
184
+ metadata: {
185
+ label: "Refunded",
186
+ description: "Funds refunded to the depositor (terminal)",
187
+ category: "terminal",
188
+ },
189
+ },
190
+ SPLIT: {
191
+ id: "SPLIT",
192
+ isFinal: true,
193
+ metadata: {
194
+ label: "Split",
195
+ description: "Funds split between parties per arbitration (terminal)",
196
+ category: "terminal",
197
+ },
198
+ },
135
199
  },
136
200
  initialState: "CREATED",
137
201
  transitions: [
@@ -30,10 +30,42 @@ exports.contractUniversalDef = (0, fiber_app_js_1.defineFiberApp)({
30
30
  complete: {},
31
31
  },
32
32
  states: {
33
- PROPOSED: { id: "PROPOSED", isFinal: false, metadata: null },
34
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
35
- COMPLETED: { id: "COMPLETED", isFinal: true, metadata: null },
36
- CANCELLED: { id: "CANCELLED", isFinal: true, metadata: null },
33
+ PROPOSED: {
34
+ id: "PROPOSED",
35
+ isFinal: false,
36
+ metadata: {
37
+ label: "Proposed",
38
+ description: "Contract proposed; awaiting acceptance",
39
+ category: "initial",
40
+ },
41
+ },
42
+ ACTIVE: {
43
+ id: "ACTIVE",
44
+ isFinal: false,
45
+ metadata: {
46
+ label: "Active",
47
+ description: "Contract accepted and in effect",
48
+ category: "active",
49
+ },
50
+ },
51
+ COMPLETED: {
52
+ id: "COMPLETED",
53
+ isFinal: true,
54
+ metadata: {
55
+ label: "Completed",
56
+ description: "Contract obligations fulfilled (terminal)",
57
+ category: "terminal",
58
+ },
59
+ },
60
+ CANCELLED: {
61
+ id: "CANCELLED",
62
+ isFinal: true,
63
+ metadata: {
64
+ label: "Cancelled",
65
+ description: "Contract cancelled before completion (terminal)",
66
+ category: "terminal",
67
+ },
68
+ },
37
69
  },
38
70
  initialState: "PROPOSED",
39
71
  transitions: [
@@ -120,9 +120,33 @@ exports.daoMultisigDef = (0, fiber_app_js_1.defineFiberApp)({
120
120
  },
121
121
  },
122
122
  states: {
123
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
124
- PENDING: { id: "PENDING", isFinal: false, metadata: null },
125
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
123
+ ACTIVE: {
124
+ id: "ACTIVE",
125
+ isFinal: false,
126
+ metadata: {
127
+ label: "Active",
128
+ description: "Multisig is idle and ready to propose an action",
129
+ category: "initial",
130
+ },
131
+ },
132
+ PENDING: {
133
+ id: "PENDING",
134
+ isFinal: false,
135
+ metadata: {
136
+ label: "Pending",
137
+ description: "An action is awaiting the required signature threshold",
138
+ category: "pending",
139
+ },
140
+ },
141
+ DISSOLVED: {
142
+ id: "DISSOLVED",
143
+ isFinal: true,
144
+ metadata: {
145
+ label: "Dissolved",
146
+ description: "Multisig DAO dissolved (terminal)",
147
+ category: "terminal",
148
+ },
149
+ },
126
150
  },
127
151
  initialState: "ACTIVE",
128
152
  transitions: [
@@ -127,9 +127,33 @@ exports.daoReputationDef = (0, fiber_app_js_1.defineFiberApp)({
127
127
  },
128
128
  },
129
129
  states: {
130
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
131
- VOTING: { id: "VOTING", isFinal: false, metadata: null },
132
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
130
+ ACTIVE: {
131
+ id: "ACTIVE",
132
+ isFinal: false,
133
+ metadata: {
134
+ label: "Active",
135
+ description: "DAO is idle and ready to accept a proposal",
136
+ category: "initial",
137
+ },
138
+ },
139
+ VOTING: {
140
+ id: "VOTING",
141
+ isFinal: false,
142
+ metadata: {
143
+ label: "Voting",
144
+ description: "Members vote with reputation-weighted power",
145
+ category: "pending",
146
+ },
147
+ },
148
+ DISSOLVED: {
149
+ id: "DISSOLVED",
150
+ isFinal: true,
151
+ metadata: {
152
+ label: "Dissolved",
153
+ description: "Reputation DAO dissolved (terminal)",
154
+ category: "terminal",
155
+ },
156
+ },
133
157
  },
134
158
  initialState: "ACTIVE",
135
159
  transitions: [
@@ -78,9 +78,33 @@ exports.daoSingleDef = (0, fiber_app_js_1.defineFiberApp)({
78
78
  },
79
79
  },
80
80
  states: {
81
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
82
- TRANSFERRING: { id: "TRANSFERRING", isFinal: false, metadata: null },
83
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
81
+ ACTIVE: {
82
+ id: "ACTIVE",
83
+ isFinal: false,
84
+ metadata: {
85
+ label: "Active",
86
+ description: "Single owner controls the DAO and may act or transfer ownership",
87
+ category: "initial",
88
+ },
89
+ },
90
+ TRANSFERRING: {
91
+ id: "TRANSFERRING",
92
+ isFinal: false,
93
+ metadata: {
94
+ label: "Transferring",
95
+ description: "Ownership transfer proposed; awaiting acceptance",
96
+ category: "pending",
97
+ },
98
+ },
99
+ DISSOLVED: {
100
+ id: "DISSOLVED",
101
+ isFinal: true,
102
+ metadata: {
103
+ label: "Dissolved",
104
+ description: "DAO dissolved by its owner (terminal)",
105
+ category: "terminal",
106
+ },
107
+ },
84
108
  },
85
109
  initialState: "ACTIVE",
86
110
  transitions: [
@@ -128,10 +128,42 @@ exports.daoTokenDef = (0, fiber_app_js_1.defineFiberApp)({
128
128
  },
129
129
  },
130
130
  states: {
131
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
132
- VOTING: { id: "VOTING", isFinal: false, metadata: null },
133
- QUEUED: { id: "QUEUED", isFinal: false, metadata: null },
134
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
131
+ ACTIVE: {
132
+ id: "ACTIVE",
133
+ isFinal: false,
134
+ metadata: {
135
+ label: "Active",
136
+ description: "DAO is idle and ready to accept a proposal",
137
+ category: "initial",
138
+ },
139
+ },
140
+ VOTING: {
141
+ id: "VOTING",
142
+ isFinal: false,
143
+ metadata: {
144
+ label: "Voting",
145
+ description: "Token holders are voting on the active proposal",
146
+ category: "pending",
147
+ },
148
+ },
149
+ QUEUED: {
150
+ id: "QUEUED",
151
+ isFinal: false,
152
+ metadata: {
153
+ label: "Queued",
154
+ description: "Passed proposal queued in timelock before execution",
155
+ category: "pending",
156
+ },
157
+ },
158
+ DISSOLVED: {
159
+ id: "DISSOLVED",
160
+ isFinal: true,
161
+ metadata: {
162
+ label: "Dissolved",
163
+ description: "Token DAO dissolved (terminal)",
164
+ category: "terminal",
165
+ },
166
+ },
135
167
  },
136
168
  initialState: "ACTIVE",
137
169
  transitions: [
@@ -133,10 +133,42 @@ exports.govSimpleDef = (0, fiber_app_js_1.defineFiberApp)({
133
133
  },
134
134
  },
135
135
  states: {
136
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
137
- VOTING: { id: "VOTING", isFinal: false, metadata: null },
138
- DISPUTE: { id: "DISPUTE", isFinal: false, metadata: null },
139
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
136
+ ACTIVE: {
137
+ id: "ACTIVE",
138
+ isFinal: false,
139
+ metadata: {
140
+ label: "Active",
141
+ description: "Governance is idle and ready to accept a proposal",
142
+ category: "initial",
143
+ },
144
+ },
145
+ VOTING: {
146
+ id: "VOTING",
147
+ isFinal: false,
148
+ metadata: {
149
+ label: "Voting",
150
+ description: "A proposal is open for voting",
151
+ category: "pending",
152
+ },
153
+ },
154
+ DISPUTE: {
155
+ id: "DISPUTE",
156
+ isFinal: false,
157
+ metadata: {
158
+ label: "Dispute",
159
+ description: "A proposal outcome is being disputed",
160
+ category: "pending",
161
+ },
162
+ },
163
+ DISSOLVED: {
164
+ id: "DISSOLVED",
165
+ isFinal: true,
166
+ metadata: {
167
+ label: "Dissolved",
168
+ description: "Governance entity dissolved (terminal)",
169
+ category: "terminal",
170
+ },
171
+ },
140
172
  },
141
173
  initialState: "ACTIVE",
142
174
  transitions: [
@@ -52,9 +52,33 @@ exports.govUniversalDef = (0, fiber_app_js_1.defineFiberApp)({
52
52
  },
53
53
  },
54
54
  states: {
55
- ACTIVE: { id: "ACTIVE", isFinal: false, metadata: null },
56
- VOTING: { id: "VOTING", isFinal: false, metadata: null },
57
- DISSOLVED: { id: "DISSOLVED", isFinal: true, metadata: null },
55
+ ACTIVE: {
56
+ id: "ACTIVE",
57
+ isFinal: false,
58
+ metadata: {
59
+ label: "Active",
60
+ description: "Governance is idle and ready to accept a proposal",
61
+ category: "initial",
62
+ },
63
+ },
64
+ VOTING: {
65
+ id: "VOTING",
66
+ isFinal: false,
67
+ metadata: {
68
+ label: "Voting",
69
+ description: "A proposal is open for voting",
70
+ category: "pending",
71
+ },
72
+ },
73
+ DISSOLVED: {
74
+ id: "DISSOLVED",
75
+ isFinal: true,
76
+ metadata: {
77
+ label: "Dissolved",
78
+ description: "Governance entity dissolved (terminal)",
79
+ category: "terminal",
80
+ },
81
+ },
58
82
  },
59
83
  initialState: "ACTIVE",
60
84
  transitions: [
@@ -132,12 +132,60 @@ exports.identityAgentDef = (0, fiber_app_js_1.defineFiberApp)({
132
132
  },
133
133
  },
134
134
  states: {
135
- REGISTERED: { id: "REGISTERED", isFinal: false },
136
- ACTIVE: { id: "ACTIVE", isFinal: false },
137
- CHALLENGED: { id: "CHALLENGED", isFinal: false },
138
- SUSPENDED: { id: "SUSPENDED", isFinal: false },
139
- PROBATION: { id: "PROBATION", isFinal: false },
140
- WITHDRAWN: { id: "WITHDRAWN", isFinal: true },
135
+ REGISTERED: {
136
+ id: "REGISTERED",
137
+ isFinal: false,
138
+ metadata: {
139
+ label: "Registered",
140
+ description: "Agent registered but not yet activated",
141
+ category: "initial",
142
+ },
143
+ },
144
+ ACTIVE: {
145
+ id: "ACTIVE",
146
+ isFinal: false,
147
+ metadata: {
148
+ label: "Active",
149
+ description: "Agent is active and accruing reputation",
150
+ category: "active",
151
+ },
152
+ },
153
+ CHALLENGED: {
154
+ id: "CHALLENGED",
155
+ isFinal: false,
156
+ metadata: {
157
+ label: "Challenged",
158
+ description: "A challenge has been raised; awaiting resolution",
159
+ category: "pending",
160
+ },
161
+ },
162
+ SUSPENDED: {
163
+ id: "SUSPENDED",
164
+ isFinal: false,
165
+ metadata: {
166
+ label: "Suspended",
167
+ description: "Agent suspended after an upheld challenge",
168
+ category: "pending",
169
+ },
170
+ },
171
+ PROBATION: {
172
+ id: "PROBATION",
173
+ isFinal: false,
174
+ metadata: {
175
+ label: "Probation",
176
+ description: "Conditional reinstatement under monitoring",
177
+ category: "active",
178
+ },
179
+ },
180
+ WITHDRAWN: {
181
+ id: "WITHDRAWN",
182
+ isFinal: true,
183
+ metadata: {
184
+ label: "Withdrawn",
185
+ description: "Agent withdrawn from the registry (terminal)",
186
+ category: "terminal",
187
+ },
188
+ },
141
189
  },
142
190
  initialState: "REGISTERED",
143
191
  transitions: [
@@ -132,11 +132,51 @@ exports.identityOracleDef = (0, fiber_app_js_1.defineFiberApp)({
132
132
  },
133
133
  },
134
134
  states: {
135
- UNREGISTERED: { id: "UNREGISTERED", isFinal: false },
136
- REGISTERED: { id: "REGISTERED", isFinal: false },
137
- ACTIVE: { id: "ACTIVE", isFinal: false },
138
- SLASHED: { id: "SLASHED", isFinal: false },
139
- WITHDRAWN: { id: "WITHDRAWN", isFinal: true },
135
+ UNREGISTERED: {
136
+ id: "UNREGISTERED",
137
+ isFinal: false,
138
+ metadata: {
139
+ label: "Unregistered",
140
+ description: "Oracle not yet registered; awaiting stake",
141
+ category: "initial",
142
+ },
143
+ },
144
+ REGISTERED: {
145
+ id: "REGISTERED",
146
+ isFinal: false,
147
+ metadata: {
148
+ label: "Registered",
149
+ description: "Oracle staked and registered but not yet active",
150
+ category: "pending",
151
+ },
152
+ },
153
+ ACTIVE: {
154
+ id: "ACTIVE",
155
+ isFinal: false,
156
+ metadata: {
157
+ label: "Active",
158
+ description: "Oracle is active and may submit resolutions",
159
+ category: "active",
160
+ },
161
+ },
162
+ SLASHED: {
163
+ id: "SLASHED",
164
+ isFinal: false,
165
+ metadata: {
166
+ label: "Slashed",
167
+ description: "Oracle penalized for a lost dispute; stake reduced",
168
+ category: "pending",
169
+ },
170
+ },
171
+ WITHDRAWN: {
172
+ id: "WITHDRAWN",
173
+ isFinal: true,
174
+ metadata: {
175
+ label: "Withdrawn",
176
+ description: "Oracle withdrawn and stake reclaimed (terminal)",
177
+ category: "terminal",
178
+ },
179
+ },
140
180
  },
141
181
  initialState: "UNREGISTERED",
142
182
  transitions: [
@@ -57,9 +57,33 @@ exports.identityUniversalDef = (0, fiber_app_js_1.defineFiberApp)({
57
57
  },
58
58
  },
59
59
  states: {
60
- CREATED: { id: "CREATED", isFinal: false },
61
- ACTIVE: { id: "ACTIVE", isFinal: false },
62
- INACTIVE: { id: "INACTIVE", isFinal: true },
60
+ CREATED: {
61
+ id: "CREATED",
62
+ isFinal: false,
63
+ metadata: {
64
+ label: "Created",
65
+ description: "Identity registered but not yet activated",
66
+ category: "initial",
67
+ },
68
+ },
69
+ ACTIVE: {
70
+ id: "ACTIVE",
71
+ isFinal: false,
72
+ metadata: {
73
+ label: "Active",
74
+ description: "Identity is active and can be updated",
75
+ category: "active",
76
+ },
77
+ },
78
+ INACTIVE: {
79
+ id: "INACTIVE",
80
+ isFinal: true,
81
+ metadata: {
82
+ label: "Inactive",
83
+ description: "Identity deactivated by its owner (terminal)",
84
+ category: "terminal",
85
+ },
86
+ },
63
87
  },
64
88
  initialState: "CREATED",
65
89
  transitions: [
@@ -73,32 +73,56 @@ exports.marketAuctionDef = (0, fiber_app_js_1.defineFiberApp)({
73
73
  PROPOSED: {
74
74
  id: "PROPOSED",
75
75
  isFinal: false,
76
- metadata: { description: "Auction created but not yet open" },
76
+ metadata: {
77
+ label: "Proposed",
78
+ description: "Auction created but not yet open",
79
+ category: "initial",
80
+ },
77
81
  },
78
82
  OPEN: {
79
83
  id: "OPEN",
80
84
  isFinal: false,
81
- metadata: { description: "Accepting bids" },
85
+ metadata: {
86
+ label: "Open",
87
+ description: "Accepting bids",
88
+ category: "active",
89
+ },
82
90
  },
83
91
  CLOSING: {
84
92
  id: "CLOSING",
85
93
  isFinal: false,
86
- metadata: { description: "Bid period ended, determining winner" },
94
+ metadata: {
95
+ label: "Closing",
96
+ description: "Bid period ended, determining winner",
97
+ category: "pending",
98
+ },
87
99
  },
88
100
  SETTLED: {
89
101
  id: "SETTLED",
90
102
  isFinal: true,
91
- metadata: { description: "Winner determined, transfer complete" },
103
+ metadata: {
104
+ label: "Settled",
105
+ description: "Winner determined, transfer complete",
106
+ category: "terminal",
107
+ },
92
108
  },
93
109
  NO_SALE: {
94
110
  id: "NO_SALE",
95
111
  isFinal: true,
96
- metadata: { description: "Reserve not met or no valid bids" },
112
+ metadata: {
113
+ label: "No sale",
114
+ description: "Reserve not met or no valid bids",
115
+ category: "terminal",
116
+ },
97
117
  },
98
118
  CANCELLED: {
99
119
  id: "CANCELLED",
100
120
  isFinal: true,
101
- metadata: { description: "Auction cancelled by seller" },
121
+ metadata: {
122
+ label: "Cancelled",
123
+ description: "Auction cancelled by seller",
124
+ category: "terminal",
125
+ },
102
126
  },
103
127
  },
104
128
  initialState: "PROPOSED",