Skip to content

Conversation

voliva
Copy link
Contributor

@voliva voliva commented Jul 30, 2025

I'm thinking I did a mistake adding the meta-signers to the top-level package. Back then it made sense since it was a new category of "meta-signers", so maybe having them next to the other signers would be nice.

But they work on a higher level, and the logic they do could be beneficial for things that are not signers.

The new idea in this PR is to have it as a standalone papi-sdk: it requires a typedApi with multisig stuff, and then exports two functions:

function getMultisigTx(
    multisig: MultisigAccount<Addr>,
    signatory: Addr,
    tx: Transaction,
    options?: MultisigTxOptions<Addr>,
): AsyncTransaction

function getMultisigSigner(
    multisig: MultisigAccount<Addr>,
    signer: PolkadotSigner,
    options?: MultisigTxOptions<Addr>,
): PolkadotSigner

They both need the multisig account info (signatories + threshold). Then for the multisigTx I need a signatory (since the call data changes based on who will sign it) and any Transaction (could do with call data only... but this way I can .getPaymentInfo() to get the weight... and you can always create one with typedApi.txFromCallData)

And getMulsitigSigner replaces the top-level one. Maybe we should deprecate that one and ask people to use this one instead?

@voliva
Copy link
Contributor Author

voliva commented Aug 30, 2025

I changed the tx parameter to txOrCallData, as I think it can be useful to pass in either of them, and the sdk can still just convert from one to the other.

@voliva voliva marked this pull request as ready for review August 30, 2025 03:14
@voliva voliva force-pushed the multisig-sdk branch 2 times, most recently from 46a81d9 to fda2402 Compare August 30, 2025 03:16
Copy link
Member

@josepot josepot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@voliva voliva merged commit 54970df into main Sep 23, 2025
1 check passed
@voliva voliva deleted the multisig-sdk branch September 23, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants