Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ Available command-line tools:
# Authorize a transaction
tap-cli action authorize --transaction-id <TX_ID>

# Create a payment request
tap-cli transaction payment --amount 99.99 --merchant did:key:z6Mk... --currency USD

# Request an exchange (TAIP-18)
tap-cli transaction exchange --from-assets USD --to-assets eip155:1/erc20:0x... \
--from-amount 1000 --requester did:key:z6Mk...

# Manage agents on a transaction (TAIP-5)
tap-cli agent-mgmt add-agents --transaction-id <TX_ID> --agents '[...]'

# Manage customers and generate IVMS101 data
tap-cli customer create --customer-id did:key:z6Mk... --profile '{"@type":"Person","name":"Alice"}'
tap-cli customer ivms101 --customer-id did:key:z6Mk...
Expand Down Expand Up @@ -153,7 +163,7 @@ See individual tool READMEs for detailed usage instructions.

## Key Features

- **Complete TAP Implementation**: Support for all TAP message types (Transfer, Authorize, Reject, Settle, Cancel, Revert, etc.)
- **Complete TAP Implementation**: Support for all TAP message types (Transfer, Payment, Connect, Escrow, Exchange, Quote, Authorize, Reject, Settle, Cancel, Revert, AddAgents, RemoveAgent, ReplaceAgent, UpdatePolicies, and more)
- **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)
Expand Down
2 changes: 1 addition & 1 deletion prds/taips
Submodule taips updated 43 files
+1 −0 .gitignore
+1 −0 .mdlrc
+102 −42 CHANGELOG.md
+3 −0 Gemfile
+15 −0 Gemfile.lock
+1 −1 README.md
+2 −2 TAIPs/taip-1.md
+106 −24 TAIPs/taip-14.md
+277 −53 TAIPs/taip-15.md
+690 −0 TAIPs/taip-18.md
+605 −0 TAIPs/taip-19.md
+52 −6 TAIPs/taip-3.md
+2 −2 TAIPs/taip-4.md
+13 −8 _includes/blurb.html
+4 −0 _layouts/default.html
+28 −0 assets/css/main.css
+88 −2 developers.md
+1 −1 index.html
+315 −42 messages.md
+205 −0 packages/typescript/CHANGELOG.md
+523 −2 packages/typescript/README.md
+363 −685 packages/typescript/package-lock.json
+17 −4 packages/typescript/package.json
+615 −0 packages/typescript/src/arbitraries.ts
+1 −0 packages/typescript/src/index.ts
+478 −0 packages/typescript/src/nameHash.test.ts
+207 −17 packages/typescript/src/nameHash.ts
+608 −35 packages/typescript/src/tap.ts
+1,315 −0 packages/typescript/src/validator.test.ts
+500 −0 packages/typescript/src/validator.ts
+82 −35 schemas/data-structures/transaction-constraints.json
+31 −30 schemas/messages/connect.json
+112 −0 schemas/messages/exchange.json
+89 −0 schemas/messages/quote.json
+15 −0 schemas/messages/transfer.json
+11 −5 test-vectors/connect/invalid-missing-constraints.json
+33 −8 test-vectors/connect/valid-b2b-connect.json
+10 −0 test-vectors/escrow/valid-escrow.json
+1 −1 test-vectors/out-of-band/valid-connect-oob.json
+11 −5 test-vectors/payment-request/valid-payment-fiat.json
+11 −5 test-vectors/payment-request/valid-payment.json
+7 −2 test-vectors/payment-request/valid-payto-invoice.json
+57 −11 transactions.md
2 changes: 2 additions & 0 deletions tap-agent/examples/multi_agent_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ fn main() -> Result<()> {
TapAgent_::new(&beneficiary_vasp_did, "beneficiaryVASP", beneficiary_party),
],
settlement_id: None,
expiry: None,
transaction_value: None,
memo: Some("Multi-agent transfer example with dynamic agent addition".to_string()),
connection_id: None,
metadata: HashMap::new(),
Expand Down
11 changes: 8 additions & 3 deletions tap-agent/examples/payment_link_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,14 @@ fn create_payment_message(
)],

supported_assets: Some(vec![
AssetId::from_str("eip155:1/erc20:0xA0b86991c53D94fa4C0bCBf0C1C4DF2F15F1b7A8").unwrap(), // USDC Ethereum
AssetId::from_str("eip155:137/erc20:0x2791Bca1f2de4661ED88A30C2A8A6b5E7C54fD3A")
.unwrap(), // USDC Polygon
tap_msg::message::payment::SupportedAsset::Simple(
AssetId::from_str("eip155:1/erc20:0xA0b86991c53D94fa4C0bCBf0C1C4DF2F15F1b7A8")
.unwrap(),
), // USDC Ethereum
tap_msg::message::payment::SupportedAsset::Simple(
AssetId::from_str("eip155:137/erc20:0x2791Bca1f2de4661ED88A30C2A8A6b5E7C54fD3A")
.unwrap(),
), // USDC Polygon
]),

fallback_settlement_addresses: Some(vec![
Expand Down
2 changes: 2 additions & 0 deletions tap-agent/examples/secure_transfer_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ fn create_transfer_message(
amount: "100.0".to_string(),
agents: vec![settlement_agent],
settlement_id: None,
expiry: None,
transaction_value: None,
memo: Some("Secure example transfer".to_string()),
connection_id: None,
metadata: HashMap::new(),
Expand Down
2 changes: 2 additions & 0 deletions tap-agent/examples/transfer_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ fn create_transfer_message(
amount: "100.0".to_string(),
agents: vec![settlement_agent],
settlement_id: None,
expiry: None,
transaction_value: None,
memo: Some("Example transfer".to_string()),
connection_id: None,
metadata: HashMap::new(),
Expand Down
98 changes: 96 additions & 2 deletions tap-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ tap-cli transaction transfer \
| `--beneficiary` | Yes | Beneficiary DID |
| `--agents` | No | Agents as JSON array |
| `--memo` | No | Optional memo |
| `--expiry` | No | ISO 8601 expiry timestamp |
| `--transaction-value` | No | Fiat equivalent as `amount:currency` (e.g., `1000.00:USD`) |

#### `transaction payment` — TAIP-14 Payment Request

Expand All @@ -118,8 +120,31 @@ tap-cli transaction payment \
--merchant did:key:z6MkMerchant... \
--currency USD \
--memo "Order #5678"

# With expiry and invoice
tap-cli transaction payment \
--amount 99.99 \
--merchant did:key:z6MkMerchant... \
--asset eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
--expiry "2026-12-31T23:59:59Z" \
--invoice-url "https://merchant.example.com/invoices/5678" \
--fallback-addresses eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
```

| Flag | Required | Description |
|------|----------|-------------|
| `--amount` | Yes | Payment amount |
| `--merchant` | Yes | Merchant DID |
| `--asset` | No* | CAIP-19 asset identifier |
| `--currency` | No* | ISO 4217 currency code (e.g., USD) |
| `--agents` | No | Agents as JSON array |
| `--memo` | No | Optional memo |
| `--expiry` | No | ISO 8601 expiry timestamp |
| `--invoice-url` | No | Invoice URL (TAIP-16) |
| `--fallback-addresses` | No | Comma-separated fallback settlement addresses (CAIP-10) |

\* One of `--asset` or `--currency` must be specified.

#### `transaction connect` — TAIP-15 Connection Request

```bash
Expand All @@ -128,13 +153,24 @@ tap-cli transaction connect \
--for did:key:z6MkParty... \
--role SourceAgent

# With transaction limits
# With transaction limits and constraints
tap-cli transaction connect \
--recipient did:key:z6MkRecipient... \
--for did:key:z6MkParty... \
--constraints '{"max_amount":"10000","daily_limit":"50000"}'
--constraints '{"max_amount":"10000","daily_limit":"50000","allowed_assets":["eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}' \
--expiry "2027-01-01T00:00:00Z" \
--agreement "https://example.com/terms"
```

| Flag | Required | Description |
|------|----------|-------------|
| `--recipient` | Yes | Recipient agent DID |
| `--for` | Yes | Party DID this connection is for |
| `--role` | No | Agent role (e.g., SourceAgent) |
| `--constraints` | No | Constraints JSON (limits, allowed_beneficiaries, allowed_settlement_addresses, allowed_assets) |
| `--expiry` | No | ISO 8601 expiry timestamp |
| `--agreement` | No | URL to terms of service or agreement |

#### `transaction escrow` — TAIP-17 Escrow Request

```bash
Expand All @@ -160,6 +196,37 @@ tap-cli transaction capture \
--settlement-address eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
```

#### `transaction exchange` — TAIP-18 Exchange Request

```bash
tap-cli transaction exchange \
--from-assets eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
--to-assets eip155:137/erc20:0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 \
--from-amount 1000.00 \
--requester did:key:z6MkRequester...

# With a specific provider
tap-cli transaction exchange \
--from-assets eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
--to-assets eip155:137/erc20:0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 \
--to-amount 999.50 \
--requester did:key:z6MkRequester... \
--provider did:key:z6MkProvider...
```

#### `transaction quote` — TAIP-18 Quote Response

```bash
tap-cli transaction quote \
--exchange-id <EXCHANGE_TX_ID> \
--from-asset eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
--to-asset eip155:137/erc20:0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 \
--from-amount 1000.00 \
--to-amount 999.50 \
--provider did:key:z6MkProvider... \
--expires "2026-06-30T12:00:00Z"
```

#### `transaction list` — Query Transactions

```bash
Expand Down Expand Up @@ -230,6 +297,33 @@ tap-cli action revert \
--reason "Fraudulent transaction"
```

### `agent-mgmt` — Agent & Policy Management within Transactions

Manage agents and policies on existing transactions (TAIP-5, TAIP-7).

```bash
# Add agents to a transaction
tap-cli agent-mgmt add-agents \
--transaction-id <TX_ID> \
--agents '[{"@id":"did:key:z6MkNew...","role":"ComplianceOfficer","for":"did:key:z6MkParty..."}]'

# Remove an agent from a transaction
tap-cli agent-mgmt remove-agent \
--transaction-id <TX_ID> \
--agent-to-remove did:key:z6MkOldAgent...

# Replace an agent in a transaction
tap-cli agent-mgmt replace-agent \
--transaction-id <TX_ID> \
--original did:key:z6MkOldAgent... \
--new-agent '{"@id":"did:key:z6MkNewAgent...","role":"SourceAgent","for":"did:key:z6MkParty..."}'

# Update transaction policies
tap-cli agent-mgmt update-policies \
--transaction-id <TX_ID> \
--policies '[{"@type":"RequireAuthorization"}]'
```

### `comm` — Communication

```bash
Expand Down
Loading