Skip to content

Commit 985a444

Browse files
pelleclaude
andcommitted
Fix test vectors to match JSON schema requirements
- Fixed escrow test vectors to include required 'agents' field and use 'expiry' instead of 'conditions' - Fixed transfer test vector to use 'asset' instead of 'currency' and include required 'agents' field - Fixed payment test vector to use 'merchant' instead of 'payee' and include required 'agents' field - Corrected field names to match schema: 'settlementAddress' and 'fallbackSettlementAddresses' - Removed non-schema fields from payment test vector 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b2ed508 commit 985a444

4 files changed

Lines changed: 40 additions & 18 deletions

File tree

test-vectors/escrow/invalid-missing-beneficiary.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@
2121
"name": "Buyer Corp",
2222
"account": "eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1"
2323
},
24-
"conditions": {
25-
"releaseOn": "2024-03-10T00:00:00Z"
26-
}
24+
"expiry": "2024-03-15T00:00:00Z",
25+
"agents": [
26+
{
27+
"@type": "Agent",
28+
"@id": "did:web:escrow-service.example",
29+
"role": "EscrowAgent",
30+
"name": "Trusted Escrow Service"
31+
}
32+
]
2733
}
2834
},
2935
"expectedResult": {

test-vectors/escrow/valid-escrow.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@
2828
"name": "Seller Inc",
2929
"account": "eip155:1:0x5aAeb6053f3E94C9b9A09f33669435E7Ef1BeAed"
3030
},
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"
31+
"expiry": "2024-03-15T00:00:00Z",
32+
"agents": [
33+
{
34+
"@type": "Agent",
35+
"@id": "did:web:escrow-service.example",
36+
"role": "EscrowAgent",
37+
"name": "Trusted Escrow Service"
38+
}
39+
]
3740
}
3841
},
3942
"expectedResult": {

test-vectors/payment-request/valid-payto-invoice.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@
1616
"@type": "https://tap.rsvp/schema/1.0#Payment",
1717
"currency": "USD",
1818
"amount": "1250.00",
19-
"payee": {
19+
"merchant": {
2020
"@type": "Party",
2121
"@id": "did:web:merchant.example",
2222
"name": "Merchant Services Inc",
2323
"account": "payto://ach/122000661/1234567890?receiver-name=Merchant%20Services%20Inc"
2424
},
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": [
25+
"settlementAddress": "payto://ach/122000661/1234567890",
26+
"fallbackSettlementAddresses": [
3027
"payto://wire/122000661/1234567890"
28+
],
29+
"agents": [
30+
{
31+
"@type": "Agent",
32+
"@id": "did:web:payment-gateway.example",
33+
"role": "PaymentProcessor",
34+
"name": "US Payment Gateway"
35+
}
3136
]
3237
}
3338
},

test-vectors/transfer/valid-with-payto.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"body": {
1515
"@context": "https://tap.rsvp/schema/1.0",
1616
"@type": "https://tap.rsvp/schema/1.0#Transfer",
17-
"currency": "EUR",
17+
"asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
1818
"amount": "5000.00",
1919
"originator": {
2020
"@type": "Party",
@@ -28,8 +28,16 @@
2828
"name": "UK Receiver Ltd",
2929
"account": "payto://iban/GB33BUKB20201555555555?receiver-name=UK%20Receiver%20Ltd"
3030
},
31-
"settlement_address": "payto://iban/GB33BUKB20201555555555",
32-
"memo": "Invoice payment #INV-2024-001"
31+
"settlementAddress": "payto://iban/GB33BUKB20201555555555",
32+
"memo": "Invoice payment #INV-2024-001",
33+
"agents": [
34+
{
35+
"@type": "Agent",
36+
"@id": "did:web:payment-processor.example",
37+
"role": "PaymentProcessor",
38+
"name": "European Payment Processor"
39+
}
40+
]
3341
}
3442
},
3543
"expectedResult": {

0 commit comments

Comments
 (0)