Skip to content

[simplex,sdk]: support signing with MPC Vault#707

Open
royvardhan wants to merge 12 commits intomainfrom
roy/external-signing-services
Open

[simplex,sdk]: support signing with MPC Vault#707
royvardhan wants to merge 12 commits intomainfrom
roy/external-signing-services

Conversation

@royvardhan
Copy link
Collaborator

@royvardhan royvardhan commented Mar 17, 2026

Closes #699

Todos:

  • MPC Vault
  • Rewire Rebalancers to work with Account
  • Tests

On Standby:

  • Blockradar

@royvardhan royvardhan force-pushed the roy/external-signing-services branch from 9053783 to 59cc159 Compare March 18, 2026 14:21
@royvardhan royvardhan force-pushed the roy/external-signing-services branch from 59cc159 to 24771cd Compare March 18, 2026 14:22
@royvardhan royvardhan force-pushed the roy/external-signing-services branch from 4fbd46f to d4bec0f Compare March 19, 2026 07:47
@royvardhan royvardhan marked this pull request as ready for review March 23, 2026 08:43
export function createSimplexSigner(config: SignerConfig): SigningAccount {
if (config.type === SignerType.PrivateKey) {
const account = privateKeyToAccount(config.privateKey)
const signRawHash = async (hash: HexString) => {
Copy link
Member

Choose a reason for hiding this comment

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

Why not have a PrivateKeySigner type that implements this, then we just initialize that type here


if (config.type === SignerType.MpcVault) {
const { account, service } = createMpcVaultAccount(config.mpcVault)
const signRawHash = async (hash: HexString) => {
Copy link
Member

Choose a reason for hiding this comment

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

Let's implement this directly on the mpc vault type

constructor(configService: FillerConfigService, signer?: SigningAccount) {
this.configService = configService
this.clientFactory = ViemClientFactory
this.signer =
Copy link
Member

Choose a reason for hiding this comment

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

Why is the signer optional in the constructor? Seems like it should not be

const walletClient = this.clientManager.getWalletClient(chain)
const publicClient = this.clientManager.getPublicClient(chain)

if (this.signer.mode === "mpcVault") {
Copy link
Member

Choose a reason for hiding this comment

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

Seems this would work better once we add more signers

Suggested change
if (this.signer.mode === "mpcVault") {
if (this.signer.mode !== "privateKey") {

Copy link
Member

@Wizdave97 Wizdave97 left a comment

Choose a reason for hiding this comment

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

Looks good

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.

[simplex]: External Wallet Provider Support

3 participants