Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e257be
Remove Complete message type per updated TAIP specifications
pelle Jun 26, 2025
ac070a8
Update TAIPs submodule to latest and add implementation TASKS.md
pelle Aug 13, 2025
65ed755
Phase 1: Add schema.org Organization fields to Agent and Party
pelle Aug 13, 2025
86764cb
Phase 2: Update AuthorizationRequired message to match TAIP-4 specifi…
pelle Aug 13, 2025
30ae8d6
Fix code formatting with cargo fmt
pelle Aug 13, 2025
20b7be6
Update TAIPs submodule with latest test vectors
pelle Aug 13, 2025
85267c7
feat: Add settlement address and product attribute support per update…
pelle Aug 13, 2025
6d02f8a
docs: Update CHANGELOG with settlement address and product attribute …
pelle Aug 13, 2025
1802c02
docs: Update TASKS.md with completed implementation items
pelle Aug 13, 2025
eb0c475
chore: Bump all crates to version 0.5.0
pelle Aug 14, 2025
e9f0fc5
docs: Update documentation for v0.5.0 release
pelle Aug 14, 2025
13d181e
feat: Add TAIP-17 Composable Escrow support
pelle Aug 14, 2025
09c98c0
feat: Add MCP tools for TAIP-14, TAIP-15, and TAIP-17 messages
pelle Aug 14, 2025
8113853
feat: Add MCP resources for database schema and enhanced TAP message …
pelle Aug 14, 2025
890cadf
style: Apply cargo fmt formatting to resources.rs
pelle Aug 14, 2025
8a5636c
style: Apply cargo fmt formatting across workspace
pelle Aug 14, 2025
249938f
docs: Update README with new MCP resources documentation
pelle Aug 14, 2025
238ef7b
fix: Resolve compiler warnings in transaction_tools.rs
pelle Aug 15, 2025
765fedf
chore: Update dependencies to latest compatible versions
pelle Aug 15, 2025
28aa0d1
fix: Individual schema lookup now returns only requested schema
pelle Aug 15, 2025
525c6f5
feat: Add payment link support with Out-of-Band invitations to tap-agent
pelle Aug 15, 2025
1ece11a
fix: Resolve compilation errors and update deprecated APIs
pelle Aug 15, 2025
0ba672e
chore: Update TAIPs submodule to latest version
pelle Aug 16, 2025
87a5022
test: Fix race condition in test_create_transfer_tool and improve tes…
pelle Aug 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .claude/agents/tap-expert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: tap-expert
description: Use proactively to retrieve and extract relevant information about the TAP spec and TAIPs
tools: Read, Grep, Glob
color: blue
---

You are a specialized information retrieval agent for TAP message specs. Your role is to efficiently fetch and extract relevant content from the TAP spec repo while avoiding duplication.

## Core Responsibilities

1. **Context Check First**: Determine if requested information is already in the main agent's context
2. **Selective Reading**: Extract only the specific sections or information requested
3. **Smart Retrieval**: Use grep to find relevant sections rather than reading entire files
4. **Return Efficiently**: Provide only new information not already in context

## Supported File Types

- Specs: @prds/taips/TAIPs/*.md
- Product docs: @prds/taips/*.md
- Typescript types: @prds/taips/packages/typescript/src/*.ts
- JSON schemas: @prds/taips/schemas/**/*.json

## Workflow

1. Check if the requested information appears to be in context already
2. If not in context, locate the requested file(s)
3. Extract only the relevant sections
4. Return the specific information needed

## Output Format

For new information:
```
📄 Retrieved from [file-path]

[Extracted content]
```

For already-in-context information:
```
✓ Already in context: [brief description of what was requested]
```

## Smart Extraction Examples

Request: "Get the pitch from mission-lite.md"
→ Extract only the pitch section, not the entire file

Request: "Find CSS styling rules from code-style.md"
→ Use grep to find CSS-related sections only

Request: "Get Task 2.1 details from tasks.md"
→ Extract only that specific task and its subtasks

## Important Constraints

- Never return information already visible in current context
- Extract minimal necessary content
- Use grep for targeted searches
- Never modify any files
- Keep responses concise

Example usage:
- "Get the product pitch from mission-lite.md"
- "Find Ruby style rules from code-style.md"
- "Extract Task 3 requirements from the password-reset spec"
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2025-08-14

### Added

#### Composable Escrow Support (TAIP-17)
- New `Escrow` message for holding assets on behalf of parties
- New `Capture` message for releasing escrowed funds
- Support for both cryptocurrency assets and fiat currencies in escrows
- Automatic expiry handling for escrows
- Support for payment guarantees, asset swaps, and conditional payments
- Multiple agent roles including dedicated EscrowAgent role
- Full validation ensuring exactly one EscrowAgent per escrow

#### Settlement Address Enhancements
- PayTo URI support (RFC 8905) for traditional payment systems (IBAN, ACH, BIC, UPI)
- `SettlementAddress` enum supporting both CAIP-10 blockchain addresses and PayTo URIs
- `fallbackSettlementAddresses` field in Payment messages for flexible payment options
- Full validation and serialization for PayTo URIs

#### Invoice Product Attributes
- Schema.org/Product attributes to LineItem (name, image, url)
- LineItem builder pattern for easier construction
- Support for product metadata in invoice line items

#### Agent and Party Enhancements
- Schema.org Organization fields for Agent and Party structures
- Added fields: name, url, logo, description, email, telephone, serviceUrl
- Builder methods and accessor functions for all new fields
- Backward compatible with existing IVMS101 data

### Changed
- AuthorizationRequired message updated to match TAIP-4 specification
- Field `url` renamed to `authorizationUrl`
- Field `expires` now required
- Added optional `from` field

## [0.4.0] - 2025-06-17

### Added
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.4.0"
version = "0.5.0"
edition = "2021"
authors = ["Pelle Braendgaard <pelle@notabene.id>"]
description = "Rust implementation of the Transaction Authorization Protocol (TAP)"
Expand All @@ -33,7 +33,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Async runtime - minimal features for WASM compatibility
tokio = { version = "1.32.0", default-features = false, features = [
tokio = { version = "1.47.1", default-features = false, features = [
"sync",
"macros",
"io-util",
Expand All @@ -43,10 +43,10 @@ tokio = { version = "1.32.0", default-features = false, features = [

# Error handling
thiserror = "1.0"
anyhow = "1.0.75"
anyhow = "1.0.99"

# UUID generation with WASM support
uuid = { version = "1.16.0", features = ["v4", "serde", "fast-rng", "js"] }
uuid = { version = "1.18.0", features = ["v4", "serde", "fast-rng", "js"] }

# Time handling with serde support
chrono = { version = "0.4", features = ["serde"] }
Expand Down Expand Up @@ -76,7 +76,7 @@ web-sys = { version = "0.3", features = [
getrandom = { version = "0.2", features = ["js"] }

# Cryptography and encoding
base64 = "0.21"
base64 = "0.22"
multibase = "0.9"

# Testing
Expand All @@ -85,7 +85,7 @@ assert_matches = "1.5.0"
wasm-bindgen-test = "0.3"

# Async traits
async-trait = "0.1"
async-trait = "0.1.89"

# Common profile settings for all crates in the workspace
[profile.release]
Expand Down
71 changes: 69 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

This repository contains a Rust implementation of the Transaction Authorization Protocol (TAP), a decentralized protocol for securely authorizing blockchain transactions before they are submitted on-chain. TAP-RS targets payment-related use cases, Travel Rule compliance, and secure transaction coordination.

**New in this release**: Full Travel Rule support with IVMS101 data model implementation, automatic customer data extraction, and compliance workflow automation.
**New in v0.5.0**:
- PayTo URI support (RFC 8905) for traditional payment systems (IBAN, ACH, BIC, UPI)
- Fallback settlement addresses for flexible payment options
- Schema.org Product attributes for invoice line items
- Enhanced Agent and Party structures with Organization fields

## Project Structure

Expand Down Expand Up @@ -116,12 +120,14 @@ See individual tool READMEs for detailed usage instructions.

## Key Features

- **Complete TAP Implementation**: Support for all TAP message types (Transfer, Authorize, Reject, Settle, Complete, etc.)
- **Complete TAP Implementation**: Support for all TAP message types (Transfer, Authorize, Reject, Settle, Cancel, Revert, etc.)
- **DIDComm v2 Integration**: Secure, encrypted messaging with authenticated signatures
- **Chain Agnostic Identifiers**: Implementation of CAIP-2 (ChainID), CAIP-10 (AccountID), and CAIP-19 (AssetID)
- **Settlement Address Flexibility**: Support for both blockchain (CAIP-10) and traditional payment systems (PayTo URI)
- **Multiple DID Methods**: Support for did:key, did:web, did:pkh, and more
- **Travel Rule Compliance**: Full IVMS 101.2023 implementation with automatic data attachment
- **Customer Data Management**: Automatic extraction and storage of party information from TAP messages
- **Enhanced Metadata Support**: Schema.org Organization fields for Agents/Parties and Product attributes for invoices
- **Command-line Tools**: Utilities for DID generation, resolution, and key management
- **Modular Agent Architecture**: Flexible identity and cryptography primitives
- **High-Performance Message Routing**: Efficient node implementation for high-throughput environments
Expand Down Expand Up @@ -179,6 +185,67 @@ let message = transfer.to_didcomm_with_route(

See the [tap-msg README](./tap-msg/README.md) for more detailed examples.

## New in v0.5.0: Settlement Address Flexibility

TAP-RS now supports both blockchain and traditional payment settlement addresses:

```rust
use tap_msg::settlement_address::{SettlementAddress, PayToUri};
use tap_msg::Payment;

// Traditional payment system addresses using PayTo URI (RFC 8905)
let iban_address = SettlementAddress::from_string(
"payto://iban/DE75512108001245126199".to_string()
)?;

let ach_address = SettlementAddress::from_string(
"payto://ach/122000247/111000025".to_string()
)?;

// Blockchain addresses using CAIP-10
let eth_address = SettlementAddress::from_string(
"eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb".to_string()
)?;

// Payment with fallback settlement addresses
let payment = Payment::builder()
.amount("100.00".to_string())
.currency_code("USD".to_string())
.merchant(Party::new("did:example:merchant"))
.fallback_settlement_addresses(vec![
iban_address, // Primary: traditional bank transfer
eth_address, // Fallback: Ethereum address
])
.build();
```

## Enhanced Metadata Support

Agents, Parties, and LineItems now support rich metadata:

```rust
use tap_msg::{Agent, LineItem};

// Agent with Organization metadata
let agent = Agent::new("did:example:agent", "PaymentProcessor", "did:example:merchant")
.with_name("Example Payment Services")
.with_url("https://example.com")
.with_email("support@example.com")
.with_telephone("+1-555-0100");

// LineItem with Product attributes
let line_item = LineItem::builder()
.id("item-001".to_string())
.description("Premium Coffee Beans".to_string())
.quantity(2.0)
.unit_price(25.99)
.line_total(51.98)
.name("Colombian Arabica Premium Blend".to_string())
.image("https://example.com/products/coffee.jpg".to_string())
.url("https://example.com/products/coffee".to_string())
.build();
```

## Typed Messages for Type Safety

TAP-RS now supports generic typed messages for compile-time type safety while maintaining 100% backward compatibility:
Expand Down
Loading