Skip to content

[Feedback] extend documentation on how to sign a transaction using a viem walletClient #695

@alramalho

Description

@alramalho

Feedback

from your docs it seems you can only sign with

// Connect OWNER_1_ADDRESS
protocolKit = await protocolKit.connect({
  provider: RPC_URL,
  signer: OWNER_1_PRIVATE_KEY
})

// Sign the safeTransaction with OWNER_1_ADDRESS
// After this, the safeTransaction contains the signature from OWNER_1_ADDRESS
safeTransaction = await protocolKit.signTransaction(
  safeTransaction,
  SigningMethod.ETH_SIGN
)

// Connect OWNER_2_ADDRESS
protocolKit = await protocolKit.connect({
  provider: RPC_URL,
  signer: OWNER_2_PRIVATE_KEY
})

// Sign the safeTransaction with OWNER_2_ADDRESS
// After this, the safeTransaction contains the signature from OWNER_1_ADDRESS and OWNER_2_ADDRESS
safeTransaction = await protocolKit.signTransaction(
  safeTransaction,
  SigningMethod.ETH_SIGN_TYPED_DATA_V4
)

How can this issue be resolved?

i am still struggling with this lol

Are you interested in working on this?

  • I would like to implement/fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextra-feedbackFeedback submitted through Nextra

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions