xoonya 2.10.0 → 2.12.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/server.js CHANGED
@@ -76,6 +76,15 @@ const {
76
76
  buildBridgeIntelligencePack,
77
77
  summarizeBridgeIntelligencePack
78
78
  } = require('./lib/bridge_intelligence');
79
+ const {
80
+ buildVerificationServicesPack,
81
+ summarizeVerificationServicesPack
82
+ } = require('./lib/verification_service_pack');
83
+ const {
84
+ buildTrustPortabilityPack,
85
+ getTrustPortabilityProfile,
86
+ summarizeTrustPortabilityPack
87
+ } = require('./lib/trust_portability_pack');
79
88
  const {
80
89
  buildOpenApiDocument,
81
90
  summarizeOpenApiDocument,
@@ -761,6 +770,32 @@ async function routeRequest(req, res) {
761
770
  return;
762
771
  }
763
772
 
773
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/trust-portability') {
774
+ sendJson(res, 200, buildTrustPortabilityPack());
775
+ return;
776
+ }
777
+
778
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/trust-portability/summary') {
779
+ sendJson(res, 200, summarizeTrustPortabilityPack());
780
+ return;
781
+ }
782
+
783
+ if (req.method === 'GET' && url.pathname.startsWith('/v1/proof-center/trust-portability/')) {
784
+ const profileId = url.pathname.slice('/v1/proof-center/trust-portability/'.length);
785
+ const profile = getTrustPortabilityProfile(profileId);
786
+ if (!profile) {
787
+ sendJson(res, 404, { ok: false, error: 'trust_portability_profile_not_found' });
788
+ return;
789
+ }
790
+ sendJson(res, 200, {
791
+ ok: true,
792
+ product: 'xoonya',
793
+ category: 'xoonya-trust-portability-detail',
794
+ profile
795
+ });
796
+ return;
797
+ }
798
+
764
799
  if (req.method === 'GET' && url.pathname === '/v1/providers') {
765
800
  sendJson(res, 200, buildProviderLanePack());
766
801
  return;
@@ -2357,102 +2392,102 @@ async function routeRequest(req, res) {
2357
2392
  }
2358
2393
 
2359
2394
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard') {
2360
- sendJson(res, 200, proofSdk.buildXoonyaNativeProofStandard());
2395
+ sendJson(res, 200, proofSdk.buildxoonyaNativeProofStandard());
2361
2396
  return;
2362
2397
  }
2363
2398
 
2364
2399
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standard/summary') {
2365
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeProofStandard());
2400
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeProofStandard());
2366
2401
  return;
2367
2402
  }
2368
2403
 
2369
2404
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness') {
2370
- sendJson(res, 200, proofSdk.buildXoonyaNativeHybridReadinessPack());
2405
+ sendJson(res, 200, proofSdk.buildxoonyaNativeHybridReadinessPack());
2371
2406
  return;
2372
2407
  }
2373
2408
 
2374
2409
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-hybrid-readiness/summary') {
2375
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeHybridReadinessPack());
2410
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeHybridReadinessPack());
2376
2411
  return;
2377
2412
  }
2378
2413
 
2379
2414
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization') {
2380
- sendJson(res, 200, proofSdk.buildXoonyaNativeStandardizationPack());
2415
+ sendJson(res, 200, proofSdk.buildxoonyaNativeStandardizationPack());
2381
2416
  return;
2382
2417
  }
2383
2418
 
2384
2419
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-standardization/summary') {
2385
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeStandardizationPack());
2420
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeStandardizationPack());
2386
2421
  return;
2387
2422
  }
2388
2423
 
2389
2424
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-conformance-mark') {
2390
- sendJson(res, 200, proofSdk.buildXoonyaNativeConformanceMarkPack());
2425
+ sendJson(res, 200, proofSdk.buildxoonyaNativeConformanceMarkPack());
2391
2426
  return;
2392
2427
  }
2393
2428
 
2394
2429
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-conformance-mark/summary') {
2395
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeConformanceMarkPack());
2430
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeConformanceMarkPack());
2396
2431
  return;
2397
2432
  }
2398
2433
 
2399
2434
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-reference-implementations') {
2400
- sendJson(res, 200, proofSdk.buildXoonyaNativeReferenceImplementationPack());
2435
+ sendJson(res, 200, proofSdk.buildxoonyaNativeReferenceImplementationPack());
2401
2436
  return;
2402
2437
  }
2403
2438
 
2404
2439
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-reference-implementations/summary') {
2405
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeReferenceImplementationPack());
2440
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeReferenceImplementationPack());
2406
2441
  return;
2407
2442
  }
2408
2443
 
2409
2444
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile') {
2410
- sendJson(res, 200, proofSdk.buildXoonyaNativePayloadProfilePack());
2445
+ sendJson(res, 200, proofSdk.buildxoonyaNativePayloadProfilePack());
2411
2446
  return;
2412
2447
  }
2413
2448
 
2414
2449
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-payload-profile/summary') {
2415
- sendJson(res, 200, proofSdk.summarizeXoonyaNativePayloadProfilePack());
2450
+ sendJson(res, 200, proofSdk.summarizexoonyaNativePayloadProfilePack());
2416
2451
  return;
2417
2452
  }
2418
2453
 
2419
2454
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame') {
2420
- sendJson(res, 200, proofSdk.buildXoonyaNativeLineRateFramePack());
2455
+ sendJson(res, 200, proofSdk.buildxoonyaNativeLineRateFramePack());
2421
2456
  return;
2422
2457
  }
2423
2458
 
2424
2459
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-line-rate-frame/summary') {
2425
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeLineRateFramePack());
2460
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeLineRateFramePack());
2426
2461
  return;
2427
2462
  }
2428
2463
 
2429
2464
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec') {
2430
- sendJson(res, 200, proofSdk.buildXoonyaNativeAtomSpec());
2465
+ sendJson(res, 200, proofSdk.buildxoonyaNativeAtomSpec());
2431
2466
  return;
2432
2467
  }
2433
2468
 
2434
2469
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-spec/summary') {
2435
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeAtomSpec());
2470
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeAtomSpec());
2436
2471
  return;
2437
2472
  }
2438
2473
 
2439
2474
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance') {
2440
- sendJson(res, 200, proofSdk.buildXoonyaNativeAtomConformancePack());
2475
+ sendJson(res, 200, proofSdk.buildxoonyaNativeAtomConformancePack());
2441
2476
  return;
2442
2477
  }
2443
2478
 
2444
2479
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-atom-conformance/summary') {
2445
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeAtomConformancePack());
2480
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeAtomConformancePack());
2446
2481
  return;
2447
2482
  }
2448
2483
 
2449
2484
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile') {
2450
- sendJson(res, 200, proofSdk.buildXoonyaNativeAnchorProfile());
2485
+ sendJson(res, 200, proofSdk.buildxoonyaNativeAnchorProfile());
2451
2486
  return;
2452
2487
  }
2453
2488
 
2454
2489
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/native-anchor-profile/summary') {
2455
- sendJson(res, 200, proofSdk.summarizeXoonyaNativeAnchorProfile());
2490
+ sendJson(res, 200, proofSdk.summarizexoonyaNativeAnchorProfile());
2456
2491
  return;
2457
2492
  }
2458
2493
 
@@ -2526,6 +2561,16 @@ async function routeRequest(req, res) {
2526
2561
  return;
2527
2562
  }
2528
2563
 
2564
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/verification-services') {
2565
+ sendJson(res, 200, buildVerificationServicesPack());
2566
+ return;
2567
+ }
2568
+
2569
+ if (req.method === 'GET' && url.pathname === '/v1/proof-center/verification-services/summary') {
2570
+ sendJson(res, 200, summarizeVerificationServicesPack());
2571
+ return;
2572
+ }
2573
+
2529
2574
  if (req.method === 'GET' && url.pathname === '/v1/proof-center/bridge/profile-support') {
2530
2575
  sendJson(res, 200, proofSdk.buildBridgeProfileSupport());
2531
2576
  return;
@@ -48,13 +48,13 @@
48
48
  {
49
49
  "id": "reject-bad-length",
50
50
  "atom_hex": "584e59410101",
51
- "expected_reason": "atomHex must be a supported Xoonya native atom",
51
+ "expected_reason": "atomHex must be a supported xoonya native atom",
52
52
  "expected_error_code": "atom_unsupported_length"
53
53
  },
54
54
  {
55
55
  "id": "reject-bad-magic",
56
56
  "atom_hex": "000000000101c88aa17753c173551a00bdd83c24fa2bfc85a87252062d4569aac18ef572cbd7aa15f09827a68d652ce3e9391eca4c8faa26c4b2",
57
- "expected_reason": "atomHex has bad Xoonya native atom magic",
57
+ "expected_reason": "atomHex has bad xoonya native atom magic",
58
58
  "expected_error_code": "atom_bad_magic"
59
59
  },
60
60
  {