feat(blockchain-api): Squads v3 proposal lifecycle endpoints - #1208
feat(blockchain-api): Squads v3 proposal lifecycle endpoints#1208madninja wants to merge 1 commit into
Conversation
Add a standalone squadsV3 router mirroring the v4 squads endpoints (approve/reject/cancel/execute/proposeConfigChange) on top of @sqds/sdk, exposed under /squads/v3/*. v3 votes act on the transaction PDA directly rather than a separate proposal account. Factor the version-neutral buildSquadsTransaction and its types into lib/utils/squads-tx.ts, shared by both the v3 and v4 routers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| * require the multisig account itself as signer, so their wrapping transaction | ||
| * is created under this index. | ||
| */ | ||
| export const CONFIG_AUTHORITY_INDEX = 0; |
There was a problem hiding this comment.
CONFIG_AUTHORITY_INDEX = 0 is my best reading of Squads v3 (index 0 = the multisig's internal/config authority; index 1 = default vault), but the actual signer for addMember/removeMember/changeThreshold self-CPIs is decided by the on-chain squads-mpl Rust program, which isn't in node_modules. I could not verify it end-to-end from here.
If the index is wrong, proposeConfigChange will build and activate fine but the proposal will fail at execute time (invalid signer). Please confirm against a real v3 multisig on devnet — run an add/remove/threshold proposal through create → approve → execute — before this endpoint is trusted. The four vote/execute endpoints don't depend on this.
|
Closing as not planned. There is no current need for v3 proposal lifecycle support, so this State at close, for anyone picking it up:
The branch |
Adds a standalone
squadsV3router giving Squads v3 multisigs the same proposal-lifecycle surface the v4 router already provides, under/squads/v3/*. Built on@sqds/sdk.Endpoints
approveProposalPOST /squads/v3/proposals/approverejectProposalPOST /squads/v3/proposals/rejectcancelProposalPOST /squads/v3/proposals/cancelexecuteProposalPOST /squads/v3/proposals/executeproposeConfigChangePOST /squads/v3/proposals/configEach returns unsigned transaction(s) for the acting member to sign, matching the v4 response envelope.
Notes on the v3 model
{ member, multisig, transactionPda }.proposeConfigChangebuildscreateTransaction + addInstruction + activateTransactioninto one unsigned tx, mirroring v4's create-only (no auto-vote).buildSquadsTransaction(+ types) is factored intolib/utils/squads-tx.tsand shared by both routers; v4 re-exports it, so v4 consumers are untouched.Draft — one item needs verification before merge
See the flagged inline comment: the
authorityIndexfor v3 config-change transactions is set to0and has not been verified end-to-end against the on-chain squads-mpl program. The four vote/execute endpoints have unambiguous account derivation; onlyproposeConfigChangecarries this open question.