From 1fbae87983dce8ab828705e6efd1b3b141a11100 Mon Sep 17 00:00:00 2001 From: AlgoVoi Date: Tue, 4 Aug 2026 11:34:52 +0100 Subject: [PATCH 1/2] feat(samples): add human-present crypto-solana scenario (AP2 + Solana Pay reference binding) Signed-off-by: AlgoVoi --- .../a2a/human-present/crypto-solana/README.md | 143 ++++++++++++++++++ .../a2a/human-present/crypto-solana/run.sh | 132 ++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 code/samples/python/scenarios/a2a/human-present/crypto-solana/README.md create mode 100755 code/samples/python/scenarios/a2a/human-present/crypto-solana/run.sh diff --git a/code/samples/python/scenarios/a2a/human-present/crypto-solana/README.md b/code/samples/python/scenarios/a2a/human-present/crypto-solana/README.md new file mode 100644 index 00000000..16680b4d --- /dev/null +++ b/code/samples/python/scenarios/a2a/human-present/crypto-solana/README.md @@ -0,0 +1,143 @@ + + +# Agent Payments Protocol Sample: Human Present Purchases with On-Chain Solana USDC + +This sample demonstrates the A2A `ap2-extension` for a human-present transaction +where the buyer settles with on-chain USDC on Solana (or native SOL for +micropayments). It mirrors the existing `x402` scenario but uses Solana Pay +semantics (specifically the **`reference` pubkey** primitive) to bind the +settling transaction to a specific AP2 `PaymentMandate`. + +**Note:** This sample pairs with the separate `crypto-algo` human-present +scenario. Together they cover non-EVM settlement on Algorand and Solana as a +complement to the EVM-focused `x402` path. + +## Scenario + +Human-present flows are commerce flows where the user is present to confirm +purchase details. The user signs the `PaymentMandate` giving all parties high +confidence in the transaction. + +The Solana variant adds one additional primitive on top of the standard AP2 +mandate chain: + +### Solana Pay `reference` binding + +Solana has no native transaction memo field (unlike Algorand or Hedera), and +the SPL Memo Program is unreliable across wallets. Instead, Solana Pay defines +a `reference` pubkey mechanism: + +1. The merchant (or its Merchant Agent) generates a fresh, single-use ed25519 + keypair per checkout. +2. The public key is embedded in the Solana Pay URL: + + ```text + solana: + ?amount= + &spl-token= + &reference= + &label=