Prepare a first Tezos manager operation from an unrevealed account

A funded implicit address can exist before its public key appears on chain. A first outgoing operation may need a reveal in the same signed group.

Inspect the source address

Set TZ to the funded implicit address on your selected network. Read its manager key and counter before constructing the group. A null key means the context has no revealed public key for this account.

octez-client rpc get "/chains/main/blocks/head/context/contracts/$TZ/manager_key"
octez-client rpc get "/chains/main/blocks/head/context/contracts/$TZ/counter"

If the stored counter is 0 and the account needs a reveal, the reveal can use counter 1 and the following transaction counter 2. Verify that the public key hashes to the source address before signing.

Check outstanding operations

Two applications preparing the first spend can both schedule the same reveal and counters. Coordinate submissions for one source and refresh the context after inclusion. A revealed account needs only the next valid manager counter for its transaction. octez.tezos.com Octez protocol documentation