xoonya 1.27.0 → 2.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/FINAL_CONTRACT.md +6 -6
- package/PUBLISH_PLAN.md +12 -0
- package/README.md +69 -0
- package/RELEASE_CHECKLIST.md +10 -0
- package/RELEASE_NOTES.md +19 -0
- package/SERVICE_CONTRACT.md +16 -0
- package/bin/xoonya-release.js +169 -0
- package/bin/xoonya-review.js +70 -0
- package/index.js +11 -1
- package/lib/announcement_pack.js +61 -0
- package/lib/ecosystem_entry.js +64 -0
- package/lib/launch_narrative.js +53 -0
- package/lib/outreach_proof.js +71 -0
- package/lib/publish_plan.js +51 -0
- package/lib/release_candidate.js +50 -0
- package/lib/release_center.js +113 -0
- package/lib/release_history.js +72 -0
- package/lib/release_manifest.js +114 -0
- package/lib/release_pack.js +391 -0
- package/package.json +16 -2
- package/proof_sdk.js +200 -7
- package/server.js +222 -0
package/proof_sdk.js
CHANGED
|
@@ -1048,6 +1048,7 @@ function canonicalizeInteractionResultPackageHandoff(input) {
|
|
|
1048
1048
|
const seamLayers = normalizeStringArray(handoff.seam_layers, "handoff_bundle.seam_layers") || [];
|
|
1049
1049
|
const deliveryCount = Number.isFinite(Number(handoff.delivery_count)) ? Number(handoff.delivery_count) : 0;
|
|
1050
1050
|
const paymentLedgerCount = Number.isFinite(Number(handoff.payment_ledger_count)) ? Number(handoff.payment_ledger_count) : 0;
|
|
1051
|
+
const economicCarry = extractEconomicConsequenceCarry(handoff);
|
|
1051
1052
|
return {
|
|
1052
1053
|
result_package_ref: resultPackageRef,
|
|
1053
1054
|
source_ref: sourceRef,
|
|
@@ -1062,7 +1063,56 @@ function canonicalizeInteractionResultPackageHandoff(input) {
|
|
|
1062
1063
|
task_refs: taskRefs,
|
|
1063
1064
|
delivery_count: deliveryCount,
|
|
1064
1065
|
payment_ledger_count: paymentLedgerCount,
|
|
1065
|
-
seam_layers: seamLayers
|
|
1066
|
+
seam_layers: seamLayers,
|
|
1067
|
+
economic_consequence_handoff_bundle: economicCarry.handoff_bundle,
|
|
1068
|
+
economic_consequence_review: economicCarry.review
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
function extractEconomicConsequenceCarry(handoff) {
|
|
1073
|
+
const bundle = handoff && handoff.economic_consequence_handoff_bundle && typeof handoff.economic_consequence_handoff_bundle === "object" && !Array.isArray(handoff.economic_consequence_handoff_bundle)
|
|
1074
|
+
? handoff.economic_consequence_handoff_bundle
|
|
1075
|
+
: null;
|
|
1076
|
+
if (!bundle) {
|
|
1077
|
+
return {
|
|
1078
|
+
handoff_bundle: null,
|
|
1079
|
+
review: null
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
const conformance = buildEconomicConsequenceConformancePack({
|
|
1083
|
+
handoff_bundle: bundle
|
|
1084
|
+
});
|
|
1085
|
+
return {
|
|
1086
|
+
handoff_bundle: bundle,
|
|
1087
|
+
review: {
|
|
1088
|
+
detected: true,
|
|
1089
|
+
conformance_pack_ref: conformance.conformance_pack_ref,
|
|
1090
|
+
account_ref: conformance.deterministic_consequence.account_ref,
|
|
1091
|
+
usage_meter_ref: conformance.deterministic_consequence.usage_meter_ref,
|
|
1092
|
+
credit_spend_ref: conformance.deterministic_consequence.credit_spend_ref,
|
|
1093
|
+
usage_units: conformance.deterministic_consequence.usage_units,
|
|
1094
|
+
pricing_band: conformance.deterministic_consequence.pricing_band,
|
|
1095
|
+
meter_profile_ref: conformance.deterministic_consequence.meter_profile_ref,
|
|
1096
|
+
economic_audit_summary: {
|
|
1097
|
+
account_ref: conformance.deterministic_consequence.account_ref,
|
|
1098
|
+
usage_meter_ref: conformance.deterministic_consequence.usage_meter_ref,
|
|
1099
|
+
credit_spend_ref: conformance.deterministic_consequence.credit_spend_ref,
|
|
1100
|
+
usage_units: conformance.deterministic_consequence.usage_units,
|
|
1101
|
+
pricing_band: conformance.deterministic_consequence.pricing_band,
|
|
1102
|
+
meter_profile_ref: conformance.deterministic_consequence.meter_profile_ref,
|
|
1103
|
+
payment_ref: conformance.deterministic_consequence.payment_ref,
|
|
1104
|
+
settlement_ref: conformance.deterministic_consequence.settlement_ref,
|
|
1105
|
+
settlement_txid: conformance.deterministic_consequence.settlement_txid,
|
|
1106
|
+
settlement_status: conformance.deterministic_consequence.settlement_status,
|
|
1107
|
+
settlement_finality_status: conformance.deterministic_consequence.settlement_finality_status,
|
|
1108
|
+
treasury_receipt_ref: conformance.deterministic_consequence.treasury_receipt_ref,
|
|
1109
|
+
proof_ref: conformance.deterministic_consequence.proof_ref,
|
|
1110
|
+
conformance_pack_ref: conformance.conformance_pack_ref,
|
|
1111
|
+
review_summary_surface: conformance.review_summary_surface
|
|
1112
|
+
},
|
|
1113
|
+
next_surface: conformance.next_surface,
|
|
1114
|
+
review_summary_surface: conformance.review_summary_surface
|
|
1115
|
+
}
|
|
1066
1116
|
};
|
|
1067
1117
|
}
|
|
1068
1118
|
|
|
@@ -1130,7 +1180,10 @@ function buildInteractionResultPackageHandoffEvent(input) {
|
|
|
1130
1180
|
task_refs: handoff.task_refs,
|
|
1131
1181
|
delivery_count: handoff.delivery_count,
|
|
1132
1182
|
payment_ledger_count: handoff.payment_ledger_count,
|
|
1133
|
-
seam_layers: handoff.seam_layers
|
|
1183
|
+
seam_layers: handoff.seam_layers,
|
|
1184
|
+
economic_consequence_ref: handoff.economic_consequence_review
|
|
1185
|
+
? handoff.economic_consequence_review.conformance_pack_ref
|
|
1186
|
+
: null
|
|
1134
1187
|
});
|
|
1135
1188
|
return canonicalizeEvent({
|
|
1136
1189
|
version: CANONICAL_EVENT_BUNDLE_VERSION,
|
|
@@ -1187,7 +1240,10 @@ function runInteractionSpineProofHandoff(input) {
|
|
|
1187
1240
|
handoff_kind: "interaction_spine_proof_handoff",
|
|
1188
1241
|
source_ref: handoff.source_ref,
|
|
1189
1242
|
committed_ref: handoff.committed_ref || null,
|
|
1190
|
-
precommit_pack_ref: handoff.precommit_pack_ref || null
|
|
1243
|
+
precommit_pack_ref: handoff.precommit_pack_ref || null,
|
|
1244
|
+
economic_consequence_ref: handoff.economic_consequence_review
|
|
1245
|
+
? handoff.economic_consequence_review.conformance_pack_ref
|
|
1246
|
+
: null
|
|
1191
1247
|
}
|
|
1192
1248
|
});
|
|
1193
1249
|
return {
|
|
@@ -1198,6 +1254,7 @@ function runInteractionSpineProofHandoff(input) {
|
|
|
1198
1254
|
receipt,
|
|
1199
1255
|
proof_bundle: proofBundle,
|
|
1200
1256
|
bundle_verification: verifyProofBundle(proofBundle),
|
|
1257
|
+
economic_consequence_review: handoff.economic_consequence_review || null,
|
|
1201
1258
|
recommended_loop: "default.proof.bundle.loop"
|
|
1202
1259
|
};
|
|
1203
1260
|
}
|
|
@@ -1218,7 +1275,10 @@ function runInteractionResultPackageHandoff(input) {
|
|
|
1218
1275
|
result_package_ref: handoff.result_package_ref,
|
|
1219
1276
|
source_ref: handoff.source_ref,
|
|
1220
1277
|
committed_ref: handoff.committed_ref || null,
|
|
1221
|
-
precommit_pack_ref: handoff.precommit_pack_ref || null
|
|
1278
|
+
precommit_pack_ref: handoff.precommit_pack_ref || null,
|
|
1279
|
+
economic_consequence_ref: handoff.economic_consequence_review
|
|
1280
|
+
? handoff.economic_consequence_review.conformance_pack_ref
|
|
1281
|
+
: null
|
|
1222
1282
|
}
|
|
1223
1283
|
});
|
|
1224
1284
|
return {
|
|
@@ -1229,6 +1289,7 @@ function runInteractionResultPackageHandoff(input) {
|
|
|
1229
1289
|
receipt,
|
|
1230
1290
|
proof_bundle: proofBundle,
|
|
1231
1291
|
bundle_verification: verifyProofBundle(proofBundle),
|
|
1292
|
+
economic_consequence_review: handoff.economic_consequence_review || null,
|
|
1232
1293
|
recommended_loop: "default.proof.bundle.loop"
|
|
1233
1294
|
};
|
|
1234
1295
|
}
|
|
@@ -1292,6 +1353,9 @@ function summarizeInteractionResultPackageHandoff(bundle) {
|
|
|
1292
1353
|
precommit_pack_ref: handoff.precommit_pack_ref || null,
|
|
1293
1354
|
seam_layer_count: Array.isArray(handoff.seam_layers) ? handoff.seam_layers.length : 0,
|
|
1294
1355
|
task_ref_count: Array.isArray(handoff.task_refs) ? handoff.task_refs.length : 0,
|
|
1356
|
+
economic_consequence_ready: Boolean(handoff.economic_consequence_review),
|
|
1357
|
+
usage_meter_ref: handoff.economic_consequence_review ? handoff.economic_consequence_review.usage_meter_ref : null,
|
|
1358
|
+
credit_spend_ref: handoff.economic_consequence_review ? handoff.economic_consequence_review.credit_spend_ref : null,
|
|
1295
1359
|
proof_bundle_version: proofBundle.version || null,
|
|
1296
1360
|
emitted_receipt_id: receipt.receipt_id || null,
|
|
1297
1361
|
bundle_valid: verification.valid === true,
|
|
@@ -1328,7 +1392,8 @@ function reviewInteractionResultPackageHandoff(input) {
|
|
|
1328
1392
|
economic_state: {
|
|
1329
1393
|
payment_protocol: handoff.payment_protocol || null,
|
|
1330
1394
|
settlement_mode: handoff.settlement_mode || null,
|
|
1331
|
-
treasury_destination_id: handoff.treasury_destination_id || null
|
|
1395
|
+
treasury_destination_id: handoff.treasury_destination_id || null,
|
|
1396
|
+
economic_consequence_review: handoff.economic_consequence_review || null
|
|
1332
1397
|
},
|
|
1333
1398
|
proof_handoff: {
|
|
1334
1399
|
source_ref: handoff.source_ref || null,
|
|
@@ -1339,6 +1404,7 @@ function reviewInteractionResultPackageHandoff(input) {
|
|
|
1339
1404
|
run_ready: Boolean(handoff.transaction_id && handoff.receipt_id && handoff.proof_ref),
|
|
1340
1405
|
next_surface: "/v1/proof-center/result-package-handoff/run"
|
|
1341
1406
|
},
|
|
1407
|
+
economic_consequence_review: handoff.economic_consequence_review || null,
|
|
1342
1408
|
recommended_loop: "default.proof.bundle.loop",
|
|
1343
1409
|
next_surface: "/v1/proof-center/result-package-handoff/run"
|
|
1344
1410
|
};
|
|
@@ -1359,7 +1425,14 @@ function summarizeReviewedInteractionResultPackageHandoff(input) {
|
|
|
1359
1425
|
review_ref: durability.review_ref || null,
|
|
1360
1426
|
run_ready: durability.run_ready === true,
|
|
1361
1427
|
next_surface: durability.next_surface || review.next_surface || null,
|
|
1362
|
-
preserved_seam_layer_count: Number(proofHandoff.seam_layer_count || 0)
|
|
1428
|
+
preserved_seam_layer_count: Number(proofHandoff.seam_layer_count || 0),
|
|
1429
|
+
economic_consequence_ready: Boolean(review.economic_consequence_review),
|
|
1430
|
+
usage_meter_ref: review.economic_consequence_review ? review.economic_consequence_review.usage_meter_ref : null,
|
|
1431
|
+
credit_spend_ref: review.economic_consequence_review ? review.economic_consequence_review.credit_spend_ref : null,
|
|
1432
|
+
economic_audit_summary: review.economic_consequence_review
|
|
1433
|
+
? review.economic_consequence_review.economic_audit_summary || null
|
|
1434
|
+
: null,
|
|
1435
|
+
economic_consequence_review: review.economic_consequence_review || null
|
|
1363
1436
|
};
|
|
1364
1437
|
}
|
|
1365
1438
|
|
|
@@ -1991,6 +2064,8 @@ function buildBridgeCenter() {
|
|
|
1991
2064
|
receipt_wrap_surface: "/v1/proof-center/bridge/receipt-wrap",
|
|
1992
2065
|
validator_verify_surface: "/v1/proof-center/bridge/validator-verify",
|
|
1993
2066
|
receipt_ledger_handoff_surface: "/v1/proof-center/bridge/receipt-ledger-handoff",
|
|
2067
|
+
economic_handoff_surface: "/v1/proof-center/bridge/economic-handoff",
|
|
2068
|
+
economic_conformance_pack_surface: "/v1/proof-center/bridge/economic-conformance-pack",
|
|
1994
2069
|
operator_review_pack_surface: "/v1/proof-center/bridge/operator-review-pack",
|
|
1995
2070
|
compatibility_pack_surface: "/v1/proof-center/bridge/compatibility-pack",
|
|
1996
2071
|
supported_profiles: [
|
|
@@ -2002,6 +2077,8 @@ function buildBridgeCenter() {
|
|
|
2002
2077
|
"receipt_wrap",
|
|
2003
2078
|
"validator_compatible_verification",
|
|
2004
2079
|
"receipt_ledger_handoff",
|
|
2080
|
+
"economic_consequence_handoff",
|
|
2081
|
+
"economic_consequence_conformance",
|
|
2005
2082
|
"operator_review_packaging",
|
|
2006
2083
|
"compatibility_packaging",
|
|
2007
2084
|
"profile_carry"
|
|
@@ -2016,6 +2093,7 @@ function summarizeBridgeCenter() {
|
|
|
2016
2093
|
capability_count: center.supported_capabilities.length,
|
|
2017
2094
|
profile_count: center.supported_profiles.length,
|
|
2018
2095
|
receipt_ledger_handoff_surface: center.receipt_ledger_handoff_surface,
|
|
2096
|
+
economic_handoff_surface: center.economic_handoff_surface,
|
|
2019
2097
|
operator_review_pack_surface: center.operator_review_pack_surface
|
|
2020
2098
|
};
|
|
2021
2099
|
}
|
|
@@ -2066,6 +2144,14 @@ function summarizeBridgeValidatorVerify(input) {
|
|
|
2066
2144
|
};
|
|
2067
2145
|
}
|
|
2068
2146
|
|
|
2147
|
+
function unwrapEconomicBridgeInput(input) {
|
|
2148
|
+
const body = normalizeBridgeInput(input);
|
|
2149
|
+
if (body.handoff_bundle && typeof body.handoff_bundle === "object" && !Array.isArray(body.handoff_bundle)) {
|
|
2150
|
+
return body.handoff_bundle;
|
|
2151
|
+
}
|
|
2152
|
+
return body;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2069
2155
|
function buildReceiptLedgerBridgeHandoff(input) {
|
|
2070
2156
|
const body = normalizeBridgeInput(input);
|
|
2071
2157
|
const receiptRef = normalizeString(body.receipt_ref);
|
|
@@ -2146,6 +2232,105 @@ function buildReceiptLedgerBridgeHandoff(input) {
|
|
|
2146
2232
|
};
|
|
2147
2233
|
}
|
|
2148
2234
|
|
|
2235
|
+
function buildEconomicConsequenceBridgeHandoff(input) {
|
|
2236
|
+
const body = unwrapEconomicBridgeInput(input);
|
|
2237
|
+
const accountRef = normalizeString(body.account_ref);
|
|
2238
|
+
const usageMeterRef = normalizeString(body.usage_meter_ref);
|
|
2239
|
+
const meterProfileRef = normalizeString(body.meter_profile_ref);
|
|
2240
|
+
const creditSpendRef = normalizeString(body.credit_spend_ref);
|
|
2241
|
+
const paymentRef = normalizeString(body.payment_ref);
|
|
2242
|
+
const settlementRef = normalizeString(body.settlement_ref);
|
|
2243
|
+
const settlementTxid = normalizeString(body.settlement_txid);
|
|
2244
|
+
const settlementStatus = normalizeString(body.settlement_status);
|
|
2245
|
+
const settlementFinalityStatus = normalizeString(body.settlement_finality_status);
|
|
2246
|
+
const treasuryReceiptRef = normalizeString(body.treasury_receipt_ref);
|
|
2247
|
+
const proofRef = normalizeString(body.proof_ref);
|
|
2248
|
+
const usageMeter = body.usage_meter && typeof body.usage_meter === "object" && !Array.isArray(body.usage_meter)
|
|
2249
|
+
? body.usage_meter
|
|
2250
|
+
: null;
|
|
2251
|
+
const creditSpend = body.credit_spend && typeof body.credit_spend === "object" && !Array.isArray(body.credit_spend)
|
|
2252
|
+
? body.credit_spend
|
|
2253
|
+
: null;
|
|
2254
|
+
if (!accountRef) throw new Error("account_ref_required");
|
|
2255
|
+
if (!usageMeterRef) throw new Error("usage_meter_ref_required");
|
|
2256
|
+
if (!meterProfileRef) throw new Error("meter_profile_ref_required");
|
|
2257
|
+
if (!creditSpendRef) throw new Error("credit_spend_ref_required");
|
|
2258
|
+
if (!usageMeter) throw new Error("usage_meter_required");
|
|
2259
|
+
if (!creditSpend) throw new Error("credit_spend_required");
|
|
2260
|
+
if (usageMeter.account_id && normalizeString(usageMeter.account_id) !== accountRef) throw new Error("usage_meter_account_mismatch");
|
|
2261
|
+
if (creditSpend.account_id && normalizeString(creditSpend.account_id) !== accountRef) throw new Error("credit_spend_account_mismatch");
|
|
2262
|
+
if (usageMeter.credit_spend_id && normalizeString(usageMeter.credit_spend_id) !== creditSpendRef) throw new Error("usage_meter_credit_spend_mismatch");
|
|
2263
|
+
if (creditSpend.credit_spend_id && normalizeString(creditSpend.credit_spend_id) !== creditSpendRef) throw new Error("credit_spend_ref_mismatch");
|
|
2264
|
+
if (usageMeter.units != null && creditSpend.units != null && Number(usageMeter.units) !== Number(creditSpend.units)) {
|
|
2265
|
+
throw new Error("usage_meter_units_mismatch");
|
|
2266
|
+
}
|
|
2267
|
+
const handoff = {
|
|
2268
|
+
mode: "xoonya-economic-consequence-handoff-v1",
|
|
2269
|
+
generated_at_iso: new Date().toISOString(),
|
|
2270
|
+
economics_context: {
|
|
2271
|
+
target_system: "xytara",
|
|
2272
|
+
account_ref: accountRef,
|
|
2273
|
+
usage_meter_ref: usageMeterRef,
|
|
2274
|
+
usage_meter_hash: canonicalJsonSha256Hex(usageMeter),
|
|
2275
|
+
usage_meter: usageMeter,
|
|
2276
|
+
meter_profile_ref: meterProfileRef,
|
|
2277
|
+
credit_spend_ref: creditSpendRef,
|
|
2278
|
+
credit_spend_hash: canonicalJsonSha256Hex(creditSpend),
|
|
2279
|
+
credit_spend: creditSpend,
|
|
2280
|
+
payment_ref: paymentRef || null,
|
|
2281
|
+
settlement_ref: settlementRef || null,
|
|
2282
|
+
settlement_txid: settlementTxid || null,
|
|
2283
|
+
settlement_status: settlementStatus || null,
|
|
2284
|
+
settlement_finality_status: settlementFinalityStatus || null,
|
|
2285
|
+
treasury_receipt_ref: treasuryReceiptRef || null,
|
|
2286
|
+
proof_ref: proofRef || null
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
return {
|
|
2290
|
+
ok: true,
|
|
2291
|
+
handoff_ref: buildBridgeRef("bridge.economic-consequence-handoff", handoff),
|
|
2292
|
+
handoff,
|
|
2293
|
+
next_surface: "/v1/proof-center/governance/interpretation-validate",
|
|
2294
|
+
review_summary_surface: "/v1/proof-center/result-package-handoff/review/summary"
|
|
2295
|
+
};
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
function buildEconomicConsequenceConformancePack(input) {
|
|
2299
|
+
const handoffBundle = buildEconomicConsequenceBridgeHandoff(input);
|
|
2300
|
+
const economicsContext = handoffBundle.handoff.economics_context;
|
|
2301
|
+
return {
|
|
2302
|
+
ok: true,
|
|
2303
|
+
conformance_pack_ref: buildBridgeRef("bridge.economic-conformance-pack", {
|
|
2304
|
+
usage_meter_ref: economicsContext.usage_meter_ref,
|
|
2305
|
+
credit_spend_ref: economicsContext.credit_spend_ref,
|
|
2306
|
+
account_ref: economicsContext.account_ref
|
|
2307
|
+
}),
|
|
2308
|
+
deterministic_consequence: {
|
|
2309
|
+
account_ref: economicsContext.account_ref,
|
|
2310
|
+
usage_meter_ref: economicsContext.usage_meter_ref,
|
|
2311
|
+
credit_spend_ref: economicsContext.credit_spend_ref,
|
|
2312
|
+
usage_units: Number(economicsContext.usage_meter.units || 0),
|
|
2313
|
+
pricing_band: normalizeString(economicsContext.usage_meter.pricing_band || null) || null,
|
|
2314
|
+
meter_profile_ref: economicsContext.meter_profile_ref,
|
|
2315
|
+
payment_ref: economicsContext.payment_ref || null,
|
|
2316
|
+
settlement_ref: economicsContext.settlement_ref || null,
|
|
2317
|
+
settlement_txid: economicsContext.settlement_txid || null,
|
|
2318
|
+
settlement_status: economicsContext.settlement_status || null,
|
|
2319
|
+
settlement_finality_status: economicsContext.settlement_finality_status || null,
|
|
2320
|
+
treasury_receipt_ref: economicsContext.treasury_receipt_ref || null,
|
|
2321
|
+
proof_ref: economicsContext.proof_ref || null
|
|
2322
|
+
},
|
|
2323
|
+
preserved_routes: [
|
|
2324
|
+
"/v1/proof-center/bridge/economic-handoff",
|
|
2325
|
+
"/v1/proof-center/bridge/economic-conformance-pack",
|
|
2326
|
+
"/v1/proof-center/governance/interpretation-validate",
|
|
2327
|
+
"/v1/proof-center/result-package-handoff/review/summary"
|
|
2328
|
+
],
|
|
2329
|
+
next_surface: "/v1/proof-center/governance/interpretation-validate",
|
|
2330
|
+
review_summary_surface: "/v1/proof-center/result-package-handoff/review/summary"
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2149
2334
|
function buildBridgeOperatorReviewPack(input) {
|
|
2150
2335
|
const body = normalizeBridgeInput(input);
|
|
2151
2336
|
const sourceRef = normalizeString(body.source_ref || body.receipt_ref || "proof-bridge.source");
|
|
@@ -2160,12 +2345,15 @@ function buildBridgeOperatorReviewPack(input) {
|
|
|
2160
2345
|
included_sections: [
|
|
2161
2346
|
"bridge_summary",
|
|
2162
2347
|
"validator_verification",
|
|
2348
|
+
"economic_consequence_review",
|
|
2163
2349
|
"profile_carry",
|
|
2164
2350
|
"governance_review_link",
|
|
2165
2351
|
"proof_run_link"
|
|
2166
2352
|
],
|
|
2167
2353
|
bridge_summary_surface: "/v1/proof-center/bridge/summary",
|
|
2168
2354
|
validator_verify_surface: "/v1/proof-center/bridge/validator-verify",
|
|
2355
|
+
economic_handoff_surface: "/v1/proof-center/bridge/economic-handoff",
|
|
2356
|
+
economic_conformance_pack_surface: "/v1/proof-center/bridge/economic-conformance-pack",
|
|
2169
2357
|
compatibility_pack_surface: "/v1/proof-center/bridge/compatibility-pack",
|
|
2170
2358
|
governance_review_link_surface: "/v1/proof-center/governance/review-link",
|
|
2171
2359
|
proof_run_surface: "/v1/proof-center/result-package-handoff/run"
|
|
@@ -2250,6 +2438,7 @@ function buildBridgeWorkflowPack(input) {
|
|
|
2250
2438
|
workflow_steps: [
|
|
2251
2439
|
"receipt_wrap_or_receive",
|
|
2252
2440
|
"validator_verify",
|
|
2441
|
+
"economic_consequence_handoff",
|
|
2253
2442
|
"inspect_profile_support",
|
|
2254
2443
|
"review_operator_pack",
|
|
2255
2444
|
"handoff_or_run"
|
|
@@ -2273,7 +2462,9 @@ function buildBridgeAdminPack(input) {
|
|
|
2273
2462
|
operator_refs: {
|
|
2274
2463
|
workflow_pack_ref: workflowPack.workflow_pack_ref,
|
|
2275
2464
|
operator_review_pack_ref: workflowPack.refs.operator_review_pack_ref,
|
|
2276
|
-
compatibility_pack_ref: workflowPack.refs.compatibility_pack_ref
|
|
2465
|
+
compatibility_pack_ref: workflowPack.refs.compatibility_pack_ref,
|
|
2466
|
+
economic_handoff_surface: "/v1/proof-center/bridge/economic-handoff",
|
|
2467
|
+
economic_conformance_pack_surface: "/v1/proof-center/bridge/economic-conformance-pack"
|
|
2277
2468
|
},
|
|
2278
2469
|
governance_refs: {
|
|
2279
2470
|
governance_dashboard_surface: "/v1/proof-center/governance/dashboard",
|
|
@@ -2678,6 +2869,8 @@ module.exports = {
|
|
|
2678
2869
|
buildBridgeReceiptWrap,
|
|
2679
2870
|
summarizeBridgeValidatorVerify,
|
|
2680
2871
|
buildReceiptLedgerBridgeHandoff,
|
|
2872
|
+
buildEconomicConsequenceBridgeHandoff,
|
|
2873
|
+
buildEconomicConsequenceConformancePack,
|
|
2681
2874
|
buildBridgeOperatorReviewPack,
|
|
2682
2875
|
buildBridgeCompatibilityPack,
|
|
2683
2876
|
buildBridgeProfileSupport,
|
package/server.js
CHANGED
|
@@ -13,6 +13,56 @@ const {
|
|
|
13
13
|
buildIntegrationDetailResponse,
|
|
14
14
|
buildIntegrationListResponse
|
|
15
15
|
} = require('./integrations/views');
|
|
16
|
+
const {
|
|
17
|
+
buildReleasePack,
|
|
18
|
+
summarizeReleasePack,
|
|
19
|
+
buildComparisonPack,
|
|
20
|
+
summarizeComparisonPack,
|
|
21
|
+
buildAdoptionPack,
|
|
22
|
+
summarizeAdoptionPack,
|
|
23
|
+
buildScenarioPack,
|
|
24
|
+
summarizeScenarioPack,
|
|
25
|
+
buildLaunchPack,
|
|
26
|
+
summarizeLaunchPack
|
|
27
|
+
} = require('./lib/release_pack');
|
|
28
|
+
const {
|
|
29
|
+
buildReleaseManifest,
|
|
30
|
+
summarizeReleaseManifest,
|
|
31
|
+
buildLaunchNotes,
|
|
32
|
+
summarizeLaunchNotes
|
|
33
|
+
} = require('./lib/release_manifest');
|
|
34
|
+
const {
|
|
35
|
+
buildReleaseCenter,
|
|
36
|
+
summarizeReleaseCenter
|
|
37
|
+
} = require('./lib/release_center');
|
|
38
|
+
const {
|
|
39
|
+
buildReleaseHistory,
|
|
40
|
+
summarizeReleaseHistory
|
|
41
|
+
} = require('./lib/release_history');
|
|
42
|
+
const {
|
|
43
|
+
buildPublishPlan,
|
|
44
|
+
summarizePublishPlan
|
|
45
|
+
} = require('./lib/publish_plan');
|
|
46
|
+
const {
|
|
47
|
+
buildEcosystemEntryPack,
|
|
48
|
+
summarizeEcosystemEntryPack
|
|
49
|
+
} = require('./lib/ecosystem_entry');
|
|
50
|
+
const {
|
|
51
|
+
buildLaunchNarrativePack,
|
|
52
|
+
summarizeLaunchNarrativePack
|
|
53
|
+
} = require('./lib/launch_narrative');
|
|
54
|
+
const {
|
|
55
|
+
buildOutreachProofPack,
|
|
56
|
+
summarizeOutreachProofPack
|
|
57
|
+
} = require('./lib/outreach_proof');
|
|
58
|
+
const {
|
|
59
|
+
buildAnnouncementPack,
|
|
60
|
+
summarizeAnnouncementPack
|
|
61
|
+
} = require('./lib/announcement_pack');
|
|
62
|
+
const {
|
|
63
|
+
buildReleaseCandidatePack,
|
|
64
|
+
summarizeReleaseCandidatePack
|
|
65
|
+
} = require('./lib/release_candidate');
|
|
16
66
|
|
|
17
67
|
function readJsonBody(req) {
|
|
18
68
|
return new Promise((resolve, reject) => {
|
|
@@ -77,6 +127,156 @@ async function routeRequest(req, res) {
|
|
|
77
127
|
return;
|
|
78
128
|
}
|
|
79
129
|
|
|
130
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack') {
|
|
131
|
+
sendJson(res, 200, buildReleasePack());
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/summary') {
|
|
136
|
+
sendJson(res, 200, summarizeReleasePack());
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/comparison') {
|
|
141
|
+
sendJson(res, 200, buildComparisonPack());
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/comparison/summary') {
|
|
146
|
+
sendJson(res, 200, summarizeComparisonPack());
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/adoption') {
|
|
151
|
+
sendJson(res, 200, buildAdoptionPack());
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/adoption/summary') {
|
|
156
|
+
sendJson(res, 200, summarizeAdoptionPack());
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/scenarios') {
|
|
161
|
+
sendJson(res, 200, buildScenarioPack());
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/scenarios/summary') {
|
|
166
|
+
sendJson(res, 200, summarizeScenarioPack());
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/launch') {
|
|
171
|
+
sendJson(res, 200, buildLaunchPack());
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-pack/launch/summary') {
|
|
176
|
+
sendJson(res, 200, summarizeLaunchPack());
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-manifest') {
|
|
181
|
+
sendJson(res, 200, buildReleaseManifest());
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-manifest/summary') {
|
|
186
|
+
sendJson(res, 200, summarizeReleaseManifest());
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-notes') {
|
|
191
|
+
sendJson(res, 200, buildLaunchNotes());
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-notes/summary') {
|
|
196
|
+
sendJson(res, 200, summarizeLaunchNotes());
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-center') {
|
|
201
|
+
sendJson(res, 200, buildReleaseCenter());
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-center/summary') {
|
|
206
|
+
sendJson(res, 200, summarizeReleaseCenter());
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-history') {
|
|
211
|
+
sendJson(res, 200, buildReleaseHistory());
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-history/summary') {
|
|
216
|
+
sendJson(res, 200, summarizeReleaseHistory());
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (req.method === 'GET' && url.pathname === '/v1/publish-plan') {
|
|
221
|
+
sendJson(res, 200, buildPublishPlan());
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (req.method === 'GET' && url.pathname === '/v1/publish-plan/summary') {
|
|
226
|
+
sendJson(res, 200, summarizePublishPlan());
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (req.method === 'GET' && url.pathname === '/v1/ecosystem-entry') {
|
|
231
|
+
sendJson(res, 200, buildEcosystemEntryPack());
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (req.method === 'GET' && url.pathname === '/v1/ecosystem-entry/summary') {
|
|
236
|
+
sendJson(res, 200, summarizeEcosystemEntryPack());
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (req.method === 'GET' && url.pathname === '/v1/launch-narrative') {
|
|
241
|
+
sendJson(res, 200, buildLaunchNarrativePack());
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (req.method === 'GET' && url.pathname === '/v1/launch-narrative/summary') {
|
|
246
|
+
sendJson(res, 200, summarizeLaunchNarrativePack());
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (req.method === 'GET' && url.pathname === '/v1/outreach-proof') {
|
|
251
|
+
sendJson(res, 200, buildOutreachProofPack());
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (req.method === 'GET' && url.pathname === '/v1/outreach-proof/summary') {
|
|
256
|
+
sendJson(res, 200, summarizeOutreachProofPack());
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (req.method === 'GET' && url.pathname === '/v1/announcement-pack') {
|
|
261
|
+
sendJson(res, 200, buildAnnouncementPack());
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (req.method === 'GET' && url.pathname === '/v1/announcement-pack/summary') {
|
|
266
|
+
sendJson(res, 200, summarizeAnnouncementPack());
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-candidate') {
|
|
271
|
+
sendJson(res, 200, buildReleaseCandidatePack());
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (req.method === 'GET' && url.pathname === '/v1/release-candidate/summary') {
|
|
276
|
+
sendJson(res, 200, summarizeReleaseCandidatePack());
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
80
280
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center') {
|
|
81
281
|
sendJson(res, 200, proofSdk.buildDefaultProofCenter());
|
|
82
282
|
return;
|
|
@@ -894,6 +1094,28 @@ async function routeRequest(req, res) {
|
|
|
894
1094
|
return;
|
|
895
1095
|
}
|
|
896
1096
|
|
|
1097
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/bridge/economic-handoff') {
|
|
1098
|
+
try {
|
|
1099
|
+
const body = await readJsonBody(req);
|
|
1100
|
+
const result = proofSdk.buildEconomicConsequenceBridgeHandoff(body);
|
|
1101
|
+
sendJson(res, 200, result);
|
|
1102
|
+
} catch (error) {
|
|
1103
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
1104
|
+
}
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
if (req.method === 'POST' && url.pathname === '/v1/proof-center/bridge/economic-conformance-pack') {
|
|
1109
|
+
try {
|
|
1110
|
+
const body = await readJsonBody(req);
|
|
1111
|
+
const result = proofSdk.buildEconomicConsequenceConformancePack(body);
|
|
1112
|
+
sendJson(res, 200, result);
|
|
1113
|
+
} catch (error) {
|
|
1114
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
1115
|
+
}
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
897
1119
|
if (req.method === 'POST' && url.pathname === '/v1/proof-center/bridge/operator-review-pack') {
|
|
898
1120
|
try {
|
|
899
1121
|
const body = await readJsonBody(req);
|