@sentio/runtime 2.59.0-rc.42 → 2.59.0-rc.44

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.
@@ -6,7 +6,7 @@ import {
6
6
  __require,
7
7
  __toCommonJS,
8
8
  __toESM
9
- } from "./chunk-3SLKMZUX.js";
9
+ } from "./chunk-LCS6SRJY.js";
10
10
 
11
11
  // ../../node_modules/.pnpm/logform@2.6.0/node_modules/logform/format.js
12
12
  var require_format = __commonJS({
@@ -10972,4 +10972,4 @@ export {
10972
10972
  safe-buffer/index.js:
10973
10973
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
10974
10974
  */
10975
- //# sourceMappingURL=chunk-FDZMT76B.js.map
10975
+ //# sourceMappingURL=chunk-U5UZYRQ4.js.map
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _sentio_protos from '@sentio/protos';
2
- import { DeepPartial as DeepPartial$1, DBResponse, ProcessStreamResponse, DBRequest_DBUpsert, DBRequest, HandlerType as HandlerType$1, ProcessConfigResponse, StartRequest, DataBinding as DataBinding$1, PreparedData, ProcessResult, PreprocessResult, ProcessStreamResponse_Partitions, TemplateInstance, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
2
+ import { DeepPartial as DeepPartial$1, DBResponse, ProcessStreamResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, ProcessStreamResponse_Partitions, TemplateInstance, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
3
3
  import { Subject } from 'rxjs';
4
4
  import { AsyncLocalStorage } from 'node:async_hooks';
5
5
  import { Required } from 'utility-types';
@@ -54,18 +54,18 @@ declare class StoreContext extends AbstractStoreContext {
54
54
 
55
55
  declare abstract class Plugin {
56
56
  name: string;
57
- supportedHandlers: HandlerType$1[];
57
+ supportedHandlers: HandlerType[];
58
58
  configure(config: ProcessConfigResponse): Promise<void>;
59
59
  start(start: StartRequest): Promise<void>;
60
60
  /**
61
61
  * @deprecated The method should not be used, use ctx.states instead
62
62
  */
63
63
  stateDiff(config: ProcessConfigResponse): boolean;
64
- processBinding(request: DataBinding$1, preparedData: PreparedData | undefined): Promise<ProcessResult>;
65
- preprocessBinding(request: DataBinding$1, preprocessStore: {
64
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult>;
65
+ preprocessBinding(request: DataBinding, preprocessStore: {
66
66
  [k: string]: any;
67
67
  }): Promise<PreprocessResult>;
68
- partition(request: DataBinding$1): Promise<ProcessStreamResponse_Partitions>;
68
+ partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions>;
69
69
  /**
70
70
  * method used by action server only
71
71
  * @param port
@@ -80,7 +80,7 @@ declare class PluginManager {
80
80
  static INSTANCE: PluginManager;
81
81
  dbContextLocalStorage: AsyncLocalStorage<IStoreContext | undefined>;
82
82
  plugins: Plugin[];
83
- typesToPlugin: Map<HandlerType$1, Plugin>;
83
+ typesToPlugin: Map<HandlerType, Plugin>;
84
84
  register(plugin: Plugin): void;
85
85
  configure(config: ProcessConfigResponse): Promise<void[]>;
86
86
  start(start: StartRequest, actionServerPort?: number): Promise<void[]>;
@@ -90,9 +90,9 @@ declare class PluginManager {
90
90
  * @deprecated The method should not be used, use ctx.states instead
91
91
  */
92
92
  stateDiff(config: ProcessConfigResponse): boolean;
93
- processBinding(request: DataBinding$1, preparedData: PreparedData | undefined, dbContext?: IStoreContext): Promise<ProcessResult>;
94
- partition(request: DataBinding$1): Promise<ProcessStreamResponse_Partitions>;
95
- preprocessBinding(request: DataBinding$1, preprocessStore: {
93
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined, dbContext?: IStoreContext): Promise<ProcessResult>;
94
+ partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions>;
95
+ preprocessBinding(request: DataBinding, preprocessStore: {
96
96
  [k: string]: any;
97
97
  }, dbContext?: StoreContext): Promise<PreprocessResult>;
98
98
  }
@@ -171,13 +171,13 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
171
171
  start(request: StartRequest, context: CallContext): Promise<Empty>;
172
172
  stop(request: Empty, context: CallContext): Promise<Empty>;
173
173
  processBindings(request: ProcessBindingsRequest, options?: CallContext): Promise<ProcessBindingResponse>;
174
- preprocessBindings(bindings: DataBinding$1[], preprocessStore: {
174
+ preprocessBindings(bindings: DataBinding[], preprocessStore: {
175
175
  [k: string]: any;
176
176
  }, dbContext?: StoreContext, options?: CallContext): Promise<PreparedData>;
177
- preprocessBinding(request: DataBinding$1, preprocessStore: {
177
+ preprocessBinding(request: DataBinding, preprocessStore: {
178
178
  [k: string]: any;
179
179
  }, dbContext?: StoreContext, options?: CallContext): Promise<PreprocessResult>;
180
- processBinding(request: DataBinding$1, preparedData: PreparedData | undefined, options?: CallContext): Promise<ProcessResult>;
180
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined, options?: CallContext): Promise<ProcessResult>;
181
181
  processBindingsStream(requests: AsyncIterable<ProcessStreamRequest>, context: CallContext): AsyncGenerator<{
182
182
  processId?: number | undefined;
183
183
  dbRequest?: {
@@ -333,7 +333,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
333
333
  } | undefined;
334
334
  } | undefined;
335
335
  runtimeInfo?: {
336
- from?: HandlerType$1 | undefined;
336
+ from?: HandlerType | undefined;
337
337
  } | undefined;
338
338
  }[] | undefined;
339
339
  counters?: {
@@ -360,7 +360,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
360
360
  } | undefined;
361
361
  add?: boolean | undefined;
362
362
  runtimeInfo?: {
363
- from?: HandlerType$1 | undefined;
363
+ from?: HandlerType | undefined;
364
364
  } | undefined;
365
365
  }[] | undefined;
366
366
  events?: {
@@ -384,7 +384,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
384
384
  severity?: _sentio_protos.LogLevel | undefined;
385
385
  message?: string | undefined;
386
386
  runtimeInfo?: {
387
- from?: HandlerType$1 | undefined;
387
+ from?: HandlerType | undefined;
388
388
  } | undefined;
389
389
  attributes2?: {
390
390
  fields?: {
@@ -450,7 +450,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
450
450
  } | undefined;
451
451
  payload?: string | undefined;
452
452
  runtimeInfo?: {
453
- from?: HandlerType$1 | undefined;
453
+ from?: HandlerType | undefined;
454
454
  } | undefined;
455
455
  }[] | undefined;
456
456
  states?: {
@@ -519,7 +519,7 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
519
519
  } | undefined;
520
520
  } | undefined;
521
521
  runtimeInfo?: {
522
- from?: HandlerType$1 | undefined;
522
+ from?: HandlerType | undefined;
523
523
  } | undefined;
524
524
  }[] | undefined;
525
525
  } | undefined;
@@ -667,35 +667,11 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
667
667
  }, void, undefined>;
668
668
  private dbContexts;
669
669
  protected handleRequests(requests: AsyncIterable<ProcessStreamRequest>, subject: Subject<DeepPartial$1<ProcessStreamResponse>>): Promise<void>;
670
- handleRequest(request: ProcessStreamRequest, lastBinding: DataBinding$1 | undefined, subject: Subject<DeepPartial$1<ProcessStreamResponse>>): Promise<void>;
670
+ handleRequest(request: ProcessStreamRequest, lastBinding: DataBinding | undefined, subject: Subject<DeepPartial$1<ProcessStreamResponse>>): Promise<void>;
671
671
  private startProcess;
672
672
  }
673
- declare function recordRuntimeInfo(results: ProcessResult, handlerType: HandlerType$1): void;
673
+ declare function recordRuntimeInfo(results: ProcessResult, handlerType: HandlerType): void;
674
674
 
675
- declare enum HandlerType {
676
- UNKNOWN = 0,
677
- ETH_LOG = 1,
678
- ETH_BLOCK = 2,
679
- ETH_TRACE = 5,
680
- ETH_TRANSACTION = 11,
681
- SOL_INSTRUCTION = 4,
682
- APT_EVENT = 6,
683
- APT_CALL = 7,
684
- APT_RESOURCE = 8,
685
- SUI_EVENT = 3,
686
- SUI_CALL = 9,
687
- SUI_OBJECT = 10,
688
- SUI_OBJECT_CHANGE = 12,
689
- FUEL_CALL = 13,
690
- FUEL_RECEIPT = 19,
691
- FUEL_TRANSACTION = 20,
692
- FUEL_BLOCK = 17,
693
- COSMOS_CALL = 14,
694
- STARKNET_EVENT = 15,
695
- BTC_TRANSACTION = 16,
696
- BTC_BLOCK = 18,
697
- UNRECOGNIZED = -1
698
- }
699
675
  interface ExecutionConfig {
700
676
  sequential: boolean;
701
677
  forceExactBlockTime: boolean;
@@ -725,406 +701,6 @@ declare const ExecutionConfig_DecoderWorkerConfig: {
725
701
  create(base?: DeepPartial<ExecutionConfig_DecoderWorkerConfig>): ExecutionConfig_DecoderWorkerConfig;
726
702
  fromPartial(object: DeepPartial<ExecutionConfig_DecoderWorkerConfig>): ExecutionConfig_DecoderWorkerConfig;
727
703
  };
728
- interface Data {
729
- ethLog?: Data_EthLog | undefined;
730
- ethBlock?: Data_EthBlock | undefined;
731
- ethTransaction?: Data_EthTransaction | undefined;
732
- ethTrace?: Data_EthTrace | undefined;
733
- solInstruction?: Data_SolInstruction | undefined;
734
- aptEvent?: Data_AptEvent | undefined;
735
- aptCall?: Data_AptCall | undefined;
736
- aptResource?: Data_AptResource | undefined;
737
- suiEvent?: Data_SuiEvent | undefined;
738
- suiCall?: Data_SuiCall | undefined;
739
- suiObject?: Data_SuiObject | undefined;
740
- suiObjectChange?: Data_SuiObjectChange | undefined;
741
- fuelLog?: Data_FuelReceipt | undefined;
742
- /** @deprecated */
743
- fuelCall?: Data_FuelCall | undefined;
744
- fuelTransaction?: Data_FuelTransaction | undefined;
745
- fuelBlock?: Data_FuelBlock | undefined;
746
- cosmosCall?: Data_CosmosCall | undefined;
747
- starknetEvents?: Data_StarknetEvent | undefined;
748
- btcTransaction?: Data_BTCTransaction | undefined;
749
- btcBlock?: Data_BTCBlock | undefined;
750
- }
751
- declare const Data: {
752
- encode(message: Data, writer?: _m0.Writer): _m0.Writer;
753
- decode(input: _m0.Reader | Uint8Array, length?: number): Data;
754
- fromJSON(object: any): Data;
755
- toJSON(message: Data): unknown;
756
- create(base?: DeepPartial<Data>): Data;
757
- fromPartial(object: DeepPartial<Data>): Data;
758
- };
759
- interface Data_EthLog {
760
- /** @deprecated */
761
- log: {
762
- [key: string]: any;
763
- } | undefined;
764
- timestamp: Date | undefined;
765
- /** @deprecated */
766
- transaction?: {
767
- [key: string]: any;
768
- } | undefined;
769
- /** @deprecated */
770
- transactionReceipt?: {
771
- [key: string]: any;
772
- } | undefined;
773
- /** @deprecated */
774
- block?: {
775
- [key: string]: any;
776
- } | undefined;
777
- rawLog: string;
778
- rawTransaction?: string | undefined;
779
- rawTransactionReceipt?: string | undefined;
780
- rawBlock?: string | undefined;
781
- }
782
- declare const Data_EthLog: {
783
- encode(message: Data_EthLog, writer?: _m0.Writer): _m0.Writer;
784
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_EthLog;
785
- fromJSON(object: any): Data_EthLog;
786
- toJSON(message: Data_EthLog): unknown;
787
- create(base?: DeepPartial<Data_EthLog>): Data_EthLog;
788
- fromPartial(object: DeepPartial<Data_EthLog>): Data_EthLog;
789
- };
790
- interface Data_EthBlock {
791
- block: {
792
- [key: string]: any;
793
- } | undefined;
794
- }
795
- declare const Data_EthBlock: {
796
- encode(message: Data_EthBlock, writer?: _m0.Writer): _m0.Writer;
797
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_EthBlock;
798
- fromJSON(object: any): Data_EthBlock;
799
- toJSON(message: Data_EthBlock): unknown;
800
- create(base?: DeepPartial<Data_EthBlock>): Data_EthBlock;
801
- fromPartial(object: DeepPartial<Data_EthBlock>): Data_EthBlock;
802
- };
803
- interface Data_EthTransaction {
804
- /** @deprecated */
805
- transaction: {
806
- [key: string]: any;
807
- } | undefined;
808
- timestamp: Date | undefined;
809
- /** @deprecated */
810
- transactionReceipt?: {
811
- [key: string]: any;
812
- } | undefined;
813
- /** @deprecated */
814
- block?: {
815
- [key: string]: any;
816
- } | undefined;
817
- /** @deprecated */
818
- trace?: {
819
- [key: string]: any;
820
- } | undefined;
821
- rawTransaction: string;
822
- rawTransactionReceipt?: string | undefined;
823
- rawBlock?: string | undefined;
824
- rawTrace?: string | undefined;
825
- }
826
- declare const Data_EthTransaction: {
827
- encode(message: Data_EthTransaction, writer?: _m0.Writer): _m0.Writer;
828
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_EthTransaction;
829
- fromJSON(object: any): Data_EthTransaction;
830
- toJSON(message: Data_EthTransaction): unknown;
831
- create(base?: DeepPartial<Data_EthTransaction>): Data_EthTransaction;
832
- fromPartial(object: DeepPartial<Data_EthTransaction>): Data_EthTransaction;
833
- };
834
- interface Data_EthTrace {
835
- trace: {
836
- [key: string]: any;
837
- } | undefined;
838
- timestamp: Date | undefined;
839
- transaction?: {
840
- [key: string]: any;
841
- } | undefined;
842
- transactionReceipt?: {
843
- [key: string]: any;
844
- } | undefined;
845
- block?: {
846
- [key: string]: any;
847
- } | undefined;
848
- }
849
- declare const Data_EthTrace: {
850
- encode(message: Data_EthTrace, writer?: _m0.Writer): _m0.Writer;
851
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_EthTrace;
852
- fromJSON(object: any): Data_EthTrace;
853
- toJSON(message: Data_EthTrace): unknown;
854
- create(base?: DeepPartial<Data_EthTrace>): Data_EthTrace;
855
- fromPartial(object: DeepPartial<Data_EthTrace>): Data_EthTrace;
856
- };
857
- interface Data_SolInstruction {
858
- instructionData: string;
859
- slot: bigint;
860
- programAccountId: string;
861
- accounts: string[];
862
- parsed?: {
863
- [key: string]: any;
864
- } | undefined;
865
- }
866
- declare const Data_SolInstruction: {
867
- encode(message: Data_SolInstruction, writer?: _m0.Writer): _m0.Writer;
868
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_SolInstruction;
869
- fromJSON(object: any): Data_SolInstruction;
870
- toJSON(message: Data_SolInstruction): unknown;
871
- create(base?: DeepPartial<Data_SolInstruction>): Data_SolInstruction;
872
- fromPartial(object: DeepPartial<Data_SolInstruction>): Data_SolInstruction;
873
- };
874
- interface Data_AptEvent {
875
- rawEvent: string;
876
- eventIndex: number;
877
- /** @deprecated */
878
- transaction: {
879
- [key: string]: any;
880
- } | undefined;
881
- rawTransaction: string;
882
- }
883
- declare const Data_AptEvent: {
884
- encode(message: Data_AptEvent, writer?: _m0.Writer): _m0.Writer;
885
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_AptEvent;
886
- fromJSON(object: any): Data_AptEvent;
887
- toJSON(message: Data_AptEvent): unknown;
888
- create(base?: DeepPartial<Data_AptEvent>): Data_AptEvent;
889
- fromPartial(object: DeepPartial<Data_AptEvent>): Data_AptEvent;
890
- };
891
- interface Data_AptCall {
892
- /** @deprecated */
893
- transaction: {
894
- [key: string]: any;
895
- } | undefined;
896
- rawTransaction: string;
897
- }
898
- declare const Data_AptCall: {
899
- encode(message: Data_AptCall, writer?: _m0.Writer): _m0.Writer;
900
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_AptCall;
901
- fromJSON(object: any): Data_AptCall;
902
- toJSON(message: Data_AptCall): unknown;
903
- create(base?: DeepPartial<Data_AptCall>): Data_AptCall;
904
- fromPartial(object: DeepPartial<Data_AptCall>): Data_AptCall;
905
- };
906
- interface Data_AptResource {
907
- /** @deprecated */
908
- resources: {
909
- [key: string]: any;
910
- }[];
911
- version: bigint;
912
- timestampMicros: bigint;
913
- rawResources: string[];
914
- }
915
- declare const Data_AptResource: {
916
- encode(message: Data_AptResource, writer?: _m0.Writer): _m0.Writer;
917
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_AptResource;
918
- fromJSON(object: any): Data_AptResource;
919
- toJSON(message: Data_AptResource): unknown;
920
- create(base?: DeepPartial<Data_AptResource>): Data_AptResource;
921
- fromPartial(object: DeepPartial<Data_AptResource>): Data_AptResource;
922
- };
923
- interface Data_SuiEvent {
924
- /** @deprecated */
925
- transaction: {
926
- [key: string]: any;
927
- } | undefined;
928
- rawEvent: string;
929
- rawTransaction: string;
930
- timestamp: Date | undefined;
931
- slot: bigint;
932
- }
933
- declare const Data_SuiEvent: {
934
- encode(message: Data_SuiEvent, writer?: _m0.Writer): _m0.Writer;
935
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_SuiEvent;
936
- fromJSON(object: any): Data_SuiEvent;
937
- toJSON(message: Data_SuiEvent): unknown;
938
- create(base?: DeepPartial<Data_SuiEvent>): Data_SuiEvent;
939
- fromPartial(object: DeepPartial<Data_SuiEvent>): Data_SuiEvent;
940
- };
941
- interface Data_SuiCall {
942
- /** @deprecated */
943
- transaction: {
944
- [key: string]: any;
945
- } | undefined;
946
- rawTransaction: string;
947
- timestamp: Date | undefined;
948
- slot: bigint;
949
- }
950
- declare const Data_SuiCall: {
951
- encode(message: Data_SuiCall, writer?: _m0.Writer): _m0.Writer;
952
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_SuiCall;
953
- fromJSON(object: any): Data_SuiCall;
954
- toJSON(message: Data_SuiCall): unknown;
955
- create(base?: DeepPartial<Data_SuiCall>): Data_SuiCall;
956
- fromPartial(object: DeepPartial<Data_SuiCall>): Data_SuiCall;
957
- };
958
- interface Data_SuiObject {
959
- /** @deprecated */
960
- objects: {
961
- [key: string]: any;
962
- }[];
963
- /** @deprecated */
964
- self?: {
965
- [key: string]: any;
966
- } | undefined;
967
- rawObjects: string[];
968
- rawSelf?: string | undefined;
969
- objectId: string;
970
- objectVersion: bigint;
971
- objectDigest: string;
972
- timestamp: Date | undefined;
973
- slot: bigint;
974
- }
975
- declare const Data_SuiObject: {
976
- encode(message: Data_SuiObject, writer?: _m0.Writer): _m0.Writer;
977
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_SuiObject;
978
- fromJSON(object: any): Data_SuiObject;
979
- toJSON(message: Data_SuiObject): unknown;
980
- create(base?: DeepPartial<Data_SuiObject>): Data_SuiObject;
981
- fromPartial(object: DeepPartial<Data_SuiObject>): Data_SuiObject;
982
- };
983
- interface Data_SuiObjectChange {
984
- /** @deprecated */
985
- changes: {
986
- [key: string]: any;
987
- }[];
988
- rawChanges: string[];
989
- timestamp: Date | undefined;
990
- txDigest: string;
991
- slot: bigint;
992
- }
993
- declare const Data_SuiObjectChange: {
994
- encode(message: Data_SuiObjectChange, writer?: _m0.Writer): _m0.Writer;
995
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_SuiObjectChange;
996
- fromJSON(object: any): Data_SuiObjectChange;
997
- toJSON(message: Data_SuiObjectChange): unknown;
998
- create(base?: DeepPartial<Data_SuiObjectChange>): Data_SuiObjectChange;
999
- fromPartial(object: DeepPartial<Data_SuiObjectChange>): Data_SuiObjectChange;
1000
- };
1001
- interface Data_FuelReceipt {
1002
- transaction: {
1003
- [key: string]: any;
1004
- } | undefined;
1005
- timestamp: Date | undefined;
1006
- receiptIndex: bigint;
1007
- }
1008
- declare const Data_FuelReceipt: {
1009
- encode(message: Data_FuelReceipt, writer?: _m0.Writer): _m0.Writer;
1010
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_FuelReceipt;
1011
- fromJSON(object: any): Data_FuelReceipt;
1012
- toJSON(message: Data_FuelReceipt): unknown;
1013
- create(base?: DeepPartial<Data_FuelReceipt>): Data_FuelReceipt;
1014
- fromPartial(object: DeepPartial<Data_FuelReceipt>): Data_FuelReceipt;
1015
- };
1016
- interface Data_FuelTransaction {
1017
- transaction: {
1018
- [key: string]: any;
1019
- } | undefined;
1020
- timestamp: Date | undefined;
1021
- }
1022
- declare const Data_FuelTransaction: {
1023
- encode(message: Data_FuelTransaction, writer?: _m0.Writer): _m0.Writer;
1024
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_FuelTransaction;
1025
- fromJSON(object: any): Data_FuelTransaction;
1026
- toJSON(message: Data_FuelTransaction): unknown;
1027
- create(base?: DeepPartial<Data_FuelTransaction>): Data_FuelTransaction;
1028
- fromPartial(object: DeepPartial<Data_FuelTransaction>): Data_FuelTransaction;
1029
- };
1030
- /** @deprecated */
1031
- interface Data_FuelCall {
1032
- transaction: {
1033
- [key: string]: any;
1034
- } | undefined;
1035
- timestamp: Date | undefined;
1036
- }
1037
- declare const Data_FuelCall: {
1038
- encode(message: Data_FuelCall, writer?: _m0.Writer): _m0.Writer;
1039
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_FuelCall;
1040
- fromJSON(object: any): Data_FuelCall;
1041
- toJSON(message: Data_FuelCall): unknown;
1042
- create(base?: DeepPartial<Data_FuelCall>): Data_FuelCall;
1043
- fromPartial(object: DeepPartial<Data_FuelCall>): Data_FuelCall;
1044
- };
1045
- interface Data_FuelBlock {
1046
- block: {
1047
- [key: string]: any;
1048
- } | undefined;
1049
- timestamp: Date | undefined;
1050
- }
1051
- declare const Data_FuelBlock: {
1052
- encode(message: Data_FuelBlock, writer?: _m0.Writer): _m0.Writer;
1053
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_FuelBlock;
1054
- fromJSON(object: any): Data_FuelBlock;
1055
- toJSON(message: Data_FuelBlock): unknown;
1056
- create(base?: DeepPartial<Data_FuelBlock>): Data_FuelBlock;
1057
- fromPartial(object: DeepPartial<Data_FuelBlock>): Data_FuelBlock;
1058
- };
1059
- interface Data_CosmosCall {
1060
- transaction: {
1061
- [key: string]: any;
1062
- } | undefined;
1063
- timestamp: Date | undefined;
1064
- }
1065
- declare const Data_CosmosCall: {
1066
- encode(message: Data_CosmosCall, writer?: _m0.Writer): _m0.Writer;
1067
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_CosmosCall;
1068
- fromJSON(object: any): Data_CosmosCall;
1069
- toJSON(message: Data_CosmosCall): unknown;
1070
- create(base?: DeepPartial<Data_CosmosCall>): Data_CosmosCall;
1071
- fromPartial(object: DeepPartial<Data_CosmosCall>): Data_CosmosCall;
1072
- };
1073
- interface Data_StarknetEvent {
1074
- result: {
1075
- [key: string]: any;
1076
- } | undefined;
1077
- timestamp: Date | undefined;
1078
- }
1079
- declare const Data_StarknetEvent: {
1080
- encode(message: Data_StarknetEvent, writer?: _m0.Writer): _m0.Writer;
1081
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_StarknetEvent;
1082
- fromJSON(object: any): Data_StarknetEvent;
1083
- toJSON(message: Data_StarknetEvent): unknown;
1084
- create(base?: DeepPartial<Data_StarknetEvent>): Data_StarknetEvent;
1085
- fromPartial(object: DeepPartial<Data_StarknetEvent>): Data_StarknetEvent;
1086
- };
1087
- interface Data_BTCTransaction {
1088
- transaction: {
1089
- [key: string]: any;
1090
- } | undefined;
1091
- timestamp: Date | undefined;
1092
- }
1093
- declare const Data_BTCTransaction: {
1094
- encode(message: Data_BTCTransaction, writer?: _m0.Writer): _m0.Writer;
1095
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_BTCTransaction;
1096
- fromJSON(object: any): Data_BTCTransaction;
1097
- toJSON(message: Data_BTCTransaction): unknown;
1098
- create(base?: DeepPartial<Data_BTCTransaction>): Data_BTCTransaction;
1099
- fromPartial(object: DeepPartial<Data_BTCTransaction>): Data_BTCTransaction;
1100
- };
1101
- interface Data_BTCBlock {
1102
- block: {
1103
- [key: string]: any;
1104
- } | undefined;
1105
- timestamp: Date | undefined;
1106
- }
1107
- declare const Data_BTCBlock: {
1108
- encode(message: Data_BTCBlock, writer?: _m0.Writer): _m0.Writer;
1109
- decode(input: _m0.Reader | Uint8Array, length?: number): Data_BTCBlock;
1110
- fromJSON(object: any): Data_BTCBlock;
1111
- toJSON(message: Data_BTCBlock): unknown;
1112
- create(base?: DeepPartial<Data_BTCBlock>): Data_BTCBlock;
1113
- fromPartial(object: DeepPartial<Data_BTCBlock>): Data_BTCBlock;
1114
- };
1115
- interface DataBinding {
1116
- data: Data | undefined;
1117
- handlerType: HandlerType;
1118
- handlerIds: number[];
1119
- }
1120
- declare const DataBinding: {
1121
- encode(message: DataBinding, writer?: _m0.Writer): _m0.Writer;
1122
- decode(input: _m0.Reader | Uint8Array, length?: number): DataBinding;
1123
- fromJSON(object: any): DataBinding;
1124
- toJSON(message: DataBinding): unknown;
1125
- create(base?: DeepPartial<DataBinding>): DataBinding;
1126
- fromPartial(object: DeepPartial<DataBinding>): DataBinding;
1127
- };
1128
704
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
1129
705
  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 {} ? {
1130
706
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -1295,4 +871,4 @@ declare const processMetrics: {
1295
871
  };
1296
872
  declare const metricsStorage: AsyncLocalStorage<string>;
1297
873
 
1298
- export { AbstractStoreContext, type ChainConfig, DataBinding, Data_EthBlock, Data_EthLog, Data_EthTrace, Data_EthTransaction, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, type IStoreContext, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, TemplateInstanceState, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };
874
+ export { AbstractStoreContext, type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, type IStoreContext, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, TemplateInstanceState, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };
package/lib/index.js CHANGED
@@ -29,11 +29,11 @@ import {
29
29
  providerMetrics,
30
30
  recordRuntimeInfo,
31
31
  timeoutError
32
- } from "./chunk-OGXSRUVD.js";
32
+ } from "./chunk-GUVQUM6U.js";
33
33
  import {
34
34
  Plugin,
35
35
  PluginManager
36
- } from "./chunk-3SLKMZUX.js";
36
+ } from "./chunk-LCS6SRJY.js";
37
37
 
38
38
  // src/chain-config.ts
39
39
  import("node:process").then((p) => p.stdout.write(""));
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\nexport {\n type DataBinding,\n type Data_EthLog,\n type Data_EthBlock,\n type Data_EthTransaction,\n type Data_EthTrace\n} from './gen/processor/protos/processor.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;ACYrD,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;ACKrD,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":[]}
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6XHWJ2VS.js";
6
6
  import {
7
7
  setupLogger
8
- } from "./chunk-FDZMT76B.js";
8
+ } from "./chunk-U5UZYRQ4.js";
9
9
  import {
10
10
  DiagConsoleLogger,
11
11
  DiagLogLevel,
@@ -43,7 +43,7 @@ import {
43
43
  require_lodash,
44
44
  require_src,
45
45
  trace
46
- } from "./chunk-OGXSRUVD.js";
46
+ } from "./chunk-GUVQUM6U.js";
47
47
  import {
48
48
  ExecutionConfig,
49
49
  PluginManager,
@@ -57,7 +57,7 @@ import {
57
57
  __toCommonJS,
58
58
  __toESM,
59
59
  require_minimal2 as require_minimal
60
- } from "./chunk-3SLKMZUX.js";
60
+ } from "./chunk-LCS6SRJY.js";
61
61
 
62
62
  // ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.25.1/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js
63
63
  // @__NO_SIDE_EFFECTS__
@@ -26336,10 +26336,15 @@ var ServiceManager = class extends ProcessorServiceImpl {
26336
26336
  this.contexts.delete(processId);
26337
26337
  }
26338
26338
  });
26339
- await this.pool.run(
26340
- { request: request3, workerPort: context2.workerPort, processId },
26341
- { transferList: [context2.workerPort] }
26342
- );
26339
+ try {
26340
+ await this.pool.run(
26341
+ { request: request3, workerPort: context2.workerPort, processId },
26342
+ { transferList: [context2.workerPort] }
26343
+ );
26344
+ } catch (err) {
26345
+ console.error("Error processing request:", err);
26346
+ subject.error(err);
26347
+ }
26343
26348
  } else {
26344
26349
  const context2 = this.contexts.get(processId);
26345
26350
  if (!context2) {