@sentio/sdk 2.53.2 → 2.53.3-rc.1

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 (54) hide show
  1. package/lib/aptos/aptos-plugin.d.ts.map +1 -1
  2. package/lib/aptos/aptos-plugin.js +2 -0
  3. package/lib/aptos/aptos-plugin.js.map +1 -1
  4. package/lib/aptos/aptos-processor.d.ts.map +1 -1
  5. package/lib/aptos/aptos-processor.js +5 -0
  6. package/lib/aptos/aptos-processor.js.map +1 -1
  7. package/lib/btc/btc-plugin.d.ts.map +1 -1
  8. package/lib/btc/btc-plugin.js +1 -0
  9. package/lib/btc/btc-plugin.js.map +1 -1
  10. package/lib/btc/btc-processor.d.ts.map +1 -1
  11. package/lib/btc/btc-processor.js +3 -0
  12. package/lib/btc/btc-processor.js.map +1 -1
  13. package/lib/btc/types.d.ts +1 -0
  14. package/lib/btc/types.d.ts.map +1 -1
  15. package/lib/eth/base-processor.d.ts +2 -0
  16. package/lib/eth/base-processor.d.ts.map +1 -1
  17. package/lib/eth/base-processor.js +5 -0
  18. package/lib/eth/base-processor.js.map +1 -1
  19. package/lib/eth/eth-plugin.d.ts.map +1 -1
  20. package/lib/eth/eth-plugin.js +3 -0
  21. package/lib/eth/eth-plugin.js.map +1 -1
  22. package/lib/fuel/fuel-plugin.d.ts.map +1 -1
  23. package/lib/fuel/fuel-plugin.js +1 -0
  24. package/lib/fuel/fuel-plugin.js.map +1 -1
  25. package/lib/fuel/fuel-processor.d.ts.map +1 -1
  26. package/lib/fuel/fuel-processor.js +3 -0
  27. package/lib/fuel/fuel-processor.js.map +1 -1
  28. package/lib/fuel/types.d.ts +1 -0
  29. package/lib/fuel/types.d.ts.map +1 -1
  30. package/lib/move/filter.d.ts +2 -0
  31. package/lib/move/filter.d.ts.map +1 -1
  32. package/lib/move/filter.js +2 -0
  33. package/lib/move/filter.js.map +1 -1
  34. package/lib/sui/sui-object-processor.d.ts +1 -0
  35. package/lib/sui/sui-object-processor.d.ts.map +1 -1
  36. package/lib/sui/sui-object-processor.js +3 -0
  37. package/lib/sui/sui-object-processor.js.map +1 -1
  38. package/lib/sui/sui-plugin.d.ts.map +1 -1
  39. package/lib/sui/sui-plugin.js +1 -0
  40. package/lib/sui/sui-plugin.js.map +1 -1
  41. package/package.json +3 -3
  42. package/src/aptos/aptos-plugin.ts +2 -0
  43. package/src/aptos/aptos-processor.ts +6 -0
  44. package/src/btc/btc-plugin.ts +1 -0
  45. package/src/btc/btc-processor.ts +5 -1
  46. package/src/btc/types.ts +1 -0
  47. package/src/eth/base-processor.ts +5 -0
  48. package/src/eth/eth-plugin.ts +3 -0
  49. package/src/fuel/fuel-plugin.ts +1 -0
  50. package/src/fuel/fuel-processor.ts +5 -1
  51. package/src/fuel/types.ts +1 -0
  52. package/src/move/filter.ts +2 -0
  53. package/src/sui/sui-object-processor.ts +5 -0
  54. package/src/sui/sui-plugin.ts +1 -0
@@ -103,6 +103,7 @@ export class EthPlugin extends Plugin {
103
103
  minutes: 0,
104
104
  minutesInterval: blockHandler.timeIntervalInMinutes,
105
105
  handlerId: handlerId,
106
+ handlerName: blockHandler.handlerName,
106
107
  fetchConfig: blockHandler.fetchConfig
107
108
  })
108
109
  }
@@ -187,6 +188,7 @@ export class EthPlugin extends Plugin {
187
188
  minutes: 0,
188
189
  minutesInterval: blockHandler.timeIntervalInMinutes,
189
190
  handlerId: handlerId,
191
+ handlerName: blockHandler.handlerName,
190
192
  fetchConfig: blockHandler.fetchConfig
191
193
  })
192
194
  }
@@ -196,6 +198,7 @@ export class EthPlugin extends Plugin {
196
198
  const handlerId = handlers.transactionHandlers.push(transactionHandler.handler) - 1
197
199
  contractConfig.transactionConfig.push({
198
200
  handlerId: handlerId,
201
+ handlerName: transactionHandler.handlerName,
199
202
  fetchConfig: transactionHandler.fetchConfig
200
203
  })
201
204
  }
@@ -86,6 +86,7 @@ export class FuelPlugin extends Plugin {
86
86
  minutes: 0,
87
87
  minutesInterval: blockHandler.timeIntervalInMinutes,
88
88
  handlerId: handlerId,
89
+ handlerName: blockHandler.handlerName,
89
90
  fetchConfig: undefined
90
91
  // fetchConfig: blockHandler.fetchConfig
91
92
  })
@@ -15,6 +15,7 @@ import {
15
15
  import { mergeProcessResults } from '@sentio/runtime'
16
16
  import { PromiseOrVoid } from '../core/index.js'
17
17
  import { ServerError, Status } from 'nice-grpc'
18
+ import { getHandlerName, proxyProcessor } from '../utils/metrics.js'
18
19
 
19
20
  export class FuelProcessor<TContract extends Contract> implements FuelBaseProcessor<FuelProcessorConfig> {
20
21
  callHandlers: CallHandler<Data_FuelCall>[] = []
@@ -29,7 +30,9 @@ export class FuelProcessor<TContract extends Contract> implements FuelBaseProces
29
30
  return processor
30
31
  }
31
32
 
32
- constructor(readonly config: FuelProcessorConfig) {}
33
+ constructor(readonly config: FuelProcessorConfig) {
34
+ return proxyProcessor(this)
35
+ }
33
36
 
34
37
  latestGasPrice: string | undefined
35
38
  async configure() {
@@ -229,6 +232,7 @@ export class FuelProcessor<TContract extends Contract> implements FuelBaseProces
229
232
  this.blockHandlers.push({
230
233
  blockInterval,
231
234
  timeIntervalInMinutes: timeInterval,
235
+ handlerName: getHandlerName(),
232
236
  handler: async function (data: Data_FuelBlock) {
233
237
  const header = data.block
234
238
  if (!header) {
package/src/fuel/types.ts CHANGED
@@ -34,6 +34,7 @@ export type BlockHandler = {
34
34
  blockInterval?: HandleInterval
35
35
  timeIntervalInMinutes?: HandleInterval
36
36
  handler: (block: Data_FuelBlock) => Promise<ProcessResult>
37
+ handlerName: string
37
38
  fetchConfig?: Partial<OnIntervalConfig>
38
39
  }
39
40
 
@@ -59,6 +59,7 @@ export class ResourceIntervalHandler {
59
59
  versionInterval?: HandleInterval
60
60
  timeIntervalInMinutes?: HandleInterval
61
61
  handler: (resource: Data_AptResource) => Promise<ProcessResult>
62
+ handlerName: string
62
63
  fetchConfig: MoveAccountFetchConfig
63
64
  }
64
65
 
@@ -66,5 +67,6 @@ export class TransactionIntervalHandler {
66
67
  versionInterval?: HandleInterval
67
68
  timeIntervalInMinutes?: HandleInterval
68
69
  handler: (tx: Data_AptCall) => Promise<ProcessResult>
70
+ handlerName: string
69
71
  fetchConfig: MoveFetchConfig
70
72
  }
@@ -18,6 +18,7 @@ import { CallHandler, TransactionFilter, accountTypeString, ObjectChangeHandler
18
18
  import { ServerError, Status } from 'nice-grpc'
19
19
  import { TypeDescriptor } from '@typemove/move'
20
20
  import { TypedSuiMoveObject } from './models.js'
21
+ import { getHandlerName, proxyProcessor } from '../utils/metrics.js'
21
22
 
22
23
  export interface SuiObjectBindOptions {
23
24
  objectId: string
@@ -39,6 +40,7 @@ interface ObjectHandler {
39
40
  timeIntervalInMinutes?: HandleInterval
40
41
  fetchConfig: MoveAccountFetchConfig
41
42
  handler: (resource: Data_SuiObject) => Promise<ProcessResult>
43
+ handlerName: string
42
44
  }
43
45
 
44
46
  export const DEFAULT_ACCOUNT_FETCH_CONFIG: MoveAccountFetchConfig = {
@@ -78,6 +80,8 @@ export abstract class SuiBaseObjectOrAddressProcessor<HandlerType> {
78
80
  }
79
81
  this.ownerType = options.ownerType
80
82
  SuiAccountProcessorState.INSTANCE.addValue(this)
83
+
84
+ return proxyProcessor(this)
81
85
  }
82
86
 
83
87
  getChainId(): string {
@@ -97,6 +101,7 @@ export abstract class SuiBaseObjectOrAddressProcessor<HandlerType> {
97
101
  ): this {
98
102
  const processor = this
99
103
  this.objectHandlers.push({
104
+ handlerName: getHandlerName(),
100
105
  handler: async function (data) {
101
106
  const ctx = new SuiObjectContext(
102
107
  processor.config.network,
@@ -156,6 +156,7 @@ export class SuiPlugin extends Plugin {
156
156
  accountConfig.moveIntervalConfigs.push({
157
157
  intervalConfig: {
158
158
  handlerId: handlerId,
159
+ handlerName: handler.handlerName,
159
160
  minutes: 0,
160
161
  minutesInterval: handler.timeIntervalInMinutes,
161
162
  slot: 0,