Skip to main content

Module antegen_thread

Module antegen_thread 

Source

Functions§

close_fiber
Closes a fiber from a thread via CPI to Fiber Program.
close_thread
Closes an existing thread account and returns the lamports to the owner. Requires authority (owner) or thread itself to sign. External fiber accounts should be passed via remaining_accounts.
create_fiber
Creates a fiber (instruction) for a thread via CPI to Fiber Program. lookup_tables is capped at 4 per fiber (Solana v0 transaction limit).
create_thread
Creates a new transaction thread. Optionally creates fiber index 0 if instruction is provided. lookup_tables is forwarded to fiber_0 when one is created; it is ignored when instruction is None.
delete_thread
Deletes a thread - admin only, skips all checks. Used for cleaning up stuck/broken threads.
exec_thread
Executes a thread fiber with trigger validation and fee distribution. Respects builder claim priority windows from registry configuration.
init_config
Initialize the global thread configuration.
swap_fiber
Swaps source fiber’s instruction into target fiber, closes source. Target keeps its PDA/index, source is deleted.
thread_memo
Memo instruction that logs a message (replacement for spl-memo). Used for tracking thread fiber execution in logs without external dependencies. Optionally emits a signal for testing signal behaviors.
update_config
Update the global thread configuration.
update_fiber
Updates a fiber’s instruction via CPI to Fiber Program. Initializes the fiber if it doesn’t exist (thread PDA pays rent). If track is true, adds the fiber_index to thread.fiber_ids. Pass None for instruction to wipe the compiled instruction (idle). Pass None for lookup_tables to leave them unchanged; Some(vec) atomically replaces. Legacy fibers reject non-empty lookup_tables.
update_thread
Allows an owner to update the thread’s properties (paused state, trigger).
withdraw_thread
Allows an owner to withdraw from a thread’s lamport balance.