Skip to content

Commit 4b693f4

Browse files
pelleclaude
andcommitted
Update test vectors for recent protocol changes
- Update AuthorizationRequired test vectors to reference TAIP-4 (moved from TAIP-15) - Add test vectors for TAIP-17 Escrow messages with valid and invalid examples - Add test vectors demonstrating PayTo URI support (RFC 8905) for traditional banking - Transfer with PayTo URIs for IBAN accounts - Payment request with ACH/wire PayTo URIs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2f8e503 commit 4b693f4

6 files changed

Lines changed: 155 additions & 2 deletions

File tree

test-vectors/authorization-required/invalid-missing-url.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"purpose": "Validates that authorization required messages must include an authorization URL",
44
"shouldPass": false,
55
"version": "1.0.0",
6-
"taips": ["taip-2", "taip-15"],
6+
"taips": ["taip-2", "taip-4"],
77
"message": {
88
"id": "98765432-e89b-12d3-a456-426614174002",
99
"type": "https://tap.rsvp/schema/1.0#AuthorizationRequired",

test-vectors/authorization-required/valid-authorization-required.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"purpose": "Validates an authorization required message with URL and expiry",
44
"shouldPass": true,
55
"version": "1.0.0",
6-
"taips": ["taip-2", "taip-15"],
6+
"taips": ["taip-2", "taip-4"],
77
"message": {
88
"id": "98765432-e89b-12d3-a456-426614174001",
99
"type": "https://tap.rsvp/schema/1.0#AuthorizationRequired",
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"description": "Invalid escrow request missing beneficiary",
3+
"purpose": "Validates that escrow messages must include a beneficiary",
4+
"shouldPass": false,
5+
"version": "1.0.0",
6+
"taips": ["taip-2", "taip-17"],
7+
"message": {
8+
"id": "550e8400-e29b-41d4-a716-446655440001",
9+
"type": "https://tap.rsvp/schema/1.0#Escrow",
10+
"from": "did:web:buyer.example",
11+
"to": ["did:web:escrow-service.example"],
12+
"created_time": 1709654400,
13+
"body": {
14+
"@context": "https://tap.rsvp/schema/1.0",
15+
"@type": "https://tap.rsvp/schema/1.0#Escrow",
16+
"asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
17+
"amount": "1000.00",
18+
"originator": {
19+
"@type": "Party",
20+
"@id": "did:web:buyer.example",
21+
"name": "Buyer Corp",
22+
"account": "eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1"
23+
},
24+
"conditions": {
25+
"releaseOn": "2024-03-10T00:00:00Z"
26+
}
27+
}
28+
},
29+
"expectedResult": {
30+
"valid": false,
31+
"error": {
32+
"type": "ValidationError",
33+
"message": "Escrow message must include a beneficiary"
34+
}
35+
}
36+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"description": "Valid escrow request with conditions",
3+
"purpose": "Validates an escrow message with release conditions and expiry",
4+
"shouldPass": true,
5+
"version": "1.0.0",
6+
"taips": ["taip-2", "taip-17"],
7+
"message": {
8+
"id": "550e8400-e29b-41d4-a716-446655440000",
9+
"type": "https://tap.rsvp/schema/1.0#Escrow",
10+
"from": "did:web:buyer.example",
11+
"to": ["did:web:escrow-service.example"],
12+
"created_time": 1709654400,
13+
"expires_time": 1709740800,
14+
"body": {
15+
"@context": "https://tap.rsvp/schema/1.0",
16+
"@type": "https://tap.rsvp/schema/1.0#Escrow",
17+
"asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
18+
"amount": "1000.00",
19+
"originator": {
20+
"@type": "Party",
21+
"@id": "did:web:buyer.example",
22+
"name": "Buyer Corp",
23+
"account": "eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1"
24+
},
25+
"beneficiary": {
26+
"@type": "Party",
27+
"@id": "did:web:seller.example",
28+
"name": "Seller Inc",
29+
"account": "eip155:1:0x5aAeb6053f3E94C9b9A09f33669435E7Ef1BeAed"
30+
},
31+
"conditions": {
32+
"releaseOn": "2024-03-10T00:00:00Z",
33+
"requiresAuthorization": true,
34+
"authorizers": ["did:web:arbiter.example"]
35+
},
36+
"expires": "2024-03-15T00:00:00Z"
37+
}
38+
},
39+
"expectedResult": {
40+
"valid": true
41+
}
42+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"description": "Valid payment request with PayTo URI for traditional banking",
3+
"purpose": "Validates payment request with RFC 8905 PayTo URI for bank transfer",
4+
"shouldPass": true,
5+
"version": "1.0.0",
6+
"taips": ["taip-2", "taip-14"],
7+
"message": {
8+
"id": "987e4567-e89b-12d3-a456-426614174020",
9+
"type": "https://tap.rsvp/schema/1.0#Payment",
10+
"from": "did:web:merchant.example",
11+
"to": ["did:web:customer.example"],
12+
"created_time": 1709654400,
13+
"expires_time": 1709740800,
14+
"body": {
15+
"@context": "https://tap.rsvp/schema/1.0",
16+
"@type": "https://tap.rsvp/schema/1.0#Payment",
17+
"currency": "USD",
18+
"amount": "1250.00",
19+
"payee": {
20+
"@type": "Party",
21+
"@id": "did:web:merchant.example",
22+
"name": "Merchant Services Inc",
23+
"account": "payto://ach/122000661/1234567890?receiver-name=Merchant%20Services%20Inc"
24+
},
25+
"reference": "ORDER-2024-03-001",
26+
"memo": "Payment for consulting services",
27+
"due_date": "2024-03-31",
28+
"settlement_address": "payto://ach/122000661/1234567890",
29+
"fallback_addresses": [
30+
"payto://wire/122000661/1234567890"
31+
]
32+
}
33+
},
34+
"expectedResult": {
35+
"valid": true
36+
}
37+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"description": "Valid transfer with PayTo URI for traditional bank settlement",
3+
"purpose": "Validates transfer message with RFC 8905 PayTo URI settlement address",
4+
"shouldPass": true,
5+
"version": "1.0.0",
6+
"taips": ["taip-2", "taip-3"],
7+
"message": {
8+
"id": "123e4567-e89b-12d3-a456-426614174010",
9+
"type": "https://tap.rsvp/schema/1.0#Transfer",
10+
"from": "did:web:originator.example",
11+
"to": ["did:web:beneficiary.example"],
12+
"created_time": 1709654400,
13+
"expires_time": 1709740800,
14+
"body": {
15+
"@context": "https://tap.rsvp/schema/1.0",
16+
"@type": "https://tap.rsvp/schema/1.0#Transfer",
17+
"currency": "EUR",
18+
"amount": "5000.00",
19+
"originator": {
20+
"@type": "Party",
21+
"@id": "did:web:originator.example",
22+
"name": "European Sender Corp",
23+
"account": "payto://iban/DE75512108001245126199?receiver-name=European%20Sender%20Corp"
24+
},
25+
"beneficiary": {
26+
"@type": "Party",
27+
"@id": "did:web:beneficiary.example",
28+
"name": "UK Receiver Ltd",
29+
"account": "payto://iban/GB33BUKB20201555555555?receiver-name=UK%20Receiver%20Ltd"
30+
},
31+
"settlement_address": "payto://iban/GB33BUKB20201555555555",
32+
"memo": "Invoice payment #INV-2024-001"
33+
}
34+
},
35+
"expectedResult": {
36+
"valid": true
37+
}
38+
}

0 commit comments

Comments
 (0)