sendSolanaPay method
Future<TransactionId>
sendSolanaPay({
- required Ed25519HDKeyPair payer,
- required Ed25519HDPublicKey recipient,
- required Decimal amount,
- Ed25519HDPublicKey? splToken,
- Iterable<
Ed25519HDPublicKey> ? reference, - String? memo,
- SignatureCallback? onSigned,
- Commitment commitment = Commitment.finalized,
Creates, signs and sends Solana Pay transaction from payer
to
recipient
.
If splToken
is null, the transaction will be in SOL.
Recipient is recipient
in the Solana Pay spec.
Amount is amount
in the Solana Pay spec.
Implementation
Future<TransactionId> sendSolanaPay({
required Ed25519HDKeyPair payer,
required Ed25519HDPublicKey recipient,
required Decimal amount,
Ed25519HDPublicKey? splToken,
Iterable<Ed25519HDPublicKey>? reference,
String? memo,
SignatureCallback? onSigned,
Commitment commitment = Commitment.finalized,
}) async =>
sendAndConfirmTransaction(
message: await createSolanaPayMessage(
payer: payer,
recipient: recipient,
amount: amount,
splToken: splToken,
reference: reference,
memo: memo,
commitment: commitment,
),
signers: [payer],
onSigned: onSigned ?? ignoreOnSigned,
commitment: commitment,
);