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