Skip to content

Solana Pay integration #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chainsona
Copy link

@chainsona chainsona commented May 28, 2025

Problem

Gill lacked Solana Pay support, preventing developers from creating payment URLs and merchant integrations.

Summary of Changes

Adds comprehensive Solana Pay support with a zero-dependency implementation built from scratch.

Core Implementation:

  • Types - Clean interfaces for transfer/transaction requests with TypeScript support
  • Functions - Complete Solana Pay spec implementation using decimal amounts
  • Features - URL creation, parsing, validation, QR codes, and reference tracking

Key Functions:

  • createTransferRequestURL() - SOL and SPL token payments
  • createTransactionRequestURL() - Interactive payment flows
  • parseSolanaPayURL() - Extract payment details from URLs
  • validateSolanaPayURL() - Robust URL validation
  • toQRCodeURL() - QR code generation for mobile wallets

Examples:
Four progressive examples (01-basic.ts through 04-wallet.ts) demonstrating usage patterns from basic transfers to complete wallet integration.

Technical Details:

  • Zero external dependencies - uses only gill's utilities and standard web APIs
  • Decimal amount support per Solana Pay specification
  • Full TypeScript support with gill's Address types
  • Concise 140-line implementation with natural, readable code

Fixes #127

Copy link

changeset-bot bot commented May 28, 2025

⚠️ No Changeset found

Latest commit: 5486769

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 28, 2025

@chainsona is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@chainsona chainsona force-pushed the features-solana-pay branch 2 times, most recently from 0055c37 to 2fe6136 Compare May 28, 2025 09:50
@chainsona chainsona force-pushed the features-solana-pay branch from 2fe6136 to 471c315 Compare May 28, 2025 09:51
@nickfrosty
Copy link
Collaborator

nickfrosty commented May 28, 2025

Your code feels heavily ai generated and will not be accepted.
installing and importing the original solana pay package and web3js defeats the purpose

- Zero-dependency implementation with full spec compliance
- Transfer & transaction requests with TypeScript support
- URL validation, parsing, QR helpers, reference tracking
- 4 progressive examples with comprehensive documentation
@chainsona
Copy link
Author

I understand your concern. I use AI to generate supporting content around the actual code implementation (eg. documentation, inline comments, test case).

Here a new implementation, with no external dependencies to other solana libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] add Solana Pay support
2 participants