Skip to content

Commit e769007

Browse files
pelleclaude
andcommitted
Enhance TAIP-15 Agent Connection Protocol with additional transaction constraints
Add three new optional constraint fields to Connect messages: - allowedBeneficiaries: array of TAIP-6 Party objects for approved payment recipients - allowedSettlementAddresses: array of CAIP-10 addresses for approved settlement - allowedAssets: array of CAIP-19 asset identifiers for approved transaction assets Add comprehensive "Transaction Constraints" section explaining: - Constraint purposes (security, compliance, user control, automation) - Enforcement requirements and consequences - Four constraint categories (purpose, financial, party, technical) Update transaction validation requirements and enhance test examples. Add CAIP-10 and CAIP-19 references. Update TypeScript interfaces. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d99422d commit e769007

3 files changed

Lines changed: 108 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ This changelog focuses on:
1414
- Protocol structural changes
1515
- Breaking changes
1616

17+
## [2025-08-23]
18+
19+
### Enhanced
20+
- **TAIP-15 Agent Connection Protocol**: Enhanced transaction constraints for improved security and control
21+
- Added three new optional constraint fields to Connect messages:
22+
- `allowedBeneficiaries` - array of TAIP-6 Party objects for approved payment recipients
23+
- `allowedSettlementAddresses` - array of CAIP-10 addresses for approved settlement addresses
24+
- `allowedAssets` - array of CAIP-19 asset identifiers for approved transaction assets
25+
- Added comprehensive "Transaction Constraints" section explaining constraint purposes, enforcement requirements, and types
26+
- Updated transaction validation requirements to include new constraint checks
27+
- Enhanced test examples to demonstrate new constraint usage
28+
- Added CAIP-10 and CAIP-19 references for address and asset identifier standards
29+
1730
## [2025-08-21]
1831

1932
### Added

TAIPs/taip-15.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ status: Review
55
type: Standard
66
author: Pelle Braendgaard <pelle@notabene.id>
77
created: 2024-03-21
8-
updated: 2025-08-21
8+
updated: 2025-08-23
99
description: Establishes a protocol for creating secure, authorized connections between TAP agents with predefined transaction constraints and OAuth-style authorization flows. Enables persistent B2B integrations with transaction limits, purpose restrictions, and user control mechanisms for ongoing business relationships while maintaining robust risk management.
1010
requires: [2, 4, 6, 9, 13]
1111
---
@@ -57,6 +57,50 @@ The Agent Connection Protocol involves two distinct parties and their respective
5757

5858
This separation allows for complex B2B relationships where a service provider (requester) wants to act on behalf of their customer (principal) while maintaining clear accountability and authorization chains.
5959

60+
### Transaction Constraints
61+
62+
Transaction constraints are a fundamental security mechanism in the Agent Connection Protocol that define the boundaries and permissions for transactions performed through an established connection. These constraints serve multiple critical purposes:
63+
64+
**Security and Risk Management**: Constraints act as guardrails that prevent unauthorized or excessive transactions, protecting both parties from potential fraud, errors, or misuse of the connection. They establish clear limits on transaction amounts, frequencies, and purposes.
65+
66+
**Compliance and Governance**: Many organizations require specific controls over automated transactions to meet regulatory requirements, internal policies, or audit standards. Constraints provide a standardized way to encode these requirements into the connection itself.
67+
68+
**User Control and Transparency**: By clearly defining what actions can be performed through a connection, constraints give users visibility and control over how their funds or assets may be used by authorized agents.
69+
70+
**Automated Decision Making**: Constraints enable receiving agents to automatically approve transactions that fall within established parameters while flagging or rejecting those that exceed the agreed-upon limits.
71+
72+
#### Constraint Enforcement
73+
74+
Agents MUST enforce all specified constraints when processing transactions through an established connection. Failure to respect constraints constitutes a violation of the connection agreement and may result in:
75+
- Transaction rejection
76+
- Connection termination
77+
- Loss of trust between parties
78+
- Potential legal or regulatory consequences
79+
80+
#### Types of Constraints
81+
82+
The Agent Connection Protocol supports several categories of transaction constraints:
83+
84+
**Purpose Constraints**: Define what types of transactions are permitted through the connection.
85+
- `purposes` - Specific [TAIP-13] purpose codes that are allowed
86+
- `categoryPurposes` - Broader [TAIP-13] category purpose codes that encompass multiple specific purposes
87+
88+
**Financial Limits**: Set monetary boundaries on transaction amounts and frequencies.
89+
- `per_transaction` - Maximum amount for any single transaction
90+
- `per_day`, `per_week`, `per_month`, `per_year` - Cumulative limits over time periods
91+
- `currency` - The currency in which all limits are expressed
92+
93+
**Party Restrictions**: Control which entities can participate in transactions.
94+
- `allowedBeneficiaries` - Specific [TAIP-6] parties that can receive payments through this connection
95+
- This enables scenarios like approved vendor lists or restricted recipient sets
96+
97+
**Technical Restrictions**: Define technical parameters for transaction execution.
98+
- `allowedSettlementAddresses` - Specific [CAIP-10] blockchain addresses permitted for settlement
99+
- `allowedAssets` - Specific [CAIP-19] assets that can be transacted through this connection
100+
- These constraints enable precise control over which tokens and addresses can be used
101+
102+
Constraints work together to create a comprehensive authorization framework. For example, a connection might allow monthly subscription payments (`purposes: ["SUBS"]`) up to $100 per month (`limits: {"per_month": "100.00", "currency": "USD"}`) only to a specific merchant (`allowedBeneficiaries: [{"@id": "did:web:saas-provider.example"}]`) using only USDC tokens (`allowedAssets: ["eip155:1/erc20:0xA0b86a33E6441b7178bb7094b2c4b6e5066d68B7"]`).
103+
60104
### Connect Message
61105

62106
A message sent by an agent requesting connection to another agent:
@@ -80,6 +124,9 @@ A message sent by an agent requesting connection to another agent:
80124
- `per_month` - OPTIONAL string decimal amount
81125
- `per_year` - OPTIONAL string decimal amount
82126
- `currency` - REQUIRED string ISO 4217 currency code if limits are specified
127+
- `allowedBeneficiaries` - OPTIONAL array of [TAIP-6] Party objects representing parties that can receive payments through this connection
128+
- `allowedSettlementAddresses` - OPTIONAL array of [CAIP-10] addresses that are permitted for settlement through this connection
129+
- `allowedAssets` - OPTIONAL array of [CAIP-19] asset identifiers that can be transacted through this connection
83130
- `agreement` - OPTIONAL string URL pointing to terms of service or agreement between the principal and requesting agent
84131
- `expiry` - OPTIONAL timestamp in ISO 8601 format indicating when the connection request expires. After this time, if no authorization has occurred, the connection request should be considered invalid. This is distinct from the technical message expiry handled by the DIDComm `expires_time` header.
85132
- `attachments` - OPTIONAL array of [TAIP-2] message attachments containing transaction messages (such as [TAIP-3] Transfer or [TAIP-14] Payment messages) that should be authorized in the same context as the Connect request. When attachments are present, authorization of the Connect request also authorizes the attached transaction messages. This enables use cases like establishing recurring billing connections with an immediate first payment, or setting up trading permissions with an initial transaction. All attached transaction messages MUST respect the connection's defined constraints.
@@ -404,7 +451,25 @@ The following are example plaintext messages. See [TAIP-2] for how to sign the m
404451
"per_transaction": "10000.00",
405452
"per_day": "50000.00",
406453
"currency": "USD"
407-
}
454+
},
455+
"allowedBeneficiaries": [
456+
{
457+
"@id": "did:example:vendor-1",
458+
"name": "Approved Vendor 1"
459+
},
460+
{
461+
"@id": "did:example:vendor-2",
462+
"name": "Approved Vendor 2"
463+
}
464+
],
465+
"allowedSettlementAddresses": [
466+
"eip155:1:0x742d35Cc6e4dfE2eDFaD2C0b91A8b0780EDAEb58",
467+
"eip155:1:0x89abcdefabcdefabcdefabcdefabcdefabcdef12"
468+
],
469+
"allowedAssets": [
470+
"eip155:1/slip44:60",
471+
"eip155:1/erc20:0xA0b86a33E6441b7178bb7094b2c4b6e5066d68B7"
472+
]
408473
},
409474
"agreement": "https://b2b-service.com/terms/api-agreement",
410475
"expiry": "2024-03-22T15:00:00Z"
@@ -589,6 +654,9 @@ The receiving agent MUST:
589654
- Verify the amount is within the per-transaction and daily limits
590655
- Confirm the originator's `@id` matches the connection's `principal.@id` value
591656
- Verify the agent has permission to act for the specified principal
657+
- If `allowedBeneficiaries` is specified, confirm the beneficiary is in the approved list
658+
- If `allowedSettlementAddresses` is specified, confirm the settlement address is in the approved list
659+
- If `allowedAssets` is specified, confirm the transaction asset is in the approved list
592660
3. Process the transaction according to [TAIP-4] if all checks pass
593661

594662
### Example Connect with Attached Payment for Recurring Billing
@@ -681,12 +749,16 @@ In this example:
681749
* [TAIP-6] Transaction Parties
682750
* [TAIP-9] Proof of Relationship
683751
* [TAIP-13] Purpose Codes
752+
* [CAIP-10] Account ID Specification
753+
* [CAIP-19] Asset Type and Asset ID Specification
684754

685755
[TAIP-2]: ./taip-2 "TAP Messaging"
686756
[TAIP-4]: ./taip-4 "Transaction Authorization Protocol"
687757
[TAIP-6]: ./taip-6 "Transaction Parties"
688758
[TAIP-9]: ./taip-9 "Proof of Relationship"
689759
[TAIP-13]: ./taip-13 "Purpose Codes"
760+
[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 "Account ID Specification"
761+
[CAIP-19]: https://chainagnostic.org/CAIPs/caip-19 "Asset Type and Asset ID Specification"
690762

691763
## Copyright
692764

packages/typescript/src/tap.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,27 @@ export interface TransactionConstraints {
16661666
*/
16671667
currency: IsoCurrency;
16681668
};
1669+
1670+
/**
1671+
* Allowed beneficiaries for transactions
1672+
* Array of TAIP-6 Party objects representing parties that can receive payments through this connection
1673+
* Used to restrict transactions to specific approved recipients
1674+
*/
1675+
allowedBeneficiaries?: Party[];
1676+
1677+
/**
1678+
* Allowed settlement addresses
1679+
* Array of CAIP-10 addresses that are permitted for settlement through this connection
1680+
* Used to restrict settlements to specific approved blockchain addresses
1681+
*/
1682+
allowedSettlementAddresses?: CAIP10[];
1683+
1684+
/**
1685+
* Allowed assets for transactions
1686+
* Array of CAIP-19 asset identifiers that can be transacted through this connection
1687+
* Used to restrict transactions to specific approved tokens or assets
1688+
*/
1689+
allowedAssets?: CAIP19[];
16691690
}
16701691

16711692
/**

0 commit comments

Comments
 (0)