From 908a8f124a6629330add356e14e21101be2ebc1f Mon Sep 17 00:00:00 2001 From: Flavio Espinoza Date: Wed, 17 Jul 2024 09:31:23 -0600 Subject: [PATCH] Added getBlsJavy to bindaries. --- src/lib/binaries.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/lib/binaries.ts b/src/lib/binaries.ts index 1bd14b5..b252251 100644 --- a/src/lib/binaries.ts +++ b/src/lib/binaries.ts @@ -76,3 +76,24 @@ export const getNetworking = () => { resolve(null) }) } + +export const getBlsJavy = () => { + return new Promise(async (resolve) => { + const os = store.system.platform === 'win32' ? 'windows' : store.system.platform + const arch = store.system.arch === 'arm64' ? 'arm64' : 'amd64' + const VERSION = 'v1.4.0' + const result = await download( + `https://github.com/blocklessnetwork/bls-javy/releases/download/${VERSION}/javy-x86_64-macos-${VERSION}.gz`, + `/tmp/bls-javy-${os}.${arch}.tar.gz` + ) + + console.log(`${Chalk.yellow('Installing')} ... unpacking ${result}`) + execSync( + `mkdir -p ${store.system.homedir}/.bls/network; tar -xvf /tmp/bls-javy-${os}.${arch}.tar.gz -C ${store.system.homedir}/.bls/network`, + { stdio: 'ignore' } + ) + console.log(`${Chalk.green('Installing')} ... installed networking agent: ${os}/${arch}`) + + resolve(null) + }) +}