import { type AuthorizationRequest, type SmartAccountSigner } from "@aa-sdk/core"; import { ServerSignerClient, type ServerSignerClientParams } from "./client/server.js"; import { type Address, type Hex, type SignableMessage, type SignedAuthorization, type TypedData, type TypedDataDefinition } from "viem"; import type { AccessKeyAuthParams } from "./signer.js"; import { SolanaSigner } from "./solanaSigner.js"; /** * AlchemyServerSigner is a signer that can sign messages and typed data using an access key. * It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. * Primarily intended to be used server-side. */ export declare class AlchemyServerSigner implements SmartAccountSigner { inner: ServerSignerClient; signerType: string; /** * Creates an instance of AlchemyServerSigner. * * @param {ServerSignerClient} client The underlying signer client */ constructor(client: ServerSignerClient); /** * Gets the address of the user from the signer client. * * @returns {Promise
} The address of the user * @throws {Error} If the user cannot be retrieved from the signer client */ getAddress(): Promise
; /** * Signs a message using the inner client. * * @param {SignableMessage} msg The message to sign * @returns {Promise} The signed message */ signMessage(msg: SignableMessage): Promise; /** * Signs typed data using the inner client. * * @param {TypedDataDefinition} params The typed data to sign * @returns {Promise} The signed typed data */ signTypedData, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(params: TypedDataDefinition): Promise; /** * Signs an authorization using the inner client. * * @param {Authorization} unsignedAuthorization The unsigned authorization to sign * @returns {Promise>} The signed authorization */ signAuthorization(unsignedAuthorization: AuthorizationRequest): Promise>; /** * Creates a new instance of `SolanaSigner` using the inner client. * * @example * ```ts * import { AlchemyServerSigner } from "@account-kit/signer"; * * const signer = await createServerSigner({ * auth: { accessKey }, * connection: { * apiKey: "alchemy-api-key", * }, * }); * * const solanaSigner = signer.toSolanaSigner(); * ``` * * @returns {SolanaSigner} A new instance of `SolanaSigner` */ toSolanaSigner(): SolanaSigner; } type CreateServerSignerParams = ServerSignerClientParams & { auth: AccessKeyAuthParams; }; /** * Creates a new server signer. * * @example * ```ts * const signer = await createServerSigner({ * auth: { accessKey }, * connection: { * apiKey: "alchemy-api-key", * } * }); * * console.log("Signer address:", await signer.getAddress()); * ``` * * @param {CreateServerSignerParams} params Parameters * @param {AccessKeyAuthParams} params.auth Authentication config for the server signer * @param {ConnectionConfig} params.connection Connection config for the server signer * @returns {Promise} A promise that resolves to a server signer */ export declare const createServerSigner: (params: CreateServerSignerParams) => Promise; /** * Generates a new access key for use in the server signer * * @returns {Hex} A randomly generated access key */ export declare const generateAccessKey: () => string; export {}; //# sourceMappingURL=serverSigner.d.ts.map