diff --git a/__fixtures__/v-next/outputhelperfunc/helper-func-types.ts b/__fixtures__/v-next/outputhelperfunc/helper-func-types.ts index eed6ef434..bd44fa62d 100644 --- a/__fixtures__/v-next/outputhelperfunc/helper-func-types.ts +++ b/__fixtures__/v-next/outputhelperfunc/helper-func-types.ts @@ -9,8 +9,8 @@ import { BinaryReader, BinaryWriter } from "./binary"; import { Rpc } from "./helpers"; export interface QueryBuilderOptions { - encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter - decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes + encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter + decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, getRpcInstance: () => Rpc | undefined @@ -22,9 +22,9 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - const data = opts.encoder(request).finish(); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); - return opts.decoder(response); + return opts.decode(response); }; } diff --git a/__fixtures__/v-next/outputicjs/helper-func-types.ts b/__fixtures__/v-next/outputicjs/helper-func-types.ts index eed6ef434..bd44fa62d 100644 --- a/__fixtures__/v-next/outputicjs/helper-func-types.ts +++ b/__fixtures__/v-next/outputicjs/helper-func-types.ts @@ -9,8 +9,8 @@ import { BinaryReader, BinaryWriter } from "./binary"; import { Rpc } from "./helpers"; export interface QueryBuilderOptions { - encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter - decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes + encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter + decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, getRpcInstance: () => Rpc | undefined @@ -22,9 +22,9 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - const data = opts.encoder(request).finish(); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); - return opts.decoder(response); + return opts.decode(response); }; } diff --git a/packages/telescope/src/helpers/helper-func-types.ts b/packages/telescope/src/helpers/helper-func-types.ts index 41009f7a4..0d9ddeb41 100644 --- a/packages/telescope/src/helpers/helper-func-types.ts +++ b/packages/telescope/src/helpers/helper-func-types.ts @@ -6,8 +6,8 @@ import { BinaryReader, BinaryWriter } from "./binary"; import { Rpc } from "./helpers"; export interface QueryBuilderOptions { - encoder: (request: TReq, writer?: BinaryWriter) => BinaryWriter - decoder: (input: BinaryReader | Uint8Array, length?: number) => TRes + encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter + decode: (input: BinaryReader | Uint8Array, length?: number) => TRes service: string, method: string, getRpcInstance: () => Rpc | undefined @@ -19,9 +19,9 @@ export function buildQuery(opts: QueryBuilderOptions) { if (!rpc) throw new Error("Query Rpc is not initialized"); - const data = opts.encoder(request).finish(); + const data = opts.encode(request).finish(); const response = await rpc.request(opts.service, opts.method, data); - return opts.decoder(response); + return opts.decode(response); }; }