@swig-wallet/paymaster-core
v1.0.1
Published
Core paymaster client for Solana gasless transactions.
Readme
@swig-wallet/paymaster-core
Core paymaster client for Solana gasless transactions.
Installation
npm install @swig-wallet/paymaster-core
# or
bun install @swig-wallet/paymaster-coreUsage
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);API
PaymasterClient
Constructor:
new PaymasterClient(config: PaymasterConfig)Methods:
isPaymasterFeePayer(serializedTx: SerializedTransaction): booleansignSerializedTransaction(serializedTx: SerializedTransaction): Promise<SerializedTransaction>signAndSendSerializedTransaction(serializedTx: SerializedTransaction): Promise<string>
See the main README for full documentation.
License
AGPL-3.0
