Skip to content

Commit

Permalink
apply lint and prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
outerlook committed Oct 23, 2024
1 parent a0b7121 commit 38accbb
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 57 deletions.
22 changes: 11 additions & 11 deletions src/client/browserClient.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {EnvironmentType} from "@kwilteam/kwil-js/dist/core/enums";
import {WebKwil} from "@kwilteam/kwil-js";
import {BaseTSNClient, TSNClientOptions} from "./client";
import { EnvironmentType } from "@kwilteam/kwil-js/dist/core/enums";
import { WebKwil } from "@kwilteam/kwil-js";
import { BaseTSNClient, TSNClientOptions } from "./client";

export class BrowserTSNClient extends BaseTSNClient<EnvironmentType.BROWSER> {
constructor(options: TSNClientOptions) {
super(options);
this.kwilClient = new WebKwil({
...options,
kwilProvider: options.endpoint,
});
}
constructor(options: TSNClientOptions) {
super(options);
this.kwilClient = new WebKwil({
...options,
kwilProvider: options.endpoint,
});
}
}

export default BrowserTSNClient;
export default BrowserTSNClient;
8 changes: 4 additions & 4 deletions src/client/client.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {describe, expect, it} from "vitest";
import {ethers} from "ethers";
import {StreamId} from "../util/StreamId";
import {NodeTSNClient} from "./nodeClient";
import { describe, expect, it } from "vitest";
import { ethers } from "ethers";
import { StreamId } from "../util/StreamId";
import { NodeTSNClient } from "./nodeClient";

describe.sequential("Client", { timeout: 30000 }, () => {
// Skip in CI, because it needs a local node
Expand Down
37 changes: 18 additions & 19 deletions src/client/client.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import {Client, KwilSigner, NodeKwil, WebKwil} from "@kwilteam/kwil-js";
import {KwilConfig} from "@kwilteam/kwil-js/dist/api_client/config";
import {Kwil} from "@kwilteam/kwil-js/dist/client/kwil";
import {EthSigner} from "@kwilteam/kwil-js/dist/core/builders";
import {EnvironmentType} from "@kwilteam/kwil-js/dist/core/enums";
import {GenericResponse} from "@kwilteam/kwil-js/dist/core/resreq";
import {TxReceipt} from "@kwilteam/kwil-js/dist/core/tx";
import {TxInfoReceipt} from "@kwilteam/kwil-js/dist/core/txQuery";
import {ComposedStream} from "../contracts-api/composedStream";
import {deployStream} from "../contracts-api/deployStream";
import {destroyStream} from "../contracts-api/destroyStream";
import {PrimitiveStream} from "../contracts-api/primitiveStream";
import {Stream} from "../contracts-api/stream";
import {StreamType} from "../contracts-api/contractValues";
import {StreamLocator} from "../types/stream";
import {EthereumAddress} from "../util/EthereumAddress";
import {StreamId} from "../util/StreamId";
import {listAllStreams} from "./listAllStreams";
import { Client, KwilSigner, NodeKwil, WebKwil } from "@kwilteam/kwil-js";
import { KwilConfig } from "@kwilteam/kwil-js/dist/api_client/config";
import { Kwil } from "@kwilteam/kwil-js/dist/client/kwil";
import { EthSigner } from "@kwilteam/kwil-js/dist/core/builders";
import { EnvironmentType } from "@kwilteam/kwil-js/dist/core/enums";
import { GenericResponse } from "@kwilteam/kwil-js/dist/core/resreq";
import { TxReceipt } from "@kwilteam/kwil-js/dist/core/tx";
import { TxInfoReceipt } from "@kwilteam/kwil-js/dist/core/txQuery";
import { ComposedStream } from "../contracts-api/composedStream";
import { deployStream } from "../contracts-api/deployStream";
import { destroyStream } from "../contracts-api/destroyStream";
import { PrimitiveStream } from "../contracts-api/primitiveStream";
import { Stream } from "../contracts-api/stream";
import { StreamType } from "../contracts-api/contractValues";
import { StreamLocator } from "../types/stream";
import { EthereumAddress } from "../util/EthereumAddress";
import { StreamId } from "../util/StreamId";
import { listAllStreams } from "./listAllStreams";

export interface EthProvider {
getAddress(): string;
Expand Down Expand Up @@ -215,4 +215,3 @@ export abstract class BaseTSNClient<T extends EnvironmentType> {
return chainInfo.data?.chain_id;
}
}

22 changes: 11 additions & 11 deletions src/client/nodeClient.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {EnvironmentType} from "@kwilteam/kwil-js/dist/core/enums";
import {NodeKwil} from "@kwilteam/kwil-js";
import {BaseTSNClient, TSNClientOptions} from "./client";
import { EnvironmentType } from "@kwilteam/kwil-js/dist/core/enums";
import { NodeKwil } from "@kwilteam/kwil-js";
import { BaseTSNClient, TSNClientOptions } from "./client";

export class NodeTSNClient extends BaseTSNClient<EnvironmentType.NODE> {
constructor(options: TSNClientOptions) {
super(options);
this.kwilClient = new NodeKwil({
...options,
kwilProvider: options.endpoint,
});
}
constructor(options: TSNClientOptions) {
super(options);
this.kwilClient = new NodeKwil({
...options,
kwilProvider: options.endpoint,
});
}
}

export default NodeTSNClient;
export default NodeTSNClient;
20 changes: 10 additions & 10 deletions src/contracts-api/composedStream.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {KwilSigner, NodeKwil, WebKwil} from "@kwilteam/kwil-js";
import {ActionInput} from "@kwilteam/kwil-js/dist/core/action";
import {GenericResponse} from "@kwilteam/kwil-js/dist/core/resreq";
import {TxReceipt} from "@kwilteam/kwil-js/dist/core/tx";
import {StreamType} from "./contractValues";
import {DateString} from "../types/other";
import {StreamLocator} from "../types/stream";
import {EthereumAddress} from "../util/EthereumAddress";
import {StreamId} from "../util/StreamId";
import {Stream} from "./stream";
import { KwilSigner, NodeKwil, WebKwil } from "@kwilteam/kwil-js";
import { ActionInput } from "@kwilteam/kwil-js/dist/core/action";
import { GenericResponse } from "@kwilteam/kwil-js/dist/core/resreq";
import { TxReceipt } from "@kwilteam/kwil-js/dist/core/tx";
import { StreamType } from "./contractValues";
import { DateString } from "../types/other";
import { StreamLocator } from "../types/stream";
import { EthereumAddress } from "../util/EthereumAddress";
import { StreamId } from "../util/StreamId";
import { Stream } from "./stream";

export const ErrorStreamNotComposed = "stream is not a composed stream";

Expand Down
4 changes: 2 additions & 2 deletions src/types/stream.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {StreamId} from "../util/StreamId";
import {EthereumAddress} from "../util/EthereumAddress";
import { StreamId } from "../util/StreamId";
import { EthereumAddress } from "../util/EthereumAddress";

export interface StreamLocator {
/**
Expand Down

0 comments on commit 38accbb

Please sign in to comment.