UNPKG

@wuwei-labs/srsly

Version:
34 lines 1.28 kB
/** * @purpose Simplified createBorrower instruction wrapper * * Thin convenience wrapper around Codama-generated createBorrower instruction. * Creates a BorrowerState PDA with managed token account for a borrower. */ import { type SdkConfig } from '../utils/config'; import { type UniversalSigner } from '../utils/signer'; import { prepareInstructions } from '../utils/instructions'; /** * Parameters for creating a borrower state */ export interface CreateBorrowerParams { /** * Borrower wallet (pays for account creation) * Accepts string address, web3.js Keypair, or @solana/kit signer */ borrower: UniversalSigner; /** * Sets compute units to allocate for the transaction. * @example 400000 */ computeUnits?: number; } /** * Initialize a borrower: a BorrowerState PDA plus a managed ATLAS ATA * used to hold reservation bid refunds and knockoff bonuses. * * @param params - Borrower creation parameters * @param config - Optional SDK configuration overrides * @returns Kit instruction (or web3.js if PublicKey in config) */ export declare function createBorrower(params: CreateBorrowerParams, config?: Partial<SdkConfig>): Promise<ReturnType<typeof prepareInstructions>>; //# sourceMappingURL=createBorrower.d.ts.map