eOASignature function

  1. @Deprecated('eOASignature is deprecated. Replace with signUserOpHash.')
UserOperationMiddlewareFn eOASignature(
  1. EthPrivateKey credentials
)

Implementation

@Deprecated('eOASignature is deprecated. Replace with signUserOpHash.')
UserOperationMiddlewareFn eOASignature(EthPrivateKey credentials) {
  return (ctx) async {
    ctx.op.signature = bytesToHex(
      credentials.signPersonalMessageToUint8List(
        ctx.getUserOpHash(),
      ),
      include0x: true,
    );
  };
}