import { ClientWithAirdrop, ClientWithPayer, ExtendedClient, Lamports, TransactionSigner } from '@solana/kit'; /** * Sets the provided `TransactionSigner` as the `payer` property on the client. * * @param payer - The `TransactionSigner` to set as the payer. * * @deprecated Use `payer` from `@solana/kit-plugin-signer` instead. * ```ts * import { createClient } from '@solana/kit'; * import { payer } from '@solana/kit-plugin-signer'; * * const client = createClient().use(payer(mySigner)); * ``` */ export declare function payer(payer: TransactionSigner): (client: T) => { [K in keyof (Omit & { payer: TransactionSigner; })]: (Omit & { payer: TransactionSigner; })[K]; }; /** * Generates a new `KeyPairSigner` and sets it as the `payer` property on the client. * * @deprecated Use `generatedPayer` from `@solana/kit-plugin-signer` instead. * ```ts * import { createClient } from '@solana/kit'; * import { generatedPayer } from '@solana/kit-plugin-signer'; * * const client = await createClient().use(generatedPayer()); * ``` */ export declare function generatedPayer(): (client: T) => Promise<{ [K in keyof (Omit & { payer: import("@solana/kit").KeyPairSigner; })]: (Omit & { payer: import("@solana/kit").KeyPairSigner; })[K]; }>; /** * Generates a new `KeyPairSigner`, funds it with the specified * amount of lamports using the client's `airdrop` function, * and sets it as the `payer` property on the client. * * @param amount - The amount of lamports to airdrop to the generated payer. * * @deprecated Use `generatedPayerWithSol` from `@solana/kit-plugin-signer` instead. * ```ts * import { createClient, lamports } from '@solana/kit'; * import { generatedPayerWithSol } from '@solana/kit-plugin-signer'; * * const client = await createClient() * .use(generatedPayerWithSol(lamports(10_000_000_000n))); * ``` */ export declare function generatedPayerWithSol(amount: Lamports): (client: T) => Promise<{ [K in keyof (Omit & { payer: import("@solana/kit").KeyPairSigner; })]: (Omit & { payer: import("@solana/kit").KeyPairSigner; })[K]; }>; /** * Reads a JSON file containing the byte array of a keypair, * creates a `KeyPairSigner` from those bytes, and sets it * as the `payer` property on the client. * * @param path - The file path to the JSON file containing the keypair bytes. * * @deprecated Use `payerFromFile` from `@solana/kit-plugin-signer` instead. * ```ts * import { createClient } from '@solana/kit'; * import { payerFromFile } from '@solana/kit-plugin-signer'; * * const client = await createClient().use(payerFromFile('path/to/keypair.json')); * ``` */ export declare function payerFromFile(path: string): (client: T) => Promise<{ [K in keyof (Omit & { payer: import("@solana/kit").KeyPairSigner; })]: (Omit & { payer: import("@solana/kit").KeyPairSigner; })[K]; }>; /** * Uses the provided `TransactionSigner` as the `payer` if one is given. * Otherwise, generates a new `KeyPairSigner`, funds it with 100 SOL * using the client's `airdrop` function, and sets it as the `payer`. * * This is useful when you want to optionally accept a payer from the * caller but fall back to a generated and funded payer for convenience * (e.g. in testing or local development). * * @param explicitPayer - An optional `TransactionSigner` to use as the payer. * When `undefined`, a new payer is generated and airdropped 100 SOL. * * @deprecated Use `payer` and/or `generatedPayerWithSol` from `@solana/kit-plugin-signer` instead. * ```ts * import { createClient, lamports } from '@solana/kit'; * import { solanaRpcConnection, rpcAirdrop } from '@solana/kit-plugin-rpc'; * import { payer, generatedPayerWithSol } from '@solana/kit-plugin-signer'; * * // With an explicit payer. * const client = createClient().use(payer(mySigner)); * * // With a generated payer funded with SOL. * const client = await createClient() * .use(solanaRpcConnection({ rpcUrl: 'http://127.0.0.1:8899' })) * .use(rpcAirdrop()) * .use(generatedPayerWithSol(lamports(100_000_000_000n))); * ``` */ export declare function payerOrGeneratedPayer(explicitPayer: TransactionSigner | undefined): (client: T) => Promise>; //# sourceMappingURL=index.d.ts.map