@hyperscale0/hsx 2.4.1 → 3.0.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/CHANGELOG.md +2 -408
- 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 +76 -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 +77 -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,320 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"instruments": [
|
|
3
|
-
{
|
|
4
|
-
"actionOrder": [
|
|
5
|
-
"create",
|
|
6
|
-
"place_deposit",
|
|
7
|
-
"assess_damage",
|
|
8
|
-
"return_deposit"
|
|
9
|
-
],
|
|
10
|
-
"actions": {
|
|
11
|
-
"assess_damage": {
|
|
12
|
-
"agentDescription": "Claim the held deposit for the owner. The deposit must be in held. The reservation settles here, whole or up to the decided amount with the exact remainder released back to the renter. There is no return afterwards.",
|
|
13
|
-
"decidedAmount": {
|
|
14
|
-
"boundField": "depositAmount",
|
|
15
|
-
"field": "damageAmount",
|
|
16
|
-
"remainderAction": "return_deposit"
|
|
17
|
-
},
|
|
18
|
-
"effects": {
|
|
19
|
-
"decides": [
|
|
20
|
-
{
|
|
21
|
-
"signature": "decides.tenant_port",
|
|
22
|
-
"source": "port"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"moves": [
|
|
26
|
-
{
|
|
27
|
-
"signature": "moves.transfer.internal",
|
|
28
|
-
"source": "moves[0]"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"signature": "moves.transfer.internal",
|
|
32
|
-
"source": "moves[1]"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"input": {
|
|
37
|
-
"additionalProperties": false,
|
|
38
|
-
"properties": {
|
|
39
|
-
"damageAmount": {
|
|
40
|
-
"description": "Decided amount in SAR minor units",
|
|
41
|
-
"pattern": "^(0|[1-9][0-9]{0,17})$",
|
|
42
|
-
"type": "string",
|
|
43
|
-
"x-hyperscale-currency": "SAR"
|
|
44
|
-
},
|
|
45
|
-
"evidence": {
|
|
46
|
-
"description": "Required decision reference retained in the operation receipt",
|
|
47
|
-
"maxLength": 180,
|
|
48
|
-
"minLength": 1,
|
|
49
|
-
"type": "string"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"required": [
|
|
53
|
-
"damageAmount",
|
|
54
|
-
"evidence"
|
|
55
|
-
],
|
|
56
|
-
"type": "object"
|
|
57
|
-
},
|
|
58
|
-
"moves": [
|
|
59
|
-
{
|
|
60
|
-
"bind": {
|
|
61
|
-
"amount": {
|
|
62
|
-
"from": "input",
|
|
63
|
-
"path": "damageAmount"
|
|
64
|
-
},
|
|
65
|
-
"currency": {
|
|
66
|
-
"from": "instance",
|
|
67
|
-
"path": "fields.currency"
|
|
68
|
-
},
|
|
69
|
-
"postMode": {
|
|
70
|
-
"from": "const",
|
|
71
|
-
"value": "partial_only"
|
|
72
|
-
},
|
|
73
|
-
"transferId": {
|
|
74
|
-
"from": "instance",
|
|
75
|
-
"path": "refs.placeDepositReservationTransferId"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"key": "post",
|
|
79
|
-
"operation": "internal_transfer.post"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"bind": {
|
|
83
|
-
"reason": {
|
|
84
|
-
"from": "const",
|
|
85
|
-
"value": "Return the unclaimed deposit remainder"
|
|
86
|
-
},
|
|
87
|
-
"transferId": {
|
|
88
|
-
"from": "instance",
|
|
89
|
-
"path": "refs.placeDepositReservationTransferId"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"key": "remainder",
|
|
93
|
-
"operation": "internal_transfer.void"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"port": {
|
|
97
|
-
"allowedParties": [
|
|
98
|
-
"beneficiary"
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
"publicAction": "assessDamageSecurityDeposit",
|
|
102
|
-
"steps": [],
|
|
103
|
-
"summary": "Claim the deposit for the owner through assess_damage"
|
|
104
|
-
},
|
|
105
|
-
"create": {
|
|
106
|
-
"agentDescription": "Open the deposit row before anything is reserved. The caller supplies the depositAmount, the currency, and the renter and owner accounts. Nothing is reserved yet, call place deposit next.",
|
|
107
|
-
"moves": [],
|
|
108
|
-
"publicAction": "createSecurityDeposit",
|
|
109
|
-
"steps": [],
|
|
110
|
-
"summary": "Create a security deposit"
|
|
111
|
-
},
|
|
112
|
-
"place_deposit": {
|
|
113
|
-
"agentDescription": "Reserve the depositAmount against the renter's account in the owner's favor. The deposit must be created. The money is held, not paid: the claim posts it to the owner and the return releases it back.",
|
|
114
|
-
"effects": {
|
|
115
|
-
"holds": [
|
|
116
|
-
{
|
|
117
|
-
"signature": "holds.reserve",
|
|
118
|
-
"source": "moves[0]"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"moves": [
|
|
122
|
-
{
|
|
123
|
-
"signature": "moves.transfer.internal",
|
|
124
|
-
"source": "moves[0]"
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
"moves": [
|
|
129
|
-
{
|
|
130
|
-
"bind": {
|
|
131
|
-
"amount": {
|
|
132
|
-
"from": "instance",
|
|
133
|
-
"path": "fields.depositAmount"
|
|
134
|
-
},
|
|
135
|
-
"currency": {
|
|
136
|
-
"from": "const",
|
|
137
|
-
"value": "SAR"
|
|
138
|
-
},
|
|
139
|
-
"destinationAccountId": {
|
|
140
|
-
"from": "instance",
|
|
141
|
-
"path": "fields.ownerAccountId"
|
|
142
|
-
},
|
|
143
|
-
"metadata.instrumentId": {
|
|
144
|
-
"from": "const",
|
|
145
|
-
"value": "security_deposit"
|
|
146
|
-
},
|
|
147
|
-
"metadata.instrumentInstanceId": {
|
|
148
|
-
"from": "instance",
|
|
149
|
-
"path": "instrumentInstanceId"
|
|
150
|
-
},
|
|
151
|
-
"metadata.phase": {
|
|
152
|
-
"from": "const",
|
|
153
|
-
"value": "place_deposit"
|
|
154
|
-
},
|
|
155
|
-
"productId": {
|
|
156
|
-
"from": "instance",
|
|
157
|
-
"path": "productId"
|
|
158
|
-
},
|
|
159
|
-
"sourceAccountId": {
|
|
160
|
-
"from": "instance",
|
|
161
|
-
"path": "fields.renterAccountId"
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"capture": {
|
|
165
|
-
"placeDepositReservationTransferId": "transferId"
|
|
166
|
-
},
|
|
167
|
-
"key": "reservation",
|
|
168
|
-
"operation": "internal_transfer.reserve"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"publicAction": "placeDepositSecurityDeposit",
|
|
172
|
-
"sandboxFailurePoint": "funding",
|
|
173
|
-
"steps": [],
|
|
174
|
-
"summary": "Reserve the depositAmount against the renter's account"
|
|
175
|
-
},
|
|
176
|
-
"return_deposit": {
|
|
177
|
-
"agentDescription": "Return the held deposit to the renter. The deposit must be in held and unclaimed. This releases the reservation whole and the owner receives nothing.",
|
|
178
|
-
"effects": {
|
|
179
|
-
"decides": [
|
|
180
|
-
{
|
|
181
|
-
"signature": "decides.tenant_port",
|
|
182
|
-
"source": "port"
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"moves": [
|
|
186
|
-
{
|
|
187
|
-
"signature": "moves.transfer.internal",
|
|
188
|
-
"source": "moves[0]"
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
"moves": [
|
|
193
|
-
{
|
|
194
|
-
"bind": {
|
|
195
|
-
"reason": {
|
|
196
|
-
"from": "const",
|
|
197
|
-
"value": "Deposit returned in full"
|
|
198
|
-
},
|
|
199
|
-
"transferId": {
|
|
200
|
-
"from": "instance",
|
|
201
|
-
"path": "refs.placeDepositReservationTransferId"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"key": "void",
|
|
205
|
-
"operation": "internal_transfer.void"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
"port": {
|
|
209
|
-
"allowedParties": [
|
|
210
|
-
"beneficiary"
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
|
-
"publicAction": "returnDepositSecurityDeposit",
|
|
214
|
-
"steps": [],
|
|
215
|
-
"summary": "Return the deposit to the renter through return_deposit"
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
"agentDescription": "Reach for security deposit when money is reserved against the renter in the owner's favor and later claimed or returned. The funds stay reserved and move only on the claim. Pick captured payment when the holder takes the money in slices, and instant transfer when nothing is held.",
|
|
219
|
-
"description": "Deposit: the depositAmount is reserved against the renter's account in the owner's favor, then damageAmount is claimed and the exact remainder returned, or the deposit is returned in full",
|
|
220
|
-
"fields": {
|
|
221
|
-
"currency": {
|
|
222
|
-
"description": "ISO 4217 currency code",
|
|
223
|
-
"maxLength": 3,
|
|
224
|
-
"minLength": 3,
|
|
225
|
-
"pattern": "^[A-Z]{3}$",
|
|
226
|
-
"type": "string"
|
|
227
|
-
},
|
|
228
|
-
"depositAmount": {
|
|
229
|
-
"description": "The deposit amount in SAR minor units, reserved in full and fully accounted on claim or return",
|
|
230
|
-
"pattern": "^[1-9][0-9]{0,17}$",
|
|
231
|
-
"type": "string",
|
|
232
|
-
"x-hyperscale-currency": "SAR"
|
|
233
|
-
},
|
|
234
|
-
"ownerAccountId": {
|
|
235
|
-
"description": "The owner account",
|
|
236
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
237
|
-
"type": "string",
|
|
238
|
-
"x-hyperscale-reference-filter": {
|
|
239
|
-
"column": "role",
|
|
240
|
-
"values": [
|
|
241
|
-
"customer_balance"
|
|
242
|
-
]
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
"renterAccountId": {
|
|
246
|
-
"description": "The renter account",
|
|
247
|
-
"pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
|
|
248
|
-
"type": "string",
|
|
249
|
-
"x-hyperscale-reference-filter": {
|
|
250
|
-
"column": "role",
|
|
251
|
-
"values": [
|
|
252
|
-
"customer_balance"
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"id": "security_deposit",
|
|
258
|
-
"idPrefix": "sd",
|
|
259
|
-
"lifecycle": {
|
|
260
|
-
"initial": "created",
|
|
261
|
-
"states": [
|
|
262
|
-
"created",
|
|
263
|
-
"held",
|
|
264
|
-
"claimed",
|
|
265
|
-
"returned"
|
|
266
|
-
],
|
|
267
|
-
"transitions": {
|
|
268
|
-
"assess_damage": {
|
|
269
|
-
"from": [
|
|
270
|
-
"held"
|
|
271
|
-
],
|
|
272
|
-
"to": "claimed"
|
|
273
|
-
},
|
|
274
|
-
"place_deposit": {
|
|
275
|
-
"from": [
|
|
276
|
-
"created"
|
|
277
|
-
],
|
|
278
|
-
"to": "held"
|
|
279
|
-
},
|
|
280
|
-
"return_deposit": {
|
|
281
|
-
"from": [
|
|
282
|
-
"held"
|
|
283
|
-
],
|
|
284
|
-
"to": "returned"
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"parties": {
|
|
289
|
-
"beneficiary": "ownerAccountId",
|
|
290
|
-
"payer": "renterAccountId"
|
|
291
|
-
},
|
|
292
|
-
"required": [
|
|
293
|
-
"renterAccountId",
|
|
294
|
-
"ownerAccountId",
|
|
295
|
-
"depositAmount",
|
|
296
|
-
"currency"
|
|
297
|
-
],
|
|
298
|
-
"summary": "Refundable deposit from renter held for owner",
|
|
299
|
-
"templateBinding": {
|
|
300
|
-
"id": "security_deposit",
|
|
301
|
-
"parameters": {
|
|
302
|
-
"claimCapture": false,
|
|
303
|
-
"claimInput": false,
|
|
304
|
-
"claimTo": false,
|
|
305
|
-
"deadline": false,
|
|
306
|
-
"fundFailurePoint": false,
|
|
307
|
-
"idPrefixOverride": false,
|
|
308
|
-
"memo": false,
|
|
309
|
-
"returnTo": false
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
"title": "Security deposit"
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"product": "deposit_example",
|
|
316
|
-
"subjects": [],
|
|
317
|
-
"title": "Deposit example",
|
|
318
|
-
"udl": 1,
|
|
319
|
-
"version": 1
|
|
320
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
program settlement_batch_example "Settlement batch example"
|
|
2
|
-
import { settlement_batch } from "std/money_flows"
|
|
3
|
-
party settlement_account: business
|
|
4
|
-
party payout_destination: business
|
|
5
|
-
settlement batch = settlement_batch {
|
|
6
|
-
settlement_account: settlement_account
|
|
7
|
-
source_capture_refs: captureReference
|
|
8
|
-
fee_entries: feeReference
|
|
9
|
-
external_reversal_offsets: reversalReference
|
|
10
|
-
close_trigger: closeAt
|
|
11
|
-
payout_destination: payout_destination
|
|
12
|
-
negative_position: reject
|
|
13
|
-
payout_acknowledgement: port acknowledge_payout
|
|
14
|
-
payout_beneficiary_ref: payoutBeneficiaryId
|
|
15
|
-
}
|
|
16
|
-
port acknowledge_payout {
|
|
17
|
-
allowed: [payout_destination]
|
|
18
|
-
shape: { acknowledgementReference: text }
|
|
19
|
-
}
|