99#[ derive( Clone , Copy , Debug , PartialEq , Eq , SchemaRead , SchemaWrite ) ]
1010#[ wincode( tag_encoding = "u8" ) ]
1111pub enum Instruction {
12- /// Initializes a programmatic signer account for an authority.
12+ /// Initializes a signer nonce account for an authority.
1313 ///
1414 /// The caller must first create and fund the account. Recommended to include
1515 /// `solana_system_interface::instruction::create_account` and `Initialize` in the same
@@ -18,70 +18,70 @@ pub enum Instruction {
1818 /// On success, the program:
1919 /// 1. Verifies the account is uninitialized, rent-exempt, and owned by this program.
2020 /// 2. Derives the initial `nonce` as
21- /// `sha256("spl-ed25519-programmatic-signer::init-v1" ‖ programmatic_signer_account_address ‖ slot_hashes[0])`.
22- /// 3. Writes `ProgrammaticSignerAccount { nonce, authority }` into the account data.
21+ /// `sha256("spl-ed25519-programmatic-signer::init-v1" ‖ signer_nonce_account_address ‖ slot_hashes[0])`.
22+ /// 3. Writes `SignerNonceAccount { nonce, authority }` into the account data.
2323 ///
2424 /// Instruction data: instruction discriminator only
2525 ///
2626 /// Accounts required:
27- /// - `[writable]` Programmatic signer account
28- /// - `[]` Authority to store in the programmatic signer account
27+ /// - `[writable]` Signer nonce account
28+ /// - `[]` Authority to store in the signer nonce account
2929 /// - `[]` `SlotHashes` sysvar
3030 Initialize ,
3131
3232 /// Authorizes and executes a wrapped Solana transaction whose required signers are
33- /// `ProgrammaticSignerPda ` accounts.
33+ /// `ProgrammaticSigner ` accounts.
3434 ///
3535 /// Instruction data: instruction discriminator followed by a serialized
3636 /// `solana_transaction::versioned::VersionedTransaction`.
3737 /// All message variants supported by `VersionedTransaction` are accepted.
3838 ///
3939 /// Wrapped required signers are paired by index:
40- /// - `message.account_keys[i]`: `ProgrammaticSignerPda ` promoted during CPI.
40+ /// - `message.account_keys[i]`: `ProgrammaticSigner ` promoted during CPI.
4141 /// - `tx.signatures[i]`: wrapped-message signature from the matching authority address.
4242 ///
4343 /// On success, the program:
4444 /// 1. Deserializes the transaction and sanitizes the wrapped message.
45- /// 2. Reads the authority stored in the programmatic signer account.
46- /// 3. Checks the passed programmatic signer account's authority signed the wrapped message.
45+ /// 2. Reads the authority stored in the signer nonce account.
46+ /// 3. Checks the passed signer nonce account's authority signed the wrapped message.
4747 /// 4. Checks the wrapped message's lifetime / recent blockhash field equals the account's
4848 /// `nonce`.
4949 /// 5. Verifies the outer transaction's only top-level instruction is `Submit`.
5050 /// 6. Iterates over the outer authority accounts in order. For each `authority_i`, requires
51- /// `ProgrammaticSignerPda (authority_i) == message.account_keys[i]` and verifies
51+ /// `ProgrammaticSigner (authority_i) == message.account_keys[i]` and verifies
5252 /// `tx.signatures[i]` over the wrapped message with `authority_i`.
5353 /// 7. Executes each `message.instructions` entry by CPI, using `invoke_signed` to promote
54- /// each authorized signer's corresponding `ProgrammaticSignerPda `.
54+ /// each authorized signer's corresponding `ProgrammaticSigner `.
5555 /// 8. Derives and stores the next nonce as
56- /// `sha256("spl-ed25519-programmatic-signer::v1" ‖ programmatic_signer_account ‖ old_nonce ‖ slot_hashes[0] ‖ sha256(signed_message_bytes))`
56+ /// `sha256("spl-ed25519-programmatic-signer::v1" ‖ signer_nonce_account ‖ old_nonce ‖ slot_hashes[0] ‖ sha256(signed_message_bytes))`
5757 ///
5858 /// Accounts required:
59- /// - `[writable]` Programmatic signer account whose nonce is consumed and advanced
59+ /// - `[writable]` Signer nonce account whose nonce is consumed and advanced
6060 /// - `[]` `SlotHashes` sysvar
6161 /// - `[]` `Instructions` sysvar
6262 /// - Authority addresses, ordered to match the wrapped message's required signers.
6363 /// - Remaining accounts referenced by the wrapped message, in order. Writable flags
6464 /// must match the wrapped message.
6565 Submit ,
6666
67- /// Closes a programmatic signer account and refunds its lamports.
67+ /// Closes a signer nonce account and refunds its lamports.
6868 ///
6969 /// Instruction data: instruction discriminator followed by [`CloseData`].
7070 ///
7171 /// Runs only as an inner instruction of a wrapped transaction submitted through `Submit`
72- /// because nothing outside this program can sign for `ProgrammaticSignerPda `.
72+ /// because nothing outside this program can sign for `ProgrammaticSigner `.
7373 ///
7474 /// Accounts required:
75- /// - `[signer]` `ProgrammaticSignerPda `
76- /// - `[writable]` Programmatic signer account
75+ /// - `[signer]` `ProgrammaticSigner `
76+ /// - `[writable]` Signer nonce account
7777 /// - `[writable]` Lamport recipient
7878 Close ,
7979}
8080
8181/// Data for [`Instruction::Close`].
8282#[ derive( Clone , Debug , PartialEq , Eq , SchemaRead , SchemaWrite ) ]
8383pub struct CloseData {
84- /// Address that receives all lamports from the closed programmatic signer account.
84+ /// Address that receives all lamports from the closed signer nonce account.
8585 pub recipient : Address ,
8686}
8787
0 commit comments