Conversation
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ## [0.1.0] - 2025-10-16 | ||
|
|
||
| ### Added | ||
|
|
||
| - Initial release of Handshake RPC observation extractor | ||
| - Implemented HandshakeRpcObservationExtractor class |
There was a problem hiding this comment.
You're not supposed to add the changelog. The changelog is auto-generated using the changeset files.
| @@ -0,0 +1,46 @@ | |||
| { | |||
| "name": "@rosen-bridge/handshake-rpc-observation-extractor", | |||
| "version": "0.1.0", | |||
There was a problem hiding this comment.
The version should start with 0.0.0. It will be updated automatically after applying changesets before the release.
| @@ -0,0 +1,46 @@ | |||
| { | |||
| "name": "@rosen-bridge/handshake-rpc-observation-extractor", | |||
There was a problem hiding this comment.
The naming convention for observation-extractors doesn't include the network. The package name should be handshake-observation-extractor; if any network is added for HNS in the next steps, it will be implemented in this package.
Please fix the ReadMe names too.
| import { defineConfig } from 'vitest/config'; | ||
|
|
||
| export default defineConfig({ | ||
| test: { | ||
| globals: true, | ||
| coverage: { | ||
| all: true, | ||
| provider: 'istanbul', | ||
| reporter: 'cobertura', | ||
| }, | ||
| passWithNoTests: true, | ||
| poolOptions: { | ||
| forks: { | ||
| singleFork: true, | ||
| }, | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Create the vitest config from the shared available configuration:
| import { defineConfig } from 'vitest/config'; | |
| export default defineConfig({ | |
| test: { | |
| globals: true, | |
| coverage: { | |
| all: true, | |
| provider: 'istanbul', | |
| reporter: 'cobertura', | |
| }, | |
| passWithNoTests: true, | |
| poolOptions: { | |
| forks: { | |
| singleFork: true, | |
| }, | |
| }, | |
| }, | |
| }); | |
| import { defineProject, mergeConfig } from 'vitest/config'; | |
| import configShared from '../../vitest.shared'; | |
| export default mergeConfig(configShared, defineProject({})); |
| // Filter out name auction transactions (covenant type != 0) | ||
| // Bridge only accepts transactions where all outputs have covenant type 0 (NONE) | ||
| const filteredTxs = blockTxs.filter((tx) => { | ||
| return !tx.vout.some((output) => output.covenant.type !== 0); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Filtering is correct, but the scanner is not responsible for filtering transactions. The filter should be implemented in the extractor. You can implement the preprocessTransactions in the extractor to do so.
| @@ -0,0 +1,43 @@ | |||
| { | |||
| "name": "@rosen-bridge/handshake-rpc-scanner", | |||
| "version": "0.1.0", | |||
| @@ -0,0 +1,27 @@ | |||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | |||
There was a problem hiding this comment.
Better to turn it off for the specific line only.
| "devDependencies": { | ||
| "@vitest/coverage-istanbul": "^3.1.4", | ||
| "tsx": "^4.19.4", | ||
| "vitest": "^3.1.4" |
There was a problem hiding this comment.
tsx and vitest installed in the root package.json should not exist here too.
| "vitest": "^3.1.4" | ||
| }, | ||
| "engines": { | ||
| "node": ">=22.18.0" |
| import { defineConfig } from 'vitest/config'; | ||
|
|
||
| export default defineConfig({ | ||
| test: { | ||
| globals: true, | ||
| coverage: { | ||
| all: true, | ||
| provider: 'istanbul', | ||
| reporter: 'cobertura', | ||
| }, | ||
| passWithNoTests: true, | ||
| poolOptions: { | ||
| forks: { | ||
| singleFork: true, | ||
| }, | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
| import { defineConfig } from 'vitest/config'; | |
| export default defineConfig({ | |
| test: { | |
| globals: true, | |
| coverage: { | |
| all: true, | |
| provider: 'istanbul', | |
| reporter: 'cobertura', | |
| }, | |
| passWithNoTests: true, | |
| poolOptions: { | |
| forks: { | |
| singleFork: true, | |
| }, | |
| }, | |
| }, | |
| }); | |
| import { defineProject, mergeConfig } from 'vitest/config'; | |
| import configShared from '../../vitest.shared'; | |
| export default mergeConfig(configShared, defineProject({})); | |
Implementation following RCS-003 - https://github.com/rosen-bridge/rcs/tree/master/rcs-003