Package Exports
- abstractpay
- abstractpay/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (abstractpay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AbstractPay
The chain-abstracted payment SDK for seamless stablecoin transactions across blockchains.
AbstractPay is a powerful, Convenient, and secure SDK designed to make cross-chain payments simple and fast. With AbstractPay, developers can enable users to spend and accept fragmented stablecoins from any chain to any chain in seconds.
Features
- Fast: Payments complete in seconds.
- Convenient: Let your users pay with any stablecoin, from any chain.
- Simple: Pay in a single step.
- Secure: No extra counterparties—AbstractPay never holds user funds.
Use Cases
- For Developers:
Onboard users from any chain and allow them to always pay using fragmented stablecoins. - For DApps:
Accept payments from any chain and provide users with the simplicity of always paying in stablecoins.
Installation
Install AbstractPay using npm:
npm install abstractpay
Usage
Initialize the SDK
For API key access, reach out to us directly via direct message or email.
import { AbstractPay } from 'abstractpay';
const sdk = new AbstractPay({
apiKey: '<your-api-key>',
baseUrl: '<api-base-url>',
testnet: boolean // optional, default: false
});
// Set the owner's wallet for signing transactions
sdk.setOwnerWallet(wallet);
One click payment
const paymentParams = {
receiverAddress: '<recipient-address>',
amount: '2.2', // amount in dollars
destinationChain: 421614, // Arbitrum sepolia
destinationToken: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', // USDC
orderType: 'p2p',
senderAddress: '<sender-address>',
};
const order = await sdk.pay(paymentParams);
console.log('Order Created:', order);
Other Example Workflow
- User Initiates Payment: The DApp calls
initialisePayment
to create a payment order. - User Signs the Order: The SDK handles signing of the order hash.
- Payment Submission: The signed payment is submitted to AbstractPay's backend for processing.
License
AbstractPay is licensed under the MIT License. See LICENSE for details.
Feedback & Contributions
We welcome contributions to improve AbstractPay! Feel free to open issues, suggest features, or submit pull requests.
For any questions or feedback, contact us at hello@cray.network.