diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index fea1b9c1..cfeddead 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -4,6 +4,11 @@ on: pull_request: branches: [main] +permissions: + contents: read + statuses: write + pull-requests: write + jobs: build: name: Lint Code Base @@ -11,20 +16,22 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: fetch-depth: 0 + persist-credentials: false - name: Lint Code Base - uses: super-linter/super-linter/slim@v8 + uses: super-linter/super-linter/slim@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0 env: DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} LOG_LEVEL: WARN SHELLCHECK_OPTS: -e SC1091 -e 2086 VALIDATE_ALL_CODEBASE: false - FILTER_REGEX_EXCLUDE: "^(\\.github/|\\.vscode/|code/samples/).*|CODE_OF_CONDUCT.md|CHANGELOG.md" + FILTER_REGEX_EXCLUDE: "^(\\.github/|\\.vscode/|code/samples/|code/web-client/).*|CODE_OF_CONDUCT.md|CHANGELOG.md" VALIDATE_BIOME_FORMAT: false + VALIDATE_BIOME_LINT: false VALIDATE_PYTHON_BLACK: false VALIDATE_PYTHON_FLAKE8: false VALIDATE_PYTHON_ISORT: false 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=