@ottochain/sdk 2.3.0 → 2.5.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/compute/index.js +33 -0
- package/dist/cjs/apps/compute/state-machines/compute-rule110.js +164 -0
- package/dist/cjs/apps/compute/state-machines/index.js +9 -0
- package/dist/cjs/apps/contracts/index.js +16 -9
- package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +134 -161
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +192 -170
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +46 -58
- package/dist/cjs/apps/corporate/index.js +2 -2
- package/dist/cjs/apps/corporate/state-machines/corp-board.js +500 -456
- package/dist/cjs/apps/corporate/state-machines/corp-entity.js +487 -361
- package/dist/cjs/apps/corporate/state-machines/corp-securities.js +769 -576
- package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +567 -557
- package/dist/cjs/apps/governance/index.js +21 -21
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +188 -209
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +181 -228
- package/dist/cjs/apps/governance/state-machines/dao-single.js +105 -88
- package/dist/cjs/apps/governance/state-machines/dao-token.js +199 -227
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +231 -231
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +64 -64
- package/dist/cjs/apps/identity/constants.js +55 -22
- package/dist/cjs/apps/identity/index.js +28 -12
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +124 -158
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +158 -173
- package/dist/cjs/apps/identity/state-machines/identity-registry.js +262 -0
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +51 -57
- package/dist/cjs/apps/identity/state-machines/index.js +3 -1
- package/dist/cjs/apps/index.js +22 -8
- package/dist/cjs/apps/lending/assets.js +247 -0
- package/dist/cjs/apps/lending/credit-scoring.js +87 -0
- package/dist/cjs/apps/lending/eligibility.js +105 -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 +433 -0
- package/dist/cjs/apps/markets/index.js +22 -12
- package/dist/cjs/apps/markets/state-machines/market-auction.js +116 -134
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +131 -141
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +163 -184
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +226 -233
- package/dist/cjs/apps/markets/state-machines/market-universal.js +65 -80
- package/dist/cjs/apps/oracles/index.js +3 -3
- package/dist/cjs/apps/privacy/index.js +67 -0
- package/dist/cjs/apps/privacy/state-machines/index.js +17 -0
- package/dist/cjs/apps/privacy/state-machines/mixer-ddhRing.js +286 -0
- package/dist/cjs/apps/privacy/state-machines/note-pool.js +476 -0
- package/dist/cjs/apps/staked-pool/assets.js +103 -0
- package/dist/cjs/apps/staked-pool/base.js +498 -0
- package/dist/cjs/apps/staked-pool/consumer.js +55 -0
- package/dist/cjs/apps/staked-pool/index.js +83 -0
- package/dist/cjs/apps/staked-pool/state-machines/index.js +12 -0
- package/dist/cjs/apps/staked-pool/state-machines/staked-pool-base.js +49 -0
- package/dist/cjs/apps/staked-pool/state-machines/staked-pool-oracle.js +131 -0
- package/dist/cjs/errors.js +3 -3
- package/dist/cjs/generated/google/protobuf/struct.js +5 -5
- package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
- 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 +51 -51
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +20 -21
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +14 -14
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +5 -5
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +125 -131
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +108 -108
- package/dist/cjs/generated/ottochain/v1/common.js +5 -5
- package/dist/cjs/generated/ottochain/v1/fiber.js +44 -6
- package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
- package/dist/cjs/generated/ottochain/v1/records.js +1 -1
- package/dist/cjs/index.js +58 -7
- package/dist/cjs/openapi.js +2 -0
- package/dist/cjs/ottochain/drop-nulls.js +1 -2
- package/dist/cjs/ottochain/genesis-manifest.js +17 -11
- package/dist/cjs/ottochain/index.js +23 -13
- package/dist/cjs/ottochain/metagraph-client.js +81 -16
- package/dist/cjs/ottochain/snapshot.js +13 -16
- package/dist/cjs/ottochain/transaction.js +67 -14
- package/dist/cjs/ottochain/types.js +16 -2
- package/dist/cjs/privacy/index.js +14 -0
- package/dist/cjs/privacy/sealed-bid.js +213 -0
- package/dist/cjs/privacy/shield-app.js +131 -0
- package/dist/cjs/schema/effects.js +156 -0
- package/dist/cjs/schema/fiber-app.js +150 -15
- package/dist/cjs/schema/guard-lint.js +343 -0
- package/dist/cjs/schema/guards.js +246 -0
- package/dist/cjs/signing.js +80 -0
- package/dist/cjs/templates/asset-policy.js +190 -0
- package/dist/cjs/templates/index.js +86 -0
- package/dist/cjs/templates/machine.js +130 -0
- package/dist/cjs/templates/migration.js +39 -0
- package/dist/cjs/templates/state-shape.js +38 -0
- package/dist/cjs/types.js +2 -3
- package/dist/cjs/validation.js +9 -11
- 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/compute/index.js +29 -0
- package/dist/esm/apps/compute/state-machines/compute-rule110.js +161 -0
- package/dist/esm/apps/compute/state-machines/index.js +5 -0
- package/dist/esm/apps/contracts/index.js +9 -5
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +135 -162
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +193 -171
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +47 -59
- package/dist/esm/apps/corporate/index.js +2 -2
- package/dist/esm/apps/corporate/state-machines/corp-board.js +501 -457
- package/dist/esm/apps/corporate/state-machines/corp-entity.js +488 -362
- package/dist/esm/apps/corporate/state-machines/corp-securities.js +770 -577
- package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +568 -558
- package/dist/esm/apps/governance/index.js +10 -10
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +189 -210
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +182 -229
- package/dist/esm/apps/governance/state-machines/dao-single.js +106 -89
- package/dist/esm/apps/governance/state-machines/dao-token.js +200 -228
- package/dist/esm/apps/governance/state-machines/governance-simple.js +232 -232
- package/dist/esm/apps/governance/state-machines/governance-universal.js +65 -65
- package/dist/esm/apps/identity/constants.js +52 -21
- package/dist/esm/apps/identity/index.js +14 -9
- package/dist/esm/apps/identity/state-machines/identity-agent.js +125 -159
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +159 -174
- package/dist/esm/apps/identity/state-machines/identity-registry.js +259 -0
- package/dist/esm/apps/identity/state-machines/identity-universal.js +52 -58
- package/dist/esm/apps/identity/state-machines/index.js +1 -0
- package/dist/esm/apps/index.js +9 -5
- package/dist/esm/apps/lending/assets.js +231 -0
- package/dist/esm/apps/lending/credit-scoring.js +81 -0
- package/dist/esm/apps/lending/eligibility.js +99 -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 +430 -0
- package/dist/esm/apps/markets/index.js +11 -7
- package/dist/esm/apps/markets/state-machines/market-auction.js +117 -135
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +132 -142
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +164 -185
- package/dist/esm/apps/markets/state-machines/market-prediction.js +227 -234
- package/dist/esm/apps/markets/state-machines/market-universal.js +66 -81
- package/dist/esm/apps/oracles/index.js +3 -3
- package/dist/esm/apps/privacy/index.js +56 -0
- package/dist/esm/apps/privacy/state-machines/index.js +6 -0
- package/dist/esm/apps/privacy/state-machines/mixer-ddhRing.js +282 -0
- package/dist/esm/apps/privacy/state-machines/note-pool.js +470 -0
- package/dist/esm/apps/staked-pool/assets.js +91 -0
- package/dist/esm/apps/staked-pool/base.js +493 -0
- package/dist/esm/apps/staked-pool/consumer.js +49 -0
- package/dist/esm/apps/staked-pool/index.js +60 -0
- package/dist/esm/apps/staked-pool/state-machines/index.js +6 -0
- package/dist/esm/apps/staked-pool/state-machines/staked-pool-base.js +46 -0
- package/dist/esm/apps/staked-pool/state-machines/staked-pool-oracle.js +127 -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 +9 -5
- package/dist/esm/generated/openapi.js +5 -0
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +47 -47
- 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 +1 -1
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +115 -121
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +101 -101
- package/dist/esm/generated/ottochain/v1/common.js +1 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +40 -2
- package/dist/esm/generated/ottochain/v1/messages.js +1 -1
- package/dist/esm/generated/ottochain/v1/records.js +1 -1
- package/dist/esm/index.js +28 -3
- package/dist/esm/openapi.js +1 -0
- package/dist/esm/ottochain/genesis-manifest.js +15 -9
- package/dist/esm/ottochain/index.js +2 -3
- package/dist/esm/ottochain/metagraph-client.js +81 -16
- package/dist/esm/ottochain/snapshot.js +6 -8
- package/dist/esm/ottochain/transaction.js +51 -3
- package/dist/esm/ottochain/types.js +15 -1
- package/dist/esm/privacy/index.js +6 -0
- package/dist/esm/privacy/sealed-bid.js +209 -0
- package/dist/esm/privacy/shield-app.js +127 -0
- package/dist/esm/schema/effects.js +145 -0
- package/dist/esm/schema/fiber-app.js +139 -8
- package/dist/esm/schema/guard-lint.js +337 -0
- package/dist/esm/schema/guards.js +228 -0
- package/dist/esm/signing.js +74 -0
- package/dist/esm/templates/asset-policy.js +182 -0
- package/dist/esm/templates/index.js +41 -0
- package/dist/esm/templates/machine.js +125 -0
- package/dist/esm/templates/migration.js +34 -0
- package/dist/esm/templates/state-shape.js +34 -0
- package/dist/esm/validation.js +1 -3
- 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/compute/index.d.ts +176 -0
- package/dist/types/apps/compute/state-machines/compute-rule110.d.ts +157 -0
- package/dist/types/apps/compute/state-machines/index.d.ts +5 -0
- package/dist/types/apps/contracts/index.d.ts +81 -221
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +23 -98
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +49 -115
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +4 -4
- package/dist/types/apps/corporate/index.d.ts +1176 -440
- package/dist/types/apps/corporate/state-machines/corp-board.d.ts +271 -135
- package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +279 -74
- package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +373 -149
- package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +252 -80
- package/dist/types/apps/governance/index.d.ts +368 -470
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +92 -107
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +61 -85
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +25 -47
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +79 -68
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +95 -125
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +6 -6
- package/dist/types/apps/identity/constants.d.ts +33 -5
- package/dist/types/apps/identity/index.d.ts +415 -131
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +23 -23
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +27 -98
- package/dist/types/apps/identity/state-machines/identity-registry.d.ts +379 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +4 -4
- package/dist/types/apps/identity/state-machines/index.d.ts +1 -0
- package/dist/types/apps/index.d.ts +9 -5
- 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 +556 -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 +536 -0
- package/dist/types/apps/markets/index.d.ts +181 -276
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +25 -49
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +35 -53
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +35 -61
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +65 -86
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +12 -12
- package/dist/types/apps/oracles/index.d.ts +1 -1
- package/dist/types/apps/privacy/index.d.ts +328 -0
- package/dist/types/apps/privacy/state-machines/index.d.ts +6 -0
- package/dist/types/apps/privacy/state-machines/mixer-ddhRing.d.ts +337 -0
- package/dist/types/apps/privacy/state-machines/note-pool.d.ts +196 -0
- package/dist/types/apps/staked-pool/assets.d.ts +53 -0
- package/dist/types/apps/staked-pool/base.d.ts +80 -0
- package/dist/types/apps/staked-pool/consumer.d.ts +29 -0
- package/dist/types/apps/staked-pool/index.d.ts +51 -0
- package/dist/types/apps/staked-pool/state-machines/index.d.ts +6 -0
- package/dist/types/apps/staked-pool/state-machines/staked-pool-base.d.ts +8 -0
- package/dist/types/apps/staked-pool/state-machines/staked-pool-oracle.d.ts +34 -0
- package/dist/types/generated/index.d.ts +5 -5
- package/dist/types/generated/openapi.d.ts +1270 -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/fiber.d.ts +7 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/openapi.d.ts +24 -0
- package/dist/types/ottochain/genesis-manifest.d.ts +11 -5
- package/dist/types/ottochain/index.d.ts +5 -6
- 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 +41 -1
- package/dist/types/ottochain/types.d.ts +336 -31
- 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 +141 -0
- package/dist/types/schema/fiber-app.d.ts +282 -2
- package/dist/types/schema/guard-lint.d.ts +111 -0
- package/dist/types/schema/guards.d.ts +146 -0
- package/dist/types/signing.d.ts +45 -0
- package/dist/types/templates/asset-policy.d.ts +119 -0
- package/dist/types/templates/index.d.ts +26 -0
- package/dist/types/templates/machine.d.ts +139 -0
- package/dist/types/templates/migration.d.ts +34 -0
- package/dist/types/templates/state-shape.d.ts +30 -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 +47 -15
- 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
|
@@ -1,564 +1,566 @@
|
|
|
1
|
-
import { defineFiberApp } from
|
|
1
|
+
import { defineFiberApp } from '../../../schema/fiber-app.js';
|
|
2
|
+
import { signerIsParty, depInState } from '../../../schema/guards.js';
|
|
3
|
+
import { addDependency } from '../../../schema/effects.js';
|
|
2
4
|
/**
|
|
3
5
|
* Securities state machine tracking the lifecycle of equity from authorization through issuance, transfer, and retirement.
|
|
4
6
|
* Manages stock certificates, book entry positions, and restricted securities.
|
|
5
7
|
*/
|
|
6
8
|
export const corpSecuritiesDef = defineFiberApp({
|
|
7
9
|
metadata: {
|
|
8
|
-
name:
|
|
9
|
-
app:
|
|
10
|
-
type:
|
|
11
|
-
version:
|
|
12
|
-
description:
|
|
10
|
+
name: 'CorpSecurities',
|
|
11
|
+
app: 'corporate',
|
|
12
|
+
type: 'securities',
|
|
13
|
+
version: '1.0.0',
|
|
14
|
+
description: 'Securities state machine tracking the lifecycle of equity from authorization through issuance, transfer, and retirement. Manages stock certificates, book entry positions, and restricted securities.',
|
|
13
15
|
crossReferences: {
|
|
14
16
|
entity: {
|
|
15
|
-
machine:
|
|
16
|
-
description:
|
|
17
|
-
foreignKey:
|
|
17
|
+
machine: 'corporate-entity',
|
|
18
|
+
description: 'Parent corporate entity with share class definitions',
|
|
19
|
+
foreignKey: 'entityId',
|
|
18
20
|
},
|
|
19
21
|
resolutions: {
|
|
20
|
-
machine:
|
|
21
|
-
description:
|
|
22
|
-
foreignKey:
|
|
22
|
+
machine: 'corporate-resolution',
|
|
23
|
+
description: 'Board resolutions authorizing securities actions',
|
|
24
|
+
foreignKey: 'entityId',
|
|
23
25
|
},
|
|
24
26
|
shareholders: {
|
|
25
|
-
machine:
|
|
26
|
-
description:
|
|
27
|
-
foreignKey:
|
|
27
|
+
machine: 'corporate-shareholders',
|
|
28
|
+
description: 'Shareholder meetings for determining voting rights',
|
|
29
|
+
foreignKey: 'entityId',
|
|
28
30
|
},
|
|
29
31
|
},
|
|
30
32
|
},
|
|
31
33
|
createSchema: {
|
|
32
34
|
required: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
'securityId',
|
|
36
|
+
'entityId',
|
|
37
|
+
'issuerAddress',
|
|
38
|
+
'shareClass',
|
|
39
|
+
'shareClassName',
|
|
40
|
+
'shareCount',
|
|
41
|
+
'parValue',
|
|
39
42
|
],
|
|
40
43
|
properties: {
|
|
41
44
|
securityId: {
|
|
42
|
-
type:
|
|
43
|
-
description:
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Unique identifier for this security lot/certificate',
|
|
44
47
|
immutable: true,
|
|
45
48
|
},
|
|
46
49
|
entityId: {
|
|
47
|
-
type:
|
|
48
|
-
description:
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Reference to parent corporate-entity',
|
|
52
|
+
immutable: true,
|
|
53
|
+
},
|
|
54
|
+
issuerAddress: {
|
|
55
|
+
type: 'address',
|
|
56
|
+
description: 'State-pinned DAG address of the issuing authority (the corporation / transfer agent). Verified against proofs[].address to gate issuer-privileged transitions.',
|
|
49
57
|
immutable: true,
|
|
50
58
|
},
|
|
51
59
|
shareClass: {
|
|
52
|
-
type:
|
|
53
|
-
description:
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Share class ID from corporate-entity',
|
|
54
62
|
},
|
|
55
63
|
shareClassName: {
|
|
56
|
-
type:
|
|
57
|
-
description:
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Human-readable class name',
|
|
58
66
|
},
|
|
59
67
|
shareCount: {
|
|
60
|
-
type:
|
|
61
|
-
description:
|
|
68
|
+
type: 'integer',
|
|
69
|
+
description: 'Number of shares in this lot',
|
|
62
70
|
},
|
|
63
71
|
parValue: {
|
|
64
|
-
type:
|
|
65
|
-
description:
|
|
72
|
+
type: 'number',
|
|
73
|
+
description: 'Par value per share',
|
|
66
74
|
},
|
|
67
75
|
},
|
|
68
76
|
},
|
|
69
77
|
stateSchema: {
|
|
70
78
|
properties: {
|
|
71
|
-
securityId: { type:
|
|
72
|
-
entityId: { type:
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
securityId: { type: 'string', immutable: true },
|
|
80
|
+
entityId: { type: 'string', immutable: true },
|
|
81
|
+
issuerAddress: { type: 'address', immutable: true },
|
|
82
|
+
shareClass: { type: 'string' },
|
|
83
|
+
shareClassName: { type: 'string' },
|
|
75
84
|
certificateNumber: {
|
|
76
|
-
type:
|
|
85
|
+
type: 'string',
|
|
77
86
|
nullable: true,
|
|
78
|
-
description:
|
|
87
|
+
description: 'For certificated shares',
|
|
79
88
|
},
|
|
80
89
|
cusip: {
|
|
81
|
-
type:
|
|
90
|
+
type: 'string',
|
|
82
91
|
nullable: true,
|
|
83
|
-
description:
|
|
92
|
+
description: 'CUSIP number if assigned',
|
|
84
93
|
},
|
|
85
|
-
shareCount: { type:
|
|
86
|
-
parValue: { type:
|
|
94
|
+
shareCount: { type: 'integer' },
|
|
95
|
+
parValue: { type: 'number' },
|
|
87
96
|
issuancePrice: {
|
|
88
|
-
type:
|
|
97
|
+
type: 'number',
|
|
89
98
|
nullable: true,
|
|
90
|
-
description:
|
|
99
|
+
description: 'Price per share at issuance',
|
|
91
100
|
computed: true,
|
|
92
101
|
},
|
|
93
102
|
issuanceDate: {
|
|
94
|
-
type:
|
|
95
|
-
format:
|
|
103
|
+
type: 'string',
|
|
104
|
+
format: 'date',
|
|
96
105
|
nullable: true,
|
|
97
106
|
computed: true,
|
|
98
107
|
},
|
|
99
108
|
form: {
|
|
100
|
-
type:
|
|
101
|
-
enum: [
|
|
102
|
-
description:
|
|
109
|
+
type: 'string',
|
|
110
|
+
enum: ['CERTIFICATED', 'BOOK_ENTRY', 'DRS'],
|
|
111
|
+
description: 'Physical certificate, book entry, or Direct Registration System',
|
|
103
112
|
computed: true,
|
|
104
113
|
},
|
|
105
|
-
holder: { $ref:
|
|
106
|
-
restrictions: { $ref:
|
|
114
|
+
holder: { $ref: '#/definitions/Holder', nullable: true, computed: true },
|
|
115
|
+
restrictions: { $ref: '#/definitions/Restrictions', computed: true },
|
|
107
116
|
authorization: {
|
|
108
|
-
$ref:
|
|
117
|
+
$ref: '#/definitions/Authorization',
|
|
109
118
|
nullable: true,
|
|
110
119
|
computed: true,
|
|
111
120
|
},
|
|
112
121
|
issuanceDetails: {
|
|
113
|
-
$ref:
|
|
122
|
+
$ref: '#/definitions/IssuanceDetails',
|
|
114
123
|
nullable: true,
|
|
115
124
|
computed: true,
|
|
116
125
|
},
|
|
117
126
|
transferHistory: {
|
|
118
|
-
type:
|
|
119
|
-
items: { $ref:
|
|
127
|
+
type: 'array',
|
|
128
|
+
items: { $ref: '#/definitions/TransferRecord' },
|
|
120
129
|
computed: true,
|
|
121
130
|
},
|
|
122
131
|
corporateActions: {
|
|
123
|
-
type:
|
|
124
|
-
items: { $ref:
|
|
132
|
+
type: 'array',
|
|
133
|
+
items: { $ref: '#/definitions/CorporateAction' },
|
|
125
134
|
computed: true,
|
|
126
135
|
},
|
|
127
136
|
retirementDetails: {
|
|
128
|
-
$ref:
|
|
137
|
+
$ref: '#/definitions/RetirementDetails',
|
|
129
138
|
nullable: true,
|
|
130
139
|
computed: true,
|
|
131
140
|
},
|
|
132
141
|
status: {
|
|
133
|
-
type:
|
|
134
|
-
enum: [
|
|
135
|
-
"AUTHORIZED",
|
|
136
|
-
"ISSUED",
|
|
137
|
-
"TREASURY",
|
|
138
|
-
"TRANSFERRED",
|
|
139
|
-
"RETIRED",
|
|
140
|
-
],
|
|
142
|
+
type: 'string',
|
|
143
|
+
enum: ['AUTHORIZED', 'ISSUED', 'TREASURY', 'TRANSFERRED', 'RETIRED'],
|
|
141
144
|
computed: true,
|
|
142
145
|
},
|
|
143
|
-
createdAt: { type:
|
|
144
|
-
updatedAt: { type:
|
|
146
|
+
createdAt: { type: 'timestamp', computed: true },
|
|
147
|
+
updatedAt: { type: 'timestamp', computed: true },
|
|
148
|
+
// Two-phase resolution gating (#24): each propose_<X> binds the executing resolution (and, for
|
|
149
|
+
// issuance, the parent entity) fiber via _addDependency and records the pending action here; the
|
|
150
|
+
// gated <X> then asserts the bound dependency state via depInState and clears the pending object.
|
|
151
|
+
// The dropped object-form dependencies (which the chain silently never gated) are replaced this way.
|
|
152
|
+
pendingIssue: { type: 'object', nullable: true, computed: true },
|
|
153
|
+
pendingRepurchase: { type: 'object', nullable: true, computed: true },
|
|
154
|
+
pendingReissue: { type: 'object', nullable: true, computed: true },
|
|
155
|
+
pendingRetire: { type: 'object', nullable: true, computed: true },
|
|
156
|
+
pendingDividend: { type: 'object', nullable: true, computed: true },
|
|
145
157
|
},
|
|
146
158
|
},
|
|
147
159
|
eventSchemas: {
|
|
148
160
|
authorize_shares: {
|
|
149
|
-
description:
|
|
161
|
+
description: 'Record shares as authorized per charter/amendment',
|
|
150
162
|
required: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
163
|
+
'securityId',
|
|
164
|
+
'entityId',
|
|
165
|
+
'shareClass',
|
|
166
|
+
'shareClassName',
|
|
167
|
+
'shareCount',
|
|
168
|
+
'parValue',
|
|
169
|
+
'authorizedDate',
|
|
158
170
|
],
|
|
159
171
|
properties: {
|
|
160
|
-
securityId: { type:
|
|
161
|
-
entityId: { type:
|
|
162
|
-
shareClass: { type:
|
|
163
|
-
shareClassName: { type:
|
|
164
|
-
shareCount: { type:
|
|
165
|
-
parValue: { type:
|
|
166
|
-
authorizedDate: { type:
|
|
167
|
-
charterProvision: { type:
|
|
172
|
+
securityId: { type: 'string' },
|
|
173
|
+
entityId: { type: 'string' },
|
|
174
|
+
shareClass: { type: 'string' },
|
|
175
|
+
shareClassName: { type: 'string' },
|
|
176
|
+
shareCount: { type: 'integer' },
|
|
177
|
+
parValue: { type: 'number' },
|
|
178
|
+
authorizedDate: { type: 'string', format: 'date' },
|
|
179
|
+
charterProvision: { type: 'string' },
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
propose_issue: {
|
|
183
|
+
description: 'Phase 1 of issuance (#24): bind the executing board resolution + parent entity fibers (_addDependency) and record the pending issuance',
|
|
184
|
+
required: ['holderId', 'boardResolutionRef'],
|
|
185
|
+
properties: {
|
|
186
|
+
holderId: { type: 'string' },
|
|
187
|
+
boardResolutionRef: { type: 'string' },
|
|
168
188
|
},
|
|
169
189
|
},
|
|
170
190
|
issue_shares: {
|
|
171
|
-
description:
|
|
172
|
-
required: [
|
|
173
|
-
"holderId",
|
|
174
|
-
"holderType",
|
|
175
|
-
"holderName",
|
|
176
|
-
"issuanceDate",
|
|
177
|
-
"form",
|
|
178
|
-
"boardResolutionRef",
|
|
179
|
-
"consideration",
|
|
180
|
-
],
|
|
191
|
+
description: 'Issue shares to a holder',
|
|
192
|
+
required: ['holderId', 'holderType', 'holderName', 'issuanceDate', 'form', 'consideration'],
|
|
181
193
|
properties: {
|
|
182
|
-
holderId: { type:
|
|
183
|
-
holderType: { type:
|
|
184
|
-
holderName: { type:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
194
|
+
holderId: { type: 'string' },
|
|
195
|
+
holderType: { type: 'string' },
|
|
196
|
+
holderName: { type: 'string' },
|
|
197
|
+
holderWallet: {
|
|
198
|
+
type: 'address',
|
|
199
|
+
description: 'DAG wallet address the holder controls; pinned so holder-initiated transfer/repurchase can be authorized via proofs[].address.',
|
|
200
|
+
},
|
|
201
|
+
address: { type: 'object' },
|
|
202
|
+
issuanceDate: { type: 'string', format: 'date' },
|
|
203
|
+
issuancePrice: { type: 'number' },
|
|
188
204
|
form: {
|
|
189
|
-
type:
|
|
190
|
-
enum: [
|
|
205
|
+
type: 'string',
|
|
206
|
+
enum: ['CERTIFICATED', 'BOOK_ENTRY', 'DRS'],
|
|
191
207
|
},
|
|
192
|
-
certificateNumber: { type:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
accreditedInvestor: { type: "boolean" },
|
|
208
|
+
certificateNumber: { type: 'string' },
|
|
209
|
+
consideration: { type: 'object' },
|
|
210
|
+
isRestricted: { type: 'boolean', default: false },
|
|
211
|
+
restrictionType: { type: 'array' },
|
|
212
|
+
legends: { type: 'array' },
|
|
213
|
+
exemptionUsed: { type: 'string' },
|
|
214
|
+
accreditedInvestor: { type: 'boolean' },
|
|
200
215
|
},
|
|
201
216
|
},
|
|
202
217
|
initiate_transfer: {
|
|
203
|
-
description:
|
|
204
|
-
required: [
|
|
205
|
-
"transferId",
|
|
206
|
-
"toHolderId",
|
|
207
|
-
"toHolderName",
|
|
208
|
-
"toHolderType",
|
|
209
|
-
"transferType",
|
|
210
|
-
"transferDate",
|
|
211
|
-
],
|
|
218
|
+
description: 'Begin transfer of shares to new holder',
|
|
219
|
+
required: ['transferId', 'toHolderId', 'toHolderName', 'toHolderType', 'transferType', 'transferDate'],
|
|
212
220
|
properties: {
|
|
213
|
-
transferId: { type:
|
|
214
|
-
toHolderId: { type:
|
|
215
|
-
toHolderName: { type:
|
|
216
|
-
toHolderType: { type:
|
|
217
|
-
toAddress: { type:
|
|
218
|
-
transferType: { type:
|
|
219
|
-
pricePerShare: { type:
|
|
220
|
-
transferDate: { type:
|
|
221
|
+
transferId: { type: 'string' },
|
|
222
|
+
toHolderId: { type: 'string' },
|
|
223
|
+
toHolderName: { type: 'string' },
|
|
224
|
+
toHolderType: { type: 'string' },
|
|
225
|
+
toAddress: { type: 'object' },
|
|
226
|
+
transferType: { type: 'string' },
|
|
227
|
+
pricePerShare: { type: 'number' },
|
|
228
|
+
transferDate: { type: 'string', format: 'date' },
|
|
221
229
|
},
|
|
222
230
|
},
|
|
223
231
|
complete_transfer: {
|
|
224
|
-
description:
|
|
225
|
-
required: [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
description: 'Complete the transfer, update holder',
|
|
233
|
+
required: ['toHolderId', 'toHolderName', 'toHolderType', 'completedDate'],
|
|
234
|
+
properties: {
|
|
235
|
+
transferAgentConfirmation: { type: 'string' },
|
|
236
|
+
newCertificateNumber: { type: 'string' },
|
|
237
|
+
toHolderId: { type: 'string' },
|
|
238
|
+
toHolderName: { type: 'string' },
|
|
239
|
+
toHolderType: { type: 'string' },
|
|
240
|
+
toHolderWallet: {
|
|
241
|
+
type: 'address',
|
|
242
|
+
description: 'DAG wallet address the new holder controls.',
|
|
243
|
+
},
|
|
244
|
+
toAddress: { type: 'object' },
|
|
245
|
+
completedDate: { type: 'string', format: 'date' },
|
|
246
|
+
costBasis: { type: 'number' },
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
propose_repurchase: {
|
|
250
|
+
description: 'Phase 1 of repurchase (#24): bind the executing board resolution fiber (_addDependency) and record the pending repurchase',
|
|
251
|
+
required: ['repurchaseDate', 'boardResolutionRef'],
|
|
231
252
|
properties: {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
toHolderId: { type: "string" },
|
|
235
|
-
toHolderName: { type: "string" },
|
|
236
|
-
toHolderType: { type: "string" },
|
|
237
|
-
toAddress: { type: "object" },
|
|
238
|
-
completedDate: { type: "string", format: "date" },
|
|
239
|
-
costBasis: { type: "number" },
|
|
253
|
+
repurchaseDate: { type: 'string', format: 'date' },
|
|
254
|
+
boardResolutionRef: { type: 'string' },
|
|
240
255
|
},
|
|
241
256
|
},
|
|
242
257
|
repurchase: {
|
|
243
|
-
description:
|
|
244
|
-
required: [
|
|
245
|
-
"repurchaseDate",
|
|
246
|
-
"pricePerShare",
|
|
247
|
-
"boardResolutionRef",
|
|
248
|
-
],
|
|
258
|
+
description: 'Company repurchases shares from holder',
|
|
259
|
+
required: ['repurchaseDate', 'pricePerShare'],
|
|
249
260
|
properties: {
|
|
250
|
-
repurchaseDate: { type:
|
|
251
|
-
pricePerShare: { type:
|
|
252
|
-
|
|
253
|
-
|
|
261
|
+
repurchaseDate: { type: 'string', format: 'date' },
|
|
262
|
+
pricePerShare: { type: 'number' },
|
|
263
|
+
repurchaseAgreementRef: { type: 'string' },
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
propose_reissue: {
|
|
267
|
+
description: 'Phase 1 of treasury reissue (#24): bind the executing board resolution fiber (_addDependency) and record the pending reissue',
|
|
268
|
+
required: ['holderId', 'boardResolutionRef'],
|
|
269
|
+
properties: {
|
|
270
|
+
holderId: { type: 'string' },
|
|
271
|
+
boardResolutionRef: { type: 'string' },
|
|
254
272
|
},
|
|
255
273
|
},
|
|
256
274
|
reissue_from_treasury: {
|
|
257
|
-
description:
|
|
258
|
-
required: [
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
275
|
+
description: 'Reissue treasury shares to a new holder',
|
|
276
|
+
required: ['holderId', 'holderName', 'holderType', 'reissueDate'],
|
|
277
|
+
properties: {
|
|
278
|
+
holderId: { type: 'string' },
|
|
279
|
+
holderName: { type: 'string' },
|
|
280
|
+
holderType: { type: 'string' },
|
|
281
|
+
holderWallet: {
|
|
282
|
+
type: 'address',
|
|
283
|
+
description: 'DAG wallet address the reissued holder controls.',
|
|
284
|
+
},
|
|
285
|
+
address: { type: 'object' },
|
|
286
|
+
reissueDate: { type: 'string', format: 'date' },
|
|
287
|
+
issuancePrice: { type: 'number' },
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
propose_retire: {
|
|
291
|
+
description: 'Phase 1 of retirement (#24): bind the executing board resolution fiber (_addDependency) and record the pending retirement (from ISSUED or TREASURY)',
|
|
292
|
+
required: ['retiredDate', 'boardResolutionRef'],
|
|
265
293
|
properties: {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
holderType: { type: "string" },
|
|
269
|
-
address: { type: "object" },
|
|
270
|
-
reissueDate: { type: "string", format: "date" },
|
|
271
|
-
issuancePrice: { type: "number" },
|
|
272
|
-
boardResolutionRef: { type: "string" },
|
|
294
|
+
retiredDate: { type: 'string', format: 'date' },
|
|
295
|
+
boardResolutionRef: { type: 'string' },
|
|
273
296
|
},
|
|
274
297
|
},
|
|
275
298
|
retire: {
|
|
276
|
-
description:
|
|
277
|
-
required: [
|
|
278
|
-
"retiredDate",
|
|
279
|
-
"retirementMethod",
|
|
280
|
-
"boardResolutionRef",
|
|
281
|
-
],
|
|
299
|
+
description: 'Retire shares (cancel them)',
|
|
300
|
+
required: ['retiredDate', 'retirementMethod'],
|
|
282
301
|
properties: {
|
|
283
|
-
retiredDate: { type:
|
|
284
|
-
retirementMethod: { type:
|
|
285
|
-
|
|
286
|
-
repurchasePrice: { type: "number" },
|
|
302
|
+
retiredDate: { type: 'string', format: 'date' },
|
|
303
|
+
retirementMethod: { type: 'string' },
|
|
304
|
+
repurchasePrice: { type: 'number' },
|
|
287
305
|
},
|
|
288
306
|
},
|
|
289
307
|
stock_split: {
|
|
290
|
-
description:
|
|
291
|
-
required: [
|
|
292
|
-
"actionId",
|
|
293
|
-
"splitRatio",
|
|
294
|
-
"effectiveDate",
|
|
295
|
-
"resolutionRef",
|
|
296
|
-
"newShareCount",
|
|
297
|
-
],
|
|
308
|
+
description: 'Apply stock split to this lot',
|
|
309
|
+
required: ['actionId', 'splitRatio', 'effectiveDate', 'resolutionRef', 'newShareCount'],
|
|
298
310
|
properties: {
|
|
299
|
-
actionId: { type:
|
|
311
|
+
actionId: { type: 'string' },
|
|
300
312
|
splitRatio: {
|
|
301
|
-
type:
|
|
313
|
+
type: 'string',
|
|
302
314
|
description: "e.g., '2:1' for 2-for-1 split",
|
|
303
315
|
},
|
|
304
|
-
effectiveDate: { type:
|
|
305
|
-
resolutionRef: { type:
|
|
306
|
-
newShareCount: { type:
|
|
316
|
+
effectiveDate: { type: 'string', format: 'date' },
|
|
317
|
+
resolutionRef: { type: 'string' },
|
|
318
|
+
newShareCount: { type: 'integer' },
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
propose_dividend: {
|
|
322
|
+
description: 'Phase 1 of dividend declaration (#24): bind the executing board resolution fiber (_addDependency) and record the pending declaration',
|
|
323
|
+
required: ['actionId', 'resolutionRef'],
|
|
324
|
+
properties: {
|
|
325
|
+
actionId: { type: 'string' },
|
|
326
|
+
resolutionRef: { type: 'string' },
|
|
307
327
|
},
|
|
308
328
|
},
|
|
309
329
|
declare_dividend: {
|
|
310
|
-
description:
|
|
311
|
-
required: [
|
|
312
|
-
"actionId",
|
|
313
|
-
"dividendType",
|
|
314
|
-
"recordDate",
|
|
315
|
-
"paymentDate",
|
|
316
|
-
"resolutionRef",
|
|
317
|
-
],
|
|
330
|
+
description: 'Record dividend declaration affecting this lot (for stock dividends)',
|
|
331
|
+
required: ['actionId', 'dividendType', 'recordDate', 'paymentDate'],
|
|
318
332
|
properties: {
|
|
319
|
-
actionId: { type:
|
|
320
|
-
dividendType: { type:
|
|
321
|
-
recordDate: { type:
|
|
322
|
-
paymentDate: { type:
|
|
323
|
-
cashAmount: { type:
|
|
324
|
-
stockShares: { type:
|
|
325
|
-
resolutionRef: { type: "string" },
|
|
333
|
+
actionId: { type: 'string' },
|
|
334
|
+
dividendType: { type: 'string', enum: ['CASH', 'STOCK'] },
|
|
335
|
+
recordDate: { type: 'string', format: 'date' },
|
|
336
|
+
paymentDate: { type: 'string', format: 'date' },
|
|
337
|
+
cashAmount: { type: 'number' },
|
|
338
|
+
stockShares: { type: 'integer' },
|
|
326
339
|
},
|
|
327
340
|
},
|
|
328
341
|
remove_restriction: {
|
|
329
|
-
description:
|
|
330
|
-
required: [
|
|
342
|
+
description: 'Remove or update restrictions on the shares',
|
|
343
|
+
required: ['restrictionType', 'removedDate'],
|
|
331
344
|
properties: {
|
|
332
|
-
restrictionType: { type:
|
|
333
|
-
removedDate: { type:
|
|
334
|
-
reason: { type:
|
|
335
|
-
legalOpinionRef: { type:
|
|
345
|
+
restrictionType: { type: 'string' },
|
|
346
|
+
removedDate: { type: 'string', format: 'date' },
|
|
347
|
+
reason: { type: 'string' },
|
|
348
|
+
legalOpinionRef: { type: 'string' },
|
|
336
349
|
},
|
|
337
350
|
},
|
|
338
351
|
},
|
|
339
352
|
definitions: {
|
|
340
353
|
Holder: {
|
|
341
|
-
type:
|
|
354
|
+
type: 'object',
|
|
342
355
|
nullable: true,
|
|
343
356
|
properties: {
|
|
344
|
-
holderId: { type:
|
|
357
|
+
holderId: { type: 'string' },
|
|
345
358
|
holderType: {
|
|
346
|
-
type:
|
|
347
|
-
enum: [
|
|
359
|
+
type: 'string',
|
|
360
|
+
enum: ['INDIVIDUAL', 'ENTITY', 'TRUST', 'TREASURY'],
|
|
348
361
|
},
|
|
349
|
-
name: { type:
|
|
350
|
-
taxId: { type:
|
|
351
|
-
|
|
352
|
-
|
|
362
|
+
name: { type: 'string' },
|
|
363
|
+
taxId: { type: 'string', nullable: true },
|
|
364
|
+
walletAddress: {
|
|
365
|
+
type: 'address',
|
|
366
|
+
nullable: true,
|
|
367
|
+
description: 'State-pinned DAG wallet address controlled by this holder; verified against proofs[].address to gate holder-initiated transfer/repurchase.',
|
|
368
|
+
},
|
|
369
|
+
address: { type: 'object', nullable: true },
|
|
370
|
+
acquisitionDate: { type: 'string', format: 'date' },
|
|
353
371
|
acquisitionMethod: {
|
|
354
|
-
type:
|
|
372
|
+
type: 'string',
|
|
355
373
|
enum: [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
374
|
+
'ORIGINAL_ISSUANCE',
|
|
375
|
+
'PURCHASE',
|
|
376
|
+
'GIFT',
|
|
377
|
+
'INHERITANCE',
|
|
378
|
+
'STOCK_SPLIT',
|
|
379
|
+
'CONVERSION',
|
|
380
|
+
'EXERCISE',
|
|
363
381
|
],
|
|
364
382
|
},
|
|
365
|
-
costBasis: { type:
|
|
383
|
+
costBasis: { type: 'number', nullable: true },
|
|
366
384
|
},
|
|
367
385
|
},
|
|
368
386
|
Restrictions: {
|
|
369
|
-
type:
|
|
387
|
+
type: 'object',
|
|
370
388
|
properties: {
|
|
371
|
-
isRestricted: { type:
|
|
389
|
+
isRestricted: { type: 'boolean', default: false },
|
|
372
390
|
restrictionType: {
|
|
373
|
-
type:
|
|
391
|
+
type: 'array',
|
|
374
392
|
items: {
|
|
375
|
-
type:
|
|
393
|
+
type: 'string',
|
|
376
394
|
enum: [
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
395
|
+
'RULE_144',
|
|
396
|
+
'SECTION_4(a)(2)',
|
|
397
|
+
'REG_D',
|
|
398
|
+
'REG_S',
|
|
399
|
+
'LOCK_UP',
|
|
400
|
+
'VESTING',
|
|
401
|
+
'RIGHT_OF_FIRST_REFUSAL',
|
|
384
402
|
],
|
|
385
403
|
},
|
|
386
404
|
},
|
|
387
|
-
restrictionEndDate: { type:
|
|
405
|
+
restrictionEndDate: { type: 'string', format: 'date', nullable: true },
|
|
388
406
|
legends: {
|
|
389
|
-
type:
|
|
390
|
-
items: { type:
|
|
391
|
-
description:
|
|
407
|
+
type: 'array',
|
|
408
|
+
items: { type: 'string' },
|
|
409
|
+
description: 'Legend text on certificates',
|
|
392
410
|
},
|
|
393
411
|
vestingSchedule: {
|
|
394
|
-
type:
|
|
412
|
+
type: 'object',
|
|
395
413
|
nullable: true,
|
|
396
414
|
properties: {
|
|
397
|
-
vestingStartDate: { type:
|
|
398
|
-
totalShares: { type:
|
|
399
|
-
vestedShares: { type:
|
|
400
|
-
vestingScheduleRef: { type:
|
|
415
|
+
vestingStartDate: { type: 'string', format: 'date' },
|
|
416
|
+
totalShares: { type: 'integer' },
|
|
417
|
+
vestedShares: { type: 'integer' },
|
|
418
|
+
vestingScheduleRef: { type: 'string' },
|
|
401
419
|
},
|
|
402
420
|
},
|
|
403
|
-
lockUpExpiration: { type:
|
|
421
|
+
lockUpExpiration: { type: 'string', format: 'date', nullable: true },
|
|
404
422
|
rofr: {
|
|
405
|
-
type:
|
|
423
|
+
type: 'object',
|
|
406
424
|
nullable: true,
|
|
407
|
-
description:
|
|
425
|
+
description: 'Right of First Refusal',
|
|
408
426
|
properties: {
|
|
409
|
-
holderIds: { type:
|
|
410
|
-
noticePeriodDays: { type:
|
|
427
|
+
holderIds: { type: 'array', items: { type: 'string' } },
|
|
428
|
+
noticePeriodDays: { type: 'integer' },
|
|
411
429
|
},
|
|
412
430
|
},
|
|
413
431
|
},
|
|
414
432
|
},
|
|
415
433
|
Authorization: {
|
|
416
|
-
type:
|
|
434
|
+
type: 'object',
|
|
417
435
|
nullable: true,
|
|
418
|
-
description:
|
|
436
|
+
description: 'For shares in AUTHORIZED state',
|
|
419
437
|
properties: {
|
|
420
|
-
authorizedDate: { type:
|
|
421
|
-
charterProvision: { type:
|
|
422
|
-
authorizedShares: { type:
|
|
438
|
+
authorizedDate: { type: 'string', format: 'date' },
|
|
439
|
+
charterProvision: { type: 'string' },
|
|
440
|
+
authorizedShares: { type: 'integer' },
|
|
423
441
|
},
|
|
424
442
|
},
|
|
425
443
|
IssuanceDetails: {
|
|
426
|
-
type:
|
|
444
|
+
type: 'object',
|
|
427
445
|
nullable: true,
|
|
428
446
|
properties: {
|
|
429
|
-
boardResolutionRef: { type:
|
|
430
|
-
issuanceAgreementRef: { type:
|
|
447
|
+
boardResolutionRef: { type: 'string' },
|
|
448
|
+
issuanceAgreementRef: { type: 'string' },
|
|
431
449
|
consideration: {
|
|
432
|
-
type:
|
|
450
|
+
type: 'object',
|
|
433
451
|
properties: {
|
|
434
452
|
type: {
|
|
435
|
-
type:
|
|
436
|
-
enum: [
|
|
437
|
-
"CASH",
|
|
438
|
-
"PROPERTY",
|
|
439
|
-
"SERVICES",
|
|
440
|
-
"DEBT_CONVERSION",
|
|
441
|
-
"STOCK_CONVERSION",
|
|
442
|
-
],
|
|
453
|
+
type: 'string',
|
|
454
|
+
enum: ['CASH', 'PROPERTY', 'SERVICES', 'DEBT_CONVERSION', 'STOCK_CONVERSION'],
|
|
443
455
|
},
|
|
444
|
-
value: { type:
|
|
445
|
-
description: { type:
|
|
456
|
+
value: { type: 'number' },
|
|
457
|
+
description: { type: 'string' },
|
|
446
458
|
},
|
|
447
459
|
},
|
|
448
|
-
exemptionUsed: { type:
|
|
449
|
-
accreditedInvestor: { type:
|
|
460
|
+
exemptionUsed: { type: 'string', nullable: true },
|
|
461
|
+
accreditedInvestor: { type: 'boolean', nullable: true },
|
|
450
462
|
},
|
|
451
463
|
},
|
|
452
464
|
TransferRecord: {
|
|
453
|
-
type:
|
|
465
|
+
type: 'object',
|
|
454
466
|
properties: {
|
|
455
|
-
transferId: { type:
|
|
456
|
-
transferDate: { type:
|
|
457
|
-
fromHolderId: { type:
|
|
458
|
-
toHolderId: { type:
|
|
459
|
-
shares: { type:
|
|
467
|
+
transferId: { type: 'string' },
|
|
468
|
+
transferDate: { type: 'string', format: 'date' },
|
|
469
|
+
fromHolderId: { type: 'string' },
|
|
470
|
+
toHolderId: { type: 'string' },
|
|
471
|
+
shares: { type: 'integer' },
|
|
460
472
|
transferType: {
|
|
461
|
-
type:
|
|
462
|
-
enum: [
|
|
473
|
+
type: 'string',
|
|
474
|
+
enum: ['SALE', 'GIFT', 'INHERITANCE', 'INTERNAL'],
|
|
463
475
|
},
|
|
464
|
-
pricePerShare: { type:
|
|
465
|
-
transferAgentConfirmation: { type:
|
|
476
|
+
pricePerShare: { type: 'number', nullable: true },
|
|
477
|
+
transferAgentConfirmation: { type: 'string', nullable: true },
|
|
466
478
|
},
|
|
467
479
|
},
|
|
468
480
|
CorporateAction: {
|
|
469
|
-
type:
|
|
470
|
-
description:
|
|
481
|
+
type: 'object',
|
|
482
|
+
description: 'Stock splits, dividends, etc. affecting this lot',
|
|
471
483
|
properties: {
|
|
472
|
-
actionId: { type:
|
|
484
|
+
actionId: { type: 'string' },
|
|
473
485
|
actionType: {
|
|
474
|
-
type:
|
|
475
|
-
enum: [
|
|
476
|
-
"STOCK_SPLIT",
|
|
477
|
-
"REVERSE_SPLIT",
|
|
478
|
-
"STOCK_DIVIDEND",
|
|
479
|
-
"CONVERSION",
|
|
480
|
-
"RECLASSIFICATION",
|
|
481
|
-
],
|
|
486
|
+
type: 'string',
|
|
487
|
+
enum: ['STOCK_SPLIT', 'REVERSE_SPLIT', 'STOCK_DIVIDEND', 'CONVERSION', 'RECLASSIFICATION'],
|
|
482
488
|
},
|
|
483
|
-
actionDate: { type:
|
|
489
|
+
actionDate: { type: 'string', format: 'date' },
|
|
484
490
|
ratio: {
|
|
485
|
-
type:
|
|
491
|
+
type: 'string',
|
|
486
492
|
nullable: true,
|
|
487
|
-
description:
|
|
493
|
+
description: 'e.g., 2:1 for split',
|
|
488
494
|
},
|
|
489
|
-
sharesBeforeAction: { type:
|
|
490
|
-
sharesAfterAction: { type:
|
|
491
|
-
resolutionRef: { type:
|
|
495
|
+
sharesBeforeAction: { type: 'integer' },
|
|
496
|
+
sharesAfterAction: { type: 'integer' },
|
|
497
|
+
resolutionRef: { type: 'string' },
|
|
492
498
|
},
|
|
493
499
|
},
|
|
494
500
|
RetirementDetails: {
|
|
495
|
-
type:
|
|
501
|
+
type: 'object',
|
|
496
502
|
nullable: true,
|
|
497
503
|
properties: {
|
|
498
|
-
retiredDate: { type:
|
|
504
|
+
retiredDate: { type: 'string', format: 'date' },
|
|
499
505
|
retirementMethod: {
|
|
500
|
-
type:
|
|
501
|
-
enum: [
|
|
502
|
-
"REPURCHASE",
|
|
503
|
-
"REDEMPTION",
|
|
504
|
-
"CANCELLATION",
|
|
505
|
-
"CONVERSION",
|
|
506
|
-
],
|
|
506
|
+
type: 'string',
|
|
507
|
+
enum: ['REPURCHASE', 'REDEMPTION', 'CANCELLATION', 'CONVERSION'],
|
|
507
508
|
},
|
|
508
|
-
repurchasePrice: { type:
|
|
509
|
-
boardResolutionRef: { type:
|
|
509
|
+
repurchasePrice: { type: 'number', nullable: true },
|
|
510
|
+
boardResolutionRef: { type: 'string' },
|
|
510
511
|
},
|
|
511
512
|
},
|
|
512
513
|
},
|
|
513
514
|
states: {
|
|
514
515
|
AUTHORIZED: {
|
|
515
|
-
id:
|
|
516
|
+
id: 'AUTHORIZED',
|
|
516
517
|
isFinal: false,
|
|
517
|
-
description:
|
|
518
|
+
description: 'Shares authorized by charter but not yet issued',
|
|
518
519
|
},
|
|
519
520
|
ISSUED: {
|
|
520
|
-
id:
|
|
521
|
+
id: 'ISSUED',
|
|
521
522
|
isFinal: false,
|
|
522
|
-
description:
|
|
523
|
+
description: 'Shares issued and held by a shareholder',
|
|
523
524
|
},
|
|
524
525
|
TREASURY: {
|
|
525
|
-
id:
|
|
526
|
+
id: 'TREASURY',
|
|
526
527
|
isFinal: false,
|
|
527
|
-
description:
|
|
528
|
+
description: 'Shares repurchased and held by the company',
|
|
528
529
|
},
|
|
529
530
|
TRANSFERRED: {
|
|
530
|
-
id:
|
|
531
|
+
id: 'TRANSFERRED',
|
|
531
532
|
isFinal: false,
|
|
532
|
-
description:
|
|
533
|
+
description: 'Transitional state during transfer between holders',
|
|
533
534
|
},
|
|
534
535
|
RETIRED: {
|
|
535
|
-
id:
|
|
536
|
+
id: 'RETIRED',
|
|
536
537
|
isFinal: true,
|
|
537
|
-
description:
|
|
538
|
+
description: 'Shares cancelled and returned to authorized but unissued',
|
|
538
539
|
},
|
|
539
540
|
},
|
|
540
|
-
initialState:
|
|
541
|
+
initialState: 'AUTHORIZED',
|
|
541
542
|
transitions: [
|
|
542
543
|
// Initial authorization (creation)
|
|
543
544
|
{
|
|
544
|
-
from:
|
|
545
|
-
to:
|
|
546
|
-
eventName:
|
|
547
|
-
|
|
545
|
+
from: 'AUTHORIZED',
|
|
546
|
+
to: 'AUTHORIZED',
|
|
547
|
+
eventName: 'authorize_shares',
|
|
548
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
549
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
548
550
|
effect: {
|
|
549
551
|
merge: [
|
|
550
|
-
{ var:
|
|
551
|
-
{
|
|
552
|
-
securityId: { var:
|
|
553
|
-
entityId: { var:
|
|
554
|
-
shareClass: { var:
|
|
555
|
-
shareClassName: { var:
|
|
556
|
-
shareCount: { var:
|
|
557
|
-
parValue: { var:
|
|
552
|
+
{ var: 'state' },
|
|
553
|
+
{
|
|
554
|
+
securityId: { var: 'event.securityId' },
|
|
555
|
+
entityId: { var: 'event.entityId' },
|
|
556
|
+
shareClass: { var: 'event.shareClass' },
|
|
557
|
+
shareClassName: { var: 'event.shareClassName' },
|
|
558
|
+
shareCount: { var: 'event.shareCount' },
|
|
559
|
+
parValue: { var: 'event.parValue' },
|
|
558
560
|
authorization: {
|
|
559
|
-
authorizedDate: { var:
|
|
560
|
-
charterProvision: { var:
|
|
561
|
-
authorizedShares: { var:
|
|
561
|
+
authorizedDate: { var: 'event.authorizedDate' },
|
|
562
|
+
charterProvision: { var: 'event.charterProvision' },
|
|
563
|
+
authorizedShares: { var: 'event.shareCount' },
|
|
562
564
|
},
|
|
563
565
|
transferHistory: [],
|
|
564
566
|
corporateActions: [],
|
|
@@ -566,417 +568,606 @@ export const corpSecuritiesDef = defineFiberApp({
|
|
|
566
568
|
],
|
|
567
569
|
},
|
|
568
570
|
},
|
|
569
|
-
// AUTHORIZED ->
|
|
571
|
+
// AUTHORIZED -> AUTHORIZED (propose_issue) — phase 1 (#24): bind the executing resolution + parent
|
|
572
|
+
// entity fibers and record the pending issuance, so issue_shares can read their state next transition.
|
|
570
573
|
{
|
|
571
|
-
from:
|
|
572
|
-
to:
|
|
573
|
-
eventName:
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
574
|
+
from: 'AUTHORIZED',
|
|
575
|
+
to: 'AUTHORIZED',
|
|
576
|
+
eventName: 'propose_issue',
|
|
577
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
578
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
579
|
+
effect: {
|
|
580
|
+
merge: [
|
|
581
|
+
{ var: 'state' },
|
|
582
|
+
{
|
|
583
|
+
pendingIssue: {
|
|
584
|
+
holderId: { var: 'event.holderId' },
|
|
585
|
+
ref: { var: 'event.boardResolutionRef' },
|
|
586
|
+
proposedAt: { var: '$ordinal' },
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
// bind the resolution fiber so issue_shares can assert its state next transition
|
|
590
|
+
addDependency({ var: 'event.boardResolutionRef' }),
|
|
591
|
+
// bind the parent entity fiber so issue_shares can assert it is ACTIVE
|
|
592
|
+
addDependency({ var: 'state.entityId' }),
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
dependencies: [],
|
|
596
|
+
},
|
|
597
|
+
// AUTHORIZED -> ISSUED — phase 2 (#24): issue once the bound resolution is EXECUTED and the parent
|
|
598
|
+
// entity is ACTIVE. depInState replaces the dropped object-form dependencies (which never gated).
|
|
599
|
+
{
|
|
600
|
+
from: 'AUTHORIZED',
|
|
601
|
+
to: 'ISSUED',
|
|
602
|
+
eventName: 'issue_shares',
|
|
603
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
604
|
+
guard: {
|
|
605
|
+
and: [
|
|
606
|
+
signerIsParty('state.issuerAddress'),
|
|
607
|
+
// the proposal must target this holder, and its bound resolution must be EXECUTED
|
|
608
|
+
{
|
|
609
|
+
'==': [{ var: 'state.pendingIssue.holderId' }, { var: 'event.holderId' }],
|
|
610
|
+
},
|
|
611
|
+
depInState('state.pendingIssue.ref', 'EXECUTED'),
|
|
612
|
+
depInState('state.entityId', 'ACTIVE'),
|
|
613
|
+
],
|
|
614
|
+
},
|
|
587
615
|
effect: {
|
|
588
616
|
merge: [
|
|
589
|
-
{ var:
|
|
617
|
+
{ var: 'state' },
|
|
590
618
|
{
|
|
591
|
-
status:
|
|
592
|
-
form: { var:
|
|
593
|
-
certificateNumber: { var:
|
|
594
|
-
issuanceDate: { var:
|
|
595
|
-
issuancePrice: { var:
|
|
619
|
+
status: 'ISSUED',
|
|
620
|
+
form: { var: 'event.form' },
|
|
621
|
+
certificateNumber: { var: 'event.certificateNumber' },
|
|
622
|
+
issuanceDate: { var: 'event.issuanceDate' },
|
|
623
|
+
issuancePrice: { var: 'event.issuancePrice' },
|
|
596
624
|
holder: {
|
|
597
|
-
holderId: { var:
|
|
598
|
-
holderType: { var:
|
|
599
|
-
name: { var:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
625
|
+
holderId: { var: 'event.holderId' },
|
|
626
|
+
holderType: { var: 'event.holderType' },
|
|
627
|
+
name: { var: 'event.holderName' },
|
|
628
|
+
walletAddress: { var: 'event.holderWallet' },
|
|
629
|
+
address: { var: 'event.address' },
|
|
630
|
+
acquisitionDate: { var: 'event.issuanceDate' },
|
|
631
|
+
acquisitionMethod: 'ORIGINAL_ISSUANCE',
|
|
603
632
|
costBasis: {
|
|
604
|
-
|
|
605
|
-
{ var: "event.issuancePrice" },
|
|
606
|
-
{ var: "state.shareCount" },
|
|
607
|
-
],
|
|
633
|
+
'*': [{ var: 'event.issuancePrice' }, { var: 'state.shareCount' }],
|
|
608
634
|
},
|
|
609
635
|
},
|
|
610
636
|
restrictions: {
|
|
611
|
-
isRestricted: { var:
|
|
612
|
-
restrictionType: { var:
|
|
613
|
-
legends: { var:
|
|
637
|
+
isRestricted: { var: 'event.isRestricted' },
|
|
638
|
+
restrictionType: { var: 'event.restrictionType' },
|
|
639
|
+
legends: { var: 'event.legends' },
|
|
614
640
|
},
|
|
615
641
|
issuanceDetails: {
|
|
616
|
-
boardResolutionRef: { var:
|
|
617
|
-
consideration: { var:
|
|
618
|
-
exemptionUsed: { var:
|
|
619
|
-
accreditedInvestor: { var:
|
|
642
|
+
boardResolutionRef: { var: 'state.pendingIssue.ref' },
|
|
643
|
+
consideration: { var: 'event.consideration' },
|
|
644
|
+
exemptionUsed: { var: 'event.exemptionUsed' },
|
|
645
|
+
accreditedInvestor: { var: 'event.accreditedInvestor' },
|
|
620
646
|
},
|
|
647
|
+
// clear the consumed proposal
|
|
648
|
+
pendingIssue: null,
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
_emit: [{ name: 'SHARES_ISSUED', data: { var: 'event' }, destination: 'external' }],
|
|
621
652
|
},
|
|
622
653
|
],
|
|
623
654
|
},
|
|
624
|
-
|
|
655
|
+
dependencies: [],
|
|
625
656
|
},
|
|
626
657
|
// ISSUED -> TRANSFERRED
|
|
627
658
|
{
|
|
628
|
-
from:
|
|
629
|
-
to:
|
|
630
|
-
eventName:
|
|
659
|
+
from: 'ISSUED',
|
|
660
|
+
to: 'TRANSFERRED',
|
|
661
|
+
eventName: 'initiate_transfer',
|
|
631
662
|
guard: {
|
|
632
663
|
and: [
|
|
664
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
665
|
+
signerIsParty('state.holder.walletAddress'),
|
|
633
666
|
{
|
|
634
667
|
or: [
|
|
635
|
-
{
|
|
668
|
+
{ '==': [{ var: 'state.restrictions.isRestricted' }, false] },
|
|
636
669
|
{
|
|
637
|
-
|
|
670
|
+
'==': [{ var: 'state.restrictions.restrictionEndDate' }, null],
|
|
638
671
|
},
|
|
639
672
|
{
|
|
640
|
-
|
|
641
|
-
{ var: "$timestamp" },
|
|
642
|
-
{ var: "state.restrictions.restrictionEndDate" },
|
|
643
|
-
],
|
|
673
|
+
'>=': [{ var: '$ordinal' }, { var: 'state.restrictions.restrictionEndDate' }],
|
|
644
674
|
},
|
|
645
675
|
],
|
|
646
676
|
},
|
|
647
|
-
{
|
|
677
|
+
{ '==': [{ var: 'state.restrictions.rofr' }, null] },
|
|
648
678
|
],
|
|
649
679
|
},
|
|
650
680
|
effect: {
|
|
651
681
|
merge: [
|
|
652
|
-
{ var:
|
|
682
|
+
{ var: 'state' },
|
|
653
683
|
{
|
|
654
|
-
status:
|
|
684
|
+
status: 'TRANSFERRED',
|
|
655
685
|
transferHistory: {
|
|
656
|
-
|
|
657
|
-
{ var:
|
|
686
|
+
merge: [
|
|
687
|
+
{ var: 'state.transferHistory' },
|
|
658
688
|
[
|
|
659
689
|
{
|
|
660
|
-
transferId: { var:
|
|
661
|
-
transferDate: { var:
|
|
662
|
-
fromHolderId: { var:
|
|
663
|
-
toHolderId: { var:
|
|
664
|
-
shares: { var:
|
|
665
|
-
transferType: { var:
|
|
666
|
-
pricePerShare: { var:
|
|
690
|
+
transferId: { var: 'event.transferId' },
|
|
691
|
+
transferDate: { var: 'event.transferDate' },
|
|
692
|
+
fromHolderId: { var: 'state.holder.holderId' },
|
|
693
|
+
toHolderId: { var: 'event.toHolderId' },
|
|
694
|
+
shares: { var: 'state.shareCount' },
|
|
695
|
+
transferType: { var: 'event.transferType' },
|
|
696
|
+
pricePerShare: { var: 'event.pricePerShare' },
|
|
667
697
|
},
|
|
668
698
|
],
|
|
669
699
|
],
|
|
670
700
|
},
|
|
671
701
|
},
|
|
702
|
+
{
|
|
703
|
+
_emit: [{ name: 'TRANSFER_INITIATED', data: { var: 'event' }, destination: 'external' }],
|
|
704
|
+
},
|
|
672
705
|
],
|
|
673
706
|
},
|
|
674
|
-
emits: ["TRANSFER_INITIATED"],
|
|
675
707
|
},
|
|
676
708
|
// TRANSFERRED -> ISSUED
|
|
677
709
|
{
|
|
678
|
-
from:
|
|
679
|
-
to:
|
|
680
|
-
eventName:
|
|
681
|
-
|
|
710
|
+
from: 'TRANSFERRED',
|
|
711
|
+
to: 'ISSUED',
|
|
712
|
+
eventName: 'complete_transfer',
|
|
713
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
714
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
682
715
|
effect: {
|
|
683
716
|
merge: [
|
|
684
|
-
{ var:
|
|
717
|
+
{ var: 'state' },
|
|
685
718
|
{
|
|
686
|
-
status:
|
|
719
|
+
status: 'ISSUED',
|
|
687
720
|
holder: {
|
|
688
|
-
holderId: { var:
|
|
689
|
-
holderType: { var:
|
|
690
|
-
name: { var:
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
721
|
+
holderId: { var: 'event.toHolderId' },
|
|
722
|
+
holderType: { var: 'event.toHolderType' },
|
|
723
|
+
name: { var: 'event.toHolderName' },
|
|
724
|
+
walletAddress: { var: 'event.toHolderWallet' },
|
|
725
|
+
address: { var: 'event.toAddress' },
|
|
726
|
+
acquisitionDate: { var: 'event.completedDate' },
|
|
727
|
+
acquisitionMethod: 'PURCHASE',
|
|
728
|
+
costBasis: { var: 'event.costBasis' },
|
|
695
729
|
},
|
|
696
730
|
certificateNumber: {
|
|
697
731
|
if: [
|
|
698
|
-
{
|
|
699
|
-
{ var:
|
|
700
|
-
{ var:
|
|
732
|
+
{ '!=': [{ var: 'event.newCertificateNumber' }, null] },
|
|
733
|
+
{ var: 'event.newCertificateNumber' },
|
|
734
|
+
{ var: 'state.certificateNumber' },
|
|
701
735
|
],
|
|
702
736
|
},
|
|
703
737
|
},
|
|
738
|
+
{
|
|
739
|
+
_emit: [{ name: 'TRANSFER_COMPLETED', data: { var: 'event' }, destination: 'external' }],
|
|
740
|
+
},
|
|
704
741
|
],
|
|
705
742
|
},
|
|
706
|
-
emits: ["TRANSFER_COMPLETED"],
|
|
707
743
|
},
|
|
708
|
-
// ISSUED ->
|
|
744
|
+
// ISSUED -> ISSUED (propose_repurchase) — phase 1 (#24): bind the executing resolution fiber and
|
|
745
|
+
// record the pending repurchase, so repurchase can read the resolution's state next transition.
|
|
709
746
|
{
|
|
710
|
-
from:
|
|
711
|
-
to:
|
|
712
|
-
eventName:
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
747
|
+
from: 'ISSUED',
|
|
748
|
+
to: 'ISSUED',
|
|
749
|
+
eventName: 'propose_repurchase',
|
|
750
|
+
// authority gate — the selling holder must sign; an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
751
|
+
guard: signerIsParty('state.holder.walletAddress'),
|
|
752
|
+
effect: {
|
|
753
|
+
merge: [
|
|
754
|
+
{ var: 'state' },
|
|
755
|
+
{
|
|
756
|
+
pendingRepurchase: {
|
|
757
|
+
repurchaseDate: { var: 'event.repurchaseDate' },
|
|
758
|
+
ref: { var: 'event.boardResolutionRef' },
|
|
759
|
+
proposedAt: { var: '$ordinal' },
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
// bind the resolution fiber so repurchase can assert its state next transition
|
|
763
|
+
addDependency({ var: 'event.boardResolutionRef' }),
|
|
764
|
+
],
|
|
765
|
+
},
|
|
766
|
+
dependencies: [],
|
|
767
|
+
},
|
|
768
|
+
// ISSUED -> TREASURY — phase 2 (#24): repurchase once the bound resolution is EXECUTED.
|
|
769
|
+
{
|
|
770
|
+
from: 'ISSUED',
|
|
771
|
+
to: 'TREASURY',
|
|
772
|
+
eventName: 'repurchase',
|
|
773
|
+
// authority gate — the selling holder must sign; an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
774
|
+
guard: {
|
|
775
|
+
and: [
|
|
776
|
+
signerIsParty('state.holder.walletAddress'),
|
|
777
|
+
// the proposal must match this repurchase, and its bound resolution must be EXECUTED
|
|
778
|
+
{
|
|
779
|
+
'==': [{ var: 'state.pendingRepurchase.repurchaseDate' }, { var: 'event.repurchaseDate' }],
|
|
780
|
+
},
|
|
781
|
+
depInState('state.pendingRepurchase.ref', 'EXECUTED'),
|
|
782
|
+
],
|
|
783
|
+
},
|
|
721
784
|
effect: {
|
|
722
785
|
merge: [
|
|
723
|
-
{ var:
|
|
786
|
+
{ var: 'state' },
|
|
724
787
|
{
|
|
725
|
-
status:
|
|
788
|
+
status: 'TREASURY',
|
|
726
789
|
transferHistory: {
|
|
727
|
-
|
|
728
|
-
{ var:
|
|
790
|
+
merge: [
|
|
791
|
+
{ var: 'state.transferHistory' },
|
|
729
792
|
[
|
|
730
793
|
{
|
|
731
794
|
transferId: {
|
|
732
|
-
cat: [
|
|
795
|
+
cat: ['REPURCHASE-', { var: 'event.repurchaseDate' }],
|
|
733
796
|
},
|
|
734
|
-
transferDate: { var:
|
|
735
|
-
fromHolderId: { var:
|
|
736
|
-
toHolderId:
|
|
737
|
-
shares: { var:
|
|
738
|
-
transferType:
|
|
739
|
-
pricePerShare: { var:
|
|
797
|
+
transferDate: { var: 'event.repurchaseDate' },
|
|
798
|
+
fromHolderId: { var: 'state.holder.holderId' },
|
|
799
|
+
toHolderId: 'TREASURY',
|
|
800
|
+
shares: { var: 'state.shareCount' },
|
|
801
|
+
transferType: 'INTERNAL',
|
|
802
|
+
pricePerShare: { var: 'event.pricePerShare' },
|
|
740
803
|
},
|
|
741
804
|
],
|
|
742
805
|
],
|
|
743
806
|
},
|
|
744
807
|
holder: {
|
|
745
|
-
holderId:
|
|
746
|
-
holderType:
|
|
747
|
-
name:
|
|
748
|
-
acquisitionDate: { var:
|
|
749
|
-
acquisitionMethod:
|
|
808
|
+
holderId: 'TREASURY',
|
|
809
|
+
holderType: 'TREASURY',
|
|
810
|
+
name: 'Treasury Stock',
|
|
811
|
+
acquisitionDate: { var: 'event.repurchaseDate' },
|
|
812
|
+
acquisitionMethod: 'PURCHASE',
|
|
750
813
|
costBasis: {
|
|
751
|
-
|
|
752
|
-
{ var: "event.pricePerShare" },
|
|
753
|
-
{ var: "state.shareCount" },
|
|
754
|
-
],
|
|
814
|
+
'*': [{ var: 'event.pricePerShare' }, { var: 'state.shareCount' }],
|
|
755
815
|
},
|
|
756
816
|
},
|
|
817
|
+
// clear the consumed proposal
|
|
818
|
+
pendingRepurchase: null,
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
_emit: [{ name: 'SHARES_REPURCHASED', data: { var: 'event' }, destination: 'external' }],
|
|
757
822
|
},
|
|
758
823
|
],
|
|
759
824
|
},
|
|
760
|
-
|
|
825
|
+
dependencies: [],
|
|
761
826
|
},
|
|
762
|
-
// TREASURY ->
|
|
827
|
+
// TREASURY -> TREASURY (propose_reissue) — phase 1 (#24): bind the executing resolution fiber and
|
|
828
|
+
// record the pending reissue, so reissue_from_treasury can read the resolution's state next transition.
|
|
763
829
|
{
|
|
764
|
-
from:
|
|
765
|
-
to:
|
|
766
|
-
eventName:
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
{
|
|
770
|
-
machine: "corporate-resolution",
|
|
771
|
-
instanceRef: { var: "event.boardResolutionRef" },
|
|
772
|
-
requiredState: "EXECUTED",
|
|
773
|
-
},
|
|
774
|
-
],
|
|
830
|
+
from: 'TREASURY',
|
|
831
|
+
to: 'TREASURY',
|
|
832
|
+
eventName: 'propose_reissue',
|
|
833
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
834
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
775
835
|
effect: {
|
|
776
836
|
merge: [
|
|
777
|
-
{ var:
|
|
837
|
+
{ var: 'state' },
|
|
778
838
|
{
|
|
779
|
-
|
|
839
|
+
pendingReissue: {
|
|
840
|
+
holderId: { var: 'event.holderId' },
|
|
841
|
+
ref: { var: 'event.boardResolutionRef' },
|
|
842
|
+
proposedAt: { var: '$ordinal' },
|
|
843
|
+
},
|
|
844
|
+
},
|
|
845
|
+
// bind the resolution fiber so reissue_from_treasury can assert its state next transition
|
|
846
|
+
addDependency({ var: 'event.boardResolutionRef' }),
|
|
847
|
+
],
|
|
848
|
+
},
|
|
849
|
+
dependencies: [],
|
|
850
|
+
},
|
|
851
|
+
// TREASURY -> ISSUED — phase 2 (#24): reissue once the bound resolution is EXECUTED.
|
|
852
|
+
{
|
|
853
|
+
from: 'TREASURY',
|
|
854
|
+
to: 'ISSUED',
|
|
855
|
+
eventName: 'reissue_from_treasury',
|
|
856
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
857
|
+
guard: {
|
|
858
|
+
and: [
|
|
859
|
+
signerIsParty('state.issuerAddress'),
|
|
860
|
+
// the proposal must target this holder, and its bound resolution must be EXECUTED
|
|
861
|
+
{
|
|
862
|
+
'==': [{ var: 'state.pendingReissue.holderId' }, { var: 'event.holderId' }],
|
|
863
|
+
},
|
|
864
|
+
depInState('state.pendingReissue.ref', 'EXECUTED'),
|
|
865
|
+
],
|
|
866
|
+
},
|
|
867
|
+
effect: {
|
|
868
|
+
merge: [
|
|
869
|
+
{ var: 'state' },
|
|
870
|
+
{
|
|
871
|
+
status: 'ISSUED',
|
|
780
872
|
holder: {
|
|
781
|
-
holderId: { var:
|
|
782
|
-
holderType: { var:
|
|
783
|
-
name: { var:
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
873
|
+
holderId: { var: 'event.holderId' },
|
|
874
|
+
holderType: { var: 'event.holderType' },
|
|
875
|
+
name: { var: 'event.holderName' },
|
|
876
|
+
walletAddress: { var: 'event.holderWallet' },
|
|
877
|
+
address: { var: 'event.address' },
|
|
878
|
+
acquisitionDate: { var: 'event.reissueDate' },
|
|
879
|
+
acquisitionMethod: 'PURCHASE',
|
|
787
880
|
costBasis: {
|
|
788
|
-
|
|
789
|
-
{ var: "event.issuancePrice" },
|
|
790
|
-
{ var: "state.shareCount" },
|
|
791
|
-
],
|
|
881
|
+
'*': [{ var: 'event.issuancePrice' }, { var: 'state.shareCount' }],
|
|
792
882
|
},
|
|
793
883
|
},
|
|
884
|
+
// clear the consumed proposal
|
|
885
|
+
pendingReissue: null,
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
_emit: [{ name: 'TREASURY_SHARES_REISSUED', data: { var: 'event' }, destination: 'external' }],
|
|
794
889
|
},
|
|
795
890
|
],
|
|
796
891
|
},
|
|
797
|
-
|
|
892
|
+
dependencies: [],
|
|
798
893
|
},
|
|
799
|
-
// ISSUED ->
|
|
894
|
+
// ISSUED -> ISSUED (propose_retire) — phase 1 (#24): bind the executing resolution fiber and record
|
|
895
|
+
// the pending retirement, so the retire transition can read the resolution's state next transition.
|
|
800
896
|
{
|
|
801
|
-
from:
|
|
802
|
-
to:
|
|
803
|
-
eventName:
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
897
|
+
from: 'ISSUED',
|
|
898
|
+
to: 'ISSUED',
|
|
899
|
+
eventName: 'propose_retire',
|
|
900
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
901
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
902
|
+
effect: {
|
|
903
|
+
merge: [
|
|
904
|
+
{ var: 'state' },
|
|
905
|
+
{
|
|
906
|
+
pendingRetire: {
|
|
907
|
+
retiredDate: { var: 'event.retiredDate' },
|
|
908
|
+
ref: { var: 'event.boardResolutionRef' },
|
|
909
|
+
proposedAt: { var: '$ordinal' },
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
// bind the resolution fiber so retire can assert its state next transition
|
|
913
|
+
addDependency({ var: 'event.boardResolutionRef' }),
|
|
914
|
+
],
|
|
915
|
+
},
|
|
916
|
+
dependencies: [],
|
|
917
|
+
},
|
|
918
|
+
// TREASURY -> TREASURY (propose_retire) — phase 1 (#24): the treasury-side counterpart, binding the
|
|
919
|
+
// executing resolution fiber and recording the pending retirement before retire executes.
|
|
920
|
+
{
|
|
921
|
+
from: 'TREASURY',
|
|
922
|
+
to: 'TREASURY',
|
|
923
|
+
eventName: 'propose_retire',
|
|
924
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
925
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
812
926
|
effect: {
|
|
813
927
|
merge: [
|
|
814
|
-
{ var:
|
|
928
|
+
{ var: 'state' },
|
|
815
929
|
{
|
|
816
|
-
|
|
930
|
+
pendingRetire: {
|
|
931
|
+
retiredDate: { var: 'event.retiredDate' },
|
|
932
|
+
ref: { var: 'event.boardResolutionRef' },
|
|
933
|
+
proposedAt: { var: '$ordinal' },
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
// bind the resolution fiber so retire can assert its state next transition
|
|
937
|
+
addDependency({ var: 'event.boardResolutionRef' }),
|
|
938
|
+
],
|
|
939
|
+
},
|
|
940
|
+
dependencies: [],
|
|
941
|
+
},
|
|
942
|
+
// ISSUED -> RETIRED — phase 2 (#24): retire once the bound resolution is EXECUTED.
|
|
943
|
+
{
|
|
944
|
+
from: 'ISSUED',
|
|
945
|
+
to: 'RETIRED',
|
|
946
|
+
eventName: 'retire',
|
|
947
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
948
|
+
guard: {
|
|
949
|
+
and: [
|
|
950
|
+
signerIsParty('state.issuerAddress'),
|
|
951
|
+
// the proposal must match this retirement, and its bound resolution must be EXECUTED
|
|
952
|
+
{
|
|
953
|
+
'==': [{ var: 'state.pendingRetire.retiredDate' }, { var: 'event.retiredDate' }],
|
|
954
|
+
},
|
|
955
|
+
depInState('state.pendingRetire.ref', 'EXECUTED'),
|
|
956
|
+
],
|
|
957
|
+
},
|
|
958
|
+
effect: {
|
|
959
|
+
merge: [
|
|
960
|
+
{ var: 'state' },
|
|
961
|
+
{
|
|
962
|
+
status: 'RETIRED',
|
|
817
963
|
retirementDetails: {
|
|
818
|
-
retiredDate: { var:
|
|
819
|
-
retirementMethod: { var:
|
|
820
|
-
repurchasePrice: { var:
|
|
821
|
-
boardResolutionRef: { var:
|
|
964
|
+
retiredDate: { var: 'event.retiredDate' },
|
|
965
|
+
retirementMethod: { var: 'event.retirementMethod' },
|
|
966
|
+
repurchasePrice: { var: 'event.repurchasePrice' },
|
|
967
|
+
boardResolutionRef: { var: 'state.pendingRetire.ref' },
|
|
822
968
|
},
|
|
823
969
|
holder: null,
|
|
970
|
+
// clear the consumed proposal
|
|
971
|
+
pendingRetire: null,
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
_emit: [{ name: 'SHARES_RETIRED', data: { var: 'event' }, destination: 'external' }],
|
|
824
975
|
},
|
|
825
976
|
],
|
|
826
977
|
},
|
|
827
|
-
|
|
978
|
+
dependencies: [],
|
|
828
979
|
},
|
|
829
|
-
// TREASURY -> RETIRED
|
|
980
|
+
// TREASURY -> RETIRED — phase 2 (#24): retire once the bound resolution is EXECUTED.
|
|
830
981
|
{
|
|
831
|
-
from:
|
|
832
|
-
to:
|
|
833
|
-
eventName:
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
982
|
+
from: 'TREASURY',
|
|
983
|
+
to: 'RETIRED',
|
|
984
|
+
eventName: 'retire',
|
|
985
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
986
|
+
guard: {
|
|
987
|
+
and: [
|
|
988
|
+
signerIsParty('state.issuerAddress'),
|
|
989
|
+
// the proposal must match this retirement, and its bound resolution must be EXECUTED
|
|
990
|
+
{
|
|
991
|
+
'==': [{ var: 'state.pendingRetire.retiredDate' }, { var: 'event.retiredDate' }],
|
|
992
|
+
},
|
|
993
|
+
depInState('state.pendingRetire.ref', 'EXECUTED'),
|
|
994
|
+
],
|
|
995
|
+
},
|
|
842
996
|
effect: {
|
|
843
997
|
merge: [
|
|
844
|
-
{ var:
|
|
998
|
+
{ var: 'state' },
|
|
845
999
|
{
|
|
846
|
-
status:
|
|
1000
|
+
status: 'RETIRED',
|
|
847
1001
|
retirementDetails: {
|
|
848
|
-
retiredDate: { var:
|
|
849
|
-
retirementMethod: { var:
|
|
850
|
-
repurchasePrice: { var:
|
|
851
|
-
boardResolutionRef: { var:
|
|
1002
|
+
retiredDate: { var: 'event.retiredDate' },
|
|
1003
|
+
retirementMethod: { var: 'event.retirementMethod' },
|
|
1004
|
+
repurchasePrice: { var: 'event.repurchasePrice' },
|
|
1005
|
+
boardResolutionRef: { var: 'state.pendingRetire.ref' },
|
|
852
1006
|
},
|
|
853
1007
|
holder: null,
|
|
1008
|
+
// clear the consumed proposal
|
|
1009
|
+
pendingRetire: null,
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
_emit: [{ name: 'SHARES_RETIRED', data: { var: 'event' }, destination: 'external' }],
|
|
854
1013
|
},
|
|
855
1014
|
],
|
|
856
1015
|
},
|
|
857
|
-
|
|
1016
|
+
dependencies: [],
|
|
858
1017
|
},
|
|
859
1018
|
// ISSUED -> ISSUED (stock_split)
|
|
860
1019
|
{
|
|
861
|
-
from:
|
|
862
|
-
to:
|
|
863
|
-
eventName:
|
|
864
|
-
|
|
1020
|
+
from: 'ISSUED',
|
|
1021
|
+
to: 'ISSUED',
|
|
1022
|
+
eventName: 'stock_split',
|
|
1023
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
1024
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
865
1025
|
effect: {
|
|
866
1026
|
merge: [
|
|
867
|
-
{ var:
|
|
1027
|
+
{ var: 'state' },
|
|
868
1028
|
{
|
|
869
1029
|
corporateActions: {
|
|
870
|
-
|
|
871
|
-
{ var:
|
|
1030
|
+
merge: [
|
|
1031
|
+
{ var: 'state.corporateActions' },
|
|
872
1032
|
[
|
|
873
1033
|
{
|
|
874
|
-
actionId: { var:
|
|
875
|
-
actionType:
|
|
876
|
-
actionDate: { var:
|
|
877
|
-
ratio: { var:
|
|
878
|
-
sharesBeforeAction: { var:
|
|
879
|
-
sharesAfterAction: { var:
|
|
880
|
-
resolutionRef: { var:
|
|
1034
|
+
actionId: { var: 'event.actionId' },
|
|
1035
|
+
actionType: 'STOCK_SPLIT',
|
|
1036
|
+
actionDate: { var: 'event.effectiveDate' },
|
|
1037
|
+
ratio: { var: 'event.splitRatio' },
|
|
1038
|
+
sharesBeforeAction: { var: 'state.shareCount' },
|
|
1039
|
+
sharesAfterAction: { var: 'event.newShareCount' },
|
|
1040
|
+
resolutionRef: { var: 'event.resolutionRef' },
|
|
881
1041
|
},
|
|
882
1042
|
],
|
|
883
1043
|
],
|
|
884
1044
|
},
|
|
885
|
-
shareCount: { var:
|
|
1045
|
+
shareCount: { var: 'event.newShareCount' },
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
_emit: [{ name: 'STOCK_SPLIT_APPLIED', data: { var: 'event' }, destination: 'external' }],
|
|
886
1049
|
},
|
|
887
1050
|
],
|
|
888
1051
|
},
|
|
889
|
-
emits: ["STOCK_SPLIT_APPLIED"],
|
|
890
1052
|
},
|
|
891
|
-
// ISSUED -> ISSUED (
|
|
1053
|
+
// ISSUED -> ISSUED (propose_dividend) — phase 1 (#24): bind the executing resolution fiber and record
|
|
1054
|
+
// the pending declaration, so declare_dividend can read the resolution's state next transition.
|
|
892
1055
|
{
|
|
893
|
-
from:
|
|
894
|
-
to:
|
|
895
|
-
eventName:
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1056
|
+
from: 'ISSUED',
|
|
1057
|
+
to: 'ISSUED',
|
|
1058
|
+
eventName: 'propose_dividend',
|
|
1059
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
1060
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
1061
|
+
effect: {
|
|
1062
|
+
merge: [
|
|
1063
|
+
{ var: 'state' },
|
|
1064
|
+
{
|
|
1065
|
+
pendingDividend: {
|
|
1066
|
+
actionId: { var: 'event.actionId' },
|
|
1067
|
+
ref: { var: 'event.resolutionRef' },
|
|
1068
|
+
proposedAt: { var: '$ordinal' },
|
|
1069
|
+
},
|
|
1070
|
+
},
|
|
1071
|
+
// bind the resolution fiber so declare_dividend can assert its state next transition
|
|
1072
|
+
addDependency({ var: 'event.resolutionRef' }),
|
|
1073
|
+
],
|
|
1074
|
+
},
|
|
1075
|
+
dependencies: [],
|
|
1076
|
+
},
|
|
1077
|
+
// ISSUED -> ISSUED (declare_dividend) — phase 2 (#24): stock dividend handling once the bound
|
|
1078
|
+
// resolution is EXECUTED.
|
|
1079
|
+
{
|
|
1080
|
+
from: 'ISSUED',
|
|
1081
|
+
to: 'ISSUED',
|
|
1082
|
+
eventName: 'declare_dividend',
|
|
1083
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
1084
|
+
guard: {
|
|
1085
|
+
and: [
|
|
1086
|
+
signerIsParty('state.issuerAddress'),
|
|
1087
|
+
// the proposal must target this action, and its bound resolution must be EXECUTED
|
|
1088
|
+
{
|
|
1089
|
+
'==': [{ var: 'state.pendingDividend.actionId' }, { var: 'event.actionId' }],
|
|
1090
|
+
},
|
|
1091
|
+
depInState('state.pendingDividend.ref', 'EXECUTED'),
|
|
1092
|
+
],
|
|
1093
|
+
},
|
|
904
1094
|
effect: {
|
|
905
1095
|
if: [
|
|
906
|
-
{
|
|
1096
|
+
{ '==': [{ var: 'event.dividendType' }, 'STOCK'] },
|
|
907
1097
|
{
|
|
908
1098
|
merge: [
|
|
909
|
-
{ var:
|
|
1099
|
+
{ var: 'state' },
|
|
910
1100
|
{
|
|
911
1101
|
corporateActions: {
|
|
912
|
-
|
|
913
|
-
{ var:
|
|
1102
|
+
merge: [
|
|
1103
|
+
{ var: 'state.corporateActions' },
|
|
914
1104
|
[
|
|
915
1105
|
{
|
|
916
|
-
actionId: { var:
|
|
917
|
-
actionType:
|
|
918
|
-
actionDate: { var:
|
|
919
|
-
sharesBeforeAction: { var:
|
|
1106
|
+
actionId: { var: 'event.actionId' },
|
|
1107
|
+
actionType: 'STOCK_DIVIDEND',
|
|
1108
|
+
actionDate: { var: 'event.paymentDate' },
|
|
1109
|
+
sharesBeforeAction: { var: 'state.shareCount' },
|
|
920
1110
|
sharesAfterAction: {
|
|
921
|
-
|
|
922
|
-
{ var: "state.shareCount" },
|
|
923
|
-
{ var: "event.stockShares" },
|
|
924
|
-
],
|
|
1111
|
+
'+': [{ var: 'state.shareCount' }, { var: 'event.stockShares' }],
|
|
925
1112
|
},
|
|
926
|
-
resolutionRef: { var:
|
|
1113
|
+
resolutionRef: { var: 'state.pendingDividend.ref' },
|
|
927
1114
|
},
|
|
928
1115
|
],
|
|
929
1116
|
],
|
|
930
1117
|
},
|
|
931
1118
|
shareCount: {
|
|
932
|
-
|
|
933
|
-
{ var: "state.shareCount" },
|
|
934
|
-
{ var: "event.stockShares" },
|
|
935
|
-
],
|
|
1119
|
+
'+': [{ var: 'state.shareCount' }, { var: 'event.stockShares' }],
|
|
936
1120
|
},
|
|
1121
|
+
// clear the consumed proposal
|
|
1122
|
+
pendingDividend: null,
|
|
937
1123
|
},
|
|
938
1124
|
],
|
|
939
1125
|
},
|
|
940
|
-
{
|
|
1126
|
+
{
|
|
1127
|
+
merge: [
|
|
1128
|
+
{ var: 'state' },
|
|
1129
|
+
// cash dividend: no share change, but still clear the consumed proposal
|
|
1130
|
+
{ pendingDividend: null },
|
|
1131
|
+
],
|
|
1132
|
+
},
|
|
941
1133
|
],
|
|
942
1134
|
},
|
|
1135
|
+
dependencies: [],
|
|
943
1136
|
},
|
|
944
1137
|
// ISSUED -> ISSUED (remove_restriction)
|
|
945
1138
|
{
|
|
946
|
-
from:
|
|
947
|
-
to:
|
|
948
|
-
eventName:
|
|
949
|
-
|
|
1139
|
+
from: 'ISSUED',
|
|
1140
|
+
to: 'ISSUED',
|
|
1141
|
+
eventName: 'remove_restriction',
|
|
1142
|
+
// authority gate — an identity role attestation (ISSUER/BOARD_MEMBER/...) layers on additively when the identity registry lands (docs/design/app-hardening-identity-integration.md §4.2)
|
|
1143
|
+
guard: signerIsParty('state.issuerAddress'),
|
|
950
1144
|
effect: {
|
|
951
1145
|
merge: [
|
|
952
|
-
{ var:
|
|
1146
|
+
{ var: 'state' },
|
|
953
1147
|
{
|
|
954
1148
|
restrictions: {
|
|
955
1149
|
merge: [
|
|
956
|
-
{ var:
|
|
1150
|
+
{ var: 'state.restrictions' },
|
|
957
1151
|
{
|
|
958
1152
|
restrictionType: {
|
|
959
1153
|
filter: [
|
|
960
|
-
{ var:
|
|
961
|
-
{
|
|
1154
|
+
{ var: 'state.restrictions.restrictionType' },
|
|
1155
|
+
{ '!=': [{ var: '' }, { var: 'event.restrictionType' }] },
|
|
962
1156
|
],
|
|
963
1157
|
},
|
|
964
1158
|
isRestricted: {
|
|
965
|
-
|
|
1159
|
+
'>': [
|
|
966
1160
|
{
|
|
967
1161
|
reduce: [
|
|
968
1162
|
{
|
|
969
1163
|
filter: [
|
|
970
|
-
{ var:
|
|
1164
|
+
{ var: 'state.restrictions.restrictionType' },
|
|
971
1165
|
{
|
|
972
|
-
|
|
973
|
-
{ var: "" },
|
|
974
|
-
{ var: "event.restrictionType" },
|
|
975
|
-
],
|
|
1166
|
+
'!=': [{ var: '' }, { var: 'event.restrictionType' }],
|
|
976
1167
|
},
|
|
977
1168
|
],
|
|
978
1169
|
},
|
|
979
|
-
{
|
|
1170
|
+
{ '+': [{ var: 'accumulator' }, 1] },
|
|
980
1171
|
0,
|
|
981
1172
|
],
|
|
982
1173
|
},
|
|
@@ -987,9 +1178,11 @@ export const corpSecuritiesDef = defineFiberApp({
|
|
|
987
1178
|
],
|
|
988
1179
|
},
|
|
989
1180
|
},
|
|
1181
|
+
{
|
|
1182
|
+
_emit: [{ name: 'RESTRICTION_REMOVED', data: { var: 'event' }, destination: 'external' }],
|
|
1183
|
+
},
|
|
990
1184
|
],
|
|
991
1185
|
},
|
|
992
|
-
emits: ["RESTRICTION_REMOVED"],
|
|
993
1186
|
},
|
|
994
1187
|
],
|
|
995
1188
|
});
|