@sentio/sdk 0.2.21 → 0.3.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.
@@ -119,12 +119,12 @@ class BaseProcessor {
119
119
  // TODO fix this bug
120
120
  await handler(event, ctx);
121
121
  return {
122
- histograms: ctx.histograms,
122
+ gauges: ctx.gauges,
123
123
  counters: ctx.counters,
124
124
  };
125
125
  }
126
126
  return {
127
- histograms: [],
127
+ gauges: [],
128
128
  counters: [],
129
129
  };
130
130
  },
@@ -142,7 +142,7 @@ class BaseProcessor {
142
142
  const ctx = new context_1.Context(contract, chainId, block, undefined);
143
143
  await handler(block, ctx);
144
144
  return {
145
- histograms: ctx.histograms,
145
+ gauges: ctx.gauges,
146
146
  counters: ctx.counters,
147
147
  };
148
148
  });
@@ -1 +1 @@
1
- {"version":3,"file":"base-processor.js","sourceRoot":"","sources":["../src/base-processor.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoD;AAMpD,gDAAuB;AACvB,yCAA+C;AAE/C,wDAAqD;AAErD,0BAA0B;AAC1B,qBAAqB;AACrB,oBAAoB;AACpB,uBAAuB;AACvB,IAAI;AAEJ,MAAM,aAAa;IACjB,OAAO,CAAe;IACtB,OAAO,CAAqC;CAC7C;AAED,MAAa,aAAa;IACxB,aAAa,GAA8C,EAAE,CAAA;IAC7D,aAAa,GAAoB,EAAE,CAAA;IAEnC,QAAQ,CAAkB;IAC1B,mBAAmB;IACnB,IAAI,CAAQ;IAEZ,MAAM,CAAqB;IAE3B,YAAY,MAAmB,EAAE,QAA0B;QACzD,mBAAmB;QACnB,qCAAqC;QAErC,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC5C,UAAU,E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A0E;QACvF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;YAClB,MAAM,IAAI,uBAAW,CAAC,kBAAM,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAA;SAC5D;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;QAEjC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,WAAW,KAAY;YAClD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAA;YACtB,MAAM,GAAG,GAAG,IAAI,iBAAO,CAA8B,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;YACzF,MAAM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;YACzB,OAAO;gBACL,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACvB,CAAA;QACH,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAtJD,sCAsJC"}
@@ -24,7 +24,7 @@ function getOptionsSignature(opts) {
24
24
  if (opts.endBlock) {
25
25
  sig.push(opts.endBlock.toString());
26
26
  }
27
- return sig.join("_");
27
+ return sig.join('_');
28
28
  }
29
29
  exports.getOptionsSignature = getOptionsSignature;
30
30
  class BindInternalOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"bind-options.js","sourceRoot":"","sources":["../src/bind-options.ts"],"names":[],"mappings":";;;AAEA,wDAAqD;AAErD,MAAa,WAAW;IACtB,OAAO,CAAQ;IACf,OAAO,GAAgB,CAAC,CAAA;IACxB,IAAI,CAAS;IACb,UAAU,CAAgB;IAC1B,QAAQ,CAAgB;CACzB;AAND,kCAMC;AAED,SAAgB,mBAAmB,CAAC,IAAiB;IACnD,MAAM,GAAG,GAAG,CAAE,IAAI,CAAC,OAAO,CAAE,CAAA;IAC5B,IAAI,IAAI,CAAC,OAAO,E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I,CAAC,IAAI,CAAC,CAAA;KACpB;IACD,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;KACrC;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;KACnC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACtB,CAAC;AAfD,kDAeC;AAED,MAAa,mBAAmB;IAC9B,OAAO,CAAQ;IACf,OAAO,CAAY;IACnB,IAAI,CAAQ;IACZ,UAAU,CAAM;IAChB,QAAQ,CAAO;CAChB;AAND,kDAMC"}
package/dist/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CounterResult, HistogramResult } from './gen/processor/protos/processor';
1
+ import { CounterResult, GaugeResult } from './gen/processor/protos/processor';
2
2
  import { BaseContract, EventFilter } from 'ethers';
3
3
  import { Block, Log } from '@ethersproject/abstract-provider';
4
4
  import { Meter } from './meter';
@@ -9,7 +9,7 @@ export declare class Context<TContract extends BaseContract, TContractWrapper ex
9
9
  log?: Log;
10
10
  block?: Block;
11
11
  blockNumber: Long;
12
- histograms: HistogramResult[];
12
+ gauges: GaugeResult[];
13
13
  counters: CounterResult[];
14
14
  meter: Meter;
15
15
  constructor(contract: TContractWrapper, chainId: string, block?: Block, log?: Log);
@@ -24,7 +24,7 @@ export declare class ContractWrapper<TContract extends BaseContract> {
24
24
  get _underlineContract(): TContract;
25
25
  }
26
26
  export declare class SolanaContext {
27
- histograms: HistogramResult[];
27
+ gauges: GaugeResult[];
28
28
  counters: CounterResult[];
29
29
  meter: Meter;
30
30
  address: string;
package/dist/context.js CHANGED
@@ -12,7 +12,7 @@ class Context {
12
12
  log;
13
13
  block;
14
14
  blockNumber;
15
- histograms = [];
15
+ gauges = [];
16
16
  counters = [];
17
17
  meter;
18
18
  constructor(contract, chainId, block, log) {
@@ -44,7 +44,7 @@ class ContractWrapper {
44
44
  }
45
45
  exports.ContractWrapper = ContractWrapper;
46
46
  class SolanaContext {
47
- histograms = [];
47
+ gauges = [];
48
48
  counters = [];
49
49
  meter;
50
50
  address;
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;AAGA,mCAA+B;AAC/B,gDAAuB;AAEvB,MAAa,OAAO;IAClB,QAAQ,CAAkB;IAC1B,OAAO,CAAQ;IACf,GAAG,CAAM;IACT,KAAK,CAAQ;IACb,WAAW,CAAM;IACjB,UAAU,GAAsB,EAAE,CAAA;IAClC,QAAQ,GAAoB,EAAE,CAAA;IAC9B,KAAK,CAAO;IAEZ,YAAY,QAA0B,EAAE,OAAe,EAAE,KAAa,EAAE,GAAS;QAC/E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,WAAW,GAAG,cAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;SACpD;aAAM,IAAI,KAAK,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,cAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;SACjD;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;CACF;AAtBD,0BAsBC;AAED,MAAa,eAAe;IAChB,QAAQ,CAAW;IAE7B,OAAO,CAA0D;IACjE,KAAK,CAAO;IAEZ,YAAY,QAAmB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;IACjC,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AAe;IAChB,QAAQ,CAAW;IAE7B,OAAO,CAA0D;IACjE,KAAK,CAAO;IAEZ,YAAY,QAAmB;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;IACjC,CAAC;IAED,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;CACF;AAdD,0CAcC;AAED,MAAa,aAAa;IACxB,MAAM,GAAkB,EAAE,CAAA;IAC1B,QAAQ,GAAoB,EAAE,CAAA;IAC9B,KAAK,CAAO;IAEZ,OAAO,CAAQ;IAEf,YAAY,OAAe;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CACF;AAXD,sCAWC"}
@@ -19,8 +19,7 @@ export interface ContractConfig {
19
19
  logConfigs: LogHandlerConfig[];
20
20
  startBlock: Long;
21
21
  endBlock: Long;
22
- transactionConfig: TransactionHandlerConfig[];
23
- instructionConfig: InstructionHandlerConfig[];
22
+ instructionConfig: InstructionHandlerConfig | undefined;
24
23
  }
25
24
  export interface ContractInfo {
26
25
  name: string;
@@ -47,13 +46,8 @@ export interface LogHandlerConfig {
47
46
  export interface HandlerCondition {
48
47
  topics: Topic[];
49
48
  }
50
- export interface TransactionHandlerConfig {
51
- handlerName: string;
52
- address: string;
53
- }
54
49
  export interface InstructionHandlerConfig {
55
- handlerName: string;
56
- address: string;
50
+ processInnerInstruction: boolean;
57
51
  }
58
52
  export interface Topic {
59
53
  hashes: string[];
@@ -100,12 +94,13 @@ export interface Instruction {
100
94
  instructionData: string;
101
95
  slot: Long;
102
96
  programAccountId: string;
97
+ parsed?: Uint8Array | undefined;
103
98
  }
104
99
  export interface Block {
105
100
  raw: Uint8Array;
106
101
  }
107
102
  export interface O11yResult {
108
- histograms: HistogramResult[];
103
+ gauges: GaugeResult[];
109
104
  counters: CounterResult[];
110
105
  }
111
106
  export interface RecordMetaData {
@@ -127,7 +122,7 @@ export interface MetricValue {
127
122
  bigInt: string | undefined;
128
123
  doubleValue: number | undefined;
129
124
  }
130
- export interface HistogramResult {
125
+ export interface GaugeResult {
131
126
  metadata: RecordMetaData | undefined;
132
127
  metricValue: MetricValue | undefined;
133
128
  }
@@ -206,13 +201,6 @@ export declare const HandlerCondition: {
206
201
  toJSON(message: HandlerCondition): unknown;
207
202
  fromPartial(object: DeepPartial<HandlerCondition>): HandlerCondition;
208
203
  };
209
- export declare const TransactionHandlerConfig: {
210
- encode(message: TransactionHandlerConfig, writer?: _m0.Writer): _m0.Writer;
211
- decode(input: _m0.Reader | Uint8Array, length?: number): TransactionHandlerConfig;
212
- fromJSON(object: any): TransactionHandlerConfig;
213
- toJSON(message: TransactionHandlerConfig): unknown;
214
- fromPartial(object: DeepPartial<TransactionHandlerConfig>): TransactionHandlerConfig;
215
- };
216
204
  export declare const InstructionHandlerConfig: {
217
205
  encode(message: InstructionHandlerConfig, writer?: _m0.Writer): _m0.Writer;
218
206
  decode(input: _m0.Reader | Uint8Array, length?: number): InstructionHandlerConfig;
@@ -346,12 +334,12 @@ export declare const MetricValue: {
346
334
  toJSON(message: MetricValue): unknown;
347
335
  fromPartial(object: DeepPartial<MetricValue>): MetricValue;
348
336
  };
349
- export declare const HistogramResult: {
350
- encode(message: HistogramResult, writer?: _m0.Writer): _m0.Writer;
351
- decode(input: _m0.Reader | Uint8Array, length?: number): HistogramResult;
352
- fromJSON(object: any): HistogramResult;
353
- toJSON(message: HistogramResult): unknown;
354
- fromPartial(object: DeepPartial<HistogramResult>): HistogramResult;
337
+ export declare const GaugeResult: {
338
+ encode(message: GaugeResult, writer?: _m0.Writer): _m0.Writer;
339
+ decode(input: _m0.Reader | Uint8Array, length?: number): GaugeResult;
340
+ fromJSON(object: any): GaugeResult;
341
+ toJSON(message: GaugeResult): unknown;
342
+ fromPartial(object: DeepPartial<GaugeResult>): GaugeResult;
355
343
  };
356
344
  export declare const CounterResult: {
357
345
  encode(message: CounterResult, writer?: _m0.Writer): _m0.Writer;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ProcessorDefinition = exports.CounterResult = exports.HistogramResult = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.TransactionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.StartRequest = exports.TemplateInstance = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = void 0;
6
+ exports.ProcessorDefinition = exports.CounterResult = exports.GaugeResult = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.StartRequest = exports.TemplateInstance = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = void 0;
7
7
  const long_1 = __importDefault(require("long"));
8
8
  const empty_1 = require("../../google/protobuf/empty");
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -185,8 +185,7 @@ function createBaseContractConfig() {
185
185
  logConfigs: [],
186
186
  startBlock: long_1.default.UZERO,
187
187
  endBlock: long_1.default.UZERO,
188
- transactionConfig: [],
189
- instructionConfig: [],
188
+ instructionConfig: undefined,
190
189
  };
191
190
  }
192
191
  exports.ContractConfig = {
@@ -206,11 +205,8 @@ exports.ContractConfig = {
206
205
  if (!message.endBlock.isZero()) {
207
206
  writer.uint32(40).uint64(message.endBlock);
208
207
  }
209
- for (const v of message.transactionConfig) {
210
- exports.TransactionHandlerConfig.encode(v, writer.uint32(58).fork()).ldelim();
211
- }
212
- for (const v of message.instructionConfig) {
213
- exports.InstructionHandlerConfig.encode(v, writer.uint32(66).fork()).ldelim();
208
+ if (message.instructionConfig !== undefined) {
209
+ exports.InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
214
210
  }
215
211
  return writer;
216
212
  },
@@ -236,11 +232,8 @@ exports.ContractConfig = {
236
232
  case 5:
237
233
  message.endBlock = reader.uint64();
238
234
  break;
239
- case 7:
240
- message.transactionConfig.push(exports.TransactionHandlerConfig.decode(reader, reader.uint32()));
241
- break;
242
- case 8:
243
- message.instructionConfig.push(exports.InstructionHandlerConfig.decode(reader, reader.uint32()));
235
+ case 6:
236
+ message.instructionConfig = exports.InstructionHandlerConfig.decode(reader, reader.uint32());
244
237
  break;
245
238
  default:
246
239
  reader.skipType(tag & 7);
@@ -266,12 +259,9 @@ exports.ContractConfig = {
266
259
  endBlock: isSet(object.endBlock)
267
260
  ? long_1.default.fromValue(object.endBlock)
268
261
  : long_1.default.UZERO,
269
- transactionConfig: Array.isArray(object?.transactionConfig)
270
- ? object.transactionConfig.map((e) => exports.TransactionHandlerConfig.fromJSON(e))
271
- : [],
272
- instructionConfig: Array.isArray(object?.instructionConfig)
273
- ? object.instructionConfig.map((e) => exports.InstructionHandlerConfig.fromJSON(e))
274
- : [],
262
+ instructionConfig: isSet(object.instructionConfig)
263
+ ? exports.InstructionHandlerConfig.fromJSON(object.instructionConfig)
264
+ : undefined,
275
265
  };
276
266
  },
277
267
  toJSON(message) {
@@ -294,18 +284,10 @@ exports.ContractConfig = {
294
284
  (obj.startBlock = (message.startBlock || long_1.default.UZERO).toString());
295
285
  message.endBlock !== undefined &&
296
286
  (obj.endBlock = (message.endBlock || long_1.default.UZERO).toString());
297
- if (message.transactionConfig) {
298
- obj.transactionConfig = message.transactionConfig.map((e) => e ? exports.TransactionHandlerConfig.toJSON(e) : undefined);
299
- }
300
- else {
301
- obj.transactionConfig = [];
302
- }
303
- if (message.instructionConfig) {
304
- obj.instructionConfig = message.instructionConfig.map((e) => e ? exports.InstructionHandlerConfig.toJSON(e) : undefined);
305
- }
306
- else {
307
- obj.instructionConfig = [];
308
- }
287
+ message.instructionConfig !== undefined &&
288
+ (obj.instructionConfig = message.instructionConfig
289
+ ? exports.InstructionHandlerConfig.toJSON(message.instructionConfig)
290
+ : undefined);
309
291
  return obj;
310
292
  },
311
293
  fromPartial(object) {
@@ -328,10 +310,11 @@ exports.ContractConfig = {
328
310
  object.endBlock !== undefined && object.endBlock !== null
329
311
  ? long_1.default.fromValue(object.endBlock)
330
312
  : long_1.default.UZERO;
331
- message.transactionConfig =
332
- object.transactionConfig?.map((e) => exports.TransactionHandlerConfig.fromPartial(e)) || [];
333
313
  message.instructionConfig =
334
- object.instructionConfig?.map((e) => exports.InstructionHandlerConfig.fromPartial(e)) || [];
314
+ object.instructionConfig !== undefined &&
315
+ object.instructionConfig !== null
316
+ ? exports.InstructionHandlerConfig.fromPartial(object.instructionConfig)
317
+ : undefined;
335
318
  return message;
336
319
  },
337
320
  };
@@ -708,69 +691,13 @@ exports.HandlerCondition = {
708
691
  return message;
709
692
  },
710
693
  };
711
- function createBaseTransactionHandlerConfig() {
712
- return { handlerName: "", address: "" };
713
- }
714
- exports.TransactionHandlerConfig = {
715
- encode(message, writer = minimal_1.default.Writer.create()) {
716
- if (message.handlerName !== "") {
717
- writer.uint32(10).string(message.handlerName);
718
- }
719
- if (message.address !== "") {
720
- writer.uint32(18).string(message.address);
721
- }
722
- return writer;
723
- },
724
- decode(input, length) {
725
- const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
726
- let end = length === undefined ? reader.len : reader.pos + length;
727
- const message = createBaseTransactionHandlerConfig();
728
- while (reader.pos < end) {
729
- const tag = reader.uint32();
730
- switch (tag >>> 3) {
731
- case 1:
732
- message.handlerName = reader.string();
733
- break;
734
- case 2:
735
- message.address = reader.string();
736
- break;
737
- default:
738
- reader.skipType(tag & 7);
739
- break;
740
- }
741
- }
742
- return message;
743
- },
744
- fromJSON(object) {
745
- return {
746
- handlerName: isSet(object.handlerName) ? String(object.handlerName) : "",
747
- address: isSet(object.address) ? String(object.address) : "",
748
- };
749
- },
750
- toJSON(message) {
751
- const obj = {};
752
- message.handlerName !== undefined &&
753
- (obj.handlerName = message.handlerName);
754
- message.address !== undefined && (obj.address = message.address);
755
- return obj;
756
- },
757
- fromPartial(object) {
758
- const message = createBaseTransactionHandlerConfig();
759
- message.handlerName = object.handlerName ?? "";
760
- message.address = object.address ?? "";
761
- return message;
762
- },
763
- };
764
694
  function createBaseInstructionHandlerConfig() {
765
- return { handlerName: "", address: "" };
695
+ return { processInnerInstruction: false };
766
696
  }
767
697
  exports.InstructionHandlerConfig = {
768
698
  encode(message, writer = minimal_1.default.Writer.create()) {
769
- if (message.handlerName !== "") {
770
- writer.uint32(10).string(message.handlerName);
771
- }
772
- if (message.address !== "") {
773
- writer.uint32(18).string(message.address);
699
+ if (message.processInnerInstruction === true) {
700
+ writer.uint32(8).bool(message.processInnerInstruction);
774
701
  }
775
702
  return writer;
776
703
  },
@@ -782,10 +709,7 @@ exports.InstructionHandlerConfig = {
782
709
  const tag = reader.uint32();
783
710
  switch (tag >>> 3) {
784
711
  case 1:
785
- message.handlerName = reader.string();
786
- break;
787
- case 2:
788
- message.address = reader.string();
712
+ message.processInnerInstruction = reader.bool();
789
713
  break;
790
714
  default:
791
715
  reader.skipType(tag & 7);
@@ -796,21 +720,20 @@ exports.InstructionHandlerConfig = {
796
720
  },
797
721
  fromJSON(object) {
798
722
  return {
799
- handlerName: isSet(object.handlerName) ? String(object.handlerName) : "",
800
- address: isSet(object.address) ? String(object.address) : "",
723
+ processInnerInstruction: isSet(object.processInnerInstruction)
724
+ ? Boolean(object.processInnerInstruction)
725
+ : false,
801
726
  };
802
727
  },
803
728
  toJSON(message) {
804
729
  const obj = {};
805
- message.handlerName !== undefined &&
806
- (obj.handlerName = message.handlerName);
807
- message.address !== undefined && (obj.address = message.address);
730
+ message.processInnerInstruction !== undefined &&
731
+ (obj.processInnerInstruction = message.processInnerInstruction);
808
732
  return obj;
809
733
  },
810
734
  fromPartial(object) {
811
735
  const message = createBaseInstructionHandlerConfig();
812
- message.handlerName = object.handlerName ?? "";
813
- message.address = object.address ?? "";
736
+ message.processInnerInstruction = object.processInnerInstruction ?? false;
814
737
  return message;
815
738
  },
816
739
  };
@@ -1455,7 +1378,12 @@ exports.Transaction = {
1455
1378
  },
1456
1379
  };
1457
1380
  function createBaseInstruction() {
1458
- return { instructionData: "", slot: long_1.default.UZERO, programAccountId: "" };
1381
+ return {
1382
+ instructionData: "",
1383
+ slot: long_1.default.UZERO,
1384
+ programAccountId: "",
1385
+ parsed: undefined,
1386
+ };
1459
1387
  }
1460
1388
  exports.Instruction = {
1461
1389
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -1468,6 +1396,9 @@ exports.Instruction = {
1468
1396
  if (message.programAccountId !== "") {
1469
1397
  writer.uint32(26).string(message.programAccountId);
1470
1398
  }
1399
+ if (message.parsed !== undefined) {
1400
+ writer.uint32(34).bytes(message.parsed);
1401
+ }
1471
1402
  return writer;
1472
1403
  },
1473
1404
  decode(input, length) {
@@ -1486,6 +1417,9 @@ exports.Instruction = {
1486
1417
  case 3:
1487
1418
  message.programAccountId = reader.string();
1488
1419
  break;
1420
+ case 4:
1421
+ message.parsed = reader.bytes();
1422
+ break;
1489
1423
  default:
1490
1424
  reader.skipType(tag & 7);
1491
1425
  break;
@@ -1502,6 +1436,7 @@ exports.Instruction = {
1502
1436
  programAccountId: isSet(object.programAccountId)
1503
1437
  ? String(object.programAccountId)
1504
1438
  : "",
1439
+ parsed: isSet(object.parsed) ? bytesFromBase64(object.parsed) : undefined,
1505
1440
  };
1506
1441
  },
1507
1442
  toJSON(message) {
@@ -1512,6 +1447,11 @@ exports.Instruction = {
1512
1447
  (obj.slot = (message.slot || long_1.default.UZERO).toString());
1513
1448
  message.programAccountId !== undefined &&
1514
1449
  (obj.programAccountId = message.programAccountId);
1450
+ message.parsed !== undefined &&
1451
+ (obj.parsed =
1452
+ message.parsed !== undefined
1453
+ ? base64FromBytes(message.parsed)
1454
+ : undefined);
1515
1455
  return obj;
1516
1456
  },
1517
1457
  fromPartial(object) {
@@ -1522,6 +1462,7 @@ exports.Instruction = {
1522
1462
  ? long_1.default.fromValue(object.slot)
1523
1463
  : long_1.default.UZERO;
1524
1464
  message.programAccountId = object.programAccountId ?? "";
1465
+ message.parsed = object.parsed ?? undefined;
1525
1466
  return message;
1526
1467
  },
1527
1468
  };
@@ -1570,12 +1511,12 @@ exports.Block = {
1570
1511
  },
1571
1512
  };
1572
1513
  function createBaseO11yResult() {
1573
- return { histograms: [], counters: [] };
1514
+ return { gauges: [], counters: [] };
1574
1515
  }
1575
1516
  exports.O11yResult = {
1576
1517
  encode(message, writer = minimal_1.default.Writer.create()) {
1577
- for (const v of message.histograms) {
1578
- exports.HistogramResult.encode(v, writer.uint32(10).fork()).ldelim();
1518
+ for (const v of message.gauges) {
1519
+ exports.GaugeResult.encode(v, writer.uint32(10).fork()).ldelim();
1579
1520
  }
1580
1521
  for (const v of message.counters) {
1581
1522
  exports.CounterResult.encode(v, writer.uint32(18).fork()).ldelim();
@@ -1590,7 +1531,7 @@ exports.O11yResult = {
1590
1531
  const tag = reader.uint32();
1591
1532
  switch (tag >>> 3) {
1592
1533
  case 1:
1593
- message.histograms.push(exports.HistogramResult.decode(reader, reader.uint32()));
1534
+ message.gauges.push(exports.GaugeResult.decode(reader, reader.uint32()));
1594
1535
  break;
1595
1536
  case 2:
1596
1537
  message.counters.push(exports.CounterResult.decode(reader, reader.uint32()));
@@ -1604,8 +1545,8 @@ exports.O11yResult = {
1604
1545
  },
1605
1546
  fromJSON(object) {
1606
1547
  return {
1607
- histograms: Array.isArray(object?.histograms)
1608
- ? object.histograms.map((e) => exports.HistogramResult.fromJSON(e))
1548
+ gauges: Array.isArray(object?.gauges)
1549
+ ? object.gauges.map((e) => exports.GaugeResult.fromJSON(e))
1609
1550
  : [],
1610
1551
  counters: Array.isArray(object?.counters)
1611
1552
  ? object.counters.map((e) => exports.CounterResult.fromJSON(e))
@@ -1614,11 +1555,11 @@ exports.O11yResult = {
1614
1555
  },
1615
1556
  toJSON(message) {
1616
1557
  const obj = {};
1617
- if (message.histograms) {
1618
- obj.histograms = message.histograms.map((e) => e ? exports.HistogramResult.toJSON(e) : undefined);
1558
+ if (message.gauges) {
1559
+ obj.gauges = message.gauges.map((e) => e ? exports.GaugeResult.toJSON(e) : undefined);
1619
1560
  }
1620
1561
  else {
1621
- obj.histograms = [];
1562
+ obj.gauges = [];
1622
1563
  }
1623
1564
  if (message.counters) {
1624
1565
  obj.counters = message.counters.map((e) => e ? exports.CounterResult.toJSON(e) : undefined);
@@ -1630,8 +1571,8 @@ exports.O11yResult = {
1630
1571
  },
1631
1572
  fromPartial(object) {
1632
1573
  const message = createBaseO11yResult();
1633
- message.histograms =
1634
- object.histograms?.map((e) => exports.HistogramResult.fromPartial(e)) || [];
1574
+ message.gauges =
1575
+ object.gauges?.map((e) => exports.GaugeResult.fromPartial(e)) || [];
1635
1576
  message.counters =
1636
1577
  object.counters?.map((e) => exports.CounterResult.fromPartial(e)) || [];
1637
1578
  return message;
@@ -1880,10 +1821,10 @@ exports.MetricValue = {
1880
1821
  return message;
1881
1822
  },
1882
1823
  };
1883
- function createBaseHistogramResult() {
1824
+ function createBaseGaugeResult() {
1884
1825
  return { metadata: undefined, metricValue: undefined };
1885
1826
  }
1886
- exports.HistogramResult = {
1827
+ exports.GaugeResult = {
1887
1828
  encode(message, writer = minimal_1.default.Writer.create()) {
1888
1829
  if (message.metadata !== undefined) {
1889
1830
  exports.RecordMetaData.encode(message.metadata, writer.uint32(10).fork()).ldelim();
@@ -1896,7 +1837,7 @@ exports.HistogramResult = {
1896
1837
  decode(input, length) {
1897
1838
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1898
1839
  let end = length === undefined ? reader.len : reader.pos + length;
1899
- const message = createBaseHistogramResult();
1840
+ const message = createBaseGaugeResult();
1900
1841
  while (reader.pos < end) {
1901
1842
  const tag = reader.uint32();
1902
1843
  switch (tag >>> 3) {
@@ -1936,7 +1877,7 @@ exports.HistogramResult = {
1936
1877
  return obj;
1937
1878
  },
1938
1879
  fromPartial(object) {
1939
- const message = createBaseHistogramResult();
1880
+ const message = createBaseGaugeResult();
1940
1881
  message.metadata =
1941
1882
  object.metadata !== undefined && object.metadata !== null
1942
1883
  ? exports.RecordMetaData.fromPartial(object.metadata)