@apibara/protocol 2.0.0-beta.26 → 2.0.0-beta.28
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.
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/shared/{protocol.d9596779.mjs → protocol.32079ba8.mjs} +4 -1
- package/dist/shared/{protocol.e1dec68a.cjs → protocol.74b3c596.cjs} +4 -0
- package/dist/shared/{protocol.59e5839c.d.cts → protocol.f9e14c27.d.cts} +2 -1
- package/dist/shared/{protocol.59e5839c.d.mts → protocol.f9e14c27.d.mts} +2 -1
- package/dist/shared/{protocol.59e5839c.d.ts → protocol.f9e14c27.d.ts} +2 -1
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +1 -1
- package/src/common.ts +4 -0
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const config = require('./shared/protocol.
|
|
3
|
+
const config = require('./shared/protocol.74b3c596.cjs');
|
|
4
4
|
const schema = require('@effect/schema');
|
|
5
5
|
const niceGrpc = require('nice-grpc');
|
|
6
6
|
require('protobufjs/minimal.js');
|
|
@@ -183,6 +183,7 @@ exports.cursorFromBytes = config.cursorFromBytes;
|
|
|
183
183
|
exports.cursorFromProto = config.cursorFromProto;
|
|
184
184
|
exports.cursorToBytes = config.cursorToBytes;
|
|
185
185
|
exports.cursorToProto = config.cursorToProto;
|
|
186
|
+
exports.isCursor = config.isCursor;
|
|
186
187
|
exports.ClientError = niceGrpc.ClientError;
|
|
187
188
|
exports.Status = niceGrpc.Status;
|
|
188
189
|
exports.GrpcClient = GrpcClient;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as stream } from './shared/protocol.
|
|
2
|
-
export { B as Bytes, b as BytesFromUint8Array,
|
|
1
|
+
import { s as stream } from './shared/protocol.f9e14c27.cjs';
|
|
2
|
+
export { B as Bytes, b as BytesFromUint8Array, E as Client, z as ClientCallOptions, G as CreateClientOptions, c as Cursor, g as CursorFromBytes, C as CursorProto, w as Data, p as DataFinality, D as DnaStreamClient, a as DnaStreamDefinition, q as Duration, F as Finalize, K as GrpcClient, H as Heartbeat, I as Invalidate, S as StatusRequest, m as StatusResponse, u as StdErr, t as StdOut, y as StreamConfig, L as StreamDataIterable, A as StreamDataOptions, r as StreamDataRequest, x as StreamDataResponse, v as SystemMessage, _ as _Cursor, J as createClient, d as createCursor, i as cursorFromBytes, f as cursorFromProto, h as cursorToBytes, e as cursorToProto, j as isCursor, l as statusRequestFromProto, k as statusRequestToProto, o as statusResponseFromProto, n as statusResponseToProto } from './shared/protocol.f9e14c27.cjs';
|
|
3
3
|
import _m0 from 'protobufjs/minimal.js';
|
|
4
4
|
export { ClientError, Status } from 'nice-grpc';
|
|
5
5
|
import '@effect/schema';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as stream } from './shared/protocol.
|
|
2
|
-
export { B as Bytes, b as BytesFromUint8Array,
|
|
1
|
+
import { s as stream } from './shared/protocol.f9e14c27.mjs';
|
|
2
|
+
export { B as Bytes, b as BytesFromUint8Array, E as Client, z as ClientCallOptions, G as CreateClientOptions, c as Cursor, g as CursorFromBytes, C as CursorProto, w as Data, p as DataFinality, D as DnaStreamClient, a as DnaStreamDefinition, q as Duration, F as Finalize, K as GrpcClient, H as Heartbeat, I as Invalidate, S as StatusRequest, m as StatusResponse, u as StdErr, t as StdOut, y as StreamConfig, L as StreamDataIterable, A as StreamDataOptions, r as StreamDataRequest, x as StreamDataResponse, v as SystemMessage, _ as _Cursor, J as createClient, d as createCursor, i as cursorFromBytes, f as cursorFromProto, h as cursorToBytes, e as cursorToProto, j as isCursor, l as statusRequestFromProto, k as statusRequestToProto, o as statusResponseFromProto, n as statusResponseToProto } from './shared/protocol.f9e14c27.mjs';
|
|
3
3
|
import _m0 from 'protobufjs/minimal.js';
|
|
4
4
|
export { ClientError, Status } from 'nice-grpc';
|
|
5
5
|
import '@effect/schema';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as stream } from './shared/protocol.
|
|
2
|
-
export { B as Bytes, b as BytesFromUint8Array,
|
|
1
|
+
import { s as stream } from './shared/protocol.f9e14c27.js';
|
|
2
|
+
export { B as Bytes, b as BytesFromUint8Array, E as Client, z as ClientCallOptions, G as CreateClientOptions, c as Cursor, g as CursorFromBytes, C as CursorProto, w as Data, p as DataFinality, D as DnaStreamClient, a as DnaStreamDefinition, q as Duration, F as Finalize, K as GrpcClient, H as Heartbeat, I as Invalidate, S as StatusRequest, m as StatusResponse, u as StdErr, t as StdOut, y as StreamConfig, L as StreamDataIterable, A as StreamDataOptions, r as StreamDataRequest, x as StreamDataResponse, v as SystemMessage, _ as _Cursor, J as createClient, d as createCursor, i as cursorFromBytes, f as cursorFromProto, h as cursorToBytes, e as cursorToProto, j as isCursor, l as statusRequestFromProto, k as statusRequestToProto, o as statusResponseFromProto, n as statusResponseToProto } from './shared/protocol.f9e14c27.js';
|
|
3
3
|
import _m0 from 'protobufjs/minimal.js';
|
|
4
4
|
export { ClientError, Status } from 'nice-grpc';
|
|
5
5
|
import '@effect/schema';
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as stream, t as testing, C as Cursor, D as DnaStreamDefinition, S as StreamDataResponse } from './shared/protocol.
|
|
2
|
-
export { B as Bytes, a as BytesFromUint8Array, e as CursorFromBytes,
|
|
1
|
+
import { s as stream, t as testing, C as Cursor, D as DnaStreamDefinition, S as StreamDataResponse } from './shared/protocol.32079ba8.mjs';
|
|
2
|
+
export { B as Bytes, a as BytesFromUint8Array, e as CursorFromBytes, o as Data, h as DataFinality, j as Duration, F as Finalize, H as Heartbeat, I as Invalidate, m as StdErr, l as StdOut, p as StreamConfig, k as StreamDataRequest, n as SystemMessage, _ as _Cursor, c as createCursor, g as cursorFromBytes, d as cursorFromProto, f as cursorToBytes, b as cursorToProto, i as isCursor } from './shared/protocol.32079ba8.mjs';
|
|
3
3
|
import { Schema } from '@effect/schema';
|
|
4
4
|
import { createChannel, createClient as createClient$1 } from 'nice-grpc';
|
|
5
5
|
export { ClientError, Status } from 'nice-grpc';
|
|
@@ -1090,6 +1090,9 @@ const CursorFromBytes = Schema.transform(
|
|
|
1090
1090
|
);
|
|
1091
1091
|
const cursorToBytes = Schema.encodeSync(CursorFromBytes);
|
|
1092
1092
|
const cursorFromBytes = Schema.decodeSync(CursorFromBytes);
|
|
1093
|
+
function isCursor(value) {
|
|
1094
|
+
return Schema.is(Cursor)(value);
|
|
1095
|
+
}
|
|
1093
1096
|
|
|
1094
1097
|
const DataFinality = Schema.transform(
|
|
1095
1098
|
Schema.Enums(DataFinality$1),
|
|
@@ -1212,4 +1215,4 @@ class StreamConfig {
|
|
|
1212
1215
|
}
|
|
1213
1216
|
}
|
|
1214
1217
|
|
|
1215
|
-
export { Bytes as B, Cursor as C, DnaStreamDefinition as D, Finalize as F, Heartbeat as H, Invalidate as I, MockFilter as M, StreamDataResponse as S, _Cursor as _, BytesFromUint8Array as a, cursorToProto as b, createCursor as c, cursorFromProto as d, CursorFromBytes as e, cursorToBytes as f, cursorFromBytes as g, DataFinality as h,
|
|
1218
|
+
export { Bytes as B, Cursor as C, DnaStreamDefinition as D, Finalize as F, Heartbeat as H, Invalidate as I, MockFilter as M, StreamDataResponse as S, _Cursor as _, BytesFromUint8Array as a, cursorToProto as b, createCursor as c, cursorFromProto as d, CursorFromBytes as e, cursorToBytes as f, cursorFromBytes as g, DataFinality as h, isCursor as i, Duration as j, StreamDataRequest as k, StdOut as l, StdErr as m, SystemMessage as n, Data as o, StreamConfig as p, MockBlock as q, stream as s, testing as t };
|
|
@@ -1097,6 +1097,9 @@ const CursorFromBytes = schema.Schema.transform(
|
|
|
1097
1097
|
);
|
|
1098
1098
|
const cursorToBytes = schema.Schema.encodeSync(CursorFromBytes);
|
|
1099
1099
|
const cursorFromBytes = schema.Schema.decodeSync(CursorFromBytes);
|
|
1100
|
+
function isCursor(value) {
|
|
1101
|
+
return schema.Schema.is(Cursor)(value);
|
|
1102
|
+
}
|
|
1100
1103
|
|
|
1101
1104
|
const DataFinality = schema.Schema.transform(
|
|
1102
1105
|
schema.Schema.Enums(DataFinality$1),
|
|
@@ -1244,5 +1247,6 @@ exports.cursorFromBytes = cursorFromBytes;
|
|
|
1244
1247
|
exports.cursorFromProto = cursorFromProto;
|
|
1245
1248
|
exports.cursorToBytes = cursorToBytes;
|
|
1246
1249
|
exports.cursorToProto = cursorToProto;
|
|
1250
|
+
exports.isCursor = isCursor;
|
|
1247
1251
|
exports.stream = stream;
|
|
1248
1252
|
exports.testing = testing;
|
|
@@ -438,6 +438,7 @@ declare const cursorFromProto: (i: CursorProto, overrideOptions?: _effect_schema
|
|
|
438
438
|
declare const CursorFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Array, never>, Schema.Schema<Cursor, CursorProto, never>>;
|
|
439
439
|
declare const cursorToBytes: (a: Cursor, overrideOptions?: _effect_schema_AST.ParseOptions) => Uint8Array;
|
|
440
440
|
declare const cursorFromBytes: (i: Uint8Array, overrideOptions?: _effect_schema_AST.ParseOptions) => Cursor;
|
|
441
|
+
declare function isCursor(value: unknown): value is Cursor;
|
|
441
442
|
|
|
442
443
|
/** The request to the `status` endpoint. */
|
|
443
444
|
declare const StatusRequest: Schema.Struct<{}>;
|
|
@@ -714,4 +715,4 @@ declare class StreamDataIterable<TBlock> {
|
|
|
714
715
|
[Symbol.asyncIterator](): AsyncIterator<StreamDataResponse<TBlock>>;
|
|
715
716
|
}
|
|
716
717
|
|
|
717
|
-
export { type
|
|
718
|
+
export { type StreamDataOptions as A, Bytes as B, type CursorProto as C, type DnaStreamClient as D, type Client as E, Finalize as F, type CreateClientOptions as G, Heartbeat as H, Invalidate as I, createClient as J, GrpcClient as K, StreamDataIterable as L, DataFinality$1 as M, StatusRequest as S, _Cursor as _, DnaStreamDefinition as a, BytesFromUint8Array as b, Cursor as c, createCursor as d, cursorToProto as e, cursorFromProto as f, CursorFromBytes as g, cursorToBytes as h, cursorFromBytes as i, isCursor as j, statusRequestToProto as k, statusRequestFromProto as l, StatusResponse as m, statusResponseToProto as n, statusResponseFromProto as o, DataFinality as p, Duration as q, StreamDataRequest as r, stream as s, StdOut as t, StdErr as u, SystemMessage as v, Data as w, StreamDataResponse as x, StreamConfig as y, type ClientCallOptions as z };
|
|
@@ -438,6 +438,7 @@ declare const cursorFromProto: (i: CursorProto, overrideOptions?: _effect_schema
|
|
|
438
438
|
declare const CursorFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Array, never>, Schema.Schema<Cursor, CursorProto, never>>;
|
|
439
439
|
declare const cursorToBytes: (a: Cursor, overrideOptions?: _effect_schema_AST.ParseOptions) => Uint8Array;
|
|
440
440
|
declare const cursorFromBytes: (i: Uint8Array, overrideOptions?: _effect_schema_AST.ParseOptions) => Cursor;
|
|
441
|
+
declare function isCursor(value: unknown): value is Cursor;
|
|
441
442
|
|
|
442
443
|
/** The request to the `status` endpoint. */
|
|
443
444
|
declare const StatusRequest: Schema.Struct<{}>;
|
|
@@ -714,4 +715,4 @@ declare class StreamDataIterable<TBlock> {
|
|
|
714
715
|
[Symbol.asyncIterator](): AsyncIterator<StreamDataResponse<TBlock>>;
|
|
715
716
|
}
|
|
716
717
|
|
|
717
|
-
export { type
|
|
718
|
+
export { type StreamDataOptions as A, Bytes as B, type CursorProto as C, type DnaStreamClient as D, type Client as E, Finalize as F, type CreateClientOptions as G, Heartbeat as H, Invalidate as I, createClient as J, GrpcClient as K, StreamDataIterable as L, DataFinality$1 as M, StatusRequest as S, _Cursor as _, DnaStreamDefinition as a, BytesFromUint8Array as b, Cursor as c, createCursor as d, cursorToProto as e, cursorFromProto as f, CursorFromBytes as g, cursorToBytes as h, cursorFromBytes as i, isCursor as j, statusRequestToProto as k, statusRequestFromProto as l, StatusResponse as m, statusResponseToProto as n, statusResponseFromProto as o, DataFinality as p, Duration as q, StreamDataRequest as r, stream as s, StdOut as t, StdErr as u, SystemMessage as v, Data as w, StreamDataResponse as x, StreamConfig as y, type ClientCallOptions as z };
|
|
@@ -438,6 +438,7 @@ declare const cursorFromProto: (i: CursorProto, overrideOptions?: _effect_schema
|
|
|
438
438
|
declare const CursorFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Array, never>, Schema.Schema<Cursor, CursorProto, never>>;
|
|
439
439
|
declare const cursorToBytes: (a: Cursor, overrideOptions?: _effect_schema_AST.ParseOptions) => Uint8Array;
|
|
440
440
|
declare const cursorFromBytes: (i: Uint8Array, overrideOptions?: _effect_schema_AST.ParseOptions) => Cursor;
|
|
441
|
+
declare function isCursor(value: unknown): value is Cursor;
|
|
441
442
|
|
|
442
443
|
/** The request to the `status` endpoint. */
|
|
443
444
|
declare const StatusRequest: Schema.Struct<{}>;
|
|
@@ -714,4 +715,4 @@ declare class StreamDataIterable<TBlock> {
|
|
|
714
715
|
[Symbol.asyncIterator](): AsyncIterator<StreamDataResponse<TBlock>>;
|
|
715
716
|
}
|
|
716
717
|
|
|
717
|
-
export { type
|
|
718
|
+
export { type StreamDataOptions as A, Bytes as B, type CursorProto as C, type DnaStreamClient as D, type Client as E, Finalize as F, type CreateClientOptions as G, Heartbeat as H, Invalidate as I, createClient as J, GrpcClient as K, StreamDataIterable as L, DataFinality$1 as M, StatusRequest as S, _Cursor as _, DnaStreamDefinition as a, BytesFromUint8Array as b, Cursor as c, createCursor as d, cursorToProto as e, cursorFromProto as f, CursorFromBytes as g, cursorToBytes as h, cursorFromBytes as i, isCursor as j, statusRequestToProto as k, statusRequestFromProto as l, StatusResponse as m, statusResponseToProto as n, statusResponseFromProto as o, DataFinality as p, Duration as q, StreamDataRequest as r, stream as s, StdOut as t, StdErr as u, SystemMessage as v, Data as w, StreamDataResponse as x, StreamConfig as y, type ClientCallOptions as z };
|
package/dist/testing/index.cjs
CHANGED
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Client, r as StreamDataRequest, A as StreamDataOptions, x as StreamDataResponse, S as StatusRequest, z as ClientCallOptions, m as StatusResponse, y as StreamConfig, c as Cursor, C as CursorProto, M as DataFinality } from '../shared/protocol.f9e14c27.cjs';
|
|
2
2
|
import { Schema } from '@effect/schema';
|
|
3
3
|
import 'nice-grpc';
|
|
4
4
|
import 'nice-grpc-common';
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Client, r as StreamDataRequest, A as StreamDataOptions, x as StreamDataResponse, S as StatusRequest, z as ClientCallOptions, m as StatusResponse, y as StreamConfig, c as Cursor, C as CursorProto, M as DataFinality } from '../shared/protocol.f9e14c27.mjs';
|
|
2
2
|
import { Schema } from '@effect/schema';
|
|
3
3
|
import 'nice-grpc';
|
|
4
4
|
import 'nice-grpc-common';
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as Client, r as StreamDataRequest, A as StreamDataOptions, x as StreamDataResponse, S as StatusRequest, z as ClientCallOptions, m as StatusResponse, y as StreamConfig, c as Cursor, C as CursorProto, M as DataFinality } from '../shared/protocol.f9e14c27.js';
|
|
2
2
|
import { Schema } from '@effect/schema';
|
|
3
3
|
import 'nice-grpc';
|
|
4
4
|
import 'nice-grpc-common';
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from '@effect/schema';
|
|
2
|
-
import { M as MockFilter$1,
|
|
2
|
+
import { M as MockFilter$1, q as MockBlock$1, p as StreamConfig, S as StreamDataResponse } from '../shared/protocol.32079ba8.mjs';
|
|
3
3
|
import 'protobufjs/minimal.js';
|
|
4
4
|
import 'effect';
|
|
5
5
|
import 'viem';
|
package/package.json
CHANGED
package/src/common.ts
CHANGED
|
@@ -63,3 +63,7 @@ export const CursorFromBytes = Schema.transform(
|
|
|
63
63
|
|
|
64
64
|
export const cursorToBytes = Schema.encodeSync(CursorFromBytes);
|
|
65
65
|
export const cursorFromBytes = Schema.decodeSync(CursorFromBytes);
|
|
66
|
+
|
|
67
|
+
export function isCursor(value: unknown): value is Cursor {
|
|
68
|
+
return Schema.is(Cursor)(value);
|
|
69
|
+
}
|