@apibara/indexer 2.0.0-beta.0 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/package.json +30 -19
  2. package/src/context.ts +8 -3
  3. package/src/hooks/index.ts +1 -0
  4. package/src/hooks/useSink.ts +13 -0
  5. package/src/index.ts +1 -0
  6. package/src/indexer.test.ts +70 -41
  7. package/src/indexer.ts +168 -168
  8. package/src/plugins/config.ts +4 -4
  9. package/src/plugins/kv.ts +2 -2
  10. package/src/plugins/persistence.test.ts +10 -6
  11. package/src/plugins/persistence.ts +3 -3
  12. package/src/sink.ts +21 -24
  13. package/src/sinks/csv.test.ts +15 -3
  14. package/src/sinks/csv.ts +68 -7
  15. package/src/sinks/drizzle/Int8Range.ts +52 -0
  16. package/src/sinks/drizzle/delete.ts +42 -0
  17. package/src/sinks/drizzle/drizzle.test.ts +239 -0
  18. package/src/sinks/drizzle/drizzle.ts +115 -0
  19. package/src/sinks/drizzle/index.ts +6 -0
  20. package/src/sinks/drizzle/insert.ts +39 -0
  21. package/src/sinks/drizzle/select.ts +44 -0
  22. package/src/sinks/drizzle/transaction.ts +49 -0
  23. package/src/sinks/drizzle/update.ts +47 -0
  24. package/src/sinks/drizzle/utils.ts +36 -0
  25. package/src/sinks/sqlite.test.ts +13 -1
  26. package/src/sinks/sqlite.ts +65 -5
  27. package/src/testing/indexer.ts +15 -8
  28. package/src/testing/setup.ts +5 -5
  29. package/src/testing/vcr.ts +42 -4
  30. package/src/vcr/record.ts +2 -2
  31. package/src/vcr/replay.ts +3 -3
  32. package/.turbo/turbo-build.log +0 -37
  33. package/CHANGELOG.md +0 -83
  34. package/LICENSE.txt +0 -202
  35. package/build.config.ts +0 -16
  36. package/dist/index.cjs +0 -34
  37. package/dist/index.d.cts +0 -21
  38. package/dist/index.d.mts +0 -21
  39. package/dist/index.d.ts +0 -21
  40. package/dist/index.mjs +0 -19
  41. package/dist/shared/indexer.371c0482.mjs +0 -15
  42. package/dist/shared/indexer.3852a4d3.d.ts +0 -91
  43. package/dist/shared/indexer.50aa7ab0.mjs +0 -268
  44. package/dist/shared/indexer.7c118fb5.d.cts +0 -28
  45. package/dist/shared/indexer.7c118fb5.d.mts +0 -28
  46. package/dist/shared/indexer.7c118fb5.d.ts +0 -28
  47. package/dist/shared/indexer.a27bcb35.d.cts +0 -91
  48. package/dist/shared/indexer.c8ef02ea.cjs +0 -289
  49. package/dist/shared/indexer.e05aedca.cjs +0 -19
  50. package/dist/shared/indexer.f7dd57e5.d.mts +0 -91
  51. package/dist/sinks/csv.cjs +0 -66
  52. package/dist/sinks/csv.d.cts +0 -34
  53. package/dist/sinks/csv.d.mts +0 -34
  54. package/dist/sinks/csv.d.ts +0 -34
  55. package/dist/sinks/csv.mjs +0 -59
  56. package/dist/sinks/sqlite.cjs +0 -71
  57. package/dist/sinks/sqlite.d.cts +0 -41
  58. package/dist/sinks/sqlite.d.mts +0 -41
  59. package/dist/sinks/sqlite.d.ts +0 -41
  60. package/dist/sinks/sqlite.mjs +0 -68
  61. package/dist/testing/index.cjs +0 -63
  62. package/dist/testing/index.d.cts +0 -29
  63. package/dist/testing/index.d.mts +0 -29
  64. package/dist/testing/index.d.ts +0 -29
  65. package/dist/testing/index.mjs +0 -59
  66. package/tsconfig.json +0 -11
@@ -0,0 +1,47 @@
1
+ import type { Cursor } from "@apibara/protocol";
2
+ import {
3
+ type ExtractTablesWithRelations,
4
+ type SQL,
5
+ type TablesRelationalConfig,
6
+ sql,
7
+ } from "drizzle-orm";
8
+ import type {
9
+ PgQueryResultHKT,
10
+ PgTable,
11
+ PgTransaction,
12
+ PgUpdateBase,
13
+ PgUpdateSetSource,
14
+ } from "drizzle-orm/pg-core";
15
+
16
+ export class DrizzleSinkUpdate<
17
+ TTable extends PgTable,
18
+ TQueryResult extends PgQueryResultHKT,
19
+ TFullSchema extends Record<string, unknown> = Record<string, never>,
20
+ TSchema extends
21
+ TablesRelationalConfig = ExtractTablesWithRelations<TFullSchema>,
22
+ > {
23
+ constructor(
24
+ private db: PgTransaction<TQueryResult, TFullSchema, TSchema>,
25
+ private table: TTable,
26
+ private endCursor?: Cursor,
27
+ ) {}
28
+
29
+ set(values: PgUpdateSetSource<TTable>): PgUpdateBase<TTable, TQueryResult> {
30
+ const originalUpdate = this.db.update(this.table);
31
+ const originalSet = originalUpdate.set(values);
32
+ return {
33
+ ...originalSet,
34
+ where: async (where: SQL | undefined) => {
35
+ await this.db
36
+ .update(this.table)
37
+ .set({
38
+ _cursor: sql`int8range(lower(_cursor), ${Number(this.endCursor?.orderKey!)}, '[)')`,
39
+ } as PgUpdateSetSource<TTable>)
40
+ .where(sql`${where ? sql`${where} AND ` : sql``}upper_inf(_cursor)`)
41
+ .execute();
42
+
43
+ return originalSet.where(where);
44
+ },
45
+ } as PgUpdateBase<TTable, TQueryResult>;
46
+ }
47
+ }
@@ -0,0 +1,36 @@
1
+ import type { PgTableFn } from "drizzle-orm/pg-core";
2
+ import { pgTable as drizzlePgTable } from "drizzle-orm/pg-core";
3
+ import range from "postgres-range";
4
+ import { Int8Range, int8range } from "./Int8Range";
5
+
6
+ export const pgTable: PgTableFn = (name, columns, extraConfig?) => {
7
+ return drizzlePgTable(
8
+ name,
9
+ {
10
+ ...columns,
11
+ _cursor: int8range("_cursor").notNull(),
12
+ },
13
+ extraConfig,
14
+ );
15
+ };
16
+
17
+ export const getDrizzleCursor = (
18
+ cursor_range: [bigint | undefined, bigint | undefined] | bigint | undefined,
19
+ ) => {
20
+ const isArray = Array.isArray(cursor_range);
21
+ const [lower, upper] = isArray ? cursor_range : [cursor_range, undefined];
22
+ let isNoUpperBound = false;
23
+ if (!lower) {
24
+ throw new Error("Lower bound cursor is required");
25
+ }
26
+ if (!upper) {
27
+ isNoUpperBound = true;
28
+ }
29
+ return new Int8Range(
30
+ new range.Range(
31
+ Number(lower),
32
+ Number(upper),
33
+ range.RANGE_LB_INC | (isNoUpperBound ? range.RANGE_UB_INF : 0),
34
+ ),
35
+ );
36
+ };
@@ -5,6 +5,7 @@ import {
5
5
  } from "@apibara/protocol/testing";
6
6
  import Database from "better-sqlite3";
7
7
  import { describe, expect, it } from "vitest";
8
+ import { useSink } from "../hooks";
8
9
  import { run } from "../indexer";
9
10
  import {} from "../plugins/persistence";
10
11
  import { generateMockMessages } from "../testing";
@@ -33,7 +34,18 @@ describe("Run Test", () => {
33
34
  database: db,
34
35
  tableName: "test",
35
36
  });
36
- await run(client, getMockIndexer(), sink);
37
+ await run(
38
+ client,
39
+ getMockIndexer({
40
+ sink,
41
+ override: {
42
+ transform: async ({ context, endCursor, block: { data } }) => {
43
+ const { writer } = useSink({ context });
44
+ writer.insert([{ data }]);
45
+ },
46
+ },
47
+ }),
48
+ );
37
49
 
38
50
  const sinkData = db.prepare("SELECT * FROM test").all();
39
51
 
@@ -1,6 +1,6 @@
1
1
  import type { Cursor } from "@apibara/protocol";
2
2
  import type { Database as SqliteDatabase } from "better-sqlite3";
3
- import { Sink, type SinkData, type SinkWriteArgs } from "../sink";
3
+ import { Sink, type SinkCursorParams, type SinkData } from "../sink";
4
4
 
5
5
  export type SqliteSinkOptions = {
6
6
  /**
@@ -24,6 +24,48 @@ export type SqliteSinkOptions = {
24
24
  onConflict?: { on: string; update: string[] };
25
25
  };
26
26
 
27
+ type TxnContext = {
28
+ buffer: SinkData[];
29
+ };
30
+
31
+ type TxnParams = {
32
+ writer: {
33
+ insert: (data: SinkData[]) => void;
34
+ };
35
+ };
36
+ const transactionHelper = (context: TxnContext) => {
37
+ return {
38
+ insert: (data: SinkData[]) => {
39
+ context.buffer.push(...data);
40
+ },
41
+ };
42
+ };
43
+
44
+ /**
45
+ * A sink that writes data to a SQLite database.
46
+ *
47
+ * @example
48
+ *
49
+ * ```ts
50
+ * const sink = sqlite({
51
+ * database: db,
52
+ * tableName: "test",
53
+ * });
54
+ *
55
+ * ...
56
+ * async transform({context, endCursor}){
57
+ * const { writer } = useSink(context);
58
+ * const insertHelper = writer(endCursor);
59
+ *
60
+ * insertHelper.insert([
61
+ * { id: 1, name: "John" },
62
+ * { id: 2, name: "Jane" },
63
+ * ]);
64
+ * }
65
+ *
66
+ * ```
67
+ */
68
+
27
69
  export class SqliteSink extends Sink {
28
70
  private _config: Omit<SqliteSinkOptions, "database">;
29
71
  private _db: SqliteDatabase;
@@ -35,13 +77,31 @@ export class SqliteSink extends Sink {
35
77
  this._db = database;
36
78
  }
37
79
 
38
- async write({ data, endCursor, finality }: SinkWriteArgs) {
39
- await this.callHook("write", { data });
40
-
80
+ private async write({
81
+ data,
82
+ endCursor,
83
+ }: { data: SinkData[]; endCursor?: Cursor }) {
41
84
  data = this.processCursorColumn(data, endCursor);
42
85
  await this.insertJsonArray(data);
86
+ }
87
+
88
+ async transaction(
89
+ { cursor, endCursor, finality }: SinkCursorParams,
90
+ cb: (params: TxnParams) => Promise<void>,
91
+ ) {
92
+ const context: TxnContext = {
93
+ buffer: [],
94
+ };
95
+
96
+ const writer = transactionHelper(context);
97
+
98
+ await cb({ writer });
99
+ await this.write({ data: context.buffer, endCursor });
100
+ }
43
101
 
44
- await this.callHook("flush", { endCursor, finality });
102
+ async invalidate(cursor?: Cursor) {
103
+ // TODO: Implement
104
+ throw new Error("Not implemented");
45
105
  }
46
106
 
47
107
  private async insertJsonArray(data: SinkData[]) {
@@ -3,23 +3,30 @@ import {
3
3
  type MockFilter,
4
4
  MockStream,
5
5
  } from "@apibara/protocol/testing";
6
- import { createIndexer, defineIndexer } from "../indexer";
6
+ import { type IndexerConfig, createIndexer, defineIndexer } from "../indexer";
7
7
  import type { IndexerPlugin } from "../plugins";
8
+ import type { Sink } from "../sink";
8
9
 
9
- export const getMockIndexer = (
10
- plugins: ReadonlyArray<IndexerPlugin<MockFilter, MockBlock, MockRet>> = [],
11
- ) =>
10
+ export const getMockIndexer = <TTxnParams>({
11
+ plugins,
12
+ sink,
13
+ override,
14
+ }: {
15
+ plugins?: ReadonlyArray<IndexerPlugin<MockFilter, MockBlock, TTxnParams>>;
16
+ sink?: Sink<TTxnParams>;
17
+ override?: Partial<IndexerConfig<MockFilter, MockBlock, TTxnParams>>;
18
+ } = {}) =>
12
19
  createIndexer(
13
20
  defineIndexer(MockStream)({
14
21
  streamUrl: "https://sepolia.ethereum.a5a.ch",
15
22
  finality: "accepted",
16
23
  filter: {},
17
- async transform({ block: { data } }) {
18
- if (!data) return [];
19
-
20
- return [{ data }];
24
+ async transform({ block: { data }, context }) {
25
+ // TODO
21
26
  },
27
+ sink,
22
28
  plugins,
29
+ ...override,
23
30
  }),
24
31
  );
25
32
 
@@ -16,17 +16,17 @@ export const test = viTest.extend({
16
16
  },
17
17
  });
18
18
 
19
- type WithClientContext<TFilter, TBlock, TRet> = {
19
+ type WithClientContext<TFilter, TBlock, TTxnParams> = {
20
20
  run: (
21
- indexerArgs: Indexer<TFilter, TBlock, TRet>,
21
+ indexerArgs: Indexer<TFilter, TBlock, TTxnParams>,
22
22
  ) => Promise<VcrReplayResult>;
23
23
  };
24
24
 
25
- async function withClient<TFilter, TBlock, TRet>(
25
+ async function withClient<TFilter, TBlock, TTxnParams>(
26
26
  cassetteName: string,
27
27
  range: { fromBlock: bigint; toBlock: bigint },
28
28
  callback: (
29
- context: WithClientContext<TFilter, TBlock, TRet>,
29
+ context: WithClientContext<TFilter, TBlock, TTxnParams>,
30
30
  ) => Promise<void>,
31
31
  ) {
32
32
  const vcrConfig: VcrConfig = {
@@ -43,7 +43,7 @@ async function withClient<TFilter, TBlock, TRet>(
43
43
  },
44
44
  };
45
45
 
46
- const context: WithClientContext<TFilter, TBlock, TRet> = {
46
+ const context: WithClientContext<TFilter, TBlock, TTxnParams> = {
47
47
  async run(indexer) {
48
48
  const client = loadCassette<TFilter, TBlock>(vcrConfig, cassetteName);
49
49
 
@@ -1,13 +1,51 @@
1
- import { Sink, type SinkWriteArgs } from "../sink";
1
+ import type { Cursor } from "@apibara/protocol";
2
+ import { Sink, type SinkCursorParams, type SinkData } from "../sink";
2
3
  import type { VcrReplayResult } from "../vcr";
3
4
 
5
+ type TxnContext = {
6
+ buffer: SinkData[];
7
+ };
8
+
9
+ type TxnParams = {
10
+ writer: {
11
+ insert: (data: SinkData[]) => void;
12
+ };
13
+ };
14
+
15
+ const transactionHelper = (context: TxnContext) => {
16
+ return {
17
+ insert: (data: SinkData[]) => {
18
+ context.buffer.push(...data);
19
+ },
20
+ };
21
+ };
22
+
4
23
  export class VcrSink extends Sink {
5
24
  public result: VcrReplayResult["outputs"] = [];
6
25
 
7
- async write({ data, endCursor, finality }: SinkWriteArgs) {
8
- await this.callHook("write", { data });
26
+ write({ data, endCursor }: { data: SinkData[]; endCursor?: Cursor }) {
27
+ if (data.length === 0) return;
28
+
9
29
  this.result.push({ data, endCursor });
10
- await this.callHook("flush", { endCursor, finality });
30
+ }
31
+
32
+ async transaction(
33
+ { cursor, endCursor, finality }: SinkCursorParams,
34
+ cb: (params: TxnParams) => Promise<void>,
35
+ ) {
36
+ const context: TxnContext = {
37
+ buffer: [],
38
+ };
39
+
40
+ const writer = transactionHelper(context);
41
+
42
+ await cb({ writer });
43
+ this.write({ data: context.buffer, endCursor });
44
+ }
45
+
46
+ async invalidate(cursor?: Cursor) {
47
+ // TODO: Implement
48
+ throw new Error("Not implemented");
11
49
  }
12
50
  }
13
51
 
package/src/vcr/record.ts CHANGED
@@ -11,10 +11,10 @@ export type CassetteDataType<TFilter, TBlock> = {
11
11
  messages: StreamDataResponse<TBlock>[];
12
12
  };
13
13
 
14
- export async function record<TFilter, TBlock, TRet>(
14
+ export async function record<TFilter, TBlock, TTxnParams>(
15
15
  vcrConfig: VcrConfig,
16
16
  client: Client<TFilter, TBlock>,
17
- indexerArg: Indexer<TFilter, TBlock, TRet>,
17
+ indexerArg: Indexer<TFilter, TBlock, TTxnParams>,
18
18
  cassetteOptions: CassetteOptions,
19
19
  ) {
20
20
  const indexer = klona(indexerArg);
package/src/vcr/replay.ts CHANGED
@@ -9,16 +9,16 @@ import { vcr } from "../testing/vcr";
9
9
  import { type CassetteDataType, deserialize } from "../vcr";
10
10
  import type { VcrConfig } from "./config";
11
11
 
12
- export async function replay<TFilter, TBlock, TRet>(
12
+ export async function replay<TFilter, TBlock, TTxnParams>(
13
13
  vcrConfig: VcrConfig,
14
- indexer: Indexer<TFilter, TBlock, TRet>,
14
+ indexer: Indexer<TFilter, TBlock, TTxnParams>,
15
15
  cassetteName: string,
16
16
  ): Promise<VcrReplayResult> {
17
17
  const client = loadCassette<TFilter, TBlock>(vcrConfig, cassetteName);
18
18
 
19
19
  const sink = vcr();
20
20
 
21
- await run(client, indexer, sink);
21
+ await run(client, indexer);
22
22
 
23
23
  return {
24
24
  outputs: sink.result,
@@ -1,37 +0,0 @@
1
-
2
- > @apibara/indexer@2.0.0-beta.0 build /home/runner/work/typescript-sdk/typescript-sdk/packages/indexer
3
- > unbuild
4
-
5
- ℹ Building indexer
6
- ℹ Cleaning dist directory: ./dist
7
- ✔ Build succeeded for indexer
8
- dist/index.cjs (total size: 11.1 kB, chunk size: 1.03 kB, exports: DefaultSink, Sink, createIndexer, defaultSink, defineIndexer, defineIndexerPlugin, deserialize, isCassetteAvailable, loadCassette, record, replay, run, serialize, useIndexerContext)
9
- └─ dist/shared/indexer.c8ef02ea.cjs (9.67 kB)
10
- └─ dist/shared/indexer.e05aedca.cjs (431 B)
11
-
12
- dist/sinks/sqlite.cjs (total size: 2.88 kB, chunk size: 2.45 kB, exports: SqliteSink, sqlite)
13
- └─ dist/shared/indexer.e05aedca.cjs (431 B)
14
-
15
- dist/sinks/csv.cjs (total size: 2.37 kB, chunk size: 1.94 kB, exports: CsvSink, csv)
16
- └─ dist/shared/indexer.e05aedca.cjs (431 B)
17
-
18
- dist/testing/index.cjs (total size: 11.7 kB, chunk size: 1.58 kB, exports: VcrSink, generateMockMessages, test, vcr)
19
- └─ dist/shared/indexer.c8ef02ea.cjs (9.67 kB)
20
- └─ dist/shared/indexer.e05aedca.cjs (431 B)
21
-
22
- dist/index.mjs (total size: 9.91 kB, chunk size: 661 B, exports: DefaultSink, Sink, createIndexer, defaultSink, defineIndexer, defineIndexerPlugin, deserialize, isCassetteAvailable, loadCassette, record, replay, run, serialize, useIndexerContext)
23
- └─ dist/shared/indexer.50aa7ab0.mjs (8.88 kB)
24
- └─ dist/shared/indexer.371c0482.mjs (373 B)
25
-
26
- dist/sinks/sqlite.mjs (total size: 2.78 kB, chunk size: 2.4 kB, exports: SqliteSink, sqlite)
27
- └─ dist/shared/indexer.371c0482.mjs (373 B)
28
-
29
- dist/sinks/csv.mjs (total size: 2.08 kB, chunk size: 1.7 kB, exports: CsvSink, csv)
30
- └─ dist/shared/indexer.371c0482.mjs (373 B)
31
-
32
- dist/testing/index.mjs (total size: 10.8 kB, chunk size: 1.55 kB, exports: VcrSink, generateMockMessages, test, vcr)
33
- └─ dist/shared/indexer.50aa7ab0.mjs (8.88 kB)
34
- └─ dist/shared/indexer.371c0482.mjs (373 B)
35
-
36
- Σ Total dist size (byte size): 61.4 kB
37
-
package/CHANGELOG.md DELETED
@@ -1,83 +0,0 @@
1
- # @apibara/indexer
2
-
3
- ## 0.4.1
4
-
5
- ### Patch Changes
6
-
7
- - [#73](https://github.com/apibara/typescript-sdk/pull/73) [`4520e1e4b5d16ea63877f2adea9f2fa7c2ec74e6`](https://github.com/apibara/typescript-sdk/commit/4520e1e4b5d16ea63877f2adea9f2fa7c2ec74e6) Thanks [@fracek](https://github.com/fracek)! - Fix execution resources types
8
-
9
- ## 0.4.0
10
-
11
- ### Minor Changes
12
-
13
- - [#71](https://github.com/apibara/typescript-sdk/pull/71) [`267120a54b084e5a18ff112b044776ccba97353f`](https://github.com/apibara/typescript-sdk/commit/267120a54b084e5a18ff112b044776ccba97353f) Thanks [@fracek](https://github.com/fracek)! - Update Starknet type definitions
14
-
15
- ## 0.3.1
16
-
17
- ### Patch Changes
18
-
19
- - [#69](https://github.com/apibara/typescript-sdk/pull/69) [`c62d304bf8e6bcd5db7583b9378349a9c13bc0bf`](https://github.com/apibara/typescript-sdk/commit/c62d304bf8e6bcd5db7583b9378349a9c13bc0bf) Thanks [@fracek](https://github.com/fracek)! - Make all fields nullable
20
-
21
- ## 0.3.0
22
-
23
- ### Minor Changes
24
-
25
- - [#66](https://github.com/apibara/typescript-sdk/pull/66) [`448f74c30088784726c3a8e6efa3f34966e4b424`](https://github.com/apibara/typescript-sdk/commit/448f74c30088784726c3a8e6efa3f34966e4b424) Thanks [@fracek](https://github.com/fracek)! - Add V3 transaction types
26
-
27
- ## 0.2.5
28
-
29
- ### Patch Changes
30
-
31
- - [#64](https://github.com/apibara/typescript-sdk/pull/64) [`fa3ba914f38c278ad8a9bc74a325914b560856a3`](https://github.com/apibara/typescript-sdk/commit/fa3ba914f38c278ad8a9bc74a325914b560856a3) Thanks [@fracek](https://github.com/fracek)! - Fix bug in lookupEventFromSelector
32
-
33
- ## 0.2.4
34
-
35
- ### Patch Changes
36
-
37
- - [#62](https://github.com/apibara/typescript-sdk/pull/62) [`39fe427cf763e5b7d273e0ded7be2f68adf447b9`](https://github.com/apibara/typescript-sdk/commit/39fe427cf763e5b7d273e0ded7be2f68adf447b9) Thanks [@fracek](https://github.com/fracek)! - Add method to lookup event name from selector
38
-
39
- ## 0.2.3
40
-
41
- ### Patch Changes
42
-
43
- - [#60](https://github.com/apibara/typescript-sdk/pull/60) [`3282cc44c917ce1764ad223282a6f5040d3b89c1`](https://github.com/apibara/typescript-sdk/commit/3282cc44c917ce1764ad223282a6f5040d3b89c1) Thanks [@fracek](https://github.com/fracek)! - Customize Contract event filter
44
-
45
- ## 0.2.2
46
-
47
- ### Patch Changes
48
-
49
- - [#52](https://github.com/apibara/typescript-sdk/pull/52) [`59bbe52`](https://github.com/apibara/typescript-sdk/commit/59bbe526c1fd2c7d7315a50df02c061f1d87f770) Thanks [@fracek](https://github.com/fracek)! - Add include transaction and receipt option
50
-
51
- ## 0.2.1
52
-
53
- ### Patch Changes
54
-
55
- - [#50](https://github.com/apibara/typescript-sdk/pull/50) [`b65086a`](https://github.com/apibara/typescript-sdk/commit/b65086a3663d40a9c27bae1e5fb7fc0cad79581f) Thanks [@fracek](https://github.com/fracek)! - Fix Starknet Block types
56
-
57
- ## 0.2.0
58
-
59
- ### Minor Changes
60
-
61
- - [#48](https://github.com/apibara/typescript-sdk/pull/48) [`b54a103`](https://github.com/apibara/typescript-sdk/commit/b54a103321752dccc7aba5988a2dc598b8d7dfc8) Thanks [@fracek](https://github.com/fracek)! - Improve starknet Filter type
62
-
63
- ### Patch Changes
64
-
65
- - [#48](https://github.com/apibara/typescript-sdk/pull/48) [`b54a103`](https://github.com/apibara/typescript-sdk/commit/b54a103321752dccc7aba5988a2dc598b8d7dfc8) Thanks [@fracek](https://github.com/fracek)! - Fix Mongo sink type
66
-
67
- ## 0.1.2
68
-
69
- ### Patch Changes
70
-
71
- - [#46](https://github.com/apibara/typescript-sdk/pull/46) [`aade5c4`](https://github.com/apibara/typescript-sdk/commit/aade5c46da8daec2e3aa7749a5a7d083cca25867) Thanks [@fracek](https://github.com/fracek)! - Publish typescript types
72
-
73
- ## 0.1.1
74
-
75
- ### Patch Changes
76
-
77
- - [#44](https://github.com/apibara/typescript-sdk/pull/44) [`0a96377`](https://github.com/apibara/typescript-sdk/commit/0a963770459c71d21a84d56dbb9e74f4beaa7349) Thanks [@fracek](https://github.com/fracek)! - Fix esm module exports
78
-
79
- ## 0.1.0
80
-
81
- ### Minor Changes
82
-
83
- - [#42](https://github.com/apibara/typescript-sdk/pull/42) [`603cfa7`](https://github.com/apibara/typescript-sdk/commit/603cfa72bac2c3bc0de54a3fc046555f7165ae56) Thanks [@fracek](https://github.com/fracek)! - Initial release