@apibara/protocol 0.1.2 → 0.2.0
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/buffer.d.ts +1 -1
- package/dist/buffer.js +1 -1
- package/dist/proto/apibara/node/v1alpha1/StreamMessagesRequest.d.ts +2 -0
- package/dist/proto/apibara/node/v1alpha1/StreamMessagesResponse.d.ts +4 -2
- package/dist/proto/node.proto +3 -0
- package/package.json +1 -1
- package/src/buffer.ts +1 -1
- package/src/proto/apibara/node/v1alpha1/StreamMessagesRequest.ts +2 -0
- package/src/proto/apibara/node/v1alpha1/StreamMessagesResponse.ts +4 -2
- package/src/proto/node.proto +3 -0
package/dist/buffer.d.ts
CHANGED
package/dist/buffer.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.bufferToHex = exports.hexToBuffer = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Converts the hex-encoded bytes to a `Buffer`.
|
|
6
6
|
* @param hex The hex string
|
|
7
|
-
* @param size The buffer size, in
|
|
7
|
+
* @param size The buffer size, in bytes
|
|
8
8
|
*/
|
|
9
9
|
function hexToBuffer(hex, size) {
|
|
10
10
|
const padSize = size * 2;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Long } from '@grpc/proto-loader';
|
|
2
2
|
export interface StreamMessagesRequest {
|
|
3
3
|
'startingSequence'?: (number | string | Long);
|
|
4
|
+
'pendingBlockIntervalSeconds'?: (number);
|
|
4
5
|
}
|
|
5
6
|
export interface StreamMessagesRequest__Output {
|
|
6
7
|
'startingSequence': (string);
|
|
8
|
+
'pendingBlockIntervalSeconds': (number);
|
|
7
9
|
}
|
|
@@ -5,11 +5,13 @@ export interface StreamMessagesResponse {
|
|
|
5
5
|
'invalidate'?: (_apibara_node_v1alpha1_Invalidate | null);
|
|
6
6
|
'data'?: (_apibara_node_v1alpha1_Data | null);
|
|
7
7
|
'heartbeat'?: (_apibara_node_v1alpha1_Heartbeat | null);
|
|
8
|
-
'
|
|
8
|
+
'pending'?: (_apibara_node_v1alpha1_Data | null);
|
|
9
|
+
'message'?: "invalidate" | "data" | "heartbeat" | "pending";
|
|
9
10
|
}
|
|
10
11
|
export interface StreamMessagesResponse__Output {
|
|
11
12
|
'invalidate'?: (_apibara_node_v1alpha1_Invalidate__Output | null);
|
|
12
13
|
'data'?: (_apibara_node_v1alpha1_Data__Output | null);
|
|
13
14
|
'heartbeat'?: (_apibara_node_v1alpha1_Heartbeat__Output | null);
|
|
14
|
-
'
|
|
15
|
+
'pending'?: (_apibara_node_v1alpha1_Data__Output | null);
|
|
16
|
+
'message': "invalidate" | "data" | "heartbeat" | "pending";
|
|
15
17
|
}
|
package/dist/proto/node.proto
CHANGED
|
@@ -70,6 +70,8 @@ message ConnectResponse {
|
|
|
70
70
|
message StreamMessagesRequest {
|
|
71
71
|
// Start streaming from the provided sequence number.
|
|
72
72
|
uint64 starting_sequence = 1;
|
|
73
|
+
// If greater than 0, send pending blocks at the specified interval.
|
|
74
|
+
uint32 pending_block_interval_seconds = 2;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
// Message sent from the node to the client.
|
|
@@ -78,6 +80,7 @@ message StreamMessagesResponse {
|
|
|
78
80
|
Invalidate invalidate = 1;
|
|
79
81
|
Data data = 2;
|
|
80
82
|
Heartbeat heartbeat = 3;
|
|
83
|
+
Data pending = 4;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
|
package/package.json
CHANGED
package/src/buffer.ts
CHANGED
|
@@ -4,8 +4,10 @@ import type { Long } from '@grpc/proto-loader';
|
|
|
4
4
|
|
|
5
5
|
export interface StreamMessagesRequest {
|
|
6
6
|
'startingSequence'?: (number | string | Long);
|
|
7
|
+
'pendingBlockIntervalSeconds'?: (number);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export interface StreamMessagesRequest__Output {
|
|
10
11
|
'startingSequence': (string);
|
|
12
|
+
'pendingBlockIntervalSeconds': (number);
|
|
11
13
|
}
|
|
@@ -8,12 +8,14 @@ export interface StreamMessagesResponse {
|
|
|
8
8
|
'invalidate'?: (_apibara_node_v1alpha1_Invalidate | null);
|
|
9
9
|
'data'?: (_apibara_node_v1alpha1_Data | null);
|
|
10
10
|
'heartbeat'?: (_apibara_node_v1alpha1_Heartbeat | null);
|
|
11
|
-
'
|
|
11
|
+
'pending'?: (_apibara_node_v1alpha1_Data | null);
|
|
12
|
+
'message'?: "invalidate"|"data"|"heartbeat"|"pending";
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export interface StreamMessagesResponse__Output {
|
|
15
16
|
'invalidate'?: (_apibara_node_v1alpha1_Invalidate__Output | null);
|
|
16
17
|
'data'?: (_apibara_node_v1alpha1_Data__Output | null);
|
|
17
18
|
'heartbeat'?: (_apibara_node_v1alpha1_Heartbeat__Output | null);
|
|
18
|
-
'
|
|
19
|
+
'pending'?: (_apibara_node_v1alpha1_Data__Output | null);
|
|
20
|
+
'message': "invalidate"|"data"|"heartbeat"|"pending";
|
|
19
21
|
}
|
package/src/proto/node.proto
CHANGED
|
@@ -70,6 +70,8 @@ message ConnectResponse {
|
|
|
70
70
|
message StreamMessagesRequest {
|
|
71
71
|
// Start streaming from the provided sequence number.
|
|
72
72
|
uint64 starting_sequence = 1;
|
|
73
|
+
// If greater than 0, send pending blocks at the specified interval.
|
|
74
|
+
uint32 pending_block_interval_seconds = 2;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
// Message sent from the node to the client.
|
|
@@ -78,6 +80,7 @@ message StreamMessagesResponse {
|
|
|
78
80
|
Invalidate invalidate = 1;
|
|
79
81
|
Data data = 2;
|
|
80
82
|
Heartbeat heartbeat = 3;
|
|
83
|
+
Data pending = 4;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
|