LogoLogo
GithubDiscordTwitter
  • Welcome
    • What is Clockwork?
    • Quickstart
    • Installation
  • Guides
    • 1. Scheduling an SPL transfer
    • 2. Auto-incrementing counter
  • Reference
    • Threads
      • Account
      • Address
      • Authority
      • Fees
      • Payers
      • Triggers
    • Localnet
    • SDK
    • Support
  • Node operators
    • Deploy a worker
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Reference
  2. Threads

Address

PreviousAccountNextAuthority

Last updated 2 years ago

Was this helpful?

A thread's public address is derived deterministically from its authority and id. These properties are immutable and may never change throughout the lifetime of the thread account. To verify a Clockwork thread account in your programs, you can use the pubkey() helper function provided by the SDK:

#[account(
    address = thread.pubkey(),
    constraint = thread.id.eq("my_thread"),
    has_one = authority,
)]
pub thread: Account<'info, Thread>
clockwork/thread.rs at 781b42fd06f2926899597ce5ea1f19b8ecd3d2e4 · clockwork-xyz/clockworkGitHub
fn pubkey()
Logo