Is there documentation anywhere on how to create a gnosis safe programmatically with detailed information on the parameters?
This looks a lot like this question (How can I programmatically create new Gnosis Safe?) but since there wasn't really an exhaustive answer, I'm asking it again while trying to provide more contexte on the hoped answer.
From reading through the documentation, it seems that in order to deploy a new wallet, one either needs to deploy a new proxy, or use the ProxyFactory (https://github.com/safe-global/safe-smart-account/blob/0142ec8a4a05f03167daba9e7231b7e858aabd32/contracts/proxies/SafeProxyFactory.sol#L56) to generate a new proxy automatically, by providing it with the latest deployed singleton instance (https://contractscan.xyz/contract/0x41675c099f32341bf84bfc5382af534df5c7461a).
Am I understanding this correctly or am I missing something?
Additionally, in these examples (https://docs.safe.global/sdk/signers) there are a few wallet providers mentioned but it isn't clear to me how to define multiple providers as owners when creating the wallet.
To summarise, how could I create (deploy?) a gnosis safe wallet with multiple owners, using for instance one of the providers mentioned in the doc or even some EOA wallets that are created through private keys generation?
Edit:
Thanks Louis for the pointers. I'm editing my question to include what I ended up using in case someone later finds this thread and is looking for a complete answer. After reading through the SDK's protocol kit, the important missing piece for me was the following:
const safeDeployTransactionData = { to: safeProxyFactoryContract.getAddress(), value: '0', // we use the createProxyWithNonce method to create the Safe in a deterministic address, see: https://github.com/safe-global/safe-contracts/blob/main/contracts/proxies/SafeProxyFactory.sol#L52 data: safeProxyFactoryContract.encode('createProxyWithNonce', [ asHex(safeSingletonContract.getAddress()), asHex(initializer), // call to the setup method to set the threshold & owners of the new Safe BigInt(saltNonce) ]) } This highlights the usage of the Factory contract to deploy new safe wallets and the possibility to use whatever EOA wallets as signer for the new Safe wallet.
I'm still not sure however how to configure the safe such that I can have multiple wallets as owners. Do I need to create the safe and then submit multiple transactions to add new owners?
Is there doc or an example somewhere of the parameters that I can modify in order to configure the safe signing scheme?