0

I want to create a program influenced by multisig structure.
There will be multiple types of instructions that require two parties to sign each transaction. Here's what I have in my mind:

  • There will be a pda account that stores the signatures of both parties
  • An execution instruction then will require this pda and an instruction
  • This instruction will invoke the instruction with the signatures inside the pda

Is it possible to create such a structure? The reason why I want to implement this structure is to create a request program, where both parties need to sign to execute a instruction inside the program, but I don't want two signers in the instruction itself. Instead, I want each user to be able to sign each instruction independently and system will execute the instruction if both parties have signed the instruction.

2
  • Signatures are only valid for max 2 minutes once they were created because what they sign includes a blockhash that can be max 2 minutes old. Maybe check durable nonces, I suspect these are what you're looking for.
    – Serban
    Nov 26, 2023 at 17:32
  • After a quick glance, this seems like what I needed. But I'll still explore and reply back after I completely figure it out.
    – brknarsy
    Nov 26, 2023 at 19:08

1 Answer 1

1

In that case, you don't need to store any signatures in your program.

Multisig participants sign a transaction that includes an instruction to your program. Your program checks that the multisig participant signed, and simply flips a bit saying "participant X has approved this instruction". Once enough participant bits have been flipped, then your multisig program can issue the instruction with a "signature" from the PDA.

The full signature is useless to your program, it simply needs to know that the person signed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.