Skip to content

EIP 5792 Type Mismatch w/ Paymaster Service #3627

@Ncookiez

Description

@Ncookiez

Check existing issues

Viem Version

2.28.4

Current Behavior

The new typing for sendCalls -> capabilities -> paymasterService does not allow for EIP 5792's optional parameter.

New Viem typing:
Image

EIP 5792 typing:
Image

Including { url, optional: true } results in an error.

Expected Behavior

The context parameter from EIP 7677 was updated accurately, but the existing optional parameter should not be removed.

Passing in { url, optional: true } should not result in an error.

Steps To Reproduce

Pass in optional to the paymasterService object into sendCalls.

e.g.

sendCalls({ chainId, account, calls, capabilities: { paymasterService: { [chainId]: { url, optional: true } } }  })

Link to Minimal Reproducible Example

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions