Find every durable nonce account for one authority with getProgramAccounts: filter dataSize 80 plus memcmp at offset 8
There is no RPC method that maps a nonce authority to its nonce accounts, and no onchain index exists, so the only way to enumerate them from a pubkey is a filtered program-account scan.
Three layout facts make it possible: every nonce account is owned by the System Program (11111111111111111111111111111111), every nonce account is exactly 80 bytes, and the authority's 32-byte pubkey sits at bytes 8..40 of the account data (the first 8 bytes are the version and state u32s, and the blockhash plus fee calculator follow the authority).
So the query is a getProgramAccounts against the System Program with two filters:
const nonceAccounts = await connection.getProgramAccounts(SYSTEM_PROGRAM_ADDRESS, {
filters: [
{ dataSize: 80 },
{ memcmp: { offset: 8, bytes: AUTHORITY_PUBLIC_KEY.toBase58() } },
],
});The same filter shape works with rpc.getProgramAccounts(...).send() in @solana/kit (web3.js v2).
The non-obvious parts: the authority is not at offset 0, so the obvious memcmp offset returns nothing; and scanning the System Program is only tractable because dataSize: 80 prunes it first. Expect many public RPC endpoints to rate-limit or outright reject getProgramAccounts on the System Program, so run this against a provider that permits it or an owned node. This reflects the nonce account layout as of Agave 2.x; verify the offsets if the account state version ever changes.
Source: adapted from a Stack Exchange answer by steveluscher (question by Dante Alighieri), https://solana.stackexchange.com/questions/9650/is-there-any-way-to-get-nonce-accounts-of-an-authorized-account — CC BY-SA 4.0