@hyperscale0/hsx 4.0.0 → 4.1.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 +8 -0
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +46 -148
- package/dist/src/compile.js.map +1 -1
- package/dist/src/headers.d.ts +2 -2
- package/dist/src/headers.d.ts.map +1 -1
- package/dist/src/headers.js +1 -2
- package/dist/src/headers.js.map +1 -1
- package/dist/src/lex.d.ts +1 -1
- package/dist/src/lex.d.ts.map +1 -1
- package/dist/src/lex.js +0 -1
- package/dist/src/lex.js.map +1 -1
- package/dist/src/parse.js +0 -17
- package/dist/src/parse.js.map +1 -1
- package/dist/src/std-bundle.d.ts.map +1 -1
- package/dist/src/std-bundle.js +10 -11
- package/dist/src/std-bundle.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/README.md +0 -10
- package/docs/headers.md +15 -16
- package/examples/cost-table.json +8 -144
- package/examples/library.hsx +4 -4
- package/package.json +4 -4
- package/src/compile.ts +57 -214
- package/src/headers.ts +1 -2
- package/src/lex.ts +0 -1
- package/src/parse.ts +0 -14
- package/src/std-bundle.ts +10 -11
- package/src/version.ts +1 -1
- package/std/cards.hsx +10 -11
- package/std/collections.hsx +3 -3
- package/std/escrow.hsx +2 -2
- package/std/financing.hsx +56 -53
- package/std/insurance.hsx +17 -16
- package/std/lending.hsx +8 -7
- package/std/money.hsx +8 -18
- package/std/reporting.hsx +0 -4
- package/std/travel.hsx +5 -6
- package/std/wallet.hsx +3 -3
- package/std/approvals.hsx +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"std-bundle.js","sourceRoot":"","sources":["../../src/std-bundle.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAAgC,IAAI,GAAG,CAAiB;IACpF,CAAC,
|
|
1
|
+
{"version":3,"file":"std-bundle.js","sourceRoot":"","sources":["../../src/std-bundle.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAAgC,IAAI,GAAG,CAAiB;IACpF,CAAC,WAAW,EAAE,u+GAAu+G,CAAC;IACt/G,CAAC,iBAAiB,EAAE,mnKAAmnK,CAAC;IACxoK,CAAC,YAAY,EAAE,s5DAAs5D,CAAC;IACt6D,CAAC,eAAe,EAAE,o5tDAAo5tD,CAAC;IACv6tD,CAAC,eAAe,EAAE,g7FAAg7F,CAAC;IACn8F,CAAC,aAAa,EAAE,wjPAAwjP,CAAC;IACzkP,CAAC,iBAAiB,EAAE,gxPAAgxP,CAAC;IACryP,CAAC,WAAW,EAAE,64QAA64Q,CAAC;IAC55Q,CAAC,eAAe,EAAE,gs5CAAgs5C,CAAC;IACnt5C,CAAC,aAAa,EAAE,qmGAAqmG,CAAC;IACtnG,CAAC,YAAY,EAAE,4wLAA4wL,CAAC;IAC5xL,CAAC,YAAY,EAAE,m6DAAm6D,CAAC;CACp7D,CAAC,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
package/dist/src/version.js
CHANGED
package/docs/README.md
CHANGED
|
@@ -85,7 +85,6 @@ write ordered requirements and moves as expressions:
|
|
|
85
85
|
```hsx
|
|
86
86
|
requires self.payer == self.order.buyer
|
|
87
87
|
requires self.order in [placed]
|
|
88
|
-
requires approval by underwriter
|
|
89
88
|
moves self.price from payer to self.held
|
|
90
89
|
moves self.price from self.held to payee fee fee
|
|
91
90
|
```
|
|
@@ -111,15 +110,6 @@ They cannot add kernel instructions. `at(list, position)` reads a dated list;
|
|
|
111
110
|
floors a weighted share. `records` declares child types. `invoke` can create a child
|
|
112
111
|
with typed input in the same transaction.
|
|
113
112
|
|
|
114
|
-
An `approval` tunable binds a party and emits a decision record for each gated
|
|
115
|
-
action, including child actions. `approval: underwriter` needs no separate object.
|
|
116
|
-
Generated records are named `<object>_<action>_decision`; child names retain their
|
|
117
|
-
object prefix. `requires approval by approver for approve is declined` reuses the
|
|
118
|
-
approve decision for a declined branch. Decisions keep the target action's typed
|
|
119
|
-
material input and expiry. `approvals.decision` remains available to attach an
|
|
120
|
-
explicit decision to an action without a library approval tunable. A decision
|
|
121
|
-
alone does not add a requirement to that action. Approval declarations with
|
|
122
|
-
`input: "material"` infer immutable material fields from the target action's input.
|
|
123
113
|
The compiler removes branches excluded by fixed enum tunables. An invalid program reports its source line
|
|
124
114
|
and a correction. No artifact is returned with diagnostics.
|
|
125
115
|
|
package/docs/headers.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Header inventory
|
|
2
2
|
|
|
3
3
|
Attach library instruments inside authored object kinds. Each program selects policies through typed tunables.
|
|
4
|
-
Bind party parameters to owner, actor, operator or declared parties. Configure declared businesses per Build
|
|
5
|
-
`ref<T>[]` accepts one reference or up to 16 references as one policy.
|
|
4
|
+
Bind party parameters to owner, actor, operator or declared parties. Configure declared businesses per Build. The authoringTemplate source is an attach fragment for an object block. Expose the chosen business action; instrument creation stays internal.
|
|
5
|
+
`ref<T>[]` accepts one reference or up to 16 references as one policy.
|
|
6
6
|
|
|
7
7
|
| Instrument | Tunables |
|
|
8
8
|
| --- | --- |
|
|
@@ -12,7 +12,6 @@ Bind party parameters to owner, actor, operator or declared parties. Configure d
|
|
|
12
12
|
| money.schedule | `payer: party`, `payee: party`, `amount: money = runtime`, `count: integer(1, 366) = 12` |
|
|
13
13
|
| money.pool | `payer: party`, `payee: party`, `target: money`, `closes: date` |
|
|
14
14
|
| money.swap | `first: party`, `second: party`, `first_amount: money`, `second_amount: money`, `expires: date` |
|
|
15
|
-
| money.deposit | `payer: party`, `payee: party`, `amount: money`, `expires: date`, `approval: approval` |
|
|
16
15
|
| money.payout | `payer: party`, `payee: party`, `adapter: text`, `max_age: duration`, `amount: money = runtime` |
|
|
17
16
|
| money.metered | `payer: party`, `payee: party`, `unit_price: money`, `units: integer = 1`, `fee: fee = { seller: 0% }` |
|
|
18
17
|
| marketplace.listing | `seller: party` |
|
|
@@ -21,27 +20,27 @@ Bind party parameters to owner, actor, operator or declared parties. Configure d
|
|
|
21
20
|
| escrow.hold | `payer: party = party(person)`, `payee: party = programOperator`, `accept_within: duration = 48h`, `fee: fee = { seller: 0%, tax: 0% }`, `dispute: policy = { refund_after: return_verified }` |
|
|
22
21
|
| wallet.balance | `holder: party`, `spend_limit: money = 100000 SAR` |
|
|
23
22
|
| wallet.spend | `wallet: ref<wallet.balance>`, `payee: party` |
|
|
24
|
-
| financing.installments | `months: integer(1, 366)`, `charge_limit: integer(1, 3) = 3`, `profit: percent`, `disburse_to: enum(funds, borrower) = funds`, `profit_earned: enum(on_payment, by_schedule, at_disbursement) = on_payment`, `apply: enum(fines_profit_principal, principal_profit, pro_rata) = fines_profit_principal`, `payoff_rebate: percent = 100%`, `write_off_after: duration = 90d`, `max_extension: duration = 90d`, `max_amendments: integer(0, 366) = 2`, `waiver_limit: percent = 100%`, `amendment_expiry: duration = 7d`, `payoff_quote_expiry: duration = 1h`, `allow_overdue: enum(allowed, blocked) = allowed`, `assessed_fines: enum(carry, require_waiver) = carry`, `down_payment: percent = 0%`, `funds: ref
|
|
25
|
-
| financing.late_charge | `on: ref<financing.installments>[]`, `grace: duration = 3d`, `fine: money = 50 SAR`, `cap: money = 25 SAR`, `fines_to: party = programOperator`, `costs_to: party = programOperator`, `
|
|
26
|
-
| financing.limits | `per_borrower: money`, `
|
|
27
|
-
| financing.
|
|
23
|
+
| financing.installments | `months: integer(1, 366)`, `charge_limit: integer(1, 3) = 3`, `profit: percent`, `disburse_to: enum(funds, borrower) = funds`, `profit_earned: enum(on_payment, by_schedule, at_disbursement) = on_payment`, `apply: enum(fines_profit_principal, principal_profit, pro_rata) = fines_profit_principal`, `payoff_rebate: percent = 100%`, `write_off_after: duration = 90d`, `max_extension: duration = 90d`, `max_amendments: integer(0, 366) = 2`, `waiver_limit: percent = 100%`, `amendment_expiry: duration = 7d`, `payoff_quote_expiry: duration = 1h`, `allow_overdue: enum(allowed, blocked) = allowed`, `assessed_fines: enum(carry, require_waiver) = carry`, `down_payment: percent = 0%`, `funds: ref<escrow.hold>?`, `borrower: party = party(person)`, `capital: party = programOperator`, `share: percent = 0%`, `limits: ref<financing.limits> = object(financing.limits)`, `portfolio: ref<financing.portfolio_limit> = object(financing.portfolio_limit)` |
|
|
24
|
+
| financing.late_charge | `on: ref<financing.installments>[]`, `grace: duration = 3d`, `fine: money = 50 SAR`, `cap: money = 25 SAR`, `fines_to: party = programOperator`, `costs_to: party = programOperator`, `borrower: party = party(person)` |
|
|
25
|
+
| financing.limits | `per_borrower: money`, `borrower: party = party(person)`, `active_plans: integer = 1` |
|
|
26
|
+
| financing.portfolio_limit | `limit: money` |
|
|
27
|
+
| financing.credit_line | `borrower: party = programOperator`, `adapter: text`, `limit: money`, `expires: date` |
|
|
28
28
|
| financing.advance | `line: ref<financing.credit_line>`, `amount: money = runtime` |
|
|
29
|
-
| lending.round | `borrower: party`, `plan: ref<financing.installments> = object(financing.installments)`, `minimum_ticket: money = 100 SAR`, `investor_cap: percent = 20%`, `commitments: ref<lending.commitment> = object(lending.commitment)` |
|
|
29
|
+
| lending.round | `borrower: party`, `plan: ref<financing.installments> = object(financing.installments)`, `operator: party = programOperator`, `minimum_ticket: money = 100 SAR`, `investor_cap: percent = 20%`, `commitments: ref<lending.commitment> = object(lending.commitment)` |
|
|
30
30
|
| lending.commitment | `round: ref<lending.round>`, `wallet: ref<wallet.balance>`, `investor: party = party(person)` |
|
|
31
|
-
| lending.distribution | `round: ref<lending.round>`, `receipt: ref`, `commitments: ref<lending.commitment> = object(lending.commitment)`, `mode: enum(cash, loss) = cash`, `residual_to: party = programOperator`, `fee: percent = 1%`, `tax: percent = 15%` |
|
|
32
|
-
| insurance.cover | `holder: party`, `
|
|
33
|
-
| insurance.claim | `cover: ref<insurance.cover>`, `
|
|
34
|
-
|
|
|
35
|
-
| collections.case | `on: ref<financing.installments>[]`, `agency: approval`, `overdue: duration = 3d`, `fee: percent = 20%` |
|
|
31
|
+
| lending.distribution | `round: ref<lending.round>`, `receipt: ref`, `commitments: ref<lending.commitment> = object(lending.commitment)`, `mode: enum(cash, loss) = cash`, `residual_to: party = programOperator`, `operator: party = programOperator`, `fee: percent = 1%`, `tax: percent = 15%` |
|
|
32
|
+
| insurance.cover | `holder: party`, `adapter: text`, `commission: percent = 0%`, `covers: ref`, `premium: money = runtime` |
|
|
33
|
+
| insurance.claim | `cover: ref<insurance.cover>`, `inspector: party` |
|
|
34
|
+
| collections.case | `on: ref<financing.installments>[]`, `agency: party`, `capital: party = programOperator`, `overdue: duration = 3d`, `fee: percent = 20%` |
|
|
36
35
|
| collections.contact | `case: ref<collections.case>[]`, `agency: party`, `max_contacts: integer = 10`, `window: duration = 30d`, `contact_from: integer(0, 23) = 8`, `contact_until: integer(1, 23) = 20`, `timezone: text = "Asia/Riyadh"`; contact_from less_than contact_until |
|
|
37
36
|
| collections.reminder | `on: ref<financing.installments>[]`, `operator: party = programOperator`, `before_days: integer(0, 366) = 3`, `overdue_days: integer(1, 366) = 1`, `max_per_day: integer(1, 10) = 1`, `send_from: integer(0, 23) = 8`, `send_until: integer(1, 24) = 20`, `timezone: text = "Asia/Riyadh"`; send_from less_than send_until |
|
|
38
37
|
| travel.package | `price: money`, `supplier_cost: money`, `departure: date`; supplier_cost at_most price |
|
|
39
|
-
| travel.booking | `package: ref<travel.package>`, `buyer: party`, `supplier: party`, `
|
|
38
|
+
| travel.booking | `package: ref<travel.package>`, `buyer: party`, `supplier: party`, `operator: party = programOperator`, `cover: ref<insurance.cover>`, `deposit: percent = 30%`, `balance_before: duration = 14d`, `confirm_within: duration = 24h`, `tax: percent = 15%`, `early_before: duration = 30d`, `middle_before: duration = 15d`, `middle_penalty: percent = 10%`, `late_penalty: percent = 30%`; early_before greater_than middle_before |
|
|
40
39
|
| cards.cardholder | `holder: party` |
|
|
41
40
|
| cards.card | `holder: ref<cards.cardholder>`, `spend_limit: money` |
|
|
42
|
-
| cards.authorization | `card: ref<cards.card>`, `merchant: party`, `
|
|
41
|
+
| cards.authorization | `card: ref<cards.card>`, `merchant: party`, `issuer: party = programOperator` |
|
|
43
42
|
| cards.transaction | `authorization: ref<cards.authorization>` |
|
|
44
|
-
| cards.dispute | `transaction: ref<cards.transaction>`, `
|
|
43
|
+
| cards.dispute | `transaction: ref<cards.transaction>`, `issuer: party = programOperator`, `within: duration = 90d` |
|
|
45
44
|
| savings.circle | `contribution: money`, `members: integer(1, 366)`, `starts: date`, `memberships: ref<savings.membership> = object(savings.membership)` |
|
|
46
45
|
| savings.membership | `circle: ref<savings.circle>`, `member: party` |
|
|
47
46
|
| reporting.portfolio | `on: ref<financing.installments>[]`, `default_days: integer(1, 3650) = 90`, `retention_years: integer(1, 100) = 10`, `aging_first_days: integer(1, 3650) = 30`, `aging_second_days: integer(1, 3650) = 60`, `aging_third_days: integer(1, 3650) = 90`, `ratio_scale: integer(1, 1000000) = 10000`, `ratio_rounding: enum(floor, halfUp) = floor`, `lock_wait_ms: integer(1, 2000) = 2000`, `capture_ms: integer(1, 10000) = 10000`, `max_rows: integer(1, 100000) = 10000`, `max_join_rows: integer(1, 1000000) = 100000`, `max_bytes: integer(1024, 16777216) = 8388608`; aging_first_days less_than aging_second_days, aging_second_days less_than aging_third_days |
|
package/examples/cost-table.json
CHANGED
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
"declaredMeters": [
|
|
5
5
|
"account.active_month",
|
|
6
6
|
"instrument.event.count",
|
|
7
|
-
"kyb.application.review",
|
|
8
7
|
"transfer.internal.count",
|
|
9
|
-
"transfer.internal.volume_sar"
|
|
10
|
-
"verification.kyb.count"
|
|
8
|
+
"transfer.internal.volume_sar"
|
|
11
9
|
],
|
|
12
|
-
"effectiveTableDigest": "
|
|
10
|
+
"effectiveTableDigest": "2d53121d200de2cb7567113ebf5bc0ce9377e7089fd4697f4b694bd557e32063",
|
|
13
11
|
"fixed": {
|
|
14
12
|
"activationBaseMinor": "500000",
|
|
15
13
|
"activationPerPointMinor": "100000",
|
|
@@ -51,14 +49,6 @@
|
|
|
51
49
|
"settlement": "invoice",
|
|
52
50
|
"signature": "clock.due"
|
|
53
51
|
},
|
|
54
|
-
{
|
|
55
|
-
"bps": 0,
|
|
56
|
-
"meter": "verification.kyb.count",
|
|
57
|
-
"payer": "product",
|
|
58
|
-
"perEventMinor": "8000",
|
|
59
|
-
"settlement": "invoice",
|
|
60
|
-
"signature": "decides.kyb"
|
|
61
|
-
},
|
|
62
52
|
{
|
|
63
53
|
"bps": 0,
|
|
64
54
|
"meter": "instrument.event.count",
|
|
@@ -83,14 +73,6 @@
|
|
|
83
73
|
"settlement": "invoice",
|
|
84
74
|
"signature": "meters.account.active_month"
|
|
85
75
|
},
|
|
86
|
-
{
|
|
87
|
-
"bps": 0,
|
|
88
|
-
"meter": "billing.invoice.settlement",
|
|
89
|
-
"payer": "product",
|
|
90
|
-
"perEventMinor": "1",
|
|
91
|
-
"settlement": "invoice",
|
|
92
|
-
"signature": "meters.billing.invoice.settlement"
|
|
93
|
-
},
|
|
94
76
|
{
|
|
95
77
|
"bps": 0,
|
|
96
78
|
"meter": "instrument.event.count",
|
|
@@ -99,14 +81,6 @@
|
|
|
99
81
|
"settlement": "invoice",
|
|
100
82
|
"signature": "meters.instrument.event.count"
|
|
101
83
|
},
|
|
102
|
-
{
|
|
103
|
-
"bps": 0,
|
|
104
|
-
"meter": "kyb.application.review",
|
|
105
|
-
"payer": "product",
|
|
106
|
-
"perEventMinor": "20000",
|
|
107
|
-
"settlement": "invoice",
|
|
108
|
-
"signature": "meters.kyb.application.review"
|
|
109
|
-
},
|
|
110
84
|
{
|
|
111
85
|
"bps": 6,
|
|
112
86
|
"meter": "transfer.internal.count",
|
|
@@ -132,14 +106,6 @@
|
|
|
132
106
|
"settlement": "invoice",
|
|
133
107
|
"signature": "requires.aggregate"
|
|
134
108
|
},
|
|
135
|
-
{
|
|
136
|
-
"bps": 0,
|
|
137
|
-
"meter": "instrument.event.count",
|
|
138
|
-
"payer": "product",
|
|
139
|
-
"perEventMinor": "0",
|
|
140
|
-
"settlement": "invoice",
|
|
141
|
-
"signature": "requires.approval"
|
|
142
|
-
},
|
|
143
109
|
{
|
|
144
110
|
"bps": 0,
|
|
145
111
|
"meter": "instrument.event.count",
|
|
@@ -196,12 +162,10 @@
|
|
|
196
162
|
"declaredMeters": [
|
|
197
163
|
"account.active_month",
|
|
198
164
|
"instrument.event.count",
|
|
199
|
-
"kyb.application.review",
|
|
200
165
|
"transfer.internal.count",
|
|
201
|
-
"transfer.internal.volume_usd"
|
|
202
|
-
"verification.kyb.count"
|
|
166
|
+
"transfer.internal.volume_usd"
|
|
203
167
|
],
|
|
204
|
-
"effectiveTableDigest": "
|
|
168
|
+
"effectiveTableDigest": "44fa81226359fcafa8bd66b70c2311ee999c9bae66ff59c85ccb14d7d68126a9",
|
|
205
169
|
"fixed": {
|
|
206
170
|
"activationBaseMinor": "133300",
|
|
207
171
|
"activationPerPointMinor": "26700",
|
|
@@ -243,14 +207,6 @@
|
|
|
243
207
|
"settlement": "invoice",
|
|
244
208
|
"signature": "clock.due"
|
|
245
209
|
},
|
|
246
|
-
{
|
|
247
|
-
"bps": 0,
|
|
248
|
-
"meter": "verification.kyb.count",
|
|
249
|
-
"payer": "product",
|
|
250
|
-
"perEventMinor": "2133",
|
|
251
|
-
"settlement": "invoice",
|
|
252
|
-
"signature": "decides.kyb"
|
|
253
|
-
},
|
|
254
210
|
{
|
|
255
211
|
"bps": 0,
|
|
256
212
|
"meter": "instrument.event.count",
|
|
@@ -275,14 +231,6 @@
|
|
|
275
231
|
"settlement": "invoice",
|
|
276
232
|
"signature": "meters.account.active_month"
|
|
277
233
|
},
|
|
278
|
-
{
|
|
279
|
-
"bps": 0,
|
|
280
|
-
"meter": "billing.invoice.settlement",
|
|
281
|
-
"payer": "product",
|
|
282
|
-
"perEventMinor": "1",
|
|
283
|
-
"settlement": "invoice",
|
|
284
|
-
"signature": "meters.billing.invoice.settlement"
|
|
285
|
-
},
|
|
286
234
|
{
|
|
287
235
|
"bps": 0,
|
|
288
236
|
"meter": "instrument.event.count",
|
|
@@ -291,14 +239,6 @@
|
|
|
291
239
|
"settlement": "invoice",
|
|
292
240
|
"signature": "meters.instrument.event.count"
|
|
293
241
|
},
|
|
294
|
-
{
|
|
295
|
-
"bps": 0,
|
|
296
|
-
"meter": "kyb.application.review",
|
|
297
|
-
"payer": "product",
|
|
298
|
-
"perEventMinor": "5333",
|
|
299
|
-
"settlement": "invoice",
|
|
300
|
-
"signature": "meters.kyb.application.review"
|
|
301
|
-
},
|
|
302
242
|
{
|
|
303
243
|
"bps": 6,
|
|
304
244
|
"meter": "transfer.internal.count",
|
|
@@ -324,14 +264,6 @@
|
|
|
324
264
|
"settlement": "invoice",
|
|
325
265
|
"signature": "requires.aggregate"
|
|
326
266
|
},
|
|
327
|
-
{
|
|
328
|
-
"bps": 0,
|
|
329
|
-
"meter": "instrument.event.count",
|
|
330
|
-
"payer": "product",
|
|
331
|
-
"perEventMinor": "0",
|
|
332
|
-
"settlement": "invoice",
|
|
333
|
-
"signature": "requires.approval"
|
|
334
|
-
},
|
|
335
267
|
{
|
|
336
268
|
"bps": 0,
|
|
337
269
|
"meter": "instrument.event.count",
|
|
@@ -388,12 +320,10 @@
|
|
|
388
320
|
"declaredMeters": [
|
|
389
321
|
"account.active_month",
|
|
390
322
|
"instrument.event.count",
|
|
391
|
-
"kyb.application.review",
|
|
392
323
|
"transfer.internal.count",
|
|
393
|
-
"transfer.internal.volume_eur"
|
|
394
|
-
"verification.kyb.count"
|
|
324
|
+
"transfer.internal.volume_eur"
|
|
395
325
|
],
|
|
396
|
-
"effectiveTableDigest": "
|
|
326
|
+
"effectiveTableDigest": "613d900e38f98a6bf3934e7940ff4d06c76f1dddc695c79ee3b5ee1ad45b8636",
|
|
397
327
|
"fixed": {
|
|
398
328
|
"activationBaseMinor": "125000",
|
|
399
329
|
"activationPerPointMinor": "25000",
|
|
@@ -435,14 +365,6 @@
|
|
|
435
365
|
"settlement": "invoice",
|
|
436
366
|
"signature": "clock.due"
|
|
437
367
|
},
|
|
438
|
-
{
|
|
439
|
-
"bps": 0,
|
|
440
|
-
"meter": "verification.kyb.count",
|
|
441
|
-
"payer": "product",
|
|
442
|
-
"perEventMinor": "2000",
|
|
443
|
-
"settlement": "invoice",
|
|
444
|
-
"signature": "decides.kyb"
|
|
445
|
-
},
|
|
446
368
|
{
|
|
447
369
|
"bps": 0,
|
|
448
370
|
"meter": "instrument.event.count",
|
|
@@ -467,14 +389,6 @@
|
|
|
467
389
|
"settlement": "invoice",
|
|
468
390
|
"signature": "meters.account.active_month"
|
|
469
391
|
},
|
|
470
|
-
{
|
|
471
|
-
"bps": 0,
|
|
472
|
-
"meter": "billing.invoice.settlement",
|
|
473
|
-
"payer": "product",
|
|
474
|
-
"perEventMinor": "1",
|
|
475
|
-
"settlement": "invoice",
|
|
476
|
-
"signature": "meters.billing.invoice.settlement"
|
|
477
|
-
},
|
|
478
392
|
{
|
|
479
393
|
"bps": 0,
|
|
480
394
|
"meter": "instrument.event.count",
|
|
@@ -483,14 +397,6 @@
|
|
|
483
397
|
"settlement": "invoice",
|
|
484
398
|
"signature": "meters.instrument.event.count"
|
|
485
399
|
},
|
|
486
|
-
{
|
|
487
|
-
"bps": 0,
|
|
488
|
-
"meter": "kyb.application.review",
|
|
489
|
-
"payer": "product",
|
|
490
|
-
"perEventMinor": "5000",
|
|
491
|
-
"settlement": "invoice",
|
|
492
|
-
"signature": "meters.kyb.application.review"
|
|
493
|
-
},
|
|
494
400
|
{
|
|
495
401
|
"bps": 6,
|
|
496
402
|
"meter": "transfer.internal.count",
|
|
@@ -516,14 +422,6 @@
|
|
|
516
422
|
"settlement": "invoice",
|
|
517
423
|
"signature": "requires.aggregate"
|
|
518
424
|
},
|
|
519
|
-
{
|
|
520
|
-
"bps": 0,
|
|
521
|
-
"meter": "instrument.event.count",
|
|
522
|
-
"payer": "product",
|
|
523
|
-
"perEventMinor": "0",
|
|
524
|
-
"settlement": "invoice",
|
|
525
|
-
"signature": "requires.approval"
|
|
526
|
-
},
|
|
527
425
|
{
|
|
528
426
|
"bps": 0,
|
|
529
427
|
"meter": "instrument.event.count",
|
|
@@ -580,12 +478,10 @@
|
|
|
580
478
|
"declaredMeters": [
|
|
581
479
|
"account.active_month",
|
|
582
480
|
"instrument.event.count",
|
|
583
|
-
"kyb.application.review",
|
|
584
481
|
"transfer.internal.count",
|
|
585
|
-
"transfer.internal.volume_gbp"
|
|
586
|
-
"verification.kyb.count"
|
|
482
|
+
"transfer.internal.volume_gbp"
|
|
587
483
|
],
|
|
588
|
-
"effectiveTableDigest": "
|
|
484
|
+
"effectiveTableDigest": "11ff399b5078ba8ba544a518d5483fced9da63da9c7b1cc2124fea1f17a5b01c",
|
|
589
485
|
"fixed": {
|
|
590
486
|
"activationBaseMinor": "104200",
|
|
591
487
|
"activationPerPointMinor": "20800",
|
|
@@ -627,14 +523,6 @@
|
|
|
627
523
|
"settlement": "invoice",
|
|
628
524
|
"signature": "clock.due"
|
|
629
525
|
},
|
|
630
|
-
{
|
|
631
|
-
"bps": 0,
|
|
632
|
-
"meter": "verification.kyb.count",
|
|
633
|
-
"payer": "product",
|
|
634
|
-
"perEventMinor": "1667",
|
|
635
|
-
"settlement": "invoice",
|
|
636
|
-
"signature": "decides.kyb"
|
|
637
|
-
},
|
|
638
526
|
{
|
|
639
527
|
"bps": 0,
|
|
640
528
|
"meter": "instrument.event.count",
|
|
@@ -659,14 +547,6 @@
|
|
|
659
547
|
"settlement": "invoice",
|
|
660
548
|
"signature": "meters.account.active_month"
|
|
661
549
|
},
|
|
662
|
-
{
|
|
663
|
-
"bps": 0,
|
|
664
|
-
"meter": "billing.invoice.settlement",
|
|
665
|
-
"payer": "product",
|
|
666
|
-
"perEventMinor": "1",
|
|
667
|
-
"settlement": "invoice",
|
|
668
|
-
"signature": "meters.billing.invoice.settlement"
|
|
669
|
-
},
|
|
670
550
|
{
|
|
671
551
|
"bps": 0,
|
|
672
552
|
"meter": "instrument.event.count",
|
|
@@ -675,14 +555,6 @@
|
|
|
675
555
|
"settlement": "invoice",
|
|
676
556
|
"signature": "meters.instrument.event.count"
|
|
677
557
|
},
|
|
678
|
-
{
|
|
679
|
-
"bps": 0,
|
|
680
|
-
"meter": "kyb.application.review",
|
|
681
|
-
"payer": "product",
|
|
682
|
-
"perEventMinor": "4167",
|
|
683
|
-
"settlement": "invoice",
|
|
684
|
-
"signature": "meters.kyb.application.review"
|
|
685
|
-
},
|
|
686
558
|
{
|
|
687
559
|
"bps": 6,
|
|
688
560
|
"meter": "transfer.internal.count",
|
|
@@ -708,14 +580,6 @@
|
|
|
708
580
|
"settlement": "invoice",
|
|
709
581
|
"signature": "requires.aggregate"
|
|
710
582
|
},
|
|
711
|
-
{
|
|
712
|
-
"bps": 0,
|
|
713
|
-
"meter": "instrument.event.count",
|
|
714
|
-
"payer": "product",
|
|
715
|
-
"perEventMinor": "0",
|
|
716
|
-
"settlement": "invoice",
|
|
717
|
-
"signature": "requires.approval"
|
|
718
|
-
},
|
|
719
583
|
{
|
|
720
584
|
"bps": 0,
|
|
721
585
|
"meter": "instrument.event.count",
|
package/examples/library.hsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
program cars "Cars"
|
|
2
2
|
use escrow
|
|
3
3
|
use financing
|
|
4
|
-
party underwriter: staff role credit_underwriter
|
|
5
4
|
object car "Cars" {
|
|
6
5
|
fields { make: text, model: text, year: integer }
|
|
7
6
|
attach sale = escrow.hold { payer: actor, payee: owner, expose fund as sell }
|
|
8
|
-
attach limits = financing.limits { borrower: actor, per_borrower: 60000 SAR
|
|
7
|
+
attach limits = financing.limits { borrower: actor, per_borrower: 60000 SAR }
|
|
8
|
+
attach ceiling = financing.portfolio_limit { limit: 1500000 SAR }
|
|
9
9
|
attach plan = financing.installments {
|
|
10
|
-
borrower: actor, capital: operator, share: 25
|
|
11
|
-
months: 3, profit: 2.5%, funds: sale, limits: limits
|
|
10
|
+
borrower: actor, capital: operator, share: 25%
|
|
11
|
+
months: 3, profit: 2.5%, funds: sale, limits: limits, portfolio: ceiling
|
|
12
12
|
expose create as finance
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/hsx",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "The strictly typed HSX language: compile total financial programs into canonical UDL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hsx",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"check": "bun run typecheck && tsc -p playground/tsconfig.json && bun test test"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@hyperscale0/adl": "1.0.0-beta.
|
|
80
|
-
"@hyperscale0/udl": "4.
|
|
79
|
+
"@hyperscale0/adl": "1.0.0-beta.8",
|
|
80
|
+
"@hyperscale0/udl": "4.1.0",
|
|
81
81
|
"fast-sha256": "1.3.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"Amir Ayub",
|
|
90
90
|
"Sara AlBakaawi"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "1e2dfa276165e489976ae18b72b975ec190ed05c"
|
|
93
93
|
}
|