Skip to content

TypedRequestPayload

TypedRequestPayload<M> = RpcMethods[M]["params"] extends void ? object : object

Defined in: packages/dapp/src/provider/typed-request.ts:21

Type-safe request payload.

Makes illegal states unrepresentable:

  • Methods with void params: params is optional and must be undefined
  • Methods with params: params is required with the correct type

M extends RpcMethodName