Skip to content

Commit fd2b0cd

Browse files
pelleclaude
andcommitted
Add serviceUrl field to Agent specification as DIDComm endpoint fallback
- Add serviceUrl to Agent attributes in TAIP-5 as optional DIDComm endpoint - Update TAIP-15 Connect message to clarify serviceUrl security requirements - Enhance TypeScript Agent interface with proper serviceUrl documentation - Update messages.md Agent data structure with serviceUrl field reference - Add DIDComm endpoint resolution guidance in agents.md - Update party and transaction documentation with schema.org enhancements - Specify security requirements: HTTPS only, DID document endpoints prioritized - Target use case: self-hosted and decentralized agents without reliable DID hosting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bd58396 commit fd2b0cd

7 files changed

Lines changed: 91 additions & 18 deletions

File tree

TAIPs/taip-15.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ A message sent by an agent requesting connection to another agent:
5151
- `@id` - REQUIRED string DID of the requesting agent. If the `agent` object is included, the `@id` MUST match the `from` field of the surrounding DIDComm message
5252
- `name` - OPTIONAL string human-readable name of the agent
5353
- `type` - OPTIONAL string type of agent (e.g. "ServiceAgent", "WalletAgent")
54-
- `serviceUrl` - OPTIONAL string URL for the agent's DIDComm endpoint
54+
- `serviceUrl` - OPTIONAL string URL for the agent's DIDComm endpoint. This field SHOULD only be used as a fallback when no DIDComm service endpoint is resolvable from the agent's DID document. This is particularly useful for self-hosted and decentralized agents that may not have reliable DID document hosting. For security purposes, this field SHOULD be ignored if a valid DIDComm service endpoint is already listed in the DID document
5555
- `principal` - REQUIRED [TAIP-6] Party object representing the party the agent acts on behalf of:
5656
- `@id` - REQUIRED string DID or IRI of the principal party
5757
- Additional attributes MAY be included as defined in [TAIP-6], such as country code, merchant category code, or other party metadata
@@ -273,6 +273,11 @@ sequenceDiagram
273273
- Authorization MUST be performed through secure, authenticated channels
274274
- Authorization URLs MUST use HTTPS and include CSRF protection
275275
- Connection identifiers should be unique and unpredictable
276+
- When using `serviceUrl` in the agent object:
277+
- The URL MUST use HTTPS for security
278+
- Agents MUST prioritize DIDComm service endpoints from the DID document over the `serviceUrl` field
279+
- The `serviceUrl` SHOULD only be used when no valid DIDComm service endpoint is resolvable from the DID document
280+
- Agents SHOULD validate that the `serviceUrl` actually belongs to the DID holder through appropriate verification mechanisms
276281

277282
## Rationale
278283

TAIPs/taip-5.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The following are the attributes of an object in the `agents` array:
8585
- `description` - OPTIONAL a string containing a description of the agent (based on [schema.org/Organization](https://schema.org/Organization))
8686
- `email` - OPTIONAL a string containing the agent's contact email address (based on [schema.org/Organization](https://schema.org/Organization))
8787
- `telephone` - OPTIONAL a string containing the agent's contact telephone number (based on [schema.org/Organization](https://schema.org/Organization))
88+
- `serviceUrl` - OPTIONAL a string URL for the agent's DIDComm endpoint. This field SHOULD only be used as a fallback when no DIDComm service endpoint is resolvable from the agent's DID document. Particularly useful for self-hosted and decentralized agents. For security purposes, this field SHOULD be ignored if a valid DIDComm service endpoint is already listed in the DID document
8889

8990
When using schema.org types in the `@type` field, implementations can leverage the rich vocabulary and tooling available for schema.org, enabling better interoperability with web standards and search engines.
9091

@@ -134,6 +135,15 @@ There are three primary ways of interacting with agents:
134135
- End-user-controlled software, such as self-hosted wallets, can receive [TAIP-2 DIDComm Messages][TAIP-2] in an interactive User Interface using [DIDComm Out of Band][DIDCommOOB]
135136
- Decentralized Protocol agents, such as DeFi protocols that can only communicate through blockchain transactions, possibly through an implementation of [CAIP-74]
136137

138+
### DIDComm Endpoint Resolution
139+
140+
TAP agents resolve DIDComm endpoints using the following priority order:
141+
142+
1. **DID Document Service Endpoints**: Primary method using the agent's DID document service section
143+
2. **Fallback Service URL**: Optional `serviceUrl` field in agent metadata when DID document endpoints are unavailable
144+
145+
The `serviceUrl` field is particularly useful for self-hosted and decentralized agents that may not have reliable DID document hosting infrastructure. For security purposes, agents MUST prioritize DID document service endpoints over the fallback `serviceUrl` when both are available, and SHOULD validate that the `serviceUrl` actually belongs to the DID holder through appropriate verification mechanisms.
146+
137147
### Identifying Agents
138148

139149
DID Methods, implement different ways of creating and modifying Decentralized Identifiers. The recommendation is to use the following two DID Methods:
@@ -640,6 +650,16 @@ As an example a message from `did:web:originator.vasp` proves that someone allow
640650

641651
As such internal and external trust tools need to be handled. This is out of scope of this proposal.
642652

653+
### Service URL Security
654+
655+
When using the optional `serviceUrl` field for DIDComm endpoint fallback:
656+
657+
- Agents MUST prioritize DID document service endpoints over `serviceUrl` when both are available
658+
- The `serviceUrl` MUST use HTTPS for secure communication
659+
- Agents SHOULD validate that the `serviceUrl` actually belongs to the DID holder through appropriate verification mechanisms
660+
- The `serviceUrl` SHOULD only be used when no valid DIDComm service endpoint is resolvable from the DID document
661+
- Implementations SHOULD log when fallback URLs are used for security monitoring purposes
662+
643663
## Privacy Considerations
644664
<!--Please add an explicit list of intra-actor assumptions and known risk factors if applicable. Any normative definition of an interface requires these to be implementable; assumptions and risks should be at both individual interaction/use-case scale and systemically, should the interface specified gain ecosystem-namespace adoption. -->
645665

agents.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ TAP agents can support multiple DID methods to enable flexible identity scenario
136136

137137
Additional DID methods can be supported based on specific implementation needs.
138138

139+
## Agent Metadata
140+
141+
TAP agents can include rich metadata based on schema.org/Organization standards to provide better identification and discovery:
142+
143+
- **Name**: Human-readable name of the agent organization
144+
- **URL**: Website address of the agent
145+
- **Logo**: URL to the agent's logo image for visual identification
146+
- **Description**: Textual description of the agent's services and capabilities
147+
- **Contact Information**: Email and telephone contact details
148+
- **Type Information**: JSON-LD type identifiers (typically "https://schema.org/Organization")
149+
150+
This metadata enhances the user experience by providing clear identification of service providers while maintaining compatibility with existing implementations.
151+
139152
## Agent-to-Agent Communication
140153

141154
Agents communicate with each other using the DIDComm v2 messaging protocol, which provides:
@@ -145,6 +158,15 @@ Agents communicate with each other using the DIDComm v2 messaging protocol, whic
145158
- **Asynchronous Messaging**: Messages can be sent and processed asynchronously
146159
- **Transport Flexibility**: Support for HTTPS, WebSockets, and other transport methods
147160

161+
### DIDComm Endpoint Resolution
162+
163+
TAP agents resolve DIDComm endpoints in the following priority order:
164+
165+
1. **DID Document Service Endpoints**: Primary method using the agent's DID document
166+
2. **Fallback Service URL**: Optional `serviceUrl` field in agent metadata when DID document endpoints are unavailable
167+
168+
The `serviceUrl` field is particularly useful for self-hosted and decentralized agents that may not have reliable DID document hosting. For security purposes, agents should prioritize DID document endpoints over the fallback service URL when both are available.
169+
148170
## Implementation Considerations
149171

150172
When designing TAP agents:
@@ -157,4 +179,6 @@ When designing TAP agents:
157179

158180
## Technical Integration
159181

160-
For technical details on agent data structures and message formats, see the [full message reference](/messages/#participant-management-messages).
182+
Agents can be enhanced with schema.org attributes to provide richer organizational metadata while maintaining backward compatibility. The schema.org vocabulary enables better integration with web standards and enhances user experience through clearer service provider identification.
183+
184+
For technical details on agent data structures, message formats, and the complete list of supported schema.org attributes, see the [full message reference](/messages/#participant-management-messages).

messages.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,20 +1399,17 @@ Represents a participant in a transaction (originator or beneficiary).
13991399
| Attribute | Type | Required | Status | Description |
14001400
|-----------|------|----------|---------|-------------|
14011401
| @id | string | Yes | Review ([TAIP-6]) | DID or IRI of the party |
1402-
| lei:leiCode | string | No | Draft ([TAIP-11]) | LEI code for legal entities. Must be a 20-character alpha-numeric string conforming to ISO 17442 |
1403-
| name | string | No | Review ([TAIP-6]) | Human-readable name |
1402+
| @type | string | No | Review ([TAIP-6]) | JSON-LD type identifier. Most commonly "https://schema.org/Organization" for institutional parties or "https://schema.org/Person" for individual parties |
1403+
| leiCode | string | No | Draft ([TAIP-11]) | LEI code for legal entities. Must be a 20-character alpha-numeric string conforming to ISO 17442 |
1404+
| name | string | No | Review ([TAIP-6]) | Human-readable name (based on schema.org/Organization or schema.org/Person) |
14041405
| nameHash | string | No | Draft ([TAIP-12]) | SHA-256 hash of the normalized name (uppercase, no whitespace) |
14051406
| mcc | string | No | Review ([TAIP-14]) | Merchant Category Code (ISO 18245) that identifies the type of business (e.g., "5411" for grocery stores) |
1407+
| url | string | No | Review ([TAIP-6]) | URL pointing to the party's website (based on schema.org/Organization) |
1408+
| logo | string | No | Review ([TAIP-6]) | URL pointing to the party's logo image (based on schema.org/Organization) |
1409+
| description | string | No | Review ([TAIP-6]) | Description of the party (based on schema.org/Organization) |
1410+
| email | string | No | Review ([TAIP-6]) | Contact email address (based on schema.org/Organization or schema.org/Person) |
1411+
| telephone | string | No | Review ([TAIP-6]) | Contact telephone number (based on schema.org/Organization or schema.org/Person) |
14061412

1407-
When including an LEI, the Party MUST include the appropriate JSON-LD context:
1408-
1409-
```json
1410-
{
1411-
"@context": { "lei": "https://schema.org/leiCode" },
1412-
"@id": "did:web:example.vasp.com",
1413-
"lei:leiCode": "5493001KJTIIGC8Y1R12"
1414-
}
1415-
```
14161413

14171414
If a customer (originator or beneficiary) is a legal entity and has an LEI, that LEI SHOULD be included in their Party. For institutions (VASPs), if they have an LEI, they MUST include it in their Party.
14181415

@@ -1475,6 +1472,9 @@ Each line item in the `lineItems` array contains:
14751472
|-----------|------|----------|---------|-------------|
14761473
| id | string | Yes | Review ([TAIP-16]) | Unique identifier for the line item within the invoice |
14771474
| description | string | Yes | Review ([TAIP-16]) | Description of the item or service |
1475+
| name | string | No | Review ([TAIP-16]) | Product name (based on schema.org/Product). If not provided, description serves as the display name |
1476+
| image | string | No | Review ([TAIP-16]) | URL to an image of the product (based on schema.org/Product) |
1477+
| url | string | No | Review ([TAIP-16]) | URL to the product page (based on schema.org/Product) |
14781478
| quantity | number | Yes | Review ([TAIP-16]) | Quantity of the item |
14791479
| unitCode | string | No | Review ([TAIP-16]) | Unit of measure code (e.g., "EA" for each, "KGM" for kilogram) |
14801480
| unitPrice | number | Yes | Review ([TAIP-16]) | Price per unit |
@@ -1535,8 +1535,16 @@ Represents a service involved in executing transactions.
15351535
| Attribute | Type | Required | Status | Description |
15361536
|-----------|------|----------|---------|-------------|
15371537
| @id | string | Yes | Review ([TAIP-5]) | DID of the agent |
1538+
| @type | string | No | Review ([TAIP-5]) | JSON-LD type identifier. Most commonly "https://schema.org/Organization" for institutional agents |
15381539
| role | string | No | Review ([TAIP-5]) | Role of the agent (e.g., "SettlementAddress", "SourceAddress", "CustodialService") |
15391540
| for | string or array of strings | No | Review ([TAIP-5]) | Reference to the Party or Parties this agent represents. Can be either a single DID string or an array of DID strings when the agent acts on behalf of multiple entities simultaneously |
1541+
| name | string | No | Review ([TAIP-5]) | Name of the agent organization (based on schema.org/Organization) |
1542+
| url | string | No | Review ([TAIP-5]) | URL pointing to the agent's website (based on schema.org/Organization) |
1543+
| logo | string | No | Review ([TAIP-5]) | URL pointing to the agent's logo image (based on schema.org/Organization) |
1544+
| description | string | No | Review ([TAIP-5]) | Description of the agent (based on schema.org/Organization) |
1545+
| email | string | No | Review ([TAIP-5]) | Contact email address (based on schema.org/Organization) |
1546+
| telephone | string | No | Review ([TAIP-5]) | Contact telephone number (based on schema.org/Organization) |
1547+
| serviceUrl | string | No | Review ([TAIP-15]) | Optional DIDComm service endpoint URL. Should only be used as a fallback when no DIDComm service endpoint is resolvable from the agent's DID document. Particularly useful for self-hosted and decentralized agents |
15401548

15411549
**Note:** Both `role` and `for` parameters are optional to support flexible agent configurations. The `role` parameter may be omitted when the agent's function is implicit from context or when using generic service agents. The `for` parameter may be omitted for standalone agents or when the relationship is established through other means.
15421550

packages/typescript/src/tap.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,13 @@ export interface Agent extends Partial<Organization> {
423423
policies?: Policies[];
424424

425425
/**
426-
* URL for requesting input by agent from a party.
426+
* Optional DIDComm service endpoint URL
427+
* This field SHOULD only be used as a fallback when no DIDComm service endpoint
428+
* is resolvable from the agent's DID document. Particularly useful for self-hosted
429+
* and decentralized agents. For security purposes, this field SHOULD be ignored
430+
* if a valid DIDComm service endpoint is already listed in the DID document.
431+
*
432+
* @example "https://agent.example.com/didcomm"
427433
*/
428434
serviceUrl?: IRI;
429435
}

parties.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,18 @@ Each party in TAP is identified through:
3838

3939
Parties in TAP may have various attributes that describe their characteristics:
4040

41-
1. **Name**: Human-readable identifier for the party
41+
1. **Name**: Human-readable identifier for the party (based on schema.org/Organization or schema.org/Person)
4242
2. **Legal Entity Identifier (LEI)**: For institutional parties, a globally recognized identifier
4343
3. **Merchant Category Code (MCC)**: Optional ISO 18245 code for merchant parties that identifies their business type (e.g., "5411" for grocery stores, "5812" for restaurants)
44-
4. **Contact Information**: Methods for reaching the party outside of the TAP protocol
45-
5. **Regulatory Status**: Information about regulatory compliance and licensing
44+
4. **Contact Information**: Methods for reaching the party outside of the TAP protocol, including:
45+
- **URL**: Website address (based on schema.org/Organization)
46+
- **Email**: Contact email address (based on schema.org/Organization or schema.org/Person)
47+
- **Telephone**: Contact phone number (based on schema.org/Organization or schema.org/Person)
48+
5. **Branding Information**: Visual identity elements:
49+
- **Logo**: URL to the party's logo image (based on schema.org/Organization)
50+
- **Description**: Textual description of the party (based on schema.org/Organization)
51+
6. **Type Information**: JSON-LD type identifiers (e.g., "https://schema.org/Organization" for institutions, "https://schema.org/Person" for individuals)
52+
7. **Regulatory Status**: Information about regulatory compliance and licensing
4653

4754
## Party Management Messages
4855

@@ -78,4 +85,6 @@ When designing party support in TAP:
7885

7986
## Technical Integration
8087

81-
For technical details on party data structures and message formats, see the [full message reference](/messages/#data-elements).
88+
Parties can be enhanced with schema.org attributes to provide richer metadata while maintaining compatibility with existing implementations. The schema.org vocabulary enables better interoperability with web standards and search engines.
89+
90+
For technical details on party data structures, message formats, and the complete list of supported schema.org attributes, see the [full message reference](/messages/#data-elements).

transactions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The **Payment** message type extends TAP to support merchant payment scenarios w
4444
- **Customer Experience Focus**: Designed for consumer-friendly payment flows with clear merchant identification
4545
- **Merchant Classification**: Supports ISO 18245 Merchant Category Codes (MCC) for business type identification (e.g., restaurants, grocery stores)
4646
- **Flexible Settlement**: Supports flexible asset selection through the `supportedAssets` field, allowing customers to choose their preferred payment method
47+
- **Fallback Settlement Options**: Includes `fallbackSettlementAddresses` field supporting both blockchain (CAIP-10) and traditional payment systems (RFC 8905 PayTo URIs) for redundancy
4748
- **Invoice Support**: Includes comprehensive invoice functionality as defined in [TAIP-16](/TAIPs/taip-16.md), supporting detailed line items, tax information, and payment terms
4849
- **Policy Support**: Can include policy requirements (e.g., RequirePresentation) for customer information needed for the transaction
4950

0 commit comments

Comments
 (0)