@sentio/sdk 2.53.2 → 2.53.3-rc.2
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/lib/aptos/aptos-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +2 -0
- package/lib/aptos/aptos-plugin.js.map +1 -1
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +5 -0
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/btc/btc-plugin.d.ts.map +1 -1
- package/lib/btc/btc-plugin.js +1 -0
- package/lib/btc/btc-plugin.js.map +1 -1
- package/lib/btc/btc-processor.d.ts.map +1 -1
- package/lib/btc/btc-processor.js +3 -0
- package/lib/btc/btc-processor.js.map +1 -1
- package/lib/btc/types.d.ts +1 -0
- package/lib/btc/types.d.ts.map +1 -1
- package/lib/eth/base-processor.d.ts +2 -0
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +5 -0
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +3 -0
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/fuel/fuel-plugin.d.ts.map +1 -1
- package/lib/fuel/fuel-plugin.js +1 -0
- package/lib/fuel/fuel-plugin.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +3 -0
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/fuel/types.d.ts +1 -0
- package/lib/fuel/types.d.ts.map +1 -1
- package/lib/move/filter.d.ts +2 -0
- package/lib/move/filter.d.ts.map +1 -1
- package/lib/move/filter.js +2 -0
- package/lib/move/filter.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts +1 -0
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +3 -0
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +1 -0
- package/lib/sui/sui-plugin.js.map +1 -1
- package/package.json +3 -3
- package/src/aptos/aptos-plugin.ts +2 -0
- package/src/aptos/aptos-processor.ts +6 -0
- package/src/btc/btc-plugin.ts +1 -0
- package/src/btc/btc-processor.ts +5 -1
- package/src/btc/types.ts +1 -0
- package/src/eth/base-processor.ts +5 -0
- package/src/eth/eth-plugin.ts +3 -0
- package/src/fuel/fuel-plugin.ts +1 -0
- package/src/fuel/fuel-processor.ts +5 -1
- package/src/fuel/types.ts +1 -0
- package/src/move/filter.ts +2 -0
- package/src/sui/sui-object-processor.ts +5 -0
- package/src/sui/sui-plugin.ts +1 -0
package/src/eth/eth-plugin.ts
CHANGED
@@ -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
|
}
|
package/src/fuel/fuel-plugin.ts
CHANGED
@@ -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
package/src/move/filter.ts
CHANGED
@@ -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,
|
package/src/sui/sui-plugin.ts
CHANGED