@notifi-network/fusion-sdk 0.0.1-canary10

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 (30) hide show
  1. package/LICENSE +21 -0
  2. package/dist/fusion_wrappers/blockchain_proxies.d.ts +24 -0
  3. package/dist/fusion_wrappers/blockchain_proxies.js +131 -0
  4. package/dist/fusion_wrappers/fetch_proxy.d.ts +9 -0
  5. package/dist/fusion_wrappers/fetch_proxy.js +31 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.js +7 -0
  8. package/dist/protos_gen/google/protobuf/duration.d.ts +99 -0
  9. package/dist/protos_gen/google/protobuf/duration.js +89 -0
  10. package/dist/protos_gen/google/protobuf/empty.d.ts +33 -0
  11. package/dist/protos_gen/google/protobuf/empty.js +45 -0
  12. package/dist/protos_gen/google/protobuf/struct.d.ts +107 -0
  13. package/dist/protos_gen/google/protobuf/struct.js +451 -0
  14. package/dist/protos_gen/google/protobuf/timestamp.d.ts +128 -0
  15. package/dist/protos_gen/google/protobuf/timestamp.js +89 -0
  16. package/dist/protos_gen/google/protobuf/wrappers.d.ts +138 -0
  17. package/dist/protos_gen/google/protobuf/wrappers.js +505 -0
  18. package/dist/protos_gen/notifi/common/v1/types.d.ts +752 -0
  19. package/dist/protos_gen/notifi/common/v1/types.js +7300 -0
  20. package/dist/protos_gen/services/blockchain_manager/v1/blockchain_manager.d.ts +587 -0
  21. package/dist/protos_gen/services/blockchain_manager/v1/blockchain_manager.js +3482 -0
  22. package/dist/protos_gen/services/fetch_proxy/v1/fetch_proxy.d.ts +87 -0
  23. package/dist/protos_gen/services/fetch_proxy/v1/fetch_proxy.js +427 -0
  24. package/dist/protos_gen/services/scheduler/v1/scheduler.d.ts +398 -0
  25. package/dist/protos_gen/services/scheduler/v1/scheduler.js +2175 -0
  26. package/dist/protos_gen/services/storage_manager/v1/storage_manager.d.ts +342 -0
  27. package/dist/protos_gen/services/storage_manager/v1/storage_manager.js +1953 -0
  28. package/dist/protos_gen/services/subscription_manager/v1/subscription_manager.d.ts +62 -0
  29. package/dist/protos_gen/services/subscription_manager/v1/subscription_manager.js +233 -0
  30. package/package.json +48 -0
@@ -0,0 +1,62 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ export declare const protobufPackage = "services.subscription_manager.v1";
4
+ export interface GetSubscriptionsRequest {
5
+ contextId: string;
6
+ eventTypeId: string;
7
+ }
8
+ export interface GetSubscriptionsResponse {
9
+ subscriptions: GetSubscriptionsResponse_FusionSubscription[];
10
+ }
11
+ export interface GetSubscriptionsResponse_FusionSubscription {
12
+ subscriptionId: string;
13
+ subscriptionValue: string;
14
+ associatedFilterOptions: string[];
15
+ }
16
+ export declare const GetSubscriptionsRequest: MessageFns<GetSubscriptionsRequest>;
17
+ export declare const GetSubscriptionsResponse: MessageFns<GetSubscriptionsResponse>;
18
+ export declare const GetSubscriptionsResponse_FusionSubscription: MessageFns<GetSubscriptionsResponse_FusionSubscription>;
19
+ export type FusionSubscriptionsService = typeof FusionSubscriptionsService;
20
+ export declare const FusionSubscriptionsService: {
21
+ readonly getSubscriptions: {
22
+ readonly path: "/services.subscription_manager.v1.FusionSubscriptions/GetSubscriptions";
23
+ readonly requestStream: false;
24
+ readonly responseStream: false;
25
+ readonly requestSerialize: (value: GetSubscriptionsRequest) => Buffer<ArrayBuffer>;
26
+ readonly requestDeserialize: (value: Buffer) => GetSubscriptionsRequest;
27
+ readonly responseSerialize: (value: GetSubscriptionsResponse) => Buffer<ArrayBuffer>;
28
+ readonly responseDeserialize: (value: Buffer) => GetSubscriptionsResponse;
29
+ };
30
+ };
31
+ export interface FusionSubscriptionsServer extends UntypedServiceImplementation {
32
+ getSubscriptions: handleUnaryCall<GetSubscriptionsRequest, GetSubscriptionsResponse>;
33
+ }
34
+ export interface FusionSubscriptionsClient extends Client {
35
+ getSubscriptions(request: GetSubscriptionsRequest, callback: (error: ServiceError | null, response: GetSubscriptionsResponse) => void): ClientUnaryCall;
36
+ getSubscriptions(request: GetSubscriptionsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetSubscriptionsResponse) => void): ClientUnaryCall;
37
+ getSubscriptions(request: GetSubscriptionsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetSubscriptionsResponse) => void): ClientUnaryCall;
38
+ }
39
+ export declare const FusionSubscriptionsClient: {
40
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): FusionSubscriptionsClient;
41
+ service: typeof FusionSubscriptionsService;
42
+ serviceName: string;
43
+ };
44
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
45
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
46
+ [K in keyof T]?: DeepPartial<T[K]>;
47
+ } : Partial<T>;
48
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
49
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
50
+ [K in keyof P]: Exact<P[K], I[K]>;
51
+ } & {
52
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
53
+ };
54
+ export interface MessageFns<T> {
55
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
56
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
57
+ fromJSON(object: any): T;
58
+ toJSON(message: T): unknown;
59
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
60
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
61
+ }
62
+ export {};
@@ -0,0 +1,233 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc unknown
5
+ // source: services/subscription_manager/v1/subscription_manager.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { makeGenericClientConstructor, } from "@grpc/grpc-js";
9
+ export const protobufPackage = "services.subscription_manager.v1";
10
+ function createBaseGetSubscriptionsRequest() {
11
+ return { contextId: "", eventTypeId: "" };
12
+ }
13
+ export const GetSubscriptionsRequest = {
14
+ encode(message, writer = new BinaryWriter()) {
15
+ if (message.contextId !== "") {
16
+ writer.uint32(10).string(message.contextId);
17
+ }
18
+ if (message.eventTypeId !== "") {
19
+ writer.uint32(18).string(message.eventTypeId);
20
+ }
21
+ return writer;
22
+ },
23
+ decode(input, length) {
24
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
25
+ let end = length === undefined ? reader.len : reader.pos + length;
26
+ const message = createBaseGetSubscriptionsRequest();
27
+ while (reader.pos < end) {
28
+ const tag = reader.uint32();
29
+ switch (tag >>> 3) {
30
+ case 1: {
31
+ if (tag !== 10) {
32
+ break;
33
+ }
34
+ message.contextId = reader.string();
35
+ continue;
36
+ }
37
+ case 2: {
38
+ if (tag !== 18) {
39
+ break;
40
+ }
41
+ message.eventTypeId = reader.string();
42
+ continue;
43
+ }
44
+ }
45
+ if ((tag & 7) === 4 || tag === 0) {
46
+ break;
47
+ }
48
+ reader.skip(tag & 7);
49
+ }
50
+ return message;
51
+ },
52
+ fromJSON(object) {
53
+ return {
54
+ contextId: isSet(object.contextId) ? globalThis.String(object.contextId) : "",
55
+ eventTypeId: isSet(object.eventTypeId) ? globalThis.String(object.eventTypeId) : "",
56
+ };
57
+ },
58
+ toJSON(message) {
59
+ const obj = {};
60
+ if (message.contextId !== "") {
61
+ obj.contextId = message.contextId;
62
+ }
63
+ if (message.eventTypeId !== "") {
64
+ obj.eventTypeId = message.eventTypeId;
65
+ }
66
+ return obj;
67
+ },
68
+ create(base) {
69
+ return GetSubscriptionsRequest.fromPartial(base ?? {});
70
+ },
71
+ fromPartial(object) {
72
+ const message = createBaseGetSubscriptionsRequest();
73
+ message.contextId = object.contextId ?? "";
74
+ message.eventTypeId = object.eventTypeId ?? "";
75
+ return message;
76
+ },
77
+ };
78
+ function createBaseGetSubscriptionsResponse() {
79
+ return { subscriptions: [] };
80
+ }
81
+ export const GetSubscriptionsResponse = {
82
+ encode(message, writer = new BinaryWriter()) {
83
+ for (const v of message.subscriptions) {
84
+ GetSubscriptionsResponse_FusionSubscription.encode(v, writer.uint32(10).fork()).join();
85
+ }
86
+ return writer;
87
+ },
88
+ decode(input, length) {
89
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
90
+ let end = length === undefined ? reader.len : reader.pos + length;
91
+ const message = createBaseGetSubscriptionsResponse();
92
+ while (reader.pos < end) {
93
+ const tag = reader.uint32();
94
+ switch (tag >>> 3) {
95
+ case 1: {
96
+ if (tag !== 10) {
97
+ break;
98
+ }
99
+ message.subscriptions.push(GetSubscriptionsResponse_FusionSubscription.decode(reader, reader.uint32()));
100
+ continue;
101
+ }
102
+ }
103
+ if ((tag & 7) === 4 || tag === 0) {
104
+ break;
105
+ }
106
+ reader.skip(tag & 7);
107
+ }
108
+ return message;
109
+ },
110
+ fromJSON(object) {
111
+ return {
112
+ subscriptions: globalThis.Array.isArray(object?.subscriptions)
113
+ ? object.subscriptions.map((e) => GetSubscriptionsResponse_FusionSubscription.fromJSON(e))
114
+ : [],
115
+ };
116
+ },
117
+ toJSON(message) {
118
+ const obj = {};
119
+ if (message.subscriptions?.length) {
120
+ obj.subscriptions = message.subscriptions.map((e) => GetSubscriptionsResponse_FusionSubscription.toJSON(e));
121
+ }
122
+ return obj;
123
+ },
124
+ create(base) {
125
+ return GetSubscriptionsResponse.fromPartial(base ?? {});
126
+ },
127
+ fromPartial(object) {
128
+ const message = createBaseGetSubscriptionsResponse();
129
+ message.subscriptions =
130
+ object.subscriptions?.map((e) => GetSubscriptionsResponse_FusionSubscription.fromPartial(e)) || [];
131
+ return message;
132
+ },
133
+ };
134
+ function createBaseGetSubscriptionsResponse_FusionSubscription() {
135
+ return { subscriptionId: "", subscriptionValue: "", associatedFilterOptions: [] };
136
+ }
137
+ export const GetSubscriptionsResponse_FusionSubscription = {
138
+ encode(message, writer = new BinaryWriter()) {
139
+ if (message.subscriptionId !== "") {
140
+ writer.uint32(10).string(message.subscriptionId);
141
+ }
142
+ if (message.subscriptionValue !== "") {
143
+ writer.uint32(18).string(message.subscriptionValue);
144
+ }
145
+ for (const v of message.associatedFilterOptions) {
146
+ writer.uint32(26).string(v);
147
+ }
148
+ return writer;
149
+ },
150
+ decode(input, length) {
151
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
152
+ let end = length === undefined ? reader.len : reader.pos + length;
153
+ const message = createBaseGetSubscriptionsResponse_FusionSubscription();
154
+ while (reader.pos < end) {
155
+ const tag = reader.uint32();
156
+ switch (tag >>> 3) {
157
+ case 1: {
158
+ if (tag !== 10) {
159
+ break;
160
+ }
161
+ message.subscriptionId = reader.string();
162
+ continue;
163
+ }
164
+ case 2: {
165
+ if (tag !== 18) {
166
+ break;
167
+ }
168
+ message.subscriptionValue = reader.string();
169
+ continue;
170
+ }
171
+ case 3: {
172
+ if (tag !== 26) {
173
+ break;
174
+ }
175
+ message.associatedFilterOptions.push(reader.string());
176
+ continue;
177
+ }
178
+ }
179
+ if ((tag & 7) === 4 || tag === 0) {
180
+ break;
181
+ }
182
+ reader.skip(tag & 7);
183
+ }
184
+ return message;
185
+ },
186
+ fromJSON(object) {
187
+ return {
188
+ subscriptionId: isSet(object.subscriptionId) ? globalThis.String(object.subscriptionId) : "",
189
+ subscriptionValue: isSet(object.subscriptionValue) ? globalThis.String(object.subscriptionValue) : "",
190
+ associatedFilterOptions: globalThis.Array.isArray(object?.associatedFilterOptions)
191
+ ? object.associatedFilterOptions.map((e) => globalThis.String(e))
192
+ : [],
193
+ };
194
+ },
195
+ toJSON(message) {
196
+ const obj = {};
197
+ if (message.subscriptionId !== "") {
198
+ obj.subscriptionId = message.subscriptionId;
199
+ }
200
+ if (message.subscriptionValue !== "") {
201
+ obj.subscriptionValue = message.subscriptionValue;
202
+ }
203
+ if (message.associatedFilterOptions?.length) {
204
+ obj.associatedFilterOptions = message.associatedFilterOptions;
205
+ }
206
+ return obj;
207
+ },
208
+ create(base) {
209
+ return GetSubscriptionsResponse_FusionSubscription.fromPartial(base ?? {});
210
+ },
211
+ fromPartial(object) {
212
+ const message = createBaseGetSubscriptionsResponse_FusionSubscription();
213
+ message.subscriptionId = object.subscriptionId ?? "";
214
+ message.subscriptionValue = object.subscriptionValue ?? "";
215
+ message.associatedFilterOptions = object.associatedFilterOptions?.map((e) => e) || [];
216
+ return message;
217
+ },
218
+ };
219
+ export const FusionSubscriptionsService = {
220
+ getSubscriptions: {
221
+ path: "/services.subscription_manager.v1.FusionSubscriptions/GetSubscriptions",
222
+ requestStream: false,
223
+ responseStream: false,
224
+ requestSerialize: (value) => Buffer.from(GetSubscriptionsRequest.encode(value).finish()),
225
+ requestDeserialize: (value) => GetSubscriptionsRequest.decode(value),
226
+ responseSerialize: (value) => Buffer.from(GetSubscriptionsResponse.encode(value).finish()),
227
+ responseDeserialize: (value) => GetSubscriptionsResponse.decode(value),
228
+ },
229
+ };
230
+ export const FusionSubscriptionsClient = makeGenericClientConstructor(FusionSubscriptionsService, "services.subscription_manager.v1.FusionSubscriptions");
231
+ function isSet(value) {
232
+ return value !== null && value !== undefined;
233
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@notifi-network/fusion-sdk",
3
+ "version": "0.0.1-canary10",
4
+ "description": "SDK utils for Notifi Fusion parser development. This includes types and helpers for accessing ephemeral/persistent storage, RPCs for different chains, and other utilities.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "scripts": {
16
+ "build": "tsc && tsc-alias",
17
+ "install-tools": "npm install -g buf",
18
+ "dev": "tsc -w",
19
+ "prepublishOnly": "npm run build",
20
+ "codegen": "cd src/protos; npx buf generate; cd ../.."
21
+ },
22
+ "keywords": [],
23
+ "author": "",
24
+ "license": "ISC",
25
+ "dependencies": {
26
+ "@grpc/grpc-js": "^1.13.3",
27
+ "@types/node": "^22.15.17",
28
+ "inquirer": "^12.5.2",
29
+ "typescript": "^5.8.2",
30
+ "winston": "^3.17.0",
31
+ "yargs": "^17.7.2",
32
+ "zod": "^3.24.2"
33
+ },
34
+ "devDependencies": {
35
+ "@bufbuild/buf": "^1.53.0",
36
+ "@bufbuild/protobuf": "^2.3.0",
37
+ "protoc-gen-ts": "^0.8.7",
38
+ "ts-proto": "^2.7.0",
39
+ "@types/ini": "^4.1.1",
40
+ "@types/inquirer": "^9.0.7",
41
+ "@types/yargs": "^17.0.33",
42
+ "prettier": "^3.5.3",
43
+ "tsc-alias": "^1.8.13"
44
+ },
45
+ "files": [
46
+ "dist"
47
+ ]
48
+ }