Core paymaster client for Solana gasless transactions.
npm install @swig-wallet/paymaster-coreCore paymaster client for Solana gasless transactions.
``bash`
npm install @swig-wallet/paymaster-coreor
bun install @swig-wallet/paymaster-core
`typescript
import { PaymasterClient } from '@swig-wallet/paymaster-core';
const client = new PaymasterClient({
apiKey: 'your-api-key',
paymasterPubkey: 'YourPaymasterPublicKey...',
baseUrl: 'https://paymaster-api.example.com',
network: 'mainnet',
});
// Sign a serialized transaction
const signedTx = await client.signSerializedTransaction(serializedTx);
// Sign and send
const signature = await client.signAndSendSerializedTransaction(serializedTx);
`
Constructor:
`typescript`
new PaymasterClient(config: PaymasterConfig)
Methods:
- isPaymasterFeePayer(serializedTx: SerializedTransaction): booleansignSerializedTransaction(serializedTx: SerializedTransaction): Promise
- signAndSendSerializedTransaction(serializedTx: SerializedTransaction): Promise
-
See the main README for full documentation.
AGPL-3.0