dynamicClient
dynamicClient<
T
>(params
?):Client
<T
>
The dynamicClient
function is a TypeScript function that creates a dynamic client for making API
calls based on a provided endpoint and configuration.
Type parameters
• T
The type describes Services
. We have to import it from the server-side code. It’s valid import, because it’s not a value
Parameters
• params?: ClientParams
The params
parameter is an optional object that can contain two properties.
endpoint
- is a path for endpoint that handles JSON-RPC calls with POST method
Returns
Client
<T
>
The function dynamicClient
returns an instance of Client<T>
.