mirror of https://github.com/waku-org/js-waku.git
chore: use pascal case for class name
This commit is contained in:
parent
967e6ffc7e
commit
81d6638067
|
@ -19,7 +19,7 @@ export interface Params {
|
|||
cursor?: proto.Index;
|
||||
}
|
||||
|
||||
export class HistoryRPC {
|
||||
export class HistoryRpc {
|
||||
private constructor(public readonly proto: proto.HistoryRpc) {}
|
||||
|
||||
get query(): proto.HistoryQuery | undefined {
|
||||
|
@ -33,7 +33,7 @@ export class HistoryRPC {
|
|||
/**
|
||||
* Create History Query.
|
||||
*/
|
||||
static createQuery(params: Params): HistoryRPC {
|
||||
static createQuery(params: Params): HistoryRpc {
|
||||
const contentFilters = params.contentTopics.map((contentTopic) => {
|
||||
return { contentTopic };
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ export class HistoryRPC {
|
|||
// milliseconds 10^-3 to nanoseconds 10^-9
|
||||
endTime = BigInt(params.endTime.valueOf()) * OneMillion;
|
||||
}
|
||||
return new HistoryRPC({
|
||||
return new HistoryRpc({
|
||||
requestId: uuid(),
|
||||
query: {
|
||||
pubsubTopic: params.pubSubTopic,
|
||||
|
@ -69,9 +69,9 @@ export class HistoryRPC {
|
|||
});
|
||||
}
|
||||
|
||||
decode(bytes: Uint8ArrayList): HistoryRPC {
|
||||
decode(bytes: Uint8ArrayList): HistoryRpc {
|
||||
const res = proto.HistoryRpc.decode(bytes);
|
||||
return new HistoryRPC(res);
|
||||
return new HistoryRpc(res);
|
||||
}
|
||||
|
||||
encode(): Uint8Array {
|
||||
|
|
|
@ -21,7 +21,7 @@ import { BaseProtocol } from "../base_protocol.js";
|
|||
import { DefaultPubSubTopic } from "../constants.js";
|
||||
import { toProtoMessage } from "../to_proto_message.js";
|
||||
|
||||
import { HistoryRPC, PageDirection, Params } from "./history_rpc.js";
|
||||
import { HistoryRpc, PageDirection, Params } from "./history_rpc.js";
|
||||
|
||||
import HistoryError = proto.HistoryResponse.HistoryError;
|
||||
|
||||
|
@ -261,7 +261,7 @@ async function* paginate<T extends IDecodedMessage>(
|
|||
while (true) {
|
||||
queryOpts.cursor = currentCursor;
|
||||
|
||||
const historyRpcQuery = HistoryRPC.createQuery(queryOpts);
|
||||
const historyRpcQuery = HistoryRpc.createQuery(queryOpts);
|
||||
|
||||
log(
|
||||
"Querying store peer",
|
||||
|
|
Loading…
Reference in New Issue