UNPKG

@solana/pay

Version:

`@solana/pay` is a JavaScript library for facilitating commerce on Solana by using a token transfer URL scheme. The URL scheme ensures that no matter the wallet or service used, the payment request must be created and interpreted in one standard way.

25 lines • 1.05 kB
import type { Address, Commitment, GetLatestBlockhashApi, Rpc, Transaction } from '@solana/kit'; /** * Thrown when a transaction response can't be fetched. */ export declare class FetchTransactionError extends Error { name: string; } /** * A compiled transaction with message bytes and signatures. */ export type FetchedTransaction = Transaction; /** * Fetch a transaction from a Solana Pay transaction request link. * * @param rpc - An RPC client supporting `getLatestBlockhash`. * @param account - Address of the account that may sign the transaction. * @param link - `link` in the [Solana Pay spec](https://github.com/solana-foundation/pay/blob/main/typescript/packages/solana-pay/spec/SPEC.md#link). * @param options - Options for `getLatestBlockhash`. * * @throws {FetchTransactionError} */ export declare function fetchTransaction(rpc: Rpc<GetLatestBlockhashApi>, account: Address, link: URL | string, { commitment }?: { commitment?: Commitment; }): Promise<FetchedTransaction>; //# sourceMappingURL=fetchTransaction.d.ts.map