Skip to main content

Module thread_program

Module thread_program 

Source

Functions§

close_fiber
Closes a fiber from a thread.
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.
create_thread
Creates a new transaction thread. Optionally creates an initial fiber if instruction is provided.
delete_thread
Deletes a thread - admin only, skips all checks. Used for cleaning up stuck/broken threads.
error_thread
Reports an error for a thread that failed to execute.
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.
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 and resets execution stats.
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.