Acammm
Acammm

Reputation: 161

How to call a solana program with multiple signers

Let's say I have a program where I want the initialization call to be signed by multiple wallets. How to proceeds, I suppose I pass x accounts as signers, but in terme of UI/user interactions how does that play out?

Upvotes: 1

Views: 4459

Answers (3)

olaf-snf
olaf-snf

Reputation: 21

You can also use Snowflake Safe and submit Solana generic multisig transactions either programatically using the SDK or via Snowflake Safe App.

SDK: https://github.com/snowflake-so/snowflake-safe-sdk App: https://safe.snowflake.so

Upvotes: 1

Acammm
Acammm

Reputation: 161

Ok I think this is the way. Indirection through a program that does the gathering of signs.

You init a multisig tx, set all the details and signers count.

Signers refer this calling the multisig program, effectively signing it

Once the treshold is reach, you call the execute ix of that multisig program, and it does a multisig CPI call.

https://github.com/project-serum/multisig/blob/master/programs/multisig/src/lib.rs

Upvotes: 1

munanadi
munanadi

Reputation: 1079

You could use initiate a transaction from the client side and add signatures to it. Check this

sign(), addSignature(), partialSign() can be used to sign it with multiple accounts.

Upvotes: 2

Related Questions