@sentio/sdk 1.31.6 → 1.32.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.
- package/lib/aptos/aptos-processor.d.ts +5 -5
- package/lib/aptos/aptos-processor.js +7 -4
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/cli/cli.js +12 -1
- package/lib/cli/cli.js.map +1 -1
- package/lib/cli/commands/login-server.js +4 -5
- package/lib/cli/commands/login-server.js.map +1 -1
- package/lib/cli/commands/run-login.js +6 -2
- package/lib/cli/commands/run-login.js.map +1 -1
- package/lib/cli/config.d.ts +1 -0
- package/lib/cli/config.js +13 -18
- package/lib/cli/config.js.map +1 -1
- package/lib/cli/upload.js +3 -2
- package/lib/cli/upload.js.map +1 -1
- package/lib/core/base-processor-template.d.ts +6 -5
- package/lib/core/base-processor-template.js +7 -4
- package/lib/core/base-processor-template.js.map +1 -1
- package/lib/core/base-processor.d.ts +6 -6
- package/lib/core/base-processor.js +7 -4
- package/lib/core/base-processor.js.map +1 -1
- package/lib/core/logger.js +1 -1
- package/lib/core/logger.js.map +1 -1
- package/lib/core/solana-processor.js +1 -0
- package/lib/core/solana-processor.js.map +1 -1
- package/lib/gen/chainquery/protos/chainquery.d.ts +106 -0
- package/lib/gen/chainquery/protos/chainquery.js +377 -2
- package/lib/gen/chainquery/protos/chainquery.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +17 -3
- package/lib/gen/processor/protos/processor.js +145 -21
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/service.d.ts +2 -0
- package/lib/service.js +145 -48
- package/lib/service.js.map +1 -1
- package/lib/testing/test-processor-server.js +6 -3
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/utils/chain.d.ts +2 -2
- package/lib/utils/chain.js +6 -4
- package/lib/utils/chain.js.map +1 -1
- package/package.json +1 -1
- package/src/aptos/aptos-processor.ts +22 -7
- package/src/cli/cli.ts +12 -1
- package/src/cli/commands/login-server.ts +4 -5
- package/src/cli/commands/run-login.ts +6 -2
- package/src/cli/config.ts +15 -18
- package/src/cli/upload.ts +5 -2
- package/src/core/base-processor-template.ts +18 -9
- package/src/core/base-processor.ts +18 -9
- package/src/core/logger.ts +1 -1
- package/src/core/solana-processor.ts +1 -0
- package/src/gen/chainquery/protos/chainquery.ts +479 -1
- package/src/gen/processor/protos/processor.ts +167 -19
- package/src/service.ts +180 -49
- package/src/testing/test-processor-server.ts +6 -3
- package/src/utils/chain.ts +8 -6
|
@@ -132,7 +132,8 @@ export class TestProcessorServer implements ProcessorServiceImplementation {
|
|
|
132
132
|
data: {
|
|
133
133
|
raw: toBytes(trace),
|
|
134
134
|
},
|
|
135
|
-
handlerId:
|
|
135
|
+
handlerId: 0,
|
|
136
|
+
handlerIds: [config.handlerId],
|
|
136
137
|
handlerType: HandlerType.ETH_TRACE,
|
|
137
138
|
}
|
|
138
139
|
}
|
|
@@ -193,7 +194,8 @@ export class TestProcessorServer implements ProcessorServiceImplementation {
|
|
|
193
194
|
data: {
|
|
194
195
|
raw: toBytes(log),
|
|
195
196
|
},
|
|
196
|
-
handlerId:
|
|
197
|
+
handlerId: 0,
|
|
198
|
+
handlerIds: [config.handlerId],
|
|
197
199
|
handlerType: HandlerType.ETH_LOG,
|
|
198
200
|
}
|
|
199
201
|
}
|
|
@@ -254,7 +256,8 @@ export class TestProcessorServer implements ProcessorServiceImplementation {
|
|
|
254
256
|
data: {
|
|
255
257
|
raw: toBytes(log),
|
|
256
258
|
},
|
|
257
|
-
|
|
259
|
+
handlerIds: [config.handlerId],
|
|
260
|
+
handlerId: 0,
|
|
258
261
|
handlerType: HandlerType.ETH_LOG,
|
|
259
262
|
}
|
|
260
263
|
}
|
package/src/utils/chain.ts
CHANGED
|
@@ -95,18 +95,20 @@ export const APTOS_MAINNET_ID = 'aptos_mainnet'
|
|
|
95
95
|
CHAIN_MAP[APTOS_TESTNET_ID] = 'aptos-test'
|
|
96
96
|
CHAIN_MAP[APTOS_MAINNET_ID] = 'aptos-mainnet'
|
|
97
97
|
|
|
98
|
-
export function getChainName(chainId: string | number): string {
|
|
98
|
+
export function getChainName(chainId: string | number | null | undefined): string {
|
|
99
99
|
if (typeof chainId === 'number') {
|
|
100
100
|
chainId = chainId.toString()
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
if (chainId) {
|
|
103
|
+
const name = CHAIN_MAP[chainId]
|
|
104
|
+
if (name) {
|
|
105
|
+
return name
|
|
106
|
+
}
|
|
105
107
|
}
|
|
106
|
-
return chainId
|
|
108
|
+
return chainId || ''
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
export function getChainType(chainId
|
|
111
|
+
export function getChainType(chainId?: string | number): string {
|
|
110
112
|
const id = String(chainId).toLowerCase()
|
|
111
113
|
if (id.startsWith('sol')) {
|
|
112
114
|
return 'solana'
|