UNPKG

@wuwei-labs/srsly

Version:
31 lines 1.31 kB
/** * PDA derivation functions for the Antegen (Thread) program * @module pda/thread */ import { Address } from '@solana/kit'; import { type UniversalSigner } from '../utils/signer'; /** * Derive the contract thread PDA * * Per-contract thread used by Antegen for automated payment scheduling. * Thread PDAs use seeds: [SEED_THREAD, authority, id] * where id = contract address. * * @param contract - The contract PDA (used as the thread ID) * @param authority - The rental authority PDA (thread authority) * @param programAddress - Optional Antegen program address (defaults to Antegen program) * @returns The derived contract thread PDA */ export declare function deriveContractThread(contract: UniversalSigner, authority: UniversalSigner, programAddress?: UniversalSigner): Promise<Address>; /** * Derive the fiber PDA for a thread * * Fiber PDAs use seeds: ["thread_fiber", thread, fiber_index (u8)] * * @param thread - The thread PDA * @param fiberIndex - The fiber index (1 for close_rental, 2 for activate_rental) * @param programAddress - Optional Antegen program address * @returns The derived fiber PDA */ export declare function deriveFiber(thread: UniversalSigner, fiberIndex: number, programAddress?: UniversalSigner): Promise<Address>; //# sourceMappingURL=thread.d.ts.map