diff --git a/index.d.ts b/index.d.ts index 3e01329..fc6dc2c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -764,7 +764,7 @@ export interface Transaction { gasUsed?: bigint contractAddress?: string logsBloom?: string - type?: number + kind?: number root?: string status?: number l1Fee?: bigint @@ -813,7 +813,7 @@ export type TransactionField = 'BlockHash'| 'GasUsed'| 'ContractAddress'| 'LogsBloom'| -'Type'| +'Kind'| 'Root'| 'Status'| 'L1Fee'| diff --git a/index.js b/index.js index da93d92..387e090 100644 --- a/index.js +++ b/index.js @@ -77,8 +77,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-android-arm64') const bindingPackageVersion = require('@envio-dev/hypersync-client-android-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -93,8 +93,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-android-arm-eabi') const bindingPackageVersion = require('@envio-dev/hypersync-client-android-arm-eabi/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -114,8 +114,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-win32-x64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -130,8 +130,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-win32-x64-msvc') const bindingPackageVersion = require('@envio-dev/hypersync-client-win32-x64-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -147,8 +147,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-win32-ia32-msvc') const bindingPackageVersion = require('@envio-dev/hypersync-client-win32-ia32-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -163,8 +163,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-win32-arm64-msvc') const bindingPackageVersion = require('@envio-dev/hypersync-client-win32-arm64-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -182,8 +182,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-darwin-universal') const bindingPackageVersion = require('@envio-dev/hypersync-client-darwin-universal/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -198,8 +198,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-darwin-x64') const bindingPackageVersion = require('@envio-dev/hypersync-client-darwin-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -214,8 +214,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-darwin-arm64') const bindingPackageVersion = require('@envio-dev/hypersync-client-darwin-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -234,8 +234,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-freebsd-x64') const bindingPackageVersion = require('@envio-dev/hypersync-client-freebsd-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -250,8 +250,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-freebsd-arm64') const bindingPackageVersion = require('@envio-dev/hypersync-client-freebsd-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -271,8 +271,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-x64-musl') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-x64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -287,8 +287,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-x64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -305,8 +305,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-arm64-musl') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -321,8 +321,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-arm64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -339,8 +339,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-arm-musleabihf') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -355,8 +355,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-arm-gnueabihf') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -373,8 +373,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-loong64-musl') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -389,8 +389,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-loong64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -407,8 +407,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-riscv64-musl') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -423,8 +423,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-riscv64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -440,8 +440,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-ppc64-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -456,8 +456,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-linux-s390x-gnu') const bindingPackageVersion = require('@envio-dev/hypersync-client-linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -476,8 +476,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-openharmony-arm64') const bindingPackageVersion = require('@envio-dev/hypersync-client-openharmony-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -492,8 +492,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-openharmony-x64') const bindingPackageVersion = require('@envio-dev/hypersync-client-openharmony-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -508,8 +508,8 @@ function requireNative() { try { const binding = require('@envio-dev/hypersync-client-openharmony-arm') const bindingPackageVersion = require('@envio-dev/hypersync-client-openharmony-arm/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.0-hyperindex-v2-compatible' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.0-hyperindex-v2-compatible but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 8ffb90b..c305978 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-darwin-arm64", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "arm64" ], @@ -16,4 +16,4 @@ "os": [ "darwin" ] -} \ No newline at end of file +} diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 67041c5..41d2962 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-darwin-x64", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "x64" ], @@ -16,4 +16,4 @@ "os": [ "darwin" ] -} \ No newline at end of file +} diff --git a/npm/linux-arm64-gnu/package.json b/npm/linux-arm64-gnu/package.json index 9140bfc..db6c795 100644 --- a/npm/linux-arm64-gnu/package.json +++ b/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-linux-arm64-gnu", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "arm64" ], @@ -19,4 +19,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json index fa65fb9..fd03e9c 100644 --- a/npm/linux-x64-gnu/package.json +++ b/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-linux-x64-gnu", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "x64" ], @@ -19,4 +19,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} diff --git a/npm/linux-x64-musl/package.json b/npm/linux-x64-musl/package.json index 3f54e6a..7d67f07 100644 --- a/npm/linux-x64-musl/package.json +++ b/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-linux-x64-musl", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "x64" ], @@ -19,4 +19,4 @@ "libc": [ "musl" ] -} \ No newline at end of file +} diff --git a/npm/win32-arm64-msvc/package.json b/npm/win32-arm64-msvc/package.json index 59105ea..42cd0c7 100644 --- a/npm/win32-arm64-msvc/package.json +++ b/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-win32-arm64-msvc", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "arm64" ], @@ -16,4 +16,4 @@ "os": [ "win32" ] -} \ No newline at end of file +} diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json index dec6b8c..04a946a 100644 --- a/npm/win32-x64-msvc/package.json +++ b/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@envio-dev/hypersync-client-win32-x64-msvc", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "cpu": [ "x64" ], @@ -16,4 +16,4 @@ "os": [ "win32" ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index e65e4d9..d19baa8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@envio-dev/hypersync-client", "description": "HyperSync Client by Envio", - "version": "0.7.1", + "version": "0.7.0-hyperindex-v2-compatible", "main": "index.js", "types": "index.d.ts", "napi": { diff --git a/src/query.rs b/src/query.rs index d849e6a..893d426 100644 --- a/src/query.rs +++ b/src/query.rs @@ -174,7 +174,8 @@ pub enum TransactionField { GasUsed, ContractAddress, LogsBloom, - Type, + #[strum(serialize = "type")] // just for test + Kind, Root, Status, L1Fee, @@ -774,7 +775,7 @@ impl From for net_types::TransactionField { TransactionField::GasUsed => net_types::TransactionField::GasUsed, TransactionField::ContractAddress => net_types::TransactionField::ContractAddress, TransactionField::LogsBloom => net_types::TransactionField::LogsBloom, - TransactionField::Type => net_types::TransactionField::Type, + TransactionField::Kind => net_types::TransactionField::Type, TransactionField::Root => net_types::TransactionField::Root, TransactionField::Status => net_types::TransactionField::Status, TransactionField::Sighash => net_types::TransactionField::Sighash, @@ -1175,7 +1176,7 @@ impl From for TransactionField { net_types::TransactionField::GasUsed => TransactionField::GasUsed, net_types::TransactionField::ContractAddress => TransactionField::ContractAddress, net_types::TransactionField::LogsBloom => TransactionField::LogsBloom, - net_types::TransactionField::Type => TransactionField::Type, + net_types::TransactionField::Type => TransactionField::Kind, net_types::TransactionField::Root => TransactionField::Root, net_types::TransactionField::Status => TransactionField::Status, net_types::TransactionField::Sighash => TransactionField::Sighash, diff --git a/src/types.rs b/src/types.rs index 2e56eb5..bfa8552 100644 --- a/src/types.rs +++ b/src/types.rs @@ -69,7 +69,7 @@ pub struct Transaction { pub gas_used: Option, pub contract_address: Option, pub logs_bloom: Option, - #[napi(js_name = "type")] + #[napi(js_name = "kind")] pub type_: Option, pub root: Option, pub status: Option,