nx_legal_svc.nx source
↩ module page · 474 lines · 24647 B
1// nx_legal_svc.nx -- LEGAL SERVICE FACADE. One agentic MCP tool over the sovereign legal-calc stack.
2//
3// The legal counterpart to nx_finance_svc: one verb-dispatched JSON tool over the exact legal-computation
4// modules (nx_sol statute-of-limitations, nx_damages prejudgment interest), inheriting the envelope, the
5// structured errors and the self-description from nx_service. No new domain logic -- every value comes from a
6// gate-proven module.
7//
8// agentic-ready: `describe` emits the verb catalog (tools/list analog).
9// workflow-ready: verbs COMPOSE -- sol.deadline emits a day number that sol.assess consumes; damages.days
10// emits a day count that damages.simple consumes. A pipeline chains them with no shared state.
11// fail-closed: a judgment date before accrual (422 REFUSED), a non-positive limitations period or
12// negative input (400 BAD_ARGS) -- never a fabricated deadline or interest figure.
13//
14// USAGE: nx_legal_svc <verb> [args...]
15// genealogy_id: legal_calc + service_infrastructure
16
17import "nx_syscalls.nx"
18import "nx_service.nx"
19import "nx_grounding.nx"
20import "nx_sol_lib.nx"
21import "nx_damages_lib.nx"
22import "nx_esign_lib.nx"
23import "nx_ltv_lib.nx"
24import "nx_hold_lib.nx"
25import "nx_privlog_lib.nx"
26import "nx_obligation_lib.nx"
27import "nx_ledes_lib.nx"
28import "nx_ipdock_lib.nx"
29import "nx_privacy_lib.nx"
30import "nx_efile_lib.nx"
31import "nx_captable_lib.nx"
32import "nx_clause_lib.nx"
33import "nx_clause_lib.nx"
34const LEG_MAGIC_8192: i64 = 8192
35
36const LEG_SVC: *u8 = "legal" as *u8
37
38// ===== describe ======================================================
39func leg_describe(j: *NxJson) -> i64 {
40 nsvc_ok_open(j, LEG_SVC, "describe" as *u8)
41 nj_kv_str(j, "service" as *u8, "sovereign legal calc: limitations deadlines, prejudgment interest" as *u8)
42 nj_comma(j)
43 nj_kv_int(j, "verb_count" as *u8, 21)
44 nj_comma(j)
45 nj_kv_bool(j, "workflow_composable" as *u8, 1)
46 nj_comma(j)
47 nj_key(j, "verbs" as *u8)
48 nj_puts(j, "[" as *u8)
49 nj_puts(j, "{\"verb\":\"sol.deadline\",\"args\":[\"accrual_y:int\",\"accrual_m:int\",\"accrual_d:int\",\"years:int\",\"tolled_days:int\"]}," as *u8)
50 nj_puts(j, "{\"verb\":\"sol.assess\",\"args\":[\"deadline_daynum:int\",\"asof_y:int\",\"asof_m:int\",\"asof_d:int\"]}," as *u8)
51 nj_puts(j, "{\"verb\":\"damages.days\",\"args\":[\"accrual_y:int\",\"accrual_m:int\",\"accrual_d:int\",\"judgment_y:int\",\"judgment_m:int\",\"judgment_d:int\"]}," as *u8)
52 nj_puts(j, "{\"verb\":\"damages.simple\",\"args\":[\"principal_cents:int\",\"annual_bp:int\",\"days:int\"]}," as *u8)
53 nj_puts(j, "{\"verb\":\"damages.compound\",\"args\":[\"principal_cents:int\",\"annual_bp:int\",\"years:int\"]}" as *u8)
54 nj_puts(j, "]" as *u8)
55 nsvc_ok_close_g(j, GND_ASSERTED)
56 return 0
57}
58
59// ===== sol.deadline ==================================================
60func leg_sol_deadline(j: *NxJson, y: i64, m: i64, d: i64, years: i64, tolled: i64) -> i64 {
61 let dl: i64 = sol_deadline_years(1, y, m, d, years, tolled)
62 if dl == SOL_UNKNOWN {
63 nsvc_error(j, LEG_SVC, "sol.deadline" as *u8, NSVC_ERR_BAD_ARGS, "limitations period must be positive years and tolling non-negative" as *u8)
64 return 0
65 }
66 nsvc_ok_open(j, LEG_SVC, "sol.deadline" as *u8)
67 nj_kv_int(j, "deadline_daynum" as *u8, dl)
68 nsvc_ok_close_g(j, GND_ASSERTED)
69 return 0
70}
71
72// ===== sol.assess (consumes the day number sol.deadline emits) =======
73func leg_sol_assess(j: *NxJson, deadline: i64, ay: i64, am: i64, ad: i64) -> i64 {
74 let asof: i64 = sol_days_from_civil(ay, am, ad)
75 let st: i64 = sol_status(deadline, asof)
76 let rem: i64 = sol_days_remaining(deadline, asof)
77 nsvc_ok_open(j, LEG_SVC, "sol.assess" as *u8)
78 nj_kv_str(j, "status" as *u8, sol_status_str(st))
79 nj_comma(j)
80 nj_kv_int(j, "days_remaining" as *u8, rem)
81 nsvc_ok_close_g(j, GND_ASSERTED)
82 return 0
83}
84
85// ===== damages.days (fail-closed if judgment precedes accrual) =======
86func leg_damages_days(j: *NxJson, y1: i64, m1: i64, d1: i64, y2: i64, m2: i64, d2: i64) -> i64 {
87 let dd: i64 = dmg_days_between(y1, m1, d1, y2, m2, d2)
88 if dd == DMG_BAD {
89 nsvc_error(j, LEG_SVC, "damages.days" as *u8, NSVC_ERR_REFUSED, "judgment date precedes accrual date" as *u8)
90 return 0
91 }
92 nsvc_ok_open(j, LEG_SVC, "damages.days" as *u8)
93 nj_kv_int(j, "days" as *u8, dd)
94 nsvc_ok_close_g(j, GND_ASSERTED)
95 return 0
96}
97
98// ===== damages.simple ================================================
99func leg_damages_simple(j: *NxJson, principal: i64, annual_bp: i64, days: i64) -> i64 {
100 let intr: i64 = dmg_simple_interest(principal, annual_bp, days)
101 if intr == DMG_BAD {
102 nsvc_error(j, LEG_SVC, "damages.simple" as *u8, NSVC_ERR_BAD_ARGS, "principal, rate and days must be non-negative" as *u8)
103 return 0
104 }
105 nsvc_ok_open(j, LEG_SVC, "damages.simple" as *u8)
106 nj_kv_int(j, "interest_cents" as *u8, intr)
107 nj_comma(j)
108 nj_kv_int(j, "total_award_cents" as *u8, dmg_total_award(principal, intr))
109 nsvc_ok_close_g(j, GND_ASSERTED)
110 return 0
111}
112
113// ===== damages.compound ==============================================
114func leg_damages_compound(j: *NxJson, principal: i64, annual_bp: i64, years: i64) -> i64 {
115 let intr: i64 = dmg_compound_interest(principal, annual_bp, years)
116 if intr == DMG_BAD {
117 nsvc_error(j, LEG_SVC, "damages.compound" as *u8, NSVC_ERR_BAD_ARGS, "principal, rate and years must be non-negative" as *u8)
118 return 0
119 }
120 nsvc_ok_open(j, LEG_SVC, "damages.compound" as *u8)
121 nj_kv_int(j, "interest_cents" as *u8, intr)
122 nj_comma(j)
123 nj_kv_int(j, "total_award_cents" as *u8, dmg_total_award(principal, intr))
124 nsvc_ok_close_g(j, GND_ASSERTED)
125 return 0
126}
127
128// ===== esign.validity -- the US statutory test, wired to the gate-proven pure core =====
129func leg_esign_validity(j: *NxJson, intent: i64, consent: i64, assoc: i64, retention: i64, is_consumer: i64, paper: i64, withdrawal: i64, hwsw: i64, access: i64) -> i64 {
130 let elems: i64 = es_elements_pure(intent, consent, assoc, retention)
131 let ueta: i64 = es_ueta_pure(intent, consent, assoc, retention)
132 let cons: i64 = es_consumer_pure(is_consumer, paper, withdrawal, hwsw, access)
133 var enforceable: i64 = 0
134 if ueta == 1 { enforceable = cons }
135 nsvc_ok_open(j, LEG_SVC, "esign.validity" as *u8)
136 nj_kv_int(j, "elements_satisfied" as *u8, elems)
137 nj_comma(j)
138 nj_kv_bool(j, "ueta_valid" as *u8, ueta)
139 nj_comma(j)
140 nj_kv_bool(j, "consumer_overlay_ok" as *u8, cons)
141 nj_comma(j)
142 nj_kv_bool(j, "esign_enforceable" as *u8, enforceable)
143 nsvc_ok_close_g(j, GND_ASSERTED)
144 return 0
145}
146
147// ===== esign.tier -- eIDAS ladder; admissible and wet-ink-equivalent reported SEPARATELY =====
148func leg_esign_tier(j: *NxJson, sig_data: i64, unique: i64, sigid: i64, sole: i64, tamper: i64, qscd: i64, qcert: i64) -> i64 {
149 let t: i64 = es_tier_pure(sig_data, unique, sigid, sole, tamper, qscd, qcert)
150 let lbl: *u8 = sys_mmap(32)
151 es_tier_label(t, lbl)
152 nsvc_ok_open(j, LEG_SVC, "esign.tier" as *u8)
153 nj_kv_int(j, "tier" as *u8, t)
154 nj_comma(j)
155 nj_kv_str(j, "tier_label" as *u8, lbl)
156 nj_comma(j)
157 nj_kv_bool(j, "admissible" as *u8, es_admissible_pure(t))
158 nj_comma(j)
159 nj_kv_bool(j, "handwritten_equivalent" as *u8, es_handwritten_pure(t))
160 nsvc_ok_close_g(j, GND_ASSERTED)
161 return 0
162}
163
164// ===== ltv.verify -- PAdES level + the THREE-valued verdict =====
165func leg_ltv_verify(j: *NxJson, sa: i64, sc: i64, ts: i64, ch: i64, rv: i64, ar: i64, revoked: i64, asof: i64, expiry: i64) -> i64 {
166 let lvl: i64 = ltv_level_pure(sa, sc, ts, ch, rv, ar)
167 let v: i64 = ltv_verify_pure(lvl, revoked, asof, expiry)
168 let ll: *u8 = sys_mmap(32)
169 let vl: *u8 = sys_mmap(32)
170 ltv_level_label(lvl, ll)
171 ltv_verdict_label(v, vl)
172 nsvc_ok_open(j, LEG_SVC, "ltv.verify" as *u8)
173 nj_kv_int(j, "level" as *u8, lvl)
174 nj_comma(j)
175 nj_kv_str(j, "level_label" as *u8, ll)
176 nj_comma(j)
177 nj_kv_int(j, "verdict" as *u8, v)
178 nj_comma(j)
179 nj_kv_str(j, "verdict_label" as *u8, vl)
180 nj_comma(j)
181 nj_kv_bool(j, "self_contained" as *u8, ltv_self_contained_pure(lvl))
182 nsvc_ok_close_g(j, GND_ASSERTED)
183 return 0
184}
185
186// ===== hold.sanction -- FRCP 37(e); safe harbour first, SEVERE needs intent =====
187func leg_hold_sanction(j: *NxJson, lost: i64, steps: i64, restorable: i64, intent: i64) -> i64 {
188 let t: i64 = hd_sanction_tier(lost, steps, restorable, intent)
189 let lbl: *u8 = sys_mmap(32)
190 hd_sanction_label(t, lbl)
191 nsvc_ok_open(j, LEG_SVC, "hold.sanction" as *u8)
192 nj_kv_int(j, "tier" as *u8, t)
193 nj_comma(j)
194 nj_kv_str(j, "tier_label" as *u8, lbl)
195 nsvc_ok_close_g(j, GND_ASSERTED)
196 return 0
197}
198
199// ===== hold.defensible -- notice alone is NOT preservation =====
200func leg_hold_defensible(j: *NxJson, duty_attached: i64, notice: i64, unacked: i64, unsuspended: i64) -> i64 {
201 nsvc_ok_open(j, LEG_SVC, "hold.defensible" as *u8)
202 nj_kv_bool(j, "defensible" as *u8, hd_defensible_pure(duty_attached, notice, unacked, unsuspended))
203 nj_comma(j)
204 nj_kv_int(j, "exposure" as *u8, hd_exposure_pure(unacked, unsuspended))
205 nsvc_ok_close_g(j, GND_ASSERTED)
206 return 0
207}
208
209// ===== privlog.assert -- attorney-client, all five elements =====
210func leg_priv_assert(j: *NxJson, comm: i64, rel: i64, advice: i64, conf: i64, waived: i64) -> i64 {
211 nsvc_ok_open(j, LEG_SVC, "privlog.assert" as *u8)
212 nj_kv_int(j, "elements_satisfied" as *u8, pl_ac_elements_pure(comm, rel, advice, conf, waived))
213 nj_comma(j)
214 nj_kv_bool(j, "privileged" as *u8, pl_ac_pure(comm, rel, advice, conf, waived))
215 nsvc_ok_close_g(j, GND_ASSERTED)
216 return 0
217}
218
219// ===== privlog.waiver -- FRE 502(b) needs ALL THREE prongs =====
220func leg_priv_waiver(j: *NxJson, disclosed: i64, common_interest: i64, inadvertent: i64, steps: i64, prompt: i64) -> i64 {
221 nsvc_ok_open(j, LEG_SVC, "privlog.waiver" as *u8)
222 nj_kv_bool(j, "waived" as *u8, pl_waived_pure(disclosed, common_interest, inadvertent, steps, prompt))
223 nsvc_ok_close_g(j, GND_ASSERTED)
224 return 0
225}
226
227// ===== obligation.status -- OVERDUE and BREACH are different states =====
228func leg_obl_status(j: *NxJson, due: i64, asof: i64, satisfied: i64, waived: i64, notice_day: i64, cure_days: i64) -> i64 {
229 let st: i64 = obl_status_pure(due, asof, satisfied, waived, notice_day, cure_days)
230 let lbl: *u8 = sys_mmap(32)
231 obl_status_label(st, lbl)
232 nsvc_ok_open(j, LEG_SVC, "obligation.status" as *u8)
233 nj_kv_int(j, "status" as *u8, st)
234 nj_comma(j)
235 nj_kv_str(j, "status_label" as *u8, lbl)
236 nj_comma(j)
237 nj_kv_bool(j, "termination_right" as *u8, obl_termination_right_pure(st))
238 nj_comma(j)
239 nj_kv_int(j, "cure_days_remaining" as *u8, obl_cure_remaining_pure(asof, notice_day, cure_days))
240 nsvc_ok_close_g(j, GND_ASSERTED)
241 return 0
242}
243
244// ===== obligation.portfolio -- undated duties count against you =====
245func leg_obl_portfolio(j: *NxJson, overdue: i64, breach: i64, unknown: i64) -> i64 {
246 nsvc_ok_open(j, LEG_SVC, "obligation.portfolio" as *u8)
247 nj_kv_int(j, "exposure" as *u8, obl_exposure_pure(overdue, breach, unknown))
248 nj_comma(j)
249 nj_kv_bool(j, "clean" as *u8, obl_portfolio_clean_pure(overdue, breach, unknown))
250 nsvc_ok_close_g(j, GND_ASSERTED)
251 return 0
252}
253
254// ===== ledes.check -- block billing REJECTED, not flagged =====
255func leg_ledes_check(j: *NxJson, task: i64, act: i64, task_count: i64, hours_hundredths: i64, rate_cents: i64, cap_cents: i64, billable: i64) -> i64 {
256 let v: i64 = led_entry_check_pure(task, act, task_count, hours_hundredths, rate_cents, cap_cents, billable)
257 let lbl: *u8 = sys_mmap(32)
258 led_verdict_label(v, lbl)
259 nsvc_ok_open(j, LEG_SVC, "ledes.check" as *u8)
260 nj_kv_int(j, "verdict" as *u8, v)
261 nj_comma(j)
262 nj_kv_str(j, "verdict_label" as *u8, lbl)
263 nj_comma(j)
264 nj_kv_bool(j, "payable" as *u8, led_entry_payable_pure(v))
265 nj_comma(j)
266 nj_kv_int(j, "line_amount_cents" as *u8, led_line_amount_pure(v, hours_hundredths, rate_cents))
267 nsvc_ok_close_g(j, GND_ASSERTED)
268 return 0
269}
270
271// ===== ip.deadline -- irrecoverable vs grace-bearing =====
272func leg_ip_deadline(j: *NxJson, anchor: i64, period_days: i64, asof: i64, grace_days: i64) -> i64 {
273 let dl: i64 = ipd_deadline_pure(anchor, period_days)
274 var st: i64 = ipd_status_hard_pure(dl, asof)
275 if grace_days > 0 { st = ipd_status_grace_pure(dl, asof, grace_days) }
276 let lbl: *u8 = sys_mmap(32)
277 ipd_status_label(st, lbl)
278 nsvc_ok_open(j, LEG_SVC, "ip.deadline" as *u8)
279 nj_kv_int(j, "deadline_daynum" as *u8, dl)
280 nj_comma(j)
281 nj_kv_str(j, "status_label" as *u8, lbl)
282 nj_comma(j)
283 nj_kv_bool(j, "recoverable" as *u8, ipd_recoverable_pure(st))
284 nj_comma(j)
285 nj_kv_bool(j, "surcharge_due" as *u8, ipd_surcharge_due_pure(st))
286 nsvc_ok_close_g(j, GND_ASSERTED)
287 return 0
288}
289
290// ===== privacy.breach -- 72h from AWARENESS; encryption excuses subjects only =====
291func leg_privacy_breach(j: *NxJson, aware_hour: i64, reported_hour: i64, personal: i64, risk: i64, high_risk: i64, encrypted: i64) -> i64 {
292 let st: i64 = prv_breach_status_pure(aware_hour, reported_hour)
293 let lbl: *u8 = sys_mmap(32)
294 prv_status_label(st, lbl)
295 nsvc_ok_open(j, LEG_SVC, "privacy.breach" as *u8)
296 nj_kv_int(j, "deadline_hour" as *u8, prv_breach_deadline_pure(aware_hour))
297 nj_comma(j)
298 nj_kv_str(j, "status_label" as *u8, lbl)
299 nj_comma(j)
300 nj_kv_bool(j, "notify_authority" as *u8, prv_notify_authority_pure(personal, risk))
301 nj_comma(j)
302 nj_kv_bool(j, "notify_subjects" as *u8, prv_notify_subjects_pure(personal, high_risk, encrypted))
303 nsvc_ok_close_g(j, GND_ASSERTED)
304 return 0
305}
306
307// ===== privacy.dsar -- a late extension buys nothing =====
308func leg_privacy_dsar(j: *NxJson, received: i64, regime_ccpa: i64, ext_claimed: i64, ext_notice_day: i64, responded: i64) -> i64 {
309 var dl: i64 = prv_gdpr_dsar_pure(received, ext_claimed, ext_notice_day)
310 if regime_ccpa == 1 { dl = prv_ccpa_dsar_pure(received, ext_claimed, ext_notice_day) }
311 let lbl: *u8 = sys_mmap(32)
312 prv_status_label(prv_response_status_pure(dl, responded), lbl)
313 nsvc_ok_open(j, LEG_SVC, "privacy.dsar" as *u8)
314 nj_kv_int(j, "deadline_daynum" as *u8, dl)
315 nj_comma(j)
316 nj_kv_str(j, "status_label" as *u8, lbl)
317 nsvc_ok_close_g(j, GND_ASSERTED)
318 return 0
319}
320
321// ===== efile.status -- a rejected submission was never filed =====
322func leg_efile_status(j: *NxJson, submitted: i64, accepted: i64, rejected: i64, deadline: i64, relation_back: i64, cure_days: i64) -> i64 {
323 let st: i64 = efl_status_pure(submitted, accepted, rejected, deadline, relation_back, cure_days)
324 let lbl: *u8 = sys_mmap(32)
325 efl_status_label(st, lbl)
326 nsvc_ok_open(j, LEG_SVC, "efile.status" as *u8)
327 nj_kv_str(j, "status_label" as *u8, lbl)
328 nj_comma(j)
329 nj_kv_bool(j, "timely" as *u8, efl_timely_pure(st))
330 nj_comma(j)
331 nj_kv_bool(j, "on_docket" as *u8, efl_on_docket_pure(st))
332 nj_comma(j)
333 nj_kv_int(j, "filing_daynum" as *u8, efl_filing_date_pure(submitted, accepted, relation_back, cure_days))
334 nsvc_ok_close_g(j, GND_ASSERTED)
335 return 0
336}
337
338// ===== captable.check -- over-issuance is VOID; both bases named =====
339func leg_captable_check(j: *NxJson, authorized: i64, issued: i64, treasury: i64, granted: i64, available: i64, warrants: i64, convertibles: i64, held: i64) -> i64 {
340 let outs: i64 = ent_outstanding_pure(issued, treasury)
341 let fd: i64 = ent_fully_diluted_pure(outs, granted, available, warrants, convertibles)
342 nsvc_ok_open(j, LEG_SVC, "captable.check" as *u8)
343 nj_kv_bool(j, "issue_within_authority" as *u8, ent_issue_ok_pure(authorized, issued))
344 nj_comma(j)
345 nj_kv_int(j, "outstanding" as *u8, outs)
346 nj_comma(j)
347 nj_kv_int(j, "fully_diluted" as *u8, fd)
348 nj_comma(j)
349 nj_kv_int(j, "ownership_outstanding_permille" as *u8, ent_ownership_outstanding_pure(held, outs))
350 nj_comma(j)
351 nj_kv_int(j, "ownership_diluted_permille" as *u8, ent_ownership_diluted_pure(held, fd))
352 nj_comma(j)
353 nj_kv_bool(j, "table_valid" as *u8, ent_table_valid_pure(authorized, issued, treasury, fd))
354 nsvc_ok_close_g(j, GND_ASSERTED)
355 return 0
356}
357
358// ===== clause.review -- reads CONTRACT TEXT: retrieval by content, deletion vs insertion =====
359func leg_clause_review(j: *NxJson, draft: *u8, standard: *u8, criticality: i64) -> i64 {
360 let retained: i64 = cl_retained_permille(standard, draft)
361 let novel: i64 = cl_novel_permille(standard, draft)
362 let dev: i64 = cl_deviation_permille(standard, draft)
363 let risk: i64 = cl_risk_pure(dev, novel, criticality)
364 let lbl: *u8 = sys_mmap(32)
365 cl_risk_label(risk, lbl)
366 nsvc_ok_open(j, LEG_SVC, "clause.review" as *u8)
367 nj_kv_int(j, "retained_permille" as *u8, retained)
368 nj_comma(j)
369 nj_kv_int(j, "novel_permille" as *u8, novel)
370 nj_comma(j)
371 nj_kv_int(j, "deviation_permille" as *u8, dev)
372 nj_comma(j)
373 nj_kv_str(j, "risk_label" as *u8, lbl)
374 nj_comma(j)
375 nj_kv_bool(j, "auto_approve" as *u8, cl_auto_approve_pure(risk))
376 nsvc_ok_close_g(j, GND_ASSERTED)
377 return 0
378}
379
380// ===== dispatch ======================================================
381func main(argc: i64, argv: *i64) -> i64 {
382 let j: *NxJson = nx_json_new(LEG_MAGIC_8192)
383 let verb: *u8 = nsvc_arg(argc, argv, 1)
384 var handled: i64 = 0
385
386 if nsvc_streq(verb, "describe" as *u8) == 1 { leg_describe(j); handled = 1 }
387 if nsvc_streq(verb, "clause.review" as *u8) == 1 {
388 leg_clause_review(j, nsvc_arg(argc, argv, 2), nsvc_arg(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
389 }
390 if nsvc_streq(verb, "ip.deadline" as *u8) == 1 {
391 leg_ip_deadline(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5)); handled = 1
392 }
393 if nsvc_streq(verb, "privacy.breach" as *u8) == 1 {
394 leg_privacy_breach(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
395 }
396 if nsvc_streq(verb, "privacy.dsar" as *u8) == 1 {
397 leg_privacy_dsar(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6)); handled = 1
398 }
399 if nsvc_streq(verb, "efile.status" as *u8) == 1 {
400 leg_efile_status(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
401 }
402 if nsvc_streq(verb, "captable.check" as *u8) == 1 {
403 leg_captable_check(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8), nsvc_arg_int(argc, argv, 9)); handled = 1
404 }
405 if nsvc_streq(verb, "obligation.status" as *u8) == 1 {
406 leg_obl_status(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
407 }
408 if nsvc_streq(verb, "obligation.portfolio" as *u8) == 1 {
409 leg_obl_portfolio(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
410 }
411 if nsvc_streq(verb, "ledes.check" as *u8) == 1 {
412 leg_ledes_check(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8)); handled = 1
413 }
414 if nsvc_streq(verb, "obligation.status" as *u8) == 1 {
415 leg_obl_status(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
416 }
417 if nsvc_streq(verb, "obligation.portfolio" as *u8) == 1 {
418 leg_obl_portfolio(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
419 }
420 if nsvc_streq(verb, "ledes.check" as *u8) == 1 {
421 leg_ledes_check(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8)); handled = 1
422 }
423 if nsvc_streq(verb, "obligation.status" as *u8) == 1 {
424 leg_obl_status(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
425 }
426 if nsvc_streq(verb, "obligation.portfolio" as *u8) == 1 {
427 leg_obl_portfolio(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
428 }
429 if nsvc_streq(verb, "ledes.check" as *u8) == 1 {
430 leg_ledes_check(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8)); handled = 1
431 }
432 if nsvc_streq(verb, "esign.validity" as *u8) == 1 {
433 leg_esign_validity(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8), nsvc_arg_int(argc, argv, 9), nsvc_arg_int(argc, argv, 10)); handled = 1
434 }
435 if nsvc_streq(verb, "esign.tier" as *u8) == 1 {
436 leg_esign_tier(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8)); handled = 1
437 }
438 if nsvc_streq(verb, "ltv.verify" as *u8) == 1 {
439 leg_ltv_verify(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7), nsvc_arg_int(argc, argv, 8), nsvc_arg_int(argc, argv, 9), nsvc_arg_int(argc, argv, 10)); handled = 1
440 }
441 if nsvc_streq(verb, "hold.sanction" as *u8) == 1 {
442 leg_hold_sanction(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5)); handled = 1
443 }
444 if nsvc_streq(verb, "hold.defensible" as *u8) == 1 {
445 leg_hold_defensible(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5)); handled = 1
446 }
447 if nsvc_streq(verb, "privlog.assert" as *u8) == 1 {
448 leg_priv_assert(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6)); handled = 1
449 }
450 if nsvc_streq(verb, "privlog.waiver" as *u8) == 1 {
451 leg_priv_waiver(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6)); handled = 1
452 }
453 if nsvc_streq(verb, "sol.deadline" as *u8) == 1 {
454 leg_sol_deadline(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6)); handled = 1
455 }
456 if nsvc_streq(verb, "sol.assess" as *u8) == 1 {
457 leg_sol_assess(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5)); handled = 1
458 }
459 if nsvc_streq(verb, "damages.days" as *u8) == 1 {
460 leg_damages_days(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4), nsvc_arg_int(argc, argv, 5), nsvc_arg_int(argc, argv, 6), nsvc_arg_int(argc, argv, 7)); handled = 1
461 }
462 if nsvc_streq(verb, "damages.simple" as *u8) == 1 {
463 leg_damages_simple(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
464 }
465 if nsvc_streq(verb, "damages.compound" as *u8) == 1 {
466 leg_damages_compound(j, nsvc_arg_int(argc, argv, 2), nsvc_arg_int(argc, argv, 3), nsvc_arg_int(argc, argv, 4)); handled = 1
467 }
468
469 if handled == 0 {
470 nsvc_error(j, LEG_SVC, verb, NSVC_ERR_UNKNOWN_VERB, "unknown verb; call describe for the catalog" as *u8)
471 }
472 nj_flush(j)
473 return 0
474}