@hyperscale0/hsx 2.4.1 → 3.0.1
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/CHANGELOG.md +4 -406
- package/README.md +3 -92
- package/dist/src/ast.d.ts +99 -310
- package/dist/src/ast.d.ts.map +1 -1
- package/dist/src/ast.js +16 -69
- package/dist/src/ast.js.map +1 -1
- package/dist/src/cli.d.ts +6 -19
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +77 -315
- package/dist/src/cli.js.map +1 -1
- package/dist/src/compile.d.ts +23 -73
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +1113 -148
- package/dist/src/compile.js.map +1 -1
- package/dist/src/cost.d.ts +8 -77
- package/dist/src/cost.d.ts.map +1 -1
- package/dist/src/cost.js +13 -422
- package/dist/src/cost.js.map +1 -1
- package/dist/src/format.d.ts +8 -7
- package/dist/src/format.d.ts.map +1 -1
- package/dist/src/format.js +9 -175
- package/dist/src/format.js.map +1 -1
- package/dist/src/headers.d.ts +35 -0
- package/dist/src/headers.d.ts.map +1 -0
- package/dist/src/headers.js +108 -0
- package/dist/src/headers.js.map +1 -0
- package/dist/src/index.d.ts +6 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/lex.d.ts +8 -28
- package/dist/src/lex.d.ts.map +1 -1
- package/dist/src/lex.js +88 -146
- package/dist/src/lex.js.map +1 -1
- package/dist/src/parse.d.ts +4 -17
- package/dist/src/parse.d.ts.map +1 -1
- package/dist/src/parse.js +402 -1040
- package/dist/src/parse.js.map +1 -1
- package/dist/src/std-bundle.d.ts.map +1 -1
- package/dist/src/std-bundle.js +12 -20
- package/dist/src/std-bundle.js.map +1 -1
- package/dist/src/std-library.d.ts +1 -1
- package/dist/src/std-library.d.ts.map +1 -1
- package/dist/src/std-library.js +1 -5
- package/dist/src/std-library.js.map +1 -1
- package/dist/src/tunables.d.ts +7 -0
- package/dist/src/tunables.d.ts.map +1 -0
- package/dist/src/tunables.js +26 -0
- package/dist/src/tunables.js.map +1 -0
- package/dist/src/version.d.ts +2 -4
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +2 -4
- package/dist/src/version.js.map +1 -1
- package/docs/README.md +179 -41
- package/docs/headers.md +44 -0
- package/examples/cost-table.json +99 -751
- package/examples/library.hsx +59 -0
- package/package.json +9 -17
- package/src/ast.ts +82 -441
- package/src/cli.ts +78 -362
- package/src/compile.ts +1535 -247
- package/src/cost.ts +28 -671
- package/src/format.ts +12 -256
- package/src/headers.ts +126 -0
- package/src/index.ts +7 -39
- package/src/lex.ts +99 -195
- package/src/parse.ts +403 -1209
- package/src/std-bundle.ts +12 -20
- package/src/std-library.ts +2 -7
- package/src/tunables.ts +31 -0
- package/src/version.ts +2 -5
- package/std/approvals.hsx +17 -0
- package/std/cards.hsx +63 -0
- package/std/collections.hsx +31 -0
- package/std/escrow.hsx +43 -0
- package/std/financing.hsx +372 -0
- package/std/insurance.hsx +59 -0
- package/std/lending.hsx +115 -0
- package/std/marketplace.hsx +24 -0
- package/std/money.hsx +195 -0
- package/std/savings.hsx +44 -0
- package/std/travel.hsx +98 -0
- package/std/wallet.hsx +41 -0
- package/dist/src/diagnostics.d.ts +0 -13
- package/dist/src/diagnostics.d.ts.map +0 -1
- package/dist/src/diagnostics.js +0 -587
- package/dist/src/diagnostics.js.map +0 -1
- package/dist/src/emit.d.ts +0 -51
- package/dist/src/emit.d.ts.map +0 -1
- package/dist/src/emit.js +0 -192
- package/dist/src/emit.js.map +0 -1
- package/dist/src/entry-overrides.d.ts +0 -58
- package/dist/src/entry-overrides.d.ts.map +0 -1
- package/dist/src/entry-overrides.js +0 -284
- package/dist/src/entry-overrides.js.map +0 -1
- package/dist/src/ir.d.ts +0 -73
- package/dist/src/ir.d.ts.map +0 -1
- package/dist/src/ir.js +0 -15
- package/dist/src/ir.js.map +0 -1
- package/dist/src/limits.d.ts +0 -23
- package/dist/src/limits.d.ts.map +0 -1
- package/dist/src/limits.js +0 -23
- package/dist/src/limits.js.map +0 -1
- package/dist/src/lsp/server.d.ts +0 -32
- package/dist/src/lsp/server.d.ts.map +0 -1
- package/dist/src/lsp/server.js +0 -391
- package/dist/src/lsp/server.js.map +0 -1
- package/dist/src/modules.d.ts +0 -38
- package/dist/src/modules.d.ts.map +0 -1
- package/dist/src/modules.js +0 -372
- package/dist/src/modules.js.map +0 -1
- package/dist/src/typecheck.d.ts +0 -8
- package/dist/src/typecheck.d.ts.map +0 -1
- package/dist/src/typecheck.js +0 -4160
- package/dist/src/typecheck.js.map +0 -1
- package/docs/guide/01-first-program.md +0 -24
- package/docs/guide/02-money.md +0 -25
- package/docs/guide/03-instruments.md +0 -93
- package/docs/guide/04-lifecycles.md +0 -40
- package/docs/guide/05-fees-and-splits.md +0 -45
- package/docs/guide/06-schedules.md +0 -26
- package/docs/guide/07-composition.md +0 -52
- package/docs/guide/08-writing-a-module.md +0 -85
- package/docs/guide/09-cost.md +0 -24
- package/docs/guide/10-diagnostics.md +0 -27
- package/docs/llms-full.txt +0 -3684
- package/docs/llms.txt +0 -44
- package/docs/piece-plans.md +0 -120
- package/docs/playground.md +0 -55
- package/docs/reference/cli.md +0 -36
- package/docs/reference/diagnostics.md +0 -901
- package/docs/reference/grammar.md +0 -38
- package/docs/reference/std/advance.md +0 -112
- package/docs/reference/std/cancellable_booking.md +0 -159
- package/docs/reference/std/captured_payment.md +0 -115
- package/docs/reference/std/conditional_disbursement.md +0 -101
- package/docs/reference/std/credit_facility.md +0 -108
- package/docs/reference/std/held_payment.md +0 -173
- package/docs/reference/std/instant_transfer.md +0 -97
- package/docs/reference/std/metered.md +0 -89
- package/docs/reference/std/pooled_split.md +0 -95
- package/docs/reference/std/premium_forward.md +0 -119
- package/docs/reference/std/reconciled_payout.md +0 -103
- package/docs/reference/std/rotating_pool.md +0 -130
- package/docs/reference/std/scheduled.md +0 -136
- package/docs/reference/std/security_deposit.md +0 -138
- package/docs/reference/std/settlement_batch.md +0 -123
- package/docs/reference/std/swap.md +0 -133
- package/docs/reference/std/threshold_pool.md +0 -138
- package/docs/reference/std/weighted_distribution.md +0 -135
- package/docs/reference/types.md +0 -61
- package/docs/reference/udl-output.md +0 -13
- package/examples/01-first-program/README.md +0 -45
- package/examples/01-first-program/tip-jar.hsx +0 -17
- package/examples/02-imports-and-modules/README.md +0 -96
- package/examples/02-imports-and-modules/photo-booth.hsx +0 -37
- package/examples/03-diagnostics/README.md +0 -68
- package/examples/03-diagnostics/corner-shop-fixed.hsx +0 -22
- package/examples/03-diagnostics/corner-shop.hsx +0 -19
- package/examples/04-complete-product/README.md +0 -84
- package/examples/04-complete-product/study-hall.hsx +0 -67
- package/examples/05-authored-instrument/README.md +0 -5
- package/examples/05-authored-instrument/payment.hsx +0 -37
- package/examples/05-watch-club/README.md +0 -6
- package/examples/05-watch-club/watch-club.hsx +0 -123
- package/examples/README.md +0 -48
- package/examples/advance/README.md +0 -3
- package/examples/advance/advance.hsx +0 -13
- package/examples/advance/advance.udl +0 -367
- package/examples/cancellable_booking/README.md +0 -3
- package/examples/cancellable_booking/cancellable_booking.hsx +0 -14
- package/examples/cancellable_booking/cancellable_booking.udl +0 -413
- package/examples/captured_payment/README.md +0 -3
- package/examples/captured_payment/captured_payment.hsx +0 -17
- package/examples/captured_payment/captured_payment.udl +0 -686
- package/examples/conditional_disbursement/README.md +0 -3
- package/examples/conditional_disbursement/conditional_disbursement.hsx +0 -15
- package/examples/conditional_disbursement/conditional_disbursement.udl +0 -418
- package/examples/credit_facility/README.md +0 -3
- package/examples/credit_facility/credit_facility.hsx +0 -24
- package/examples/credit_facility/credit_facility.udl +0 -1396
- package/examples/held_payment/README.md +0 -3
- package/examples/held_payment/held_payment.hsx +0 -13
- package/examples/held_payment/held_payment.udl +0 -569
- package/examples/instant_transfer/README.md +0 -3
- package/examples/instant_transfer/instant_transfer.hsx +0 -16
- package/examples/instant_transfer/instant_transfer.udl +0 -376
- package/examples/metered/README.md +0 -3
- package/examples/metered/metered.hsx +0 -13
- package/examples/metered/metered.udl +0 -253
- package/examples/pooled_split/README.md +0 -3
- package/examples/pooled_split/pooled_split.hsx +0 -15
- package/examples/pooled_split/pooled_split.udl +0 -432
- package/examples/premium_forward/README.md +0 -3
- package/examples/premium_forward/premium_forward.hsx +0 -19
- package/examples/premium_forward/premium_forward.udl +0 -604
- package/examples/reconciled_payout/README.md +0 -3
- package/examples/reconciled_payout/reconciled_payout.hsx +0 -13
- package/examples/reconciled_payout/reconciled_payout.udl +0 -312
- package/examples/rotating_pool/README.md +0 -3
- package/examples/rotating_pool/rotating_pool.hsx +0 -18
- package/examples/rotating_pool/rotating_pool.udl +0 -4370
- package/examples/scheduled/README.md +0 -3
- package/examples/scheduled/scheduled.hsx +0 -12
- package/examples/scheduled/scheduled.udl +0 -355
- package/examples/security_deposit/README.md +0 -3
- package/examples/security_deposit/security_deposit.hsx +0 -21
- package/examples/security_deposit/security_deposit.udl +0 -320
- package/examples/settlement_batch/README.md +0 -3
- package/examples/settlement_batch/settlement_batch.hsx +0 -19
- package/examples/settlement_batch/settlement_batch.udl +0 -757
- package/examples/swap/README.md +0 -3
- package/examples/swap/swap.hsx +0 -19
- package/examples/swap/swap.udl +0 -892
- package/examples/threshold_pool/README.md +0 -3
- package/examples/threshold_pool/threshold_pool.hsx +0 -16
- package/examples/threshold_pool/threshold_pool.udl +0 -680
- package/examples/weighted_distribution/README.md +0 -3
- package/examples/weighted_distribution/weighted_distribution.hsx +0 -20
- package/examples/weighted_distribution/weighted_distribution.udl +0 -348
- package/skills/hsx/SKILL.md +0 -449
- package/src/diagnostics.ts +0 -620
- package/src/emit.ts +0 -282
- package/src/entry-overrides.ts +0 -428
- package/src/ir.ts +0 -113
- package/src/limits.ts +0 -22
- package/src/lsp/server.ts +0 -460
- package/src/modules.ts +0 -452
- package/src/typecheck.ts +0 -5515
- package/std/SEMANTICS.md +0 -44
- package/std/money_flows/advance.hsx +0 -235
- package/std/money_flows/cancellable_booking.hsx +0 -402
- package/std/money_flows/captured_payment.hsx +0 -220
- package/std/money_flows/conditional_disbursement.hsx +0 -226
- package/std/money_flows/credit_facility.hsx +0 -214
- package/std/money_flows/held_payment.hsx +0 -812
- package/std/money_flows/index.hsx +0 -4
- package/std/money_flows/instant_transfer.hsx +0 -231
- package/std/money_flows/metered.hsx +0 -104
- package/std/money_flows/pooled_split.hsx +0 -109
- package/std/money_flows/premium_forward.hsx +0 -307
- package/std/money_flows/reconciled_payout.hsx +0 -119
- package/std/money_flows/rotating_pool.hsx +0 -305
- package/std/money_flows/scheduled.hsx +0 -599
- package/std/money_flows/security_deposit.hsx +0 -248
- package/std/money_flows/settlement_batch.hsx +0 -173
- package/std/money_flows/swap.hsx +0 -1192
- package/std/money_flows/threshold_pool.hsx +0 -307
- package/std/money_flows/weighted_distribution.hsx +0 -237
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
program weighted_distribution_example "Weighted distribution example"
|
|
2
|
-
import { weighted_distribution } from "std/money_flows"
|
|
3
|
-
party distribution_source: business
|
|
4
|
-
party recipient: business
|
|
5
|
-
settlement proceeds = weighted_distribution {
|
|
6
|
-
source: distribution_source
|
|
7
|
-
recipient: recipient
|
|
8
|
-
amount: distributableAmount: money(SAR)
|
|
9
|
-
weight: entitlementWeight: money(SAR)
|
|
10
|
-
max_recipients: 12
|
|
11
|
-
record_at: recordAt
|
|
12
|
-
snapshot: port snapshot_entitlements
|
|
13
|
-
rounding_policy: largest_remainder
|
|
14
|
-
withholding_policy: refuse
|
|
15
|
-
correction_policy: new_distribution
|
|
16
|
-
}
|
|
17
|
-
port snapshot_entitlements {
|
|
18
|
-
allowed: [distribution_source]
|
|
19
|
-
shape: { evidenceReference: text }
|
|
20
|
-
}
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"instruments": [
|
|
3
|
-
{
|
|
4
|
-
"actionOrder": [
|
|
5
|
-
"create",
|
|
6
|
-
"snapshot_entitlements"
|
|
7
|
-
],
|
|
8
|
-
"actions": {
|
|
9
|
-
"create": {
|
|
10
|
-
"agentDescription": "Open a distribution and start recording entitlements. No money moves. The pool amount, the record date, and the exact recipient count are fixed here.",
|
|
11
|
-
"moves": [],
|
|
12
|
-
"publicAction": "createProceeds",
|
|
13
|
-
"steps": [],
|
|
14
|
-
"summary": "Open entitlement recording"
|
|
15
|
-
},
|
|
16
|
-
"snapshot_entitlements": {
|
|
17
|
-
"agentDescription": "Freeze the entitlement set against a stated evidence reference. The distribution must still be open and its recorded entitlements must match the declared recipient count. Nothing can be recorded afterwards and there is no unfreeze. No money moves.",
|
|
18
|
-
"captureInput": {
|
|
19
|
-
"snapshotEvidenceReference": "evidenceReference"
|
|
20
|
-
},
|
|
21
|
-
"effects": {
|
|
22
|
-
"decides": [
|
|
23
|
-
{
|
|
24
|
-
"signature": "decides.tenant_port",
|
|
25
|
-
"source": "port"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"input": {
|
|
30
|
-
"additionalProperties": false,
|
|
31
|
-
"properties": {
|
|
32
|
-
"evidenceReference": {
|
|
33
|
-
"description": "Required decision reference retained in the operation receipt",
|
|
34
|
-
"maxLength": 180,
|
|
35
|
-
"minLength": 1,
|
|
36
|
-
"type": "string"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"required": [
|
|
40
|
-
"evidenceReference"
|
|
41
|
-
],
|
|
42
|
-
"type": "object"
|
|
43
|
-
},
|
|
44
|
-
"moves": [],
|
|
45
|
-
"port": {
|
|
46
|
-
"allowedParties": [
|
|
47
|
-
"payer"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"publicAction": "snapshotEntitlementsProceeds",
|
|
51
|
-
"steps": [],
|
|
52
|
-
"summary": "Freeze the entitlement set from stored evidence"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"agentDescription": "Reach for weighted distribution when one pool splits across many recipients by declared weights. Record one entitlement per recipient, freeze the set with the snapshot port, then each entitlement pays its own largest-remainder share, so the shares add back to the pool exactly. Settlement batch goes the other way, many charges into one payout.",
|
|
56
|
-
"aggregateInvariants": [
|
|
57
|
-
{
|
|
58
|
-
"childInstrumentId": "proceeds_entitlement",
|
|
59
|
-
"childRefField": "proceedsId",
|
|
60
|
-
"childStatuses": [
|
|
61
|
-
"recorded",
|
|
62
|
-
"paid"
|
|
63
|
-
],
|
|
64
|
-
"count": true,
|
|
65
|
-
"parentField": "maxRecipients"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"description": "Evidence-frozen weighted distribution",
|
|
69
|
-
"fields": {
|
|
70
|
-
"currency": {
|
|
71
|
-
"description": "ISO 4217 currency code",
|
|
72
|
-
"maxLength": 3,
|
|
73
|
-
"minLength": 3,
|
|
74
|
-
"pattern": "^[A-Z]{3}$",
|
|
75
|
-
"type": "string"
|
|
76
|
-
},
|
|
77
|
-
"distributableAmount": {
|
|
78
|
-
"description": "Distribution pool in SAR minor units",
|
|
79
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
80
|
-
"type": "string",
|
|
81
|
-
"x-hyperscale-currency": "SAR"
|
|
82
|
-
},
|
|
83
|
-
"distributionSourceAccountId": {
|
|
84
|
-
"description": "The distribution source account",
|
|
85
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
86
|
-
"type": "string",
|
|
87
|
-
"x-hyperscale-reference-filter": {
|
|
88
|
-
"column": "role",
|
|
89
|
-
"values": [
|
|
90
|
-
"customer_balance"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"maxRecipients": {
|
|
95
|
-
"const": 12,
|
|
96
|
-
"description": "Exactly 12 frozen entitlement rows",
|
|
97
|
-
"type": "integer"
|
|
98
|
-
},
|
|
99
|
-
"recordAt": {
|
|
100
|
-
"description": "Stored record date",
|
|
101
|
-
"format": "hyperscale-date-time",
|
|
102
|
-
"type": "string"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"id": "proceeds",
|
|
106
|
-
"idPrefix": "proc",
|
|
107
|
-
"lifecycle": {
|
|
108
|
-
"initial": "open",
|
|
109
|
-
"states": [
|
|
110
|
-
"open",
|
|
111
|
-
"snapshotted"
|
|
112
|
-
],
|
|
113
|
-
"transitions": {
|
|
114
|
-
"snapshot_entitlements": {
|
|
115
|
-
"from": [
|
|
116
|
-
"open"
|
|
117
|
-
],
|
|
118
|
-
"to": "snapshotted"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"parties": {
|
|
123
|
-
"payer": "distributionSourceAccountId"
|
|
124
|
-
},
|
|
125
|
-
"required": [
|
|
126
|
-
"distributionSourceAccountId",
|
|
127
|
-
"currency",
|
|
128
|
-
"distributableAmount",
|
|
129
|
-
"recordAt",
|
|
130
|
-
"maxRecipients"
|
|
131
|
-
],
|
|
132
|
-
"summary": "Frozen largest-remainder distribution",
|
|
133
|
-
"templateBinding": {
|
|
134
|
-
"id": "weighted_distribution",
|
|
135
|
-
"parameters": {
|
|
136
|
-
"flat": false,
|
|
137
|
-
"idPrefixOverride": false,
|
|
138
|
-
"maxRecipients": 12,
|
|
139
|
-
"receipts": false
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
"title": "Proceeds"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"actionOrder": [
|
|
146
|
-
"create",
|
|
147
|
-
"payout"
|
|
148
|
-
],
|
|
149
|
-
"actions": {
|
|
150
|
-
"create": {
|
|
151
|
-
"agentDescription": "Record one recipient weight against an open distribution. The parent distribution must still be open, and the currency and source account are copied from it. No money moves. Do not supply a share. It is derived later from the frozen set.",
|
|
152
|
-
"effects": {
|
|
153
|
-
"reads": [
|
|
154
|
-
{
|
|
155
|
-
"signature": "reads.requires_refs",
|
|
156
|
-
"source": "requiresRefs"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
},
|
|
160
|
-
"moves": [],
|
|
161
|
-
"publicAction": "createProceedsEntitlement",
|
|
162
|
-
"requiresRefs": [
|
|
163
|
-
{
|
|
164
|
-
"bind": {
|
|
165
|
-
"currency": "fields.currency",
|
|
166
|
-
"distributionSourceAccountId": "fields.distributionSourceAccountId"
|
|
167
|
-
},
|
|
168
|
-
"field": "proceedsId",
|
|
169
|
-
"statuses": [
|
|
170
|
-
"open"
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"steps": [],
|
|
175
|
-
"summary": "Record one entitlement before snapshot"
|
|
176
|
-
},
|
|
177
|
-
"payout": {
|
|
178
|
-
"agentDescription": "Pay this recipient their largest-remainder share of the pool. The parent distribution must already be snapshotted. The amount is computed from the recorded weights, not supplied by the caller, and a zero share moves nothing. This moves money and does not reverse.",
|
|
179
|
-
"distribute": {
|
|
180
|
-
"amountRef": "payoutShare",
|
|
181
|
-
"onZero": "skip_steps",
|
|
182
|
-
"pool": {
|
|
183
|
-
"from": "parent",
|
|
184
|
-
"path": "fields.distributableAmount"
|
|
185
|
-
},
|
|
186
|
-
"refField": "proceedsId",
|
|
187
|
-
"statuses": [
|
|
188
|
-
"recorded",
|
|
189
|
-
"paid"
|
|
190
|
-
],
|
|
191
|
-
"weightField": "entitlementWeight"
|
|
192
|
-
},
|
|
193
|
-
"effects": {
|
|
194
|
-
"moves": [
|
|
195
|
-
{
|
|
196
|
-
"signature": "moves.transfer.internal",
|
|
197
|
-
"source": "moves[0]"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
"reads": [
|
|
201
|
-
{
|
|
202
|
-
"signature": "reads.requires_refs",
|
|
203
|
-
"source": "requiresRefs"
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
},
|
|
207
|
-
"moves": [
|
|
208
|
-
{
|
|
209
|
-
"bind": {
|
|
210
|
-
"amount": {
|
|
211
|
-
"from": "instance",
|
|
212
|
-
"path": "refs.payoutShare"
|
|
213
|
-
},
|
|
214
|
-
"currency": {
|
|
215
|
-
"from": "const",
|
|
216
|
-
"value": "SAR"
|
|
217
|
-
},
|
|
218
|
-
"destinationAccountId": {
|
|
219
|
-
"from": "instance",
|
|
220
|
-
"path": "fields.recipientAccountId"
|
|
221
|
-
},
|
|
222
|
-
"metadata.instrumentId": {
|
|
223
|
-
"from": "const",
|
|
224
|
-
"value": "proceeds_entitlement"
|
|
225
|
-
},
|
|
226
|
-
"metadata.instrumentInstanceId": {
|
|
227
|
-
"from": "instance",
|
|
228
|
-
"path": "instrumentInstanceId"
|
|
229
|
-
},
|
|
230
|
-
"metadata.phase": {
|
|
231
|
-
"from": "const",
|
|
232
|
-
"value": "payout"
|
|
233
|
-
},
|
|
234
|
-
"productId": {
|
|
235
|
-
"from": "instance",
|
|
236
|
-
"path": "productId"
|
|
237
|
-
},
|
|
238
|
-
"sourceAccountId": {
|
|
239
|
-
"from": "instance",
|
|
240
|
-
"path": "fields.distributionSourceAccountId"
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
"capture": {
|
|
244
|
-
"payoutPayoutTransferId": "transferId"
|
|
245
|
-
},
|
|
246
|
-
"key": "payout",
|
|
247
|
-
"operation": "internal_transfer.create"
|
|
248
|
-
}
|
|
249
|
-
],
|
|
250
|
-
"publicAction": "payoutProceedsEntitlement",
|
|
251
|
-
"requiresRefs": [
|
|
252
|
-
{
|
|
253
|
-
"field": "proceedsId",
|
|
254
|
-
"match": {
|
|
255
|
-
"fields.currency": "fields.currency",
|
|
256
|
-
"fields.distributionSourceAccountId": "fields.distributionSourceAccountId"
|
|
257
|
-
},
|
|
258
|
-
"statuses": [
|
|
259
|
-
"snapshotted"
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
],
|
|
263
|
-
"steps": [],
|
|
264
|
-
"summary": "Pay the deterministic largest-remainder share once"
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
"agentDescription": "One recipient weighted claim on proceeds. Record one per recipient before the snapshot. Its share is derived from its weight against the frozen set, never supplied by the caller.",
|
|
268
|
-
"description": "One frozen weighted entitlement in proceeds",
|
|
269
|
-
"fields": {
|
|
270
|
-
"currency": {
|
|
271
|
-
"description": "ISO 4217 currency code",
|
|
272
|
-
"maxLength": 3,
|
|
273
|
-
"minLength": 3,
|
|
274
|
-
"pattern": "^[A-Z]{3}$",
|
|
275
|
-
"type": "string"
|
|
276
|
-
},
|
|
277
|
-
"distributionSourceAccountId": {
|
|
278
|
-
"description": "The distribution source account",
|
|
279
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
280
|
-
"type": "string",
|
|
281
|
-
"x-hyperscale-reference-filter": {
|
|
282
|
-
"column": "role",
|
|
283
|
-
"values": [
|
|
284
|
-
"customer_balance"
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"entitlementWeight": {
|
|
289
|
-
"description": "Stored non-negative entitlement weight",
|
|
290
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
291
|
-
"type": "string",
|
|
292
|
-
"x-hyperscale-currency": "SAR"
|
|
293
|
-
},
|
|
294
|
-
"proceedsId": {
|
|
295
|
-
"description": "The exact proceeds",
|
|
296
|
-
"pattern": "^proc_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
297
|
-
"type": "string"
|
|
298
|
-
},
|
|
299
|
-
"recipientAccountId": {
|
|
300
|
-
"description": "The recipient account",
|
|
301
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
302
|
-
"type": "string",
|
|
303
|
-
"x-hyperscale-reference-filter": {
|
|
304
|
-
"column": "role",
|
|
305
|
-
"values": [
|
|
306
|
-
"customer_balance"
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
"id": "proceeds_entitlement",
|
|
312
|
-
"idPrefix": "zzaa",
|
|
313
|
-
"lifecycle": {
|
|
314
|
-
"initial": "recorded",
|
|
315
|
-
"states": [
|
|
316
|
-
"recorded",
|
|
317
|
-
"paid"
|
|
318
|
-
],
|
|
319
|
-
"transitions": {
|
|
320
|
-
"payout": {
|
|
321
|
-
"from": [
|
|
322
|
-
"recorded"
|
|
323
|
-
],
|
|
324
|
-
"to": "paid"
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
"parties": {
|
|
329
|
-
"beneficiary": "recipientAccountId",
|
|
330
|
-
"payer": "distributionSourceAccountId"
|
|
331
|
-
},
|
|
332
|
-
"required": [
|
|
333
|
-
"recipientAccountId",
|
|
334
|
-
"distributionSourceAccountId",
|
|
335
|
-
"currency",
|
|
336
|
-
"proceedsId",
|
|
337
|
-
"entitlementWeight"
|
|
338
|
-
],
|
|
339
|
-
"summary": "Frozen entitlement in proceeds",
|
|
340
|
-
"title": "Proceeds Entitlement"
|
|
341
|
-
}
|
|
342
|
-
],
|
|
343
|
-
"product": "weighted_distribution_example",
|
|
344
|
-
"subjects": [],
|
|
345
|
-
"title": "Weighted distribution example",
|
|
346
|
-
"udl": 1,
|
|
347
|
-
"version": 1
|
|
348
|
-
}
|