UNPKG

@bit-gpt/h402

Version:

BitGPT's 402 open protocol for blockchain-native payments

23 lines 1.03 kB
import { address } from "@solana/kit"; /** * Creates a TransactionSigner from an address string. * This is a utility function that creates a minimal implementation of the TransactionSigner interface * that can be used with the Solana program clients like getTransferSolInstruction. * * Note: This signer cannot actually sign transactions as it doesn't have the private key. * It's only meant to be used for creating instructions that require a TransactionSigner parameter. * * @param addressString - The address string to create a signer for * @returns A TransactionSigner object with the specified address */ export function createAddressSigner(addressString) { return { address: address(addressString), signTransactions: async (transactions) => { // This is a dummy implementation that doesn't actually sign anything // It's only meant to be used for creating instructions return transactions.map(() => ({})); }, }; } //# sourceMappingURL=signers.js.map