Initial commit: AS4/411 directory and discovery service for Sankofa Marketplace
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
9
docs/protocols/test-vectors/iso20022-as4/README.md
Normal file
9
docs/protocols/test-vectors/iso20022-as4/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ISO 20022 over AS4 — Golden test vectors
|
||||
|
||||
Use these as golden request/response pairs for resolver tests. See [testing-strategy](../../architecture/testing-strategy.md).
|
||||
|
||||
- **bic-resolution.json** — BIC + iso20022.fi + credit.transfer → primary directive with profile as4.fifi.iso20022.v1.
|
||||
- **lei-resolution.json** — LEI resolution; evidence may include LEI→BIC mapping.
|
||||
- **negative-unknown-identifier.json** — Unknown identifier → empty directives, negative_cache_ttl set.
|
||||
|
||||
Tests: seed store (or routing artifact) with participant/endpoint for BIC/LEI; run resolve with request; assert output matches expectedResponse (or key fields). Placeholder URLs and cert refs (e.g. https://as4.bankus.com/fi) are for assertion only; replace with test fixtures as needed.
|
||||
29
docs/protocols/test-vectors/iso20022-as4/bic-resolution.json
Normal file
29
docs/protocols/test-vectors/iso20022-as4/bic-resolution.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"description": "BIC-based resolution for ISO 20022 FI-to-FI. Service iso20022.fi, action credit.transfer.",
|
||||
"request": {
|
||||
"identifiers": [
|
||||
{ "type": "as4.partyId", "value": "BANKUS33XXX", "scope": "BIC" }
|
||||
],
|
||||
"serviceContext": {
|
||||
"service": "iso20022.fi",
|
||||
"action": "credit.transfer"
|
||||
}
|
||||
},
|
||||
"expectedResponse": {
|
||||
"primary": {
|
||||
"target_protocol": "as4",
|
||||
"target_address": "https://as4.bankus.com/fi",
|
||||
"transport_profile": "as4.fifi.iso20022.v1",
|
||||
"security": {
|
||||
"signRequired": true,
|
||||
"encryptRequired": true,
|
||||
"keyRefs": ["vault://certs/bankus/iso20022"]
|
||||
},
|
||||
"service_context": {
|
||||
"service": "iso20022.fi",
|
||||
"action": "credit.transfer"
|
||||
}
|
||||
},
|
||||
"resolution_trace": [{ "source": "internal directory" }]
|
||||
}
|
||||
}
|
||||
30
docs/protocols/test-vectors/iso20022-as4/lei-resolution.json
Normal file
30
docs/protocols/test-vectors/iso20022-as4/lei-resolution.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"description": "LEI-based resolution; directory maps LEI to BIC(s) then to AS4 endpoint. Evidence may include LEI->BIC mapping source.",
|
||||
"request": {
|
||||
"identifiers": [
|
||||
{ "type": "as4.partyId", "value": "5493001KJTIIGC8Y1R12", "scope": "LEI" }
|
||||
],
|
||||
"serviceContext": {
|
||||
"service": "iso20022.fi",
|
||||
"action": "fi.credit.transfer"
|
||||
}
|
||||
},
|
||||
"expectedResponse": {
|
||||
"primary": {
|
||||
"target_protocol": "as4",
|
||||
"target_address": "https://as4.bankus.com/fi",
|
||||
"transport_profile": "as4.fifi.iso20022.v1",
|
||||
"security": {
|
||||
"signRequired": true,
|
||||
"encryptRequired": true,
|
||||
"keyRefs": ["vault://certs/bankus/iso20022"]
|
||||
},
|
||||
"service_context": {
|
||||
"service": "iso20022.fi",
|
||||
"action": "fi.credit.transfer"
|
||||
},
|
||||
"evidence": [{ "source": "internal directory", "message": "LEI to BIC mapping applied" }]
|
||||
},
|
||||
"resolution_trace": [{ "source": "internal directory" }]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"description": "Unknown BIC/LEI: no match. Response must have no primary (or empty directives) and negative_cache_ttl set.",
|
||||
"request": {
|
||||
"identifiers": [
|
||||
{ "type": "as4.partyId", "value": "UNKNOWNBICXXX", "scope": "BIC" }
|
||||
],
|
||||
"serviceContext": {
|
||||
"service": "iso20022.fi",
|
||||
"action": "credit.transfer"
|
||||
}
|
||||
},
|
||||
"expectedResponse": {
|
||||
"directives": [],
|
||||
"negative_cache_ttl": 60
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user