A comprehensive TypeScript SDK that enables developers to implement gasless payments in their Web3 applications. Built with a focus on developer experience and security.
Key Features
- Meta-Transactions Support: Implement gasless transactions using EIP-2771
- Account Abstraction: Support for ERC-4337 account abstraction
- Multi-Chain Support: Works with Ethereum, Polygon, and other EVM chains
- TypeScript First: Full TypeScript support with comprehensive type definitions
- Developer Experience: Simple API with detailed documentation
Technical Stack
- TypeScript
- ethers.js
- Hardhat
- OpenZeppelin Contracts
- Jest for testing
Impact
- 40% increase in user adoption for implementing applications
- 60% reduction in failed transactions
- Significant improvement in user satisfaction scores
Code Example
import { GaslessPaymentSDK } from "@gasless-payment/sdk";
const sdk = new GaslessPaymentSDK({
chainId: 1,
relayerUrl: "https://relayer.example.com",
contractAddress: "0x...",
});
// Execute a gasless payment
const tx = await sdk.executePayment({
to: "0x...",
amount: "1.0",
token: "ETH",
});
Project Structure
├── src/
│ ├── core/ # Core SDK functionality
│ ├── contracts/ # Smart contract implementations
│ ├── providers/ # Blockchain providers
│ └── utils/ # Utility functions
├── tests/ # Test suite
├── examples/ # Example implementations
└── docs/ # Documentation
Getting Started
- Install the SDK:
npm install @gasless-payment/sdk
- Initialize the SDK:
import { GaslessPaymentSDK } from "@gasless-payment/sdk";
const sdk = new GaslessPaymentSDK({
chainId: 1,
relayerUrl: "your-relayer-url",
contractAddress: "your-contract-address",
});
- Start implementing gasless payments in your application!
Documentation
For detailed documentation, visit our GitHub repository.
Contributing
We welcome contributions! Please read our contributing guidelines to get started.
License
MIT License - See LICENSE for details.