Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
404 lines
14 KiB
JavaScript
Executable File
404 lines
14 KiB
JavaScript
Executable File
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/* prettier-ignore */
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
const { existsSync, readFileSync } = require('fs')
|
|
const { join } = require('path')
|
|
|
|
const { platform, arch } = process
|
|
|
|
let nativeBinding = null
|
|
let localFileExisted = false
|
|
let loadError = null
|
|
|
|
function isMusl() {
|
|
// For Node 10
|
|
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
try {
|
|
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
} catch (e) {
|
|
return true
|
|
}
|
|
} else {
|
|
const { glibcVersionRuntime } = process.report.getReport().header
|
|
return !glibcVersionRuntime
|
|
}
|
|
}
|
|
|
|
switch (platform) {
|
|
case 'android':
|
|
switch (arch) {
|
|
case 'arm64':
|
|
localFileExisted = existsSync(join(__dirname, 'edr.android-arm64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.android-arm64.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-android-arm64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm':
|
|
localFileExisted = existsSync(join(__dirname, 'edr.android-arm-eabi.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.android-arm-eabi.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-android-arm-eabi')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
}
|
|
break
|
|
case 'win32':
|
|
switch (arch) {
|
|
case 'x64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.win32-x64-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.win32-x64-msvc.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-win32-x64-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'ia32':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.win32-ia32-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.win32-ia32-msvc.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-win32-ia32-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.win32-arm64-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.win32-arm64-msvc.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-win32-arm64-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
}
|
|
break
|
|
case 'darwin':
|
|
localFileExisted = existsSync(join(__dirname, 'edr.darwin-universal.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.darwin-universal.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-darwin-universal')
|
|
}
|
|
break
|
|
} catch {}
|
|
switch (arch) {
|
|
case 'x64':
|
|
localFileExisted = existsSync(join(__dirname, 'edr.darwin-x64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.darwin-x64.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-darwin-x64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.darwin-arm64.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.darwin-arm64.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-darwin-arm64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
}
|
|
break
|
|
case 'freebsd':
|
|
if (arch !== 'x64') {
|
|
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
}
|
|
localFileExisted = existsSync(join(__dirname, 'edr.freebsd-x64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.freebsd-x64.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-freebsd-x64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'linux':
|
|
switch (arch) {
|
|
case 'x64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-x64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-x64-musl.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-x64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-x64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-x64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-x64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'arm64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-arm64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-arm64-musl.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-arm64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-arm64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-arm64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-arm64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'arm':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-arm-musleabihf.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-arm-musleabihf.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-arm-musleabihf')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-arm-gnueabihf.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-arm-gnueabihf.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-arm-gnueabihf')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'riscv64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-riscv64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-riscv64-musl.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-riscv64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-riscv64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-riscv64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-riscv64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 's390x':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'edr.linux-s390x-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./edr.linux-s390x-gnu.node')
|
|
} else {
|
|
nativeBinding = require('@nomicfoundation/edr-linux-s390x-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
|
}
|
|
|
|
if (!nativeBinding) {
|
|
if (loadError) {
|
|
throw loadError
|
|
}
|
|
throw new Error(`Failed to load native binding`)
|
|
}
|
|
|
|
const { GENERIC_CHAIN_TYPE, genericChainProviderFactory, L1_CHAIN_TYPE, l1GenesisState, l1ProviderFactory, SpecId, l1HardforkFromString, l1HardforkToString, l1HardforkLatest, FRONTIER, FRONTIER_THAWING, HOMESTEAD, DAO_FORK, TANGERINE, SPURIOUS_DRAGON, BYZANTIUM, CONSTANTINOPLE, PETERSBURG, ISTANBUL, MUIR_GLACIER, BERLIN, LONDON, ARROW_GLACIER, GRAY_GLACIER, MERGE, SHANGHAI, CANCUN, PRAGUE, OSAKA, OpHardfork, opHardforkFromString, opHardforkToString, opLatestHardfork, OP_CHAIN_TYPE, opGenesisState, opProviderFactory, BEDROCK, REGOLITH, CANYON, ECOTONE, FJORD, GRANITE, HOLOCENE, ISTHMUS, MineOrdering, EdrContext, ContractDecoder, GasReportExecutionStatus, addStatementCoverageInstrumentation, latestSupportedSolidityVersion, Precompile, precompileP256Verify, ProviderFactory, Response, Provider, SuccessReason, ExceptionalHalt, CheatcodeErrorCode, CachedChains, CachedEndpoints, FsAccessPermission, CollectStackTraces, IncludeTraces, SolidityTestRunnerFactory, l1SolidityTestRunnerFactory, opSolidityTestRunnerFactory, SuiteResult, TestResult, TestStatus, CallKind, LogKind, linkHexStringBytecode, printStackTrace, Exit, ExitCode, BytecodeWrapper, ContractFunctionType, ReturnData, StackTraceEntryType, stackTraceEntryTypeToString, FALLBACK_FUNCTION_NAME, RECEIVE_FUNCTION_NAME, CONSTRUCTOR_FUNCTION_NAME, UNRECOGNIZED_FUNCTION_NAME, UNKNOWN_FUNCTION_NAME, PRECOMPILE_FUNCTION_NAME, UNRECOGNIZED_CONTRACT_NAME, RawTrace, getLatestSupportedSolcVersion } = nativeBinding
|
|
|
|
module.exports.GENERIC_CHAIN_TYPE = GENERIC_CHAIN_TYPE
|
|
module.exports.genericChainProviderFactory = genericChainProviderFactory
|
|
module.exports.L1_CHAIN_TYPE = L1_CHAIN_TYPE
|
|
module.exports.l1GenesisState = l1GenesisState
|
|
module.exports.l1ProviderFactory = l1ProviderFactory
|
|
module.exports.SpecId = SpecId
|
|
module.exports.l1HardforkFromString = l1HardforkFromString
|
|
module.exports.l1HardforkToString = l1HardforkToString
|
|
module.exports.l1HardforkLatest = l1HardforkLatest
|
|
module.exports.FRONTIER = FRONTIER
|
|
module.exports.FRONTIER_THAWING = FRONTIER_THAWING
|
|
module.exports.HOMESTEAD = HOMESTEAD
|
|
module.exports.DAO_FORK = DAO_FORK
|
|
module.exports.TANGERINE = TANGERINE
|
|
module.exports.SPURIOUS_DRAGON = SPURIOUS_DRAGON
|
|
module.exports.BYZANTIUM = BYZANTIUM
|
|
module.exports.CONSTANTINOPLE = CONSTANTINOPLE
|
|
module.exports.PETERSBURG = PETERSBURG
|
|
module.exports.ISTANBUL = ISTANBUL
|
|
module.exports.MUIR_GLACIER = MUIR_GLACIER
|
|
module.exports.BERLIN = BERLIN
|
|
module.exports.LONDON = LONDON
|
|
module.exports.ARROW_GLACIER = ARROW_GLACIER
|
|
module.exports.GRAY_GLACIER = GRAY_GLACIER
|
|
module.exports.MERGE = MERGE
|
|
module.exports.SHANGHAI = SHANGHAI
|
|
module.exports.CANCUN = CANCUN
|
|
module.exports.PRAGUE = PRAGUE
|
|
module.exports.OSAKA = OSAKA
|
|
module.exports.OpHardfork = OpHardfork
|
|
module.exports.opHardforkFromString = opHardforkFromString
|
|
module.exports.opHardforkToString = opHardforkToString
|
|
module.exports.opLatestHardfork = opLatestHardfork
|
|
module.exports.OP_CHAIN_TYPE = OP_CHAIN_TYPE
|
|
module.exports.opGenesisState = opGenesisState
|
|
module.exports.opProviderFactory = opProviderFactory
|
|
module.exports.BEDROCK = BEDROCK
|
|
module.exports.REGOLITH = REGOLITH
|
|
module.exports.CANYON = CANYON
|
|
module.exports.ECOTONE = ECOTONE
|
|
module.exports.FJORD = FJORD
|
|
module.exports.GRANITE = GRANITE
|
|
module.exports.HOLOCENE = HOLOCENE
|
|
module.exports.ISTHMUS = ISTHMUS
|
|
module.exports.MineOrdering = MineOrdering
|
|
module.exports.EdrContext = EdrContext
|
|
module.exports.ContractDecoder = ContractDecoder
|
|
module.exports.GasReportExecutionStatus = GasReportExecutionStatus
|
|
module.exports.addStatementCoverageInstrumentation = addStatementCoverageInstrumentation
|
|
module.exports.latestSupportedSolidityVersion = latestSupportedSolidityVersion
|
|
module.exports.Precompile = Precompile
|
|
module.exports.precompileP256Verify = precompileP256Verify
|
|
module.exports.ProviderFactory = ProviderFactory
|
|
module.exports.Response = Response
|
|
module.exports.Provider = Provider
|
|
module.exports.SuccessReason = SuccessReason
|
|
module.exports.ExceptionalHalt = ExceptionalHalt
|
|
module.exports.CheatcodeErrorCode = CheatcodeErrorCode
|
|
module.exports.CachedChains = CachedChains
|
|
module.exports.CachedEndpoints = CachedEndpoints
|
|
module.exports.FsAccessPermission = FsAccessPermission
|
|
module.exports.CollectStackTraces = CollectStackTraces
|
|
module.exports.IncludeTraces = IncludeTraces
|
|
module.exports.SolidityTestRunnerFactory = SolidityTestRunnerFactory
|
|
module.exports.l1SolidityTestRunnerFactory = l1SolidityTestRunnerFactory
|
|
module.exports.opSolidityTestRunnerFactory = opSolidityTestRunnerFactory
|
|
module.exports.SuiteResult = SuiteResult
|
|
module.exports.TestResult = TestResult
|
|
module.exports.TestStatus = TestStatus
|
|
module.exports.CallKind = CallKind
|
|
module.exports.LogKind = LogKind
|
|
module.exports.linkHexStringBytecode = linkHexStringBytecode
|
|
module.exports.printStackTrace = printStackTrace
|
|
module.exports.Exit = Exit
|
|
module.exports.ExitCode = ExitCode
|
|
module.exports.BytecodeWrapper = BytecodeWrapper
|
|
module.exports.ContractFunctionType = ContractFunctionType
|
|
module.exports.ReturnData = ReturnData
|
|
module.exports.StackTraceEntryType = StackTraceEntryType
|
|
module.exports.stackTraceEntryTypeToString = stackTraceEntryTypeToString
|
|
module.exports.FALLBACK_FUNCTION_NAME = FALLBACK_FUNCTION_NAME
|
|
module.exports.RECEIVE_FUNCTION_NAME = RECEIVE_FUNCTION_NAME
|
|
module.exports.CONSTRUCTOR_FUNCTION_NAME = CONSTRUCTOR_FUNCTION_NAME
|
|
module.exports.UNRECOGNIZED_FUNCTION_NAME = UNRECOGNIZED_FUNCTION_NAME
|
|
module.exports.UNKNOWN_FUNCTION_NAME = UNKNOWN_FUNCTION_NAME
|
|
module.exports.PRECOMPILE_FUNCTION_NAME = PRECOMPILE_FUNCTION_NAME
|
|
module.exports.UNRECOGNIZED_CONTRACT_NAME = UNRECOGNIZED_CONTRACT_NAME
|
|
module.exports.RawTrace = RawTrace
|
|
module.exports.getLatestSupportedSolcVersion = getLatestSupportedSolcVersion
|