| Status | Draft. |
| Version | 0.1.0, 2026-11-30 |
| Profile of | None: an OCI protocol |
| Depends on | OCI-0 Core, OCI-1 Trust Registry, OCI-PAY-2 Payments Switch (§4, OCI-Signature only), OCI-WALLET-1 Documents and Addressing |
| Used by | OCI-WALLET-3 Wallets |
| Reference implementation | ociwallet-exchange-api (the exchange), ociwallet-issuer-api (an issuer’s side), ociwallet-api (a wallet’s side) |
1. Purpose
In OCI-Wallet a person keeps verified documents (a driving licence, an ID card) in a wallet they choose. The documents come from issuers. Issuers and wallets do not call each other. Each one is registered with one document exchange, and every call between organisations goes through exchanges.
OCI-WALLET-2 says how those calls work. It covers five kinds of traffic:
- Hello. A signed connection check between two participants.
- Find. A wallet asks an issuer which documents of one type it has issued to the person the wallet has signed in.
- Fetch. A wallet asks an issuer for one document, by its URI.
- Status. A wallet asks an issuer whether a document is still good.
- Push. An issuer sends a document to the wallet address a person gave it.
For each, this spec fixes who may call which path, how the signature is checked, how an exchange finds the issuer or the wallet a call is for, what it passes on unchanged, what it writes in its log, and how failures are answered.
An exchange carries documents and keeps none. It does not open a document, check the issuer’s signature on it, or match a document to a person. Those belong to the issuer and the wallet.
OCI-WALLET-2 does not repeat what other specs define. The document URI, document types, the signed document, document status as a concept, the wallet address, how a document is matched to a person, and the participant kinds are in OCI-WALLET-1. What a wallet does for its person, including what it checks before it keeps a document, is in OCI-WALLET-3. The OCI-Signature header is in OCI-PAY-2 §4.
The reference deployment has one exchange (NDX, exchange:ndx), one issuer (the Transport Department, issuer:transport) and one wallet provider (Satchel, wallet:satchel). This text uses them as its examples.
2. Conventions and terms
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY and OPTIONAL are to be read as described in RFC 2119 and RFC 8174, and only when they appear in capitals. Every normative clause has an ID such as WEX-3.1.
| Term | Meaning |
|---|---|
| Participant | An organisation’s service with an entry in the trust registry (OCI-1): an id, a kind, a country, a status, a base_url, a jwks_url and, for a member, a home. |
| Exchange | A participant of kind doc_exchange. It routes document calls and keeps no document. A country may have one or several. |
| Issuer | A participant of kind doc_issuer. It signs documents and answers for them. |
| Wallet | A participant of kind wallet: a wallet provider’s server. It keeps documents for the people who use it. |
| Requester | A participant of kind doc_requester. In this version it can only say hello (§6). |
| Home exchange | The one exchange an issuer, a wallet or a requester is registered with: the home of its registry entry. |
| Member | An issuer, a wallet or a requester, as seen from its home exchange. |
| Peer | Another exchange, as seen from one exchange. |
| Relation | How the caller of a call stands to the receiver: member, peer or home (§3). |
| Document URI | <issuer>-<TYPE>-<id>, as OCI-WALLET-1 defines it. Example: transport-DRVLC-KA0120230001. |
| Document type | A five-letter code a country registered, with the issuers accredited for it (OCI-WALLET-1). Example: DRVLC. |
| Wallet address | <handle>@<provider>, as OCI-WALLET-1 defines it. Example: asha@satchel. |
| Person | In a find or a fetch: who the wallet has signed in and is asking for. |
| Hop | One call from one exchange to another. |
3. Participants and relations
Who may make a call is decided by the caller’s relation to the receiver. The relation is read from the trust registry on every call. A route accepts exactly one relation.
- WEX-3.1 A receiver MUST work out the caller’s relation from two registry entries: the caller’s (found by the
issof its signature, §4) and its own. It MUST NOT take the relation, the caller’s kind or the caller’s home from the request. - WEX-3.2 When the receiver is an exchange, the caller is its member when the caller’s
kindisdoc_issuer,walletordoc_requesterand the caller’shomeequals the exchange’s id. - WEX-3.3 When the receiver is an exchange, the caller is its peer when the caller’s
kindisdoc_exchange. A peer may be in the same country or in another. - WEX-3.4 When the receiver is not an exchange, the caller is its home when the caller’s
kindisdoc_exchangeand the receiver’s ownhomeequals the caller’s id. - WEX-3.5 In every other case the caller has no relation. A participant has no relation to itself, even with a valid signature.
- WEX-3.6 A receiver MUST refuse a call whose caller has no relation, or a relation the path does not accept, with
403 FORBIDDEN_PARTICIPANT. The paths and the relation each accepts are:
| Served by | Paths | Relation accepted | Further limit on the caller |
|---|---|---|---|
| An exchange | POST /v1/hello | member | none: an issuer, a wallet or a requester |
| An exchange | POST /v1/find, /v1/fetch, /v1/status | member | kind wallet only (WEX-3.7) |
| An exchange | POST /v1/push | member | kind doc_issuer only (WEX-3.8) |
| An exchange | POST /peer/v1/hello, /peer/v1/find, /peer/v1/fetch, /peer/v1/status, /peer/v1/push | peer | none |
| An issuer | POST /exchange/v1/hello, /exchange/v1/find, /exchange/v1/fetch, /exchange/v1/status | home | none |
| A wallet | POST /exchange/v1/hello, /exchange/v1/push | home | none |
- WEX-3.7 An exchange MUST refuse
/v1/find,/v1/fetchand/v1/statusfrom a member that is not a wallet, with403 FORBIDDEN_PARTICIPANT. - WEX-3.8 An exchange MUST refuse
/v1/pushfrom a member that is not an issuer, with403 FORBIDDEN_PARTICIPANT. - WEX-3.9 An issuer or a wallet MUST accept calls only from its home exchange. A call from another exchange, from another member of the same exchange, or from any other participant MUST be refused under WEX-3.6. Anything from elsewhere reaches it through its home exchange.
- WEX-3.10 An issuer or a wallet MUST send its document calls only to its home exchange, at
/v1/*. When its registry entry names no home, or the home is not an active participant ofkinddoc_exchange, it MUST make no call. - WEX-3.11 The relation follows the registry. When a member’s
homechanges to another exchange, the old exchange MUST refuse it and the new one MUST serve it, with no other step. A receiver MAY act on a cached copy of the registry (WEX-4.9), so a change can take that long to show.
4. The signature
Every call in this spec is signed with OCI-Signature, as OCI-PAY-2 §4 defines it: a compact JWS with detached content over the exact body bytes, alg EdDSA, a protected header with alg, kid, iss, iat, htm and htu, a 120-second window on iat, and keys taken only from the sender’s registry entry. This section states only what differs here, and the codes a receiver answers.
- WEX-4.1 Every call to a path in WEX-3.6 MUST carry an
OCI-Signatureheader and MUST be verified as OCI-PAY-2 §4 requires, with the differences in WEX-4.2 to WEX-4.9. OnlyGET /healthandGET /.well-known/jwks.jsonare served without one. - WEX-4.2
issMUST be the sender’s participant id in the trust registry. The ids of this family (exchange:<name>,issuer:<name>,wallet:<name>) are defined in OCI-WALLET-1. An exchange’s id does not carry its country, unlike a payments switch’s. - WEX-4.3
htuMUST equal thebase_urlthe trust registry lists for the receiver, without a trailing slash, followed by the request path, with no query string. The receiver MUST compare it as an exact string with its own registrybase_urlplus the path it received. A receiver uses a configured address only when its registry entry lists none. (OCI-PAY-4 compares against a configured address.) - WEX-4.4 A receiver MUST itself be an
activeparticipant in the trust registry. When it is not registered or is suspended, it MUST refuse every signed call with503 NOT_REGISTERED. - WEX-4.5 A receiver MUST take the sender’s keys from the
jwks_urlof the sender’s registry entry. This version does not use keys held inline in the registry. - WEX-4.6 A receiver MUST make the checks in this order and answer the first that fails:
| # | Check | Answer when it fails |
|---|---|---|
| 1 | The header is present | 401 SIGNATURE_MISSING |
| 2 | It has three parts with an empty middle part; the protected header decodes; iss and kid are strings and iat is an integer; alg is EdDSA | 401 SIGNATURE_INVALID |
| 3 | iat is within 120 seconds of the receiver’s clock | 401 SIGNATURE_EXPIRED |
| 4 | The receiver is an active participant (WEX-4.4) | 503 NOT_REGISTERED |
| 5 | htm is the request method and htu is as WEX-4.3 requires | 401 SIGNATURE_INVALID |
| 6 | iss is an active participant | 401 UNKNOWN_PARTICIPANT |
| 7 | A key from the sender’s jwks_url verifies the signature over the body bytes | 401 SIGNATURE_INVALID |
| 8 | The caller’s relation (WEX-3.1 to WEX-3.6) | 403 FORBIDDEN_PARTICIPANT |
| 9 | The body (WEX-5.3) | 422 VALIDATION_ERROR |
| 10 | Where the path is for one kind of member only (WEX-3.7, WEX-3.8), the member’s kind | 403 FORBIDDEN_PARTICIPANT |
- WEX-4.7 The signature and the relation MUST be checked before the body is parsed. A caller with no relation the path accepts is told
403, never what was wrong with its body. A member of the wrong kind for a path is told403once its body is well formed. - WEX-4.8 When the trust registry or the sender’s key set cannot be fetched, the receiver MUST refuse the call with
502 TRUST_REGISTRY_UNAVAILABLE. It MUST NOT accept the call. - WEX-4.9 A receiver MAY cache the registry’s participant list and its document types. The reference caches each for 60 seconds, and a sender’s key set for 300 seconds with the single refetch OCI-PAY-2 §4 describes (at most once every 30 seconds per sender).
- WEX-4.10 A signature covers one hop. An exchange that passes a call on MUST sign the new call with its own key, as its own
iss, for the next receiver’shtu. It MUST NOT pass on the signature it received. - WEX-4.11 There is no
Idempotency-Keyin this version. Find, fetch and status change nothing. A repeated push is handled as §14 says. - WEX-4.12 Answers are not signed, as in OCI-PAY-2 §4. A document in an answer carries its issuer’s own signature (OCI-WALLET-1), which does not depend on the path it took.
5. Common rules
- WEX-5.1 Every call is
POSTwith a JSON body, sent server to server. - WEX-5.2 Every error MUST use the body
{"error": {"code": "<CODE>", "message": "<one sentence>"}}with the matching HTTP status, as OCI-PAY-2 does. Callers branch oncode. The codes are listed in §15. - WEX-5.3 A body that is not JSON, or does not match the call’s shape, MUST be refused with
422 VALIDATION_ERROR. For find, fetch, status and push, a member the call does not define MUST be refused the same way: nothing unknown is passed on. - WEX-5.4 A document type on the wire is five capital letters (
^[A-Z]{5}$). A document URI matches^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$and is at most 100 characters. An issuer id in a find matches^issuer:[a-z0-9][a-z0-9._]{0,62}$. A wallet address matches^[a-z0-9][a-z0-9._-]{0,62}@[a-z0-9][a-z0-9._-]{0,62}$and is at most 127 characters. What each part means is in OCI-WALLET-1. - WEX-5.5 A document’s
statuson the wire is one ofactive,suspended,revoked. - WEX-5.6
personis an object withname(REQUIRED, 1 to 120 characters) andnational_id(OPTIONAL, 1 to 40 characters), and no other member. It says who the wallet has signed in. A wallet sendsnational_idonly for a person who has connected their national identity (OCI-WALLET-3). How an issuer uses the two to decide whose a document is, is the matching rule of OCI-WALLET-1.
6. Hello
Hello is the connection check. It proves that a call signed by one participant reaches the other, and that the other sees it in the expected relation. Each of the three doors has one.
- WEX-6.1 The request MUST carry
nonce: 8 to 64 characters fromA-Z a-z 0-9 _ -. The caller SHOULD use a fresh random value each time. - WEX-6.2 The receiver MUST answer
200withnonce(the value it was sent),you(the caller’s participant id, as the signature proved it),relation(the caller’s relation:member,peerorhome),me(the receiver’s own participant id) andat(the receiver’s time, RFC 3339). - WEX-6.3 A caller MUST treat a hello as passed only when
nonceis the one it sent,youis its own id,meis the participant it meant to reach, andrelationis the one it expects:memberfrom its home exchange,peerfrom another exchange,homefrom a member. - WEX-6.4 An exchange MUST log a hello it answers (§13), with no issuer and no document type.
POST /v1/hello Check the connection to the home exchange · served by an exchange
A signed hello. The exchange answers who it saw and in what relation. Called by an issuer, a wallet or a requester, at its home exchange. Defined in WEX-3.2, WEX-6.1, WEX-6.2, WEX-6.3, WEX-6.4.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | Any fresh value. It comes back in the answer, which shows the body arrived as signed. (pattern ^[A-Za-z0-9_-]+$; at most 64 characters; at least 8) | WEX-6.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | The nonce the caller sent. | WEX-6.2 |
you | string | yes | The caller's participant id, as its signature proved it. | WEX-6.2 |
relation | "member" | "peer" | "home" | yes | How the caller stands to the receiver. | WEX-6.2 |
me | string | yes | The receiver's own participant id. | WEX-6.2 |
at | string, date-time | yes | The receiver's time. | WEX-6.2 |
Errors
A member checks the connection to its home exchange. This is the only call a requester can make in this version.
POST /peer/v1/hello Check the connection between two exchanges · served by an exchange
A signed hello from one exchange to another. Called by Another exchange. Defined in WEX-3.3, WEX-6.1, WEX-6.2, WEX-6.3, WEX-6.4.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | Any fresh value. It comes back in the answer, which shows the body arrived as signed. (pattern ^[A-Za-z0-9_-]+$; at most 64 characters; at least 8) | WEX-6.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | The nonce the caller sent. | WEX-6.2 |
you | string | yes | The caller's participant id, as its signature proved it. | WEX-6.2 |
relation | "member" | "peer" | "home" | yes | How the caller stands to the receiver. | WEX-6.2 |
me | string | yes | The receiver's own participant id. | WEX-6.2 |
at | string, date-time | yes | The receiver's time. | WEX-6.2 |
Errors
One exchange checks the connection to another.
POST /exchange/v1/hello Check the connection from the home exchange to an issuer · served by an issuer
A signed hello from an exchange to one of its member issuers. Called by the issuer's home exchange. Defined in WEX-3.4, WEX-3.9, WEX-6.1, WEX-6.2, WEX-6.3.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | Any fresh value. It comes back in the answer, which shows the body arrived as signed. (pattern ^[A-Za-z0-9_-]+$; at most 64 characters; at least 8) | WEX-6.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | The nonce the caller sent. | WEX-6.2 |
you | string | yes | The caller's participant id, as its signature proved it. | WEX-6.2 |
relation | "member" | "peer" | "home" | yes | How the caller stands to the receiver. | WEX-6.2 |
me | string | yes | The receiver's own participant id. | WEX-6.2 |
at | string, date-time | yes | The receiver's time. | WEX-6.2 |
Errors
POST /exchange/v1/hello Check the connection from the home exchange to a wallet · served by a wallet
A signed hello from an exchange to one of its member wallets. Called by the wallet's home exchange. Defined in WEX-3.4, WEX-3.9, WEX-6.1, WEX-6.2, WEX-6.3.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | Any fresh value. It comes back in the answer, which shows the body arrived as signed. (pattern ^[A-Za-z0-9_-]+$; at most 64 characters; at least 8) | WEX-6.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
nonce | string | yes | The nonce the caller sent. | WEX-6.2 |
you | string | yes | The caller's participant id, as its signature proved it. | WEX-6.2 |
relation | "member" | "peer" | "home" | yes | How the caller stands to the receiver. | WEX-6.2 |
me | string | yes | The receiver's own participant id. | WEX-6.2 |
at | string, date-time | yes | The receiver's time. | WEX-6.2 |
Errors
An exchange checks the connection to one of its members. An issuer and a wallet serve the same call.
7. Routing a call to its issuer
Find, fetch and status are each for one issuer. This section is the rule that takes them there. It is the same at /v1/* and at /peer/v1/*, except for the last step.
- WEX-7.1 The exchange takes the issuer and the document type from the request. For a find they are
issueranddoc_type. For a fetch or a status they are read from the URI: the issuer’s participant id isissuer:followed by the URI’s first part, and the type is its second part (OCI-WALLET-1). - WEX-7.2 The issuer MUST be an
activeparticipant ofkinddoc_issuer. If not, the exchange MUST answer404 ISSUER_NOT_FOUNDand call nobody. - WEX-7.3 The issuer MUST be accredited for the document type in the issuer’s own country, as the trust registry lists it (OCI-WALLET-1). If not, the exchange MUST answer
403 ISSUER_NOT_ACCREDITEDand call nobody. This covers a type that does not exist, a type that is another issuer’s, and a type of another country. - WEX-7.4 When the issuer’s
homeis this exchange, the exchange MUST call the issuer directly at/exchange/v1/find,/exchange/v1/fetchor/exchange/v1/status. - WEX-7.5 When the issuer’s
homeis another exchange and the call came from a member, the exchange MUST send it to that exchange at/peer/v1/find,/peer/v1/fetchor/peer/v1/status. That exchange MUST be anactiveparticipant ofkinddoc_exchange. If the issuer has no home, or its home is not one, the exchange MUST answer502 ISSUER_UNREACHABLE. - WEX-7.6 The one-hop rule. When the issuer’s
homeis another exchange and the call came from a peer, the exchange MUST answer404 ISSUER_NOT_HEREand call nobody. A call that arrives from a peer is only ever for a member. No call crosses more than one hop between exchanges. - WEX-7.7 The exchange that receives a call from a peer MUST make the checks of WEX-7.2 and WEX-7.3 itself. It does not rely on the first exchange having made them.
- WEX-7.8 The exchange MUST find the issuer, its home and its address in the trust registry on each call. It MUST NOT keep its own list of issuers.
7.1 What is passed on
- WEX-7.9 The exchange MUST pass the request on with the same members and values it received, and add nothing. To a peer it sends the whole body. To a member issuer it sends the whole body, except that a find is sent without
issuer: an issuer is not told its own name. The bytes are the exchange’s own serialisation, signed again (WEX-4.10). - WEX-7.10
person.national_idMUST be passed on when the wallet sent one, and MUST NOT appear when the wallet sent none or sentnull. An exchange never adds, fills in or changes anything about a person. - WEX-7.11 When the next receiver answers with status
200,403,404,410or422and a JSON body, the exchange MUST answer its caller with the same status and the same JSON, unchanged. This holds for a success and for a refusal, and for an answer from a member issuer and from a peer alike. Members the exchange does not know MUST be passed back too. - WEX-7.12 Any other outcome is the route’s failure, not the caller’s fault: another status (including
401,500,502and503), an answer that is not JSON, a timeout or a failed connection. The exchange MUST answer502 ISSUER_UNAVAILABLE. It MUST NOT pass on the body of such an answer. - WEX-7.13 The exchange MUST NOT read a passed-back answer for meaning. It does not check that a found URI belongs to the issuer asked, that a fetched document is the one asked for, or that a document’s signature is good. The wallet makes those checks (OCI-WALLET-3, on finding and keeping a document).
8. Find
A wallet asks which documents of one type an issuer has issued to the person it has signed in.
POST /v1/find Find a person's documents of one type at an issuer · served by an exchange
The exchange routes the call to the issuer and passes the issuer's answer back unchanged. Called by a wallet, at its home exchange. Defined in WEX-3.7, WEX-8.1, WEX-8.2, WEX-8.3, WEX-7.11, WEX-8.10.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
issuer | string | yes | The issuer to ask, as its participant id (issuer:transport). (pattern ^issuer:[a-z0-9][a-z0-9._]{0,62}$) | WEX-8.1 |
doc_type | string | yes | The document type, as the issuer's country registered it (DRVLC). (pattern ^[A-Z]{5}$) | WEX-5.4 |
search | object | yes | The type's search fields and the person's answers. The fields are declared per document type (OCI-WALLET-1). May be empty only when person.national_id is present (WEX-8.10). | WEX-8.1 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
documents | array of object | yes | The documents of this type issued to the person that match every search field given and are not revoked. Empty when there are none. | WEX-8.8 |
documents[].uri | string | yes | The document's URI. | WEX-8.9 |
documents[].doc_type | string | yes | The document type. | WEX-8.9 |
documents[].name | string | yes | The document type's name (Driving Licence). | WEX-8.9 |
documents[].issued_on | string, date | yes | The day the document was issued. | WEX-8.9 |
documents[].expires_on | string, null, date | yes | The day the document expires, or null when it does not. | WEX-8.9 |
documents[].status | "active" | "suspended" | yes | How the document stands today. A revoked document is not listed. | WEX-8.9 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)502 ISSUER_UNREACHABLE(WEX-7.5)404 ISSUER_NOT_HERE(WEX-7.11)502 ISSUER_UNAVAILABLE(WEX-7.12)403 NOT_ACCREDITED(WEX-8.6)422 UNKNOWN_SEARCH_FIELD(WEX-8.7)422 SEARCH_FIELD_MISSING(WEX-8.7)
- WEX-8.1 The request MUST carry
issuer(the issuer’s participant id),doc_type,searchandperson(WEX-5.6).searchis an object of at most 10 members, each a string: the type’s search fields and the person’s answers (search fields are defined per document type in OCI-WALLET-1). - WEX-8.2 A wallet MUST set
personfrom its own record of who is signed in. A find withoutpersonMUST be refused (422 VALIDATION_ERROR). - WEX-8.3 The exchange MUST route the call as §7 says and answer as WEX-7.11 and WEX-7.12 say.
POST /peer/v1/find Find documents at an issuer that is a member here · served by an exchange
The same call, one hop on. It is delivered only to a member issuer. Called by Another exchange, for one of its member wallets. Defined in WEX-8.4, WEX-7.6, WEX-7.7, WEX-8.10.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
issuer | string | yes | The issuer to ask, as its participant id (issuer:transport). (pattern ^issuer:[a-z0-9][a-z0-9._]{0,62}$) | WEX-8.1 |
doc_type | string | yes | The document type, as the issuer's country registered it (DRVLC). (pattern ^[A-Z]{5}$) | WEX-5.4 |
search | object | yes | The type's search fields and the person's answers. The fields are declared per document type (OCI-WALLET-1). May be empty only when person.national_id is present (WEX-8.10). | WEX-8.1 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
documents | array of object | yes | The documents of this type issued to the person that match every search field given and are not revoked. Empty when there are none. | WEX-8.8 |
documents[].uri | string | yes | The document's URI. | WEX-8.9 |
documents[].doc_type | string | yes | The document type. | WEX-8.9 |
documents[].name | string | yes | The document type's name (Driving Licence). | WEX-8.9 |
documents[].issued_on | string, date | yes | The day the document was issued. | WEX-8.9 |
documents[].expires_on | string, null, date | yes | The day the document expires, or null when it does not. | WEX-8.9 |
documents[].status | "active" | "suspended" | yes | How the document stands today. A revoked document is not listed. | WEX-8.9 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)404 ISSUER_NOT_HERE(WEX-7.6)502 ISSUER_UNAVAILABLE(WEX-7.12)403 NOT_ACCREDITED(WEX-8.6)422 UNKNOWN_SEARCH_FIELD(WEX-8.7)422 SEARCH_FIELD_MISSING(WEX-8.7)
- WEX-8.4 The request and the answer are those of
/v1/find, withissuerkept. The receiving exchange MUST deliver it only to a member issuer (WEX-7.6).
POST /exchange/v1/find Find the documents issued to a person · served by an issuer
The issuer answers with the documents of one type issued to the person that match every search field given. Called by the issuer's home exchange. Defined in WEX-8.5, WEX-8.6, WEX-8.7, WEX-8.8, WEX-8.9, WEX-8.10.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
doc_type | string | yes | The document type, as the issuer's country registered it (DRVLC). (pattern ^[A-Z]{5}$) | WEX-5.4 |
search | object | yes | The type's search fields and the person's answers. The fields are declared per document type (OCI-WALLET-1). May be empty only when person.national_id is present (WEX-8.10). | WEX-8.1 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
documents | array of object | yes | The documents of this type issued to the person that match every search field given and are not revoked. Empty when there are none. | WEX-8.8 |
documents[].uri | string | yes | The document's URI. | WEX-8.9 |
documents[].doc_type | string | yes | The document type. | WEX-8.9 |
documents[].name | string | yes | The document type's name (Driving Licence). | WEX-8.9 |
documents[].issued_on | string, date | yes | The day the document was issued. | WEX-8.9 |
documents[].expires_on | string, null, date | yes | The day the document expires, or null when it does not. | WEX-8.9 |
documents[].status | "active" | "suspended" | yes | How the document stands today. A revoked document is not listed. | WEX-8.9 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)403 NOT_ACCREDITED(WEX-8.6)422 UNKNOWN_SEARCH_FIELD(WEX-8.7)422 SEARCH_FIELD_MISSING(WEX-8.7)
- WEX-8.5 The request carries
doc_type,searchandperson, and noissuer. - WEX-8.6 The issuer MUST be accredited for
doc_typein the trust registry at the time of the call. If it is not, it MUST answer403 NOT_ACCREDITED. - WEX-8.7 The issuer MUST refuse a
searchmember that the type does not declare (422 UNKNOWN_SEARCH_FIELD), and a find that leaves out, or leaves blank, a search field the type marks as required (422 SEARCH_FIELD_MISSING). - WEX-8.8 The issuer MUST answer
200withdocuments: the documents of that type that were issued toperson(the matching rule of OCI-WALLET-1), that match every search field given, and that are notrevoked. When there are none it answers200with an empty list, never an error. A wrong search value and a document issued to someone else look the same to the caller. - WEX-8.9 Each entry MUST carry
uri,doc_type,name(the document type’s name),issued_on(a date),expires_on(a date ornull) andstatus(activeorsuspended). It MUST NOT carry the document itself, its number or anything about the person. - WEX-8.10
searchMAY be empty ({}) when, and only when,person.national_idis present: the person is asking by their national ID number alone (OCI-WALLET-1 WDOC-4.14). An exchange MUST pass an emptysearchon like any other, and MUST NOT add to it. An issuer answers it as WDOC-4.14 requires, and refuses an emptysearchwithout aperson.national_idwith422 SEARCH_FIELD_MISSING.
9. Fetch
A wallet asks for one document by its URI.
POST /v1/fetch Fetch a document by its URI · served by an exchange
The exchange routes the call by the URI and passes the issuer's answer back unchanged. Called by a wallet, at its home exchange. Defined in WEX-3.7, WEX-9.1, WEX-9.2, WEX-7.11.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-9.7 |
status | "active" | "suspended" | yes | How the document stands today. A revoked document is refused, not sent. | WEX-9.7 |
document | string | yes | The signed document: a compact JWS signed by the issuer, exactly as it was signed. Defined in OCI-WALLET-1. | WEX-9.7 |
pdf | string, null | yes | The printable copy, base64, or null when there is none. | WEX-9.7 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)502 ISSUER_UNREACHABLE(WEX-7.5)404 ISSUER_NOT_HERE(WEX-7.11)502 ISSUER_UNAVAILABLE(WEX-7.12)404 DOCUMENT_NOT_FOUND(WEX-9.4)403 NOT_ACCREDITED(WEX-9.5)410 DOCUMENT_REVOKED(WEX-9.6)
- WEX-9.1 The request MUST carry
uriandperson(WEX-5.6). A fetch withoutpersonMUST be refused (422 VALIDATION_ERROR). A URI is not a secret: knowing one is not enough to read the document. - WEX-9.2 The exchange MUST route the call by the URI as §7 says and answer as WEX-7.11 and WEX-7.12 say.
POST /peer/v1/fetch Fetch a document from an issuer that is a member here · served by an exchange
The same call, one hop on. It is delivered only to a member issuer. Called by Another exchange, for one of its member wallets. Defined in WEX-9.3, WEX-7.6, WEX-7.7.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-9.7 |
status | "active" | "suspended" | yes | How the document stands today. A revoked document is refused, not sent. | WEX-9.7 |
document | string | yes | The signed document: a compact JWS signed by the issuer, exactly as it was signed. Defined in OCI-WALLET-1. | WEX-9.7 |
pdf | string, null | yes | The printable copy, base64, or null when there is none. | WEX-9.7 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)404 ISSUER_NOT_HERE(WEX-7.6)502 ISSUER_UNAVAILABLE(WEX-7.12)404 DOCUMENT_NOT_FOUND(WEX-9.4)403 NOT_ACCREDITED(WEX-9.5)410 DOCUMENT_REVOKED(WEX-9.6)
- WEX-9.3 The request and the answer are those of
/v1/fetch. The receiving exchange MUST deliver it only to a member issuer (WEX-7.6).
POST /exchange/v1/fetch Send a document to the person it was issued to · served by an issuer
The issuer answers with the signed document and its printable copy, only for the person it was issued to. Called by the issuer's home exchange. Defined in WEX-9.4, WEX-9.5, WEX-9.6, WEX-9.7.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
person | object | yes | Who the wallet has signed in and is asking for. An issuer answers only for documents issued to them. An exchange passes it on and keeps none of it. | WEX-5.6 |
person.name | string | yes | The person's name, as the wallet's identity gives it. (at most 120 characters; at least 1) | WEX-5.6 |
person.national_id | string, null | The person's number in the country's identity system. Sent only when the person has connected their national identity to the wallet. An exchange passes it on only when it was sent. (at most 40 characters; at least 1) | WEX-7.10 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-9.7 |
status | "active" | "suspended" | yes | How the document stands today. A revoked document is refused, not sent. | WEX-9.7 |
document | string | yes | The signed document: a compact JWS signed by the issuer, exactly as it was signed. Defined in OCI-WALLET-1. | WEX-9.7 |
pdf | string, null | yes | The printable copy, base64, or null when there is none. | WEX-9.7 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 DOCUMENT_NOT_FOUND(WEX-9.4)403 NOT_ACCREDITED(WEX-9.5)410 DOCUMENT_REVOKED(WEX-9.6)
- WEX-9.4 The issuer MUST answer
404 DOCUMENT_NOT_FOUNDwhen the URI names another issuer, when it has no such document, and when the document was not issued toperson(the matching rule of OCI-WALLET-1). The three cases MUST be answered alike. - WEX-9.5 The issuer MUST answer
403 NOT_ACCREDITEDwhen it is no longer accredited for the URI’s document type. - WEX-9.6 The issuer MUST answer
410 DOCUMENT_REVOKEDfor a revoked document, and MUST NOT send it. - WEX-9.7 Otherwise the issuer MUST answer
200withuri(as asked),status(activeorsuspended),document(the signed document, a compact JWS as OCI-WALLET-1 defines it, exactly as it was signed) andpdf(the printable copy, base64, ornullwhen there is none). A suspended document is sent, with its status.
10. Status
A wallet asks whether a document is still good. The signed document carries no status, so status is always asked of the issuer.
POST /v1/status Ask whether a document is still good · served by an exchange
The exchange routes the call by the URI and passes the issuer's answer back unchanged. The call names no person. Called by a wallet, at its home exchange. Defined in WEX-3.7, WEX-10.1, WEX-10.2, WEX-7.11.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-10.4 |
status | "active" | "suspended" | "revoked" | yes | How the document stands today. | WEX-10.4 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)502 ISSUER_UNREACHABLE(WEX-7.5)404 ISSUER_NOT_HERE(WEX-7.11)502 ISSUER_UNAVAILABLE(WEX-7.12)404 DOCUMENT_NOT_FOUND(WEX-10.5)403 NOT_ACCREDITED(WEX-10.5)
- WEX-10.1 The request MUST carry
uriand nothing else. It carries noperson: the answer says nothing about anyone. A status call that carriespersonMUST be refused (422 VALIDATION_ERROR). - WEX-10.2 The exchange MUST route the call by the URI as §7 says and answer as WEX-7.11 and WEX-7.12 say.
POST /peer/v1/status Ask an issuer that is a member here how a document stands · served by an exchange
The same call, one hop on. It is delivered only to a member issuer. Called by Another exchange, for one of its member wallets. Defined in WEX-10.3, WEX-7.6, WEX-7.7.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-10.4 |
status | "active" | "suspended" | "revoked" | yes | How the document stands today. | WEX-10.4 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 ISSUER_NOT_FOUND(WEX-7.2)403 ISSUER_NOT_ACCREDITED(WEX-7.3)404 ISSUER_NOT_HERE(WEX-7.6)502 ISSUER_UNAVAILABLE(WEX-7.12)404 DOCUMENT_NOT_FOUND(WEX-10.5)403 NOT_ACCREDITED(WEX-10.5)
- WEX-10.3 The request and the answer are those of
/v1/status. The receiving exchange MUST deliver it only to a member issuer (WEX-7.6).
POST /exchange/v1/status Say how a document stands today · served by an issuer
The issuer answers active, suspended or revoked. Called by the issuer's home exchange. Defined in WEX-10.4, WEX-10.5.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-5.4 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI asked for. | WEX-10.4 |
status | "active" | "suspended" | "revoked" | yes | How the document stands today. | WEX-10.4 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 DOCUMENT_NOT_FOUND(WEX-10.5)403 NOT_ACCREDITED(WEX-10.5)
- WEX-10.4 The issuer MUST answer
200withuriandstatus:active,suspendedorrevoked. A revoked document is answered200withrevoked, not410. - WEX-10.5 The issuer MUST answer
404 DOCUMENT_NOT_FOUNDwhen the URI names another issuer or it has no such document, and403 NOT_ACCREDITEDwhen it is no longer accredited for the URI’s type.
11. Push
An issuer sends a document to the wallet address a person gave it. A push travels the other way from a fetch, by the same rules: the home exchange first, one hop at most, then the wallet.
POST /v1/push Send a document to a person's wallet address · served by an exchange
The exchange checks who may send what, finds the wallet from the address and delivers the document. It keeps nothing. Called by an issuer, at its home exchange. Defined in WEX-3.8, WEX-11.1, WEX-11.2, WEX-11.3, WEX-11.4, WEX-11.5, WEX-11.6, WEX-11.7, WEX-11.9, WEX-11.10, WEX-11.11.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
to | string | yes | The person's wallet address: <handle>@<provider> (asha@satchel). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._-]{0,62}@[a-z0-9][a-z0-9._-]{0,62}$; at most 127 characters) | WEX-11.1 |
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-11.1 |
document | string | yes | The signed document: a compact JWS signed by the issuer. The exchange does not open it. (at most 200000 characters; at least 1) | WEX-11.1 |
pdf | string, null | The printable copy, base64, or null when there is none. (at most 20000000 characters) | WEX-11.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI that was pushed. | WEX-11.9 |
to | string | yes | The wallet address it was pushed to. | WEX-11.9 |
wallet | string | yes | The participant id of the wallet provider that took the document (wallet:satchel). | WEX-11.9 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)403 NOT_YOUR_DOCUMENT(WEX-11.2)403 ISSUER_NOT_ACCREDITED(WEX-11.3)404 WALLET_NOT_FOUND(WEX-11.4)502 WALLET_UNREACHABLE(WEX-11.6)403 ISSUER_NOT_YOURS(WEX-11.10)404 WALLET_NOT_HERE(WEX-11.10)404 NO_SUCH_ADDRESS(WEX-11.18)422 DOCUMENT_NOT_GENUINE(WEX-11.18)403 NOT_THEIR_DOCUMENT(WEX-11.18)410 DOCUMENT_EXPIRED(WEX-11.18)502 WALLET_UNAVAILABLE(WEX-11.11)
- WEX-11.1 The request MUST carry
to(a wallet address),uri,document(the signed document, 1 to 200,000 characters) and MAY carrypdf(the printable copy, base64, at most 20,000,000 characters, ornull). - WEX-11.2 An issuer pushes only what it issued. The exchange MUST check that the URI’s issuer is the caller. If not, it MUST answer
403 NOT_YOUR_DOCUMENT. - WEX-11.3 The exchange MUST check that the issuer is accredited for the URI’s document type, as in WEX-7.3. If not, it MUST answer
403 ISSUER_NOT_ACCREDITED. - WEX-11.4 The exchange MUST find the wallet from the address alone: the participant id is
wallet:followed by the part after the last@(OCI-WALLET-1, the wallet address). That participant MUST beactiveand ofkindwallet. If not, the exchange MUST answer404 WALLET_NOT_FOUND. The exchange does not know, and MUST NOT try to learn, whether the handle exists. - WEX-11.5 When the wallet’s
homeis this exchange, the exchange MUST call the wallet at/exchange/v1/push. - WEX-11.6 When the wallet’s
homeis another exchange and the call came from a member, the exchange MUST send it to that exchange at/peer/v1/push. That exchange MUST be anactiveparticipant ofkinddoc_exchange. If the wallet has no home, or its home is not one, the exchange MUST answer502 WALLET_UNREACHABLE. - WEX-11.7 The exchange MUST pass on
to,uri,documentandpdfwith the values it received,pdfasnullwhen the issuer sent none, and add nothing. - WEX-11.8 The exchange MUST NOT open the document. It does not check the issuer’s signature on it, that it is the document the URI names, or who it was issued to. The wallet does (OCI-WALLET-3, on taking a pushed document).
- WEX-11.9 When the next receiver answers
200with a JSON body, the exchange MUST answer200withuriandtoas it received them andwallet: the wallet’s participant id, as it worked it out under WEX-11.4. This answer is the exchange’s own. It is not the wallet’s answer passed back. - WEX-11.10 When the next receiver answers
403,404,409,410or422with an error body (WEX-5.2), the exchange MUST answer its caller with the same status,codeandmessage. The refusal is the issuer’s to hear. - WEX-11.11 Any other outcome is unknown (§14): another status, a
200that is not JSON, one of the statuses of WEX-11.10 without an error body, a timeout or a failed connection. The exchange MUST answer502 WALLET_UNAVAILABLE.
POST /peer/v1/push Deliver a document to a wallet that is a member here · served by an exchange
The same call, one hop on. It is taken only for the calling exchange's own issuers and delivered only to a member wallet. Called by Another exchange, for one of its member issuers. Defined in WEX-11.12, WEX-11.13, WEX-11.14, WEX-11.15.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
to | string | yes | The person's wallet address: <handle>@<provider> (asha@satchel). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._-]{0,62}@[a-z0-9][a-z0-9._-]{0,62}$; at most 127 characters) | WEX-11.1 |
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-11.1 |
document | string | yes | The signed document: a compact JWS signed by the issuer. The exchange does not open it. (at most 200000 characters; at least 1) | WEX-11.1 |
pdf | string, null | The printable copy, base64, or null when there is none. (at most 20000000 characters) | WEX-11.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI that was pushed. | WEX-11.9 |
to | string | yes | The wallet address it was pushed to. | WEX-11.9 |
wallet | string | yes | The participant id of the wallet provider that took the document (wallet:satchel). | WEX-11.9 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)403 ISSUER_NOT_YOURS(WEX-11.13)404 ISSUER_NOT_FOUND(WEX-11.14)403 ISSUER_NOT_ACCREDITED(WEX-11.3)404 WALLET_NOT_FOUND(WEX-11.4)404 WALLET_NOT_HERE(WEX-11.15)404 NO_SUCH_ADDRESS(WEX-11.18)422 DOCUMENT_NOT_GENUINE(WEX-11.18)403 NOT_THEIR_DOCUMENT(WEX-11.18)410 DOCUMENT_EXPIRED(WEX-11.18)502 WALLET_UNAVAILABLE(WEX-11.11)
- WEX-11.12 The request and the answer are those of
/v1/push. - WEX-11.13 An exchange forwards a push only for its own issuers. The receiving exchange MUST check that the URI’s issuer is in the trust registry and that its
homeis the calling exchange. If not, it MUST answer403 ISSUER_NOT_YOURS. - WEX-11.14 The receiving exchange MUST then make the checks of WEX-11.3 and WEX-11.4 itself, and MUST answer
404 ISSUER_NOT_FOUNDwhen the URI’s issuer is not anactiveparticipant ofkinddoc_issuer. - WEX-11.15 The one-hop rule. The receiving exchange MUST deliver the push only to a member wallet. When the wallet’s
homeis another exchange, it MUST answer404 WALLET_NOT_HEREand call nobody.
POST /exchange/v1/push Take a document an issuer is sending to one of this wallet's addresses · served by a wallet
The wallet checks the document and keeps it for the person the address is. What it checks is OCI-WALLET-3. Called by the wallet's home exchange. Defined in WEX-11.16, WEX-11.17, WEX-11.18.
| Request | Type | Required | Meaning | Clause |
|---|---|---|---|---|
to | string | yes | The person's wallet address: <handle>@<provider> (asha@satchel). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._-]{0,62}@[a-z0-9][a-z0-9._-]{0,62}$; at most 127 characters) | WEX-11.1 |
uri | string | yes | The document's URI: <issuer>-<TYPE>-<id> (transport-DRVLC-KA0120230001). Defined in OCI-WALLET-1. (pattern ^[a-z0-9][a-z0-9._]{0,62}-[A-Z]{5}-[A-Za-z0-9]{1,20}$; at most 100 characters) | WEX-11.1 |
document | string | yes | The signed document: a compact JWS signed by the issuer. The exchange does not open it. (at most 200000 characters; at least 1) | WEX-11.1 |
pdf | string, null | The printable copy, base64, or null when there is none. (at most 20000000 characters) | WEX-11.1 |
| Response | Type | Required | Meaning | Clause |
|---|---|---|---|---|
uri | string | yes | The URI that was pushed. | WEX-11.17 |
to | string | yes | The wallet address it was pushed to. | WEX-11.17 |
wallet | string | yes | The participant id of the wallet provider that took the document (wallet:satchel). | WEX-11.17 |
Errors
401 SIGNATURE_MISSING(WEX-4.6)401 SIGNATURE_INVALID(WEX-4.6)401 SIGNATURE_EXPIRED(WEX-4.6)401 UNKNOWN_PARTICIPANT(WEX-4.6)403 FORBIDDEN_PARTICIPANT(WEX-3.6)422 VALIDATION_ERROR(WEX-5.3)502 TRUST_REGISTRY_UNAVAILABLE(WEX-4.8)503 NOT_REGISTERED(WEX-4.4)404 NO_SUCH_ADDRESS(WEX-11.18)422 DOCUMENT_NOT_GENUINE(WEX-11.18)403 NOT_THEIR_DOCUMENT(WEX-11.18)410 DOCUMENT_EXPIRED(WEX-11.18)
- WEX-11.16 The request is that of
/v1/push. The wallet MUST accept it only from its home exchange (WEX-3.9). - WEX-11.17 On success the wallet MUST answer
200withuriandtoas it received them andwallet: its own participant id. - WEX-11.18 The wallet’s refusals on this call are
404 NO_SUCH_ADDRESS(the address is not at this provider, or nobody here has that handle),422 DOCUMENT_NOT_GENUINE(the document does not check out),403 NOT_THEIR_DOCUMENT(it was issued to someone else) and410 DOCUMENT_EXPIRED. When each applies, and what the wallet does with a document it takes, is OCI-WALLET-3 (taking a pushed document). This spec fixes only that these are the codes on the wire and that they reach the issuer unchanged (WEX-11.10). - WEX-11.19 An issuer MUST treat a push as delivered only on a
200whose body carrieswallet. It SHOULD record the URI, the address and that wallet id as the delivery.
12. What an exchange never keeps
- WEX-12.1 An exchange MUST NOT store a document, a printable copy, a document URI, a search value, a person’s name, a national ID number or a wallet address. They pass through memory for the length of one call.
- WEX-12.2 An exchange MUST NOT store any part of an answer it passes back.
- WEX-12.3 The only record an exchange keeps of a call is its log entry (§13).
- WEX-12.4 An exchange MUST NOT put a URI’s id part, a search value, a person’s name or number, or a wallet address’s handle into an error it writes itself. The reference names only participant ids and document types in its own messages.
13. The log
- WEX-13.1 An exchange MUST log every call it accepts at
/v1/*and/peer/v1/*: one entry per call, written before the call is routed, so a call the route then fails is still in the log. - WEX-13.2 An entry MUST hold exactly: the caller’s participant id, the caller’s relation (
memberorpeer), the method, the path, the issuer the call was about, the document type it was about, and the time. For a hello the issuer and type are empty. For a fetch, a status and a push, the issuer and type are the URI’s. - WEX-13.3 An entry MUST NOT hold a URI, a search value, anything in
person, a wallet address, a document, a printable copy, or any part of an answer. - WEX-13.4 A call refused before routing is not logged in the reference: a bad signature, a caller with no relation or the wrong kind, a malformed body,
NOT_YOUR_DOCUMENTandISSUER_NOT_YOURS. The outcome of a logged call is not recorded either. See §21.
14. Unknown outcomes
- WEX-14.1 An exchange makes each onward call once. It MUST NOT retry on its own, and it keeps no queue: a call that is not answered is over.
- WEX-14.2 A caller MUST tell three classes of answer apart by status and code, never by message:
| Class | Answers | What the caller may conclude |
|---|---|---|
| Answered | 200 | It happened. |
| Refused | 403, 404, 409, 410, 422, and 502 ISSUER_UNREACHABLE / 502 WALLET_UNREACHABLE | It did not happen. Repeating the same call will give the same answer until something changes in the registry or at the issuer or wallet. |
| Unknown | 502 ISSUER_UNAVAILABLE, 502 WALLET_UNAVAILABLE, 502 TRUST_REGISTRY_UNAVAILABLE, 503 NOT_REGISTERED, a timeout, no answer | Nothing. |
A caller MAY treat any 502 as unknown without reading its code, as the reference issuer does on a push: that only delays a conclusion, and never draws a wrong one.
- WEX-14.3 Find, fetch and status change nothing at the issuer. After an unknown outcome a wallet MAY repeat the call.
- WEX-14.4 After an unknown outcome of a push, the wallet may or may not hold the document. The issuer MUST NOT record it as delivered (WEX-11.19) and MAY push it again. A repeat is safe because a wallet that is sent a document it already holds keeps one copy (OCI-WALLET-3, taking a pushed document).
- WEX-14.5 An exchange MUST answer a timeout of its onward call as unknown (WEX-7.12, WEX-11.11), never as a refusal. The reference waits 15 seconds for each onward call.
- WEX-14.6 An unknown outcome on the second hop reaches the first exchange as a
502, which it answers as unknown in turn (WEX-7.12, WEX-11.11). A refusal on the second hop reaches the caller as that refusal (WEX-7.11, WEX-11.10).
15. Errors
Errors use the body of WEX-5.2.
| Status | Code | Answered by | When |
|---|---|---|---|
| 401 | SIGNATURE_MISSING, SIGNATURE_INVALID, SIGNATURE_EXPIRED, UNKNOWN_PARTICIPANT | any receiver | WEX-4.6 |
| 403 | FORBIDDEN_PARTICIPANT | any receiver | WEX-3.6, WEX-3.7, WEX-3.8 |
| 422 | VALIDATION_ERROR | any receiver | WEX-5.3 |
| 502 | TRUST_REGISTRY_UNAVAILABLE | any receiver | WEX-4.8, and when an exchange cannot read the registry while routing |
| 503 | NOT_REGISTERED | any receiver | WEX-4.4 |
| 404 | ISSUER_NOT_FOUND | exchange | WEX-7.2, WEX-11.14 |
| 403 | ISSUER_NOT_ACCREDITED | exchange | WEX-7.3, WEX-11.3 |
| 404 | ISSUER_NOT_HERE | exchange, to a peer | WEX-7.6 |
| 502 | ISSUER_UNREACHABLE | exchange | WEX-7.5 |
| 502 | ISSUER_UNAVAILABLE | exchange | WEX-7.12 |
| 403 | NOT_YOUR_DOCUMENT | exchange | WEX-11.2 |
| 403 | ISSUER_NOT_YOURS | exchange, to a peer | WEX-11.13 |
| 404 | WALLET_NOT_FOUND | exchange | WEX-11.4 |
| 404 | WALLET_NOT_HERE | exchange, to a peer | WEX-11.15 |
| 502 | WALLET_UNREACHABLE | exchange | WEX-11.6 |
| 502 | WALLET_UNAVAILABLE | exchange | WEX-11.11 |
| 502 | PARTICIPANT_UNAVAILABLE | exchange | the next receiver stopped being an active participant between the routing check and the call |
| 403 | NOT_ACCREDITED | issuer | WEX-8.6, WEX-9.5, WEX-10.5 |
| 422 | UNKNOWN_SEARCH_FIELD, SEARCH_FIELD_MISSING | issuer | WEX-8.7 |
| 404 | DOCUMENT_NOT_FOUND | issuer | WEX-9.4, WEX-10.5 |
| 410 | DOCUMENT_REVOKED | issuer | WEX-9.6 |
| 404 | NO_SUCH_ADDRESS | wallet | WEX-11.18 |
| 422 | DOCUMENT_NOT_GENUINE | wallet | WEX-11.18 |
| 403 | NOT_THEIR_DOCUMENT | wallet | WEX-11.18 |
| 410 | DOCUMENT_EXPIRED | wallet | WEX-11.18 |
- WEX-15.1 A caller of
/v1/find,/v1/fetchor/v1/statusMUST expect the issuer’s codes and a peer exchange’s codes as well as its home exchange’s, because they are passed back unchanged (WEX-7.11). A caller of/v1/pushMUST expect the wallet’s codes and a peer exchange’s codes, for the same reason (WEX-11.10). - WEX-15.2 A wallet that cannot fetch the issuer’s keys while checking a pushed document answers
502 ISSUER_UNAVAILABLE. The exchange answers that as502 WALLET_UNAVAILABLE(WEX-11.11), so the issuer sees an unknown outcome and may push again.
16. Worked example
Asha Rao uses Satchel. Her wallet address is asha@satchel. Satchel (wallet:satchel) and the Transport Department (issuer:transport) are both members of NDX (exchange:ndx). India registered DRVLC (Driving Licence) with issuer:transport accredited for it, searched by number and date_of_birth.
1. Find. Asha is signed in at Satchel and asks for her driving licence. Satchel asks its home exchange:
wallet:satchel -> exchange:ndx POST /v1/find
OCI-Signature: eyJhbGciOiJFZERTQSIsImtpZCI6ImsxIiwiaXNzIjoid2FsbGV0OnNhdGNoZWwiLCJpYXQiOjE3OTYwMjkyMDAsImh0bSI6IlBPU1QiLCJodHUiOiJodHRwczovL25keC5leGFtcGxlL3YxL2ZpbmQifQ..<signature>
{ "issuer": "issuer:transport", "doc_type": "DRVLC",
"search": { "number": "KA0120230001", "date_of_birth": "1990-04-12" },
"person": { "name": "Asha Rao" } }
The protected header decodes to {"alg":"EdDSA","kid":"k1","iss":"wallet:satchel","iat":1796029200,"htm":"POST","htu":"https://ndx.example/v1/find"}, where https://ndx.example is the base_url the registry lists for NDX.
NDX checks the signature, sees Satchel is its member and a wallet, logs (wallet:satchel, member, POST, /v1/find, issuer:transport, DRVLC), finds issuer:transport active, accredited for DRVLC and its own member, and calls it, signed as exchange:ndx, without issuer:
exchange:ndx -> issuer:transport POST /exchange/v1/find
{ "doc_type": "DRVLC", "search": { "number": "KA0120230001", "date_of_birth": "1990-04-12" },
"person": { "name": "Asha Rao" } }
The Transport Department answers, and NDX passes the answer back unchanged:
{ "documents": [ { "uri": "transport-DRVLC-KA0120230001", "doc_type": "DRVLC", "name": "Driving Licence",
"issued_on": "2023-01-10", "expires_on": "2043-01-09", "status": "active" } ] }
2. Fetch. Asha has connected her national identity at Satchel, so the wallet now sends her number too. The number shown is synthetic.
wallet:satchel -> exchange:ndx POST /v1/fetch
{ "uri": "transport-DRVLC-KA0120230001", "person": { "name": "Asha Rao", "national_id": "9999 0000 0001" } }
NDX reads issuer:transport and DRVLC from the URI, routes as before, and sends the same body to /exchange/v1/fetch. The answer comes back unchanged:
{ "uri": "transport-DRVLC-KA0120230001", "status": "active",
"document": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im9jaS1kb2Mrand0Iiwia2lkIjoiLi4uIn0.eyJpc3MiOiJpc3N1ZXI6dHJhbnNwb3J0IiwuLi59.<signature>",
"pdf": "JVBERi0xLjQK..." }
Had Ravi Menon’s wallet sent the same URI, the Transport Department would have answered 404 DOCUMENT_NOT_FOUND, and NDX would have passed that on.
3. Status.
wallet:satchel -> exchange:ndx -> issuer:transport POST /v1/status, then POST /exchange/v1/status
{ "uri": "transport-DRVLC-KA0120230001" }
{ "uri": "transport-DRVLC-KA0120230001", "status": "active" }
4. Push. Asha gave the Transport Department her wallet address. It sends her renewed licence:
issuer:transport -> exchange:ndx POST /v1/push
{ "to": "asha@satchel", "uri": "transport-DRVLC-KA0120260007", "document": "eyJ...", "pdf": "JVBERi0xLjQK..." }
NDX checks the caller is an issuer, that the URI is its own, that it is accredited for DRVLC, and that wallet:satchel is an active wallet and its member. It logs (issuer:transport, member, POST, /v1/push, issuer:transport, DRVLC) and sends the same body to Satchel at /exchange/v1/push. Satchel checks the document and answers 200. NDX answers the issuer:
{ "uri": "transport-DRVLC-KA0120260007", "to": "asha@satchel", "wallet": "wallet:satchel" }
Had nobody at Satchel had the handle asha, Satchel would have answered 404 NO_SUCH_ADDRESS, and the issuer would have received the same status, code and message.
5. Two exchanges. Suppose Satchel’s home were a second exchange, exchange:east. The find of step 1 goes wallet:satchel -> exchange:east at /v1/find, then exchange:east -> exchange:ndx at /peer/v1/find with the whole body including issuer, then exchange:ndx -> issuer:transport at /exchange/v1/find. Each exchange logs its own call. The push of step 4 goes issuer:transport -> exchange:ndx at /v1/push, exchange:ndx -> exchange:east at /peer/v1/push, then exchange:east -> wallet:satchel at /exchange/v1/push. If exchange:east were asked by a peer for an issuer that is not its member, it would answer 404 ISSUER_NOT_HERE.
6. An unknown outcome. If Satchel does not answer the push within the exchange’s wait, NDX answers 502 WALLET_UNAVAILABLE. The Transport Department records no delivery and pushes again later. Satchel keeps one copy however many times it arrives.
17. Security considerations
- Three doors, one relation each. A caller is never checked by hand: a path accepts one relation, read from the registry (§3). A member cannot use the peer door, a peer cannot use the members’ door, and an issuer or a wallet has one caller only. A compromised member can reach nothing but its own home exchange.
- The registry decides. Relations, issuer accreditation and addresses all come from the trust registry, cached for up to 60 seconds in the reference (WEX-4.9). A suspension takes that long to bite. A wrong
homeorbase_urlin the registry sends calls to the wrong place, so who may change an entry matters as much as any key. - An exchange is trusted for its own members. A receiving exchange cannot see which wallet a peer’s find or fetch is for: the call is signed by the peer and names no wallet. It relies on the peer having checked that its caller is a wallet (WEX-3.7). For a push it can check more: that the issuer belongs to the calling exchange (WEX-11.13).
- An exchange can read what it carries. Calls are signed hop by hop and not encrypted end to end. An exchange sees search values, the person’s name and number, and the document. WEX-12 forbids keeping them; nothing in the protocol makes it impossible. A changed document is caught by the issuer’s signature, which the wallet checks. A changed
personorsearchis not caught by anything. - Passed-back answers are the other side’s words. An answer under WEX-7.11 can carry whatever an issuer or a peer wrote. A wallet MUST check a found or fetched document itself (OCI-WALLET-3) and MUST NOT treat a passed-back message as its home exchange’s statement.
- A URI is not a secret. Status can be asked by any wallet for any URI (WEX-10.1), and tells only how the document stands. Reading a document needs the person it was issued to (WEX-9.4).
- Replay. A signature is good for 120 seconds and carries no
jti(OCI-PAY-2 §4). A replayed find, fetch or status reads again. A replayed push delivers a document the wallet already holds. - Refusals that say little. An issuer answers a wrong person, a wrong issuer and a missing document alike (WEX-9.4), and a find with no match as an empty list (WEX-8.8), so a caller cannot probe which documents exist.
404 NO_SUCH_ADDRESSdoes tell an issuer whether a handle exists at a wallet provider. - Size. A push may carry up to 20,000,000 characters of printable copy. A receiver should bound request bodies at its edge before it verifies the signature over them.
18. Privacy considerations
- The person chooses the wallet and starts every find and fetch. A wallet sends an issuer only the search answers the person gave, their name, and their national ID number once they have connected it (OCI-WALLET-3).
- An exchange keeps no document, no URI, no search value, no name, no number and no wallet address (WEX-12.1). Its log says which wallet provider asked which issuer about which document type, and when (WEX-13.2). That still shows how often a provider’s people ask a given issuer for a given type.
- The log never ties a call to a person. An exchange cannot answer “which documents did Asha fetch”. The person sees their own history in their wallet (OCI-WALLET-3).
- A push tells the exchange, in passing, that an issuer has a document for an address. It is not written down (WEX-13.3).
- An issuer learns which exchange called it, never which wallet provider: the call it receives is signed by its home exchange and names no wallet.
- With two exchanges, both see the whole call. Each logs its own entry under the same limits.
- Error messages name participants and document types only (WEX-12.4).
19. Changes this spec needs in other OCI specs
- OCI-1 Trust Registry. A participant entry needs
home: the id of a member’s home exchange. The registry should refuse ahomethat is not an activedoc_exchange; today only the services check. It also needs the kindsdoc_exchange,doc_issuer,walletanddoc_requester, and the list of document types with accredited issuers (both specified in OCI-WALLET-1). - OCI-PAY-2 Payments Switch. §4 should become a shared definition of
OCI-Signaturethat both families cite, with the receiver’s address rule (WEX-4.3) and the error codes settled once. OCI-PAY-2 already notes that its switch and its bank connectors answer different codes for the same failure; this family uses the connector’s set (SIGNATURE_MISSING,FORBIDDEN_PARTICIPANT,502 TRUST_REGISTRY_UNAVAILABLE). - OCI-0 Core. CORE-9.1 gives another error body. This spec uses the body of OCI-PAY-2 (WEX-5.2), the same exception OCI-PAY-2 records.
- OCI-0 Core.
OCI-SignatureusesEdDSA, the same exception to CORE-5 that OCI-PAY-2 records.
20. Conformance
An exchange conforms to OCI-WALLET-2 0.1 when it passes the tests of ociwallet-exchange-api. An issuer’s side conforms when it passes the exchange-facing tests of ociwallet-issuer-api. A wallet’s side conforms when it passes the exchange-facing tests of ociwallet-api.
| Clauses | Checked by |
|---|---|
| WEX-3.2 to 3.6, 3.11 | exchange test_exchange.py: test_a_member_is_answered_and_the_call_is_logged, test_another_exchange_is_a_peer_in_the_same_country_or_another, test_a_caller_with_no_business_here_is_refused, test_a_member_that_moves_to_another_exchange_is_no_longer_served, test_it_cannot_call_itself |
| WEX-3.7, 3.8 | exchange test_routing.py: test_only_a_wallet_finds_and_fetches, test_a_member_cannot_use_the_peer_door_nor_a_peer_the_members; test_push.py: test_who_may_push_what |
| WEX-3.9, 3.10 | issuer test_issuer.py: test_anyone_but_the_home_exchange_is_refused, test_moving_to_another_exchange_changes_who_may_call, test_its_calls_go_to_its_home_exchange_signed, test_without_an_active_home_exchange_it_calls_nobody; issuer test_documents.py: test_only_the_home_exchange_may_find_fetch_or_ask_status; wallet test_national.py: test_only_the_home_exchange_may_push |
| WEX-4.1 to 4.9 | exchange test_exchange.py: test_an_unsigned_call_is_refused, test_the_signature_is_checked_before_the_body, test_someone_elses_key_does_not_verify, test_a_changed_body_does_not_verify, test_an_old_or_future_signature_is_refused, test_a_signature_for_a_different_request_is_refused, test_a_malformed_signature_header_is_refused, test_a_suspended_or_unknown_caller_is_refused, test_an_exchange_that_is_suspended_or_unregistered_serves_nobody, test_a_rotated_key_is_picked_up_by_one_refetch, test_the_registry_being_down_is_not_the_callers_fault. The issuer and the wallet repeat them in test_issuer.py and test_wallet.py. |
| WEX-5.3, 6.1 | exchange test_exchange.py: test_a_signed_body_that_is_not_a_hello_is_a_validation_error; test_routing.py: test_a_malformed_call_is_a_validation_error |
| WEX-6.2 to 6.4 | exchange test_exchange.py: test_a_member_is_answered_and_the_call_is_logged, test_check_greets_its_members_and_every_other_exchange_with_signed_calls |
| WEX-7.1, 7.4, 7.9 | exchange test_routing.py: test_a_call_for_a_member_issuer_goes_straight_to_it |
| WEX-7.2, 7.3 | test_an_unknown_issuer_is_not_found, test_a_suspended_issuer_is_not_found, test_an_issuer_is_only_asked_for_types_it_is_accredited_for |
| WEX-7.5, 7.6 | test_a_call_for_another_exchanges_issuer_goes_through_that_exchange, test_a_peers_call_is_delivered_only_to_a_member_here, test_an_issuer_with_no_active_home_exchange_cannot_be_reached |
| WEX-7.10 | exchange test_push.py: test_a_person_may_carry_a_national_id_and_it_is_passed_on |
| WEX-7.11 to 7.13 | exchange test_routing.py: test_the_issuers_own_refusal_is_passed_on_unchanged, test_an_issuer_that_fails_is_unavailable_not_the_callers_fault, test_a_document_passes_through_untouched |
| WEX-8.5 to 8.9 | issuer test_documents.py: test_find_matches_every_field_given, test_find_says_what_it_found_and_no_more, test_find_takes_only_the_types_search_fields, test_find_is_only_for_types_the_issuer_is_accredited_for, test_a_document_is_found_and_fetched_only_by_the_person_it_was_issued_to |
| WEX-9.4 to 9.7, 10.4, 10.5 | issuer test_documents.py: test_a_document_that_is_not_this_issuers_is_not_found, test_a_malformed_uri_is_a_validation_error, test_suspend_restore_and_revoke, test_an_issued_document_is_the_certificate_signed_by_the_issuer, test_the_printable_copy_is_a_pdf_in_the_issuers_storage |
| WEX-11.1 to 11.7, 11.9 | exchange test_push.py: test_a_push_for_a_member_wallet_goes_straight_to_it, test_a_push_for_another_exchanges_wallet_goes_through_that_exchange, test_who_may_push_what, test_an_address_at_no_wallet_provider |
| WEX-11.10, 11.11 | test_the_wallets_refusal_reaches_the_issuer_and_a_failure_does_not |
| WEX-11.13 to 11.15 | test_a_push_from_another_exchange_is_delivered_to_a_member_wallet, test_a_push_never_takes_two_hops, test_who_may_push_what |
| WEX-11.16 to 11.18 | wallet test_national.py: test_a_pushed_document_lands_in_the_persons_wallet, test_only_the_home_exchange_may_push, test_an_address_nobody_has, test_a_pushed_document_is_checked_like_any_other, test_a_connected_person_is_not_sent_someone_elses_document |
| WEX-11.19 | issuer test_documents.py: test_a_document_is_pushed_to_a_wallet_address_through_the_home_exchange, test_a_push_the_wallet_refuses_is_said_as_it_was_given |
| WEX-12.x, 13.x | exchange test_routing.py: test_the_log_never_holds_what_was_searched_for_or_which_document; test_push.py: test_the_log_holds_neither_the_address_nor_the_document |
Each service states how it meets every clause in its conformance.json, and tests/test_clauses.py in each names its tests by clause. The current results are in conformance/results/.
21. Open questions
- Who a peer’s call is for.
/peer/v1/find,/peer/v1/fetchand/peer/v1/statusdo not name the wallet that asked, and the receiving exchange cannot check that a wallet asked at all. Should the first exchange name its member in the body, as/peer/v1/pushlets the receiver check the issuer (WEX-11.13)? The logs of the two exchanges cannot be joined to one call today. - Which exchanges are peers. Any active
doc_exchangein the registry is a peer, in any country (WEX-3.3). Plan 012 expected peering across countries only between exchanges the two countries recognise (OCI-1 §6). The code has no such check. - What the log is for. It records accepted calls before routing, not refusals and not outcomes (WEX-13.4). It has no retention rule and no way to read it but the database. Should refusals be logged? Should the outcome class (answered, refused, unknown) be? Who may read it?
- Both exchanges log, neither tells the person. No part of the exchange log reaches the person. Should a person be able to ask an exchange who asked for their document types? The log holds nothing that identifies them, so today it cannot answer.
409on a push. WEX-11.10 passes a wallet’s409back, but the reference wallet answers no409on a push. Keep it reserved, or drop it?- A
200from the wallet is not read. The exchange takes any200with a JSON body as delivery and builds its own answer (WEX-11.9). Should it check the wallet’suri,toandwallet? - A passed-back refusal is not read either. For find, fetch and status, any JSON body with status
403,404,410or422goes back as it is (WEX-7.11), even if it is not an error body. For a push the exchange rebuilds the error fromcodeandmessage(WEX-11.10). Should the two behave alike? - A peer’s refusals look like the issuer’s.
404 ISSUER_NOT_HERE,403 ISSUER_NOT_YOURSand404 WALLET_NOT_HEREmean the two exchanges read the registry differently at that moment. They reach the wallet or the issuer as refusals (WEX-14.2), though a repeat a minute later may succeed. Should they be answered as unknown? - Nested waits. Every hop waits 15 seconds in the reference, and so does the member. With two exchanges, the member can give up while the second hop is still waiting. Should the waits shrink hop by hop, or the first hop’s be longer?
- Idempotency for push. A push has no key (WEX-4.11) and relies on the wallet keeping one copy per URI. Is that enough once a document can be re-issued under the same URI, or pushed to several wallets?
- Find semantics on the wire. WEX-8.7 and WEX-8.8 state what the issuer answers. How a search value is compared with a document (the reference ignores case and spacing) is in OCI-WALLET-1 §4 (WDOC-4.3, WDOC-4.4).
- Hello and unknown members. Find, fetch, status and push refuse unknown members (WEX-5.3). Hello accepts and ignores them. Accidental, or the forward-compatible choice for a check call?
personwithnational_id: null. An exchange accepts it and passes on apersonwithout the member (WEX-7.10). Should a wallet be told to omit it rather than sendnull?- Suspended exchanges and cached entries. A registry change shows after up to 60 seconds (WEX-4.9). Should a suspension be pushed to exchanges, or the cache be shorter for
status? - Size of a push. 20,000,000 characters of base64 in one signed JSON body is heavy to sign, verify and hold in memory at each hop. Should the printable copy travel another way?
- Not in this version. Requesters: a
doc_requesteris a member and can say hello, and nothing else. Sharing a document with a requester under consent would be OCI-WALLET-4. Also not built: connecting a wallet at an issuer (a second factor or a QR code), which is how an issuer would learn the address it pushes to; copies encrypted so that only the person can read them, which would change WEX-11.8 and the security notes; pushing again after a document is re-issued; listing issuers or document types through an exchange (they are read from the trust registry); and searching every exchange for a person whose wallet is not registered.
Changes
| Version | Date | What changed |
|---|---|---|
| 0.1.0 | 2026-11-30 | First version, extracted from the reference implementation. |