diff --git a/src/components/client.ts b/src/components/client.ts index 1497d4ed..46c4e5f5 100644 --- a/src/components/client.ts +++ b/src/components/client.ts @@ -143,9 +143,9 @@ export class <%= className %> { rpcParams = params; } if (notification) { - return this.rpc.notify(methodName, rpcParams); + return this.rpc.notify({method: methodName, params: rpcParams}); } - return this.rpc.request(methodName, rpcParams, this.timeout); + return this.rpc.request({method: methodName, params: rpcParams}, this.timeout); } <% openrpcDocument.methods.forEach((method) => { %> diff --git a/templates/client/typescript/_package.json b/templates/client/typescript/_package.json index 68d90a0a..8997b15b 100644 --- a/templates/client/typescript/_package.json +++ b/templates/client/typescript/_package.json @@ -13,7 +13,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@open-rpc/client-js": "^1.3.1", + "@open-rpc/client-js": "^1.4.0", "@open-rpc/meta-schema": "^1.6.0", "@open-rpc/schema-utils-js": "^1.12.0", "@types/json-schema": "7.0.3",