@sentio/sdk 2.54.0-rc.1 → 2.54.0-rc.11

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 (123) hide show
  1. package/lib/aptos/aptos-plugin.d.ts.map +1 -1
  2. package/lib/aptos/aptos-plugin.js +6 -2
  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 +7 -0
  6. package/lib/aptos/aptos-processor.js.map +1 -1
  7. package/lib/aptos/builtin/0x1.d.ts +840 -815
  8. package/lib/aptos/builtin/0x1.d.ts.map +1 -1
  9. package/lib/aptos/builtin/0x1.js +1200 -1137
  10. package/lib/aptos/builtin/0x1.js.map +1 -1
  11. package/lib/aptos/builtin/0x3.d.ts +67 -52
  12. package/lib/aptos/builtin/0x3.d.ts.map +1 -1
  13. package/lib/aptos/builtin/0x3.js +66 -53
  14. package/lib/aptos/builtin/0x3.js.map +1 -1
  15. package/lib/aptos/builtin/0x4.d.ts +113 -113
  16. package/lib/aptos/builtin/0x4.d.ts.map +1 -1
  17. package/lib/aptos/builtin/0x4.js +149 -149
  18. package/lib/aptos/builtin/0x4.js.map +1 -1
  19. package/lib/btc/btc-plugin.d.ts.map +1 -1
  20. package/lib/btc/btc-plugin.js +5 -2
  21. package/lib/btc/btc-plugin.js.map +1 -1
  22. package/lib/btc/btc-processor.d.ts +1 -0
  23. package/lib/btc/btc-processor.d.ts.map +1 -1
  24. package/lib/btc/btc-processor.js +1 -0
  25. package/lib/btc/btc-processor.js.map +1 -1
  26. package/lib/cosmos/cosmos-plugin.d.ts.map +1 -1
  27. package/lib/cosmos/cosmos-plugin.js +1 -0
  28. package/lib/cosmos/cosmos-plugin.js.map +1 -1
  29. package/lib/cosmos/cosmos-processor.d.ts.map +1 -1
  30. package/lib/cosmos/cosmos-processor.js +3 -0
  31. package/lib/cosmos/cosmos-processor.js.map +1 -1
  32. package/lib/cosmos/types.d.ts +1 -0
  33. package/lib/cosmos/types.d.ts.map +1 -1
  34. package/lib/eth/base-processor.d.ts.map +1 -1
  35. package/lib/eth/base-processor.js +1 -0
  36. package/lib/eth/base-processor.js.map +1 -1
  37. package/lib/fuel/asset-processor.d.ts.map +1 -1
  38. package/lib/fuel/asset-processor.js +3 -0
  39. package/lib/fuel/asset-processor.js.map +1 -1
  40. package/lib/fuel/base-processor.d.ts.map +1 -1
  41. package/lib/fuel/base-processor.js +2 -0
  42. package/lib/fuel/base-processor.js.map +1 -1
  43. package/lib/fuel/fuel-plugin.d.ts +4 -2
  44. package/lib/fuel/fuel-plugin.d.ts.map +1 -1
  45. package/lib/fuel/fuel-plugin.js +58 -25
  46. package/lib/fuel/fuel-plugin.js.map +1 -1
  47. package/lib/fuel/fuel-processor.d.ts +3 -2
  48. package/lib/fuel/fuel-processor.d.ts.map +1 -1
  49. package/lib/fuel/fuel-processor.js +22 -24
  50. package/lib/fuel/fuel-processor.js.map +1 -1
  51. package/lib/fuel/global-processor.d.ts.map +1 -1
  52. package/lib/fuel/global-processor.js +3 -0
  53. package/lib/fuel/global-processor.js.map +1 -1
  54. package/lib/fuel/transaction.d.ts +5 -1
  55. package/lib/fuel/transaction.d.ts.map +1 -1
  56. package/lib/fuel/transaction.js +17 -10
  57. package/lib/fuel/transaction.js.map +1 -1
  58. package/lib/fuel/types.d.ts +7 -1
  59. package/lib/fuel/types.d.ts.map +1 -1
  60. package/lib/fuel/types.js.map +1 -1
  61. package/lib/move/filter.d.ts +4 -0
  62. package/lib/move/filter.d.ts.map +1 -1
  63. package/lib/move/filter.js +4 -0
  64. package/lib/move/filter.js.map +1 -1
  65. package/lib/stark/starknet-plugin.d.ts.map +1 -1
  66. package/lib/stark/starknet-plugin.js +2 -1
  67. package/lib/stark/starknet-plugin.js.map +1 -1
  68. package/lib/stark/starknet-processor.d.ts +1 -0
  69. package/lib/stark/starknet-processor.d.ts.map +1 -1
  70. package/lib/stark/starknet-processor.js +4 -0
  71. package/lib/stark/starknet-processor.js.map +1 -1
  72. package/lib/sui/builtin/0x1.d.ts +83 -0
  73. package/lib/sui/builtin/0x1.d.ts.map +1 -1
  74. package/lib/sui/builtin/0x1.js +345 -1
  75. package/lib/sui/builtin/0x1.js.map +1 -1
  76. package/lib/sui/context.d.ts +1 -0
  77. package/lib/sui/context.d.ts.map +1 -1
  78. package/lib/sui/context.js +2 -0
  79. package/lib/sui/context.js.map +1 -1
  80. package/lib/sui/sui-object-processor.d.ts.map +1 -1
  81. package/lib/sui/sui-object-processor.js +2 -0
  82. package/lib/sui/sui-object-processor.js.map +1 -1
  83. package/lib/sui/sui-plugin.d.ts.map +1 -1
  84. package/lib/sui/sui-plugin.js +10 -5
  85. package/lib/sui/sui-plugin.js.map +1 -1
  86. package/lib/sui/sui-processor.d.ts.map +1 -1
  87. package/lib/sui/sui-processor.js +6 -0
  88. package/lib/sui/sui-processor.js.map +1 -1
  89. package/lib/testing/fuel-facet.d.ts.map +1 -1
  90. package/lib/testing/fuel-facet.js +8 -7
  91. package/lib/testing/fuel-facet.js.map +1 -1
  92. package/package.json +8 -8
  93. package/src/aptos/abis/0x1.json +3816 -3657
  94. package/src/aptos/abis/0x3.json +247 -219
  95. package/src/aptos/abis/0x4.json +576 -576
  96. package/src/aptos/aptos-plugin.ts +6 -2
  97. package/src/aptos/aptos-processor.ts +8 -0
  98. package/src/aptos/builtin/0x1.ts +2374 -2235
  99. package/src/aptos/builtin/0x3.ts +154 -113
  100. package/src/aptos/builtin/0x4.ts +280 -282
  101. package/src/btc/btc-plugin.ts +5 -2
  102. package/src/btc/btc-processor.ts +2 -0
  103. package/src/cosmos/cosmos-plugin.ts +1 -0
  104. package/src/cosmos/cosmos-processor.ts +5 -1
  105. package/src/cosmos/types.ts +1 -0
  106. package/src/eth/base-processor.ts +2 -0
  107. package/src/fuel/asset-processor.ts +5 -1
  108. package/src/fuel/base-processor.ts +2 -0
  109. package/src/fuel/fuel-plugin.ts +66 -24
  110. package/src/fuel/fuel-processor.ts +38 -31
  111. package/src/fuel/global-processor.ts +5 -1
  112. package/src/fuel/transaction.ts +18 -9
  113. package/src/fuel/types.ts +8 -0
  114. package/src/move/filter.ts +4 -0
  115. package/src/stark/starknet-plugin.ts +2 -1
  116. package/src/stark/starknet-processor.ts +7 -1
  117. package/src/sui/abis/0x1.json +391 -0
  118. package/src/sui/builtin/0x1.ts +510 -1
  119. package/src/sui/context.ts +2 -0
  120. package/src/sui/sui-object-processor.ts +2 -0
  121. package/src/sui/sui-plugin.ts +10 -5
  122. package/src/sui/sui-processor.ts +7 -0
  123. package/src/testing/fuel-facet.ts +8 -7
@@ -179,6 +179,7 @@ export class SuiAddressContext extends MoveAccountContext<
179
179
  export class SuiObjectContext extends SuiAddressContext {
180
180
  contractName = 'object'
181
181
  objectId: string
182
+ objectVersion: bigint
182
183
 
183
184
  constructor(
184
185
  network: SuiNetwork,
@@ -190,5 +191,6 @@ export class SuiObjectContext extends SuiAddressContext {
190
191
  ) {
191
192
  super(network, objectId, checkpoint, timestamp, baseLabels)
192
193
  this.objectId = objectId
194
+ this.objectVersion = objectVersion
193
195
  }
194
196
  }
@@ -196,6 +196,7 @@ export class SuiAddressProcessor extends SuiBaseObjectOrAddressProcessorInternal
196
196
  const processor = this
197
197
 
198
198
  this.callHandlers.push({
199
+ handlerName: getHandlerName(),
199
200
  handler: async function (data) {
200
201
  if (!data.transaction) {
201
202
  throw new ServerError(Status.INVALID_ARGUMENT, 'transaction is null')
@@ -290,6 +291,7 @@ export class SuiObjectTypeProcessor<T> extends SuiBaseObjectOrAddressProcessor<
290
291
  }
291
292
  const processor = this
292
293
  this.objectChangeHandlers.push({
294
+ handlerName: getHandlerName(),
293
295
  handler: async function (data: Data_SuiObjectChange) {
294
296
  const ctx = new SuiObjectChangeContext(
295
297
  processor.config.network,
@@ -100,7 +100,8 @@ export class SuiPlugin extends Plugin {
100
100
  }
101
101
  }),
102
102
  fetchConfig: handler.fetchConfig,
103
- handlerId
103
+ handlerId,
104
+ handlerName: handler.handlerName
104
105
  }
105
106
  contractConfig.moveEventConfigs.push(eventHandlerConfig)
106
107
  }
@@ -118,7 +119,8 @@ export class SuiPlugin extends Plugin {
118
119
  }
119
120
  }),
120
121
  fetchConfig: handler.fetchConfig,
121
- handlerId
122
+ handlerId,
123
+ handlerName: handler.handlerName
122
124
  }
123
125
  contractConfig.moveCallConfigs.push(functionHandlerConfig)
124
126
  }
@@ -127,7 +129,8 @@ export class SuiPlugin extends Plugin {
127
129
  const handlerId = handlers.suiObjectChangeHandlers.push(handler.handler) - 1
128
130
  const objectChangeHandler: MoveResourceChangeConfig = {
129
131
  type: handler.type,
130
- handlerId
132
+ handlerId,
133
+ handlerName: handler.handlerName
131
134
  }
132
135
  contractConfig.moveResourceChangeConfigs.push(objectChangeHandler)
133
136
  }
@@ -145,7 +148,8 @@ export class SuiPlugin extends Plugin {
145
148
  const handlerId = handlers.suiObjectChangeHandlers.push(handler.handler) - 1
146
149
  const objectChangeHandler: MoveResourceChangeConfig = {
147
150
  type: handler.type,
148
- handlerId
151
+ handlerId,
152
+ handlerName: handler.handlerName
149
153
  }
150
154
  accountConfig.moveResourceChangeConfigs.push(objectChangeHandler)
151
155
  }
@@ -185,7 +189,8 @@ export class SuiPlugin extends Plugin {
185
189
  }
186
190
  }),
187
191
  fetchConfig: handler.fetchConfig,
188
- handlerId
192
+ handlerId,
193
+ handlerName: handler.handlerName
189
194
  }
190
195
  accountConfig.moveCallConfigs.push(functionHandlerConfig)
191
196
  }
@@ -19,6 +19,7 @@ import { getMoveCalls } from './utils.js'
19
19
  import { defaultMoveCoder, MoveCoder } from './index.js'
20
20
  import { ALL_ADDRESS, Labels } from '../core/index.js'
21
21
  import { Required } from 'utility-types'
22
+ import { getHandlerName, proxyProcessor } from '../utils/metrics.js'
22
23
 
23
24
  export const DEFAULT_FETCH_CONFIG: MoveFetchConfig = {
24
25
  resourceChanges: false,
@@ -63,6 +64,8 @@ export class SuiBaseProcessor {
63
64
  this.config = configure(options)
64
65
  SuiProcessorState.INSTANCE.addValue(this)
65
66
  this.coder = defaultMoveCoder(this.config.network)
67
+
68
+ return proxyProcessor(this)
66
69
  }
67
70
 
68
71
  getChainId(): string {
@@ -90,6 +93,7 @@ export class SuiBaseProcessor {
90
93
  const allEventType = new Set(_filters.map((f) => f.type))
91
94
 
92
95
  this.eventHandlers.push({
96
+ handlerName: getHandlerName(),
93
97
  handler: async function (data) {
94
98
  if (!data.transaction) {
95
99
  throw new ServerError(Status.INVALID_ARGUMENT, 'event is null')
@@ -153,6 +157,7 @@ export class SuiBaseProcessor {
153
157
  const allFunctionType = new Set(_filters.map((f) => f.function))
154
158
 
155
159
  this.callHandlers.push({
160
+ handlerName: getHandlerName(),
156
161
  handler: async function (data) {
157
162
  if (!data.transaction) {
158
163
  throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')
@@ -214,6 +219,7 @@ export class SuiBaseProcessor {
214
219
  const processor = this
215
220
 
216
221
  this.callHandlers.push({
222
+ handlerName: getHandlerName(),
217
223
  handler: async function (data) {
218
224
  if (!data.transaction) {
219
225
  throw new ServerError(Status.INVALID_ARGUMENT, 'transaction is null')
@@ -250,6 +256,7 @@ export class SuiBaseProcessor {
250
256
  }
251
257
  const processor = this
252
258
  this.objectChangeHandlers.push({
259
+ handlerName: getHandlerName(),
253
260
  handler: async function (data: Data_SuiObjectChange) {
254
261
  const ctx = new SuiObjectChangeContext(
255
262
  processor.config.network,
@@ -30,13 +30,13 @@ export class FuelFacet {
30
30
  for (const callConfig of config.fuelCallConfigs) {
31
31
  const binding = {
32
32
  data: {
33
- fuelCall: {
33
+ fuelTransaction: {
34
34
  transaction,
35
35
  timestamp: new Date()
36
36
  }
37
37
  },
38
38
  handlerIds: [callConfig.handlerId],
39
- handlerType: HandlerType.FUEL_CALL
39
+ handlerType: HandlerType.FUEL_TRANSACTION
40
40
  }
41
41
 
42
42
  const filter = callConfig.filters[0]?.function
@@ -55,13 +55,14 @@ export class FuelFacet {
55
55
  for (const logConfig of config.fuelLogConfigs) {
56
56
  const binding = {
57
57
  data: {
58
- fuelCall: {
58
+ fuelLog: {
59
59
  transaction,
60
- timestamp: new Date()
60
+ timestamp: new Date(),
61
+ receiptIndex: BigInt(transaction.status.receipts.findIndex((r: any) => r.rb == logConfig.logIds[0]))
61
62
  }
62
63
  },
63
64
  handlerIds: [logConfig.handlerId],
64
- handlerType: HandlerType.FUEL_CALL
65
+ handlerType: HandlerType.FUEL_RECEIPT
65
66
  }
66
67
 
67
68
  const logIds = logConfig.logIds
@@ -76,13 +77,13 @@ export class FuelFacet {
76
77
  for (const assetConfig of config.assetConfigs) {
77
78
  const binding = {
78
79
  data: {
79
- fuelCall: {
80
+ fuelTransaction: {
80
81
  transaction,
81
82
  timestamp: new Date()
82
83
  }
83
84
  },
84
85
  handlerIds: [assetConfig.handlerId],
85
- handlerType: HandlerType.FUEL_CALL
86
+ handlerType: HandlerType.FUEL_TRANSACTION
86
87
  }
87
88
 
88
89
  res.push(binding)