@argonprotocol/testing 1.4.7-dev.6c827619 → 1.4.7-dev.ceb2baac

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/index.d.cts CHANGED
@@ -120,13 +120,6 @@ type BitcoinRawTransactionResult = {
120
120
  txid: string;
121
121
  };
122
122
 
123
- declare class TestBitcoinCli {
124
- /**
125
- * Returns the localhost address of the notary (NOTE: not accessible from containers)
126
- */
127
- static run(command: string): string;
128
- }
129
-
130
123
  declare class TestOracle implements ITeardownable {
131
124
  #private;
132
125
  static BitcoinOperator: string;
@@ -425,4 +418,4 @@ declare function stringifyExt(obj: any): any;
425
418
  declare function sudo(): KeyringPair;
426
419
  declare function activateNotary(sudo: KeyringPair, client: ArgonClient, notary: TestNotary): Promise<void>;
427
420
 
428
- export { type EthereumGatewayUpdateBatch, EthereumProofE2eHarness, type ITeardownable, SKIP_E2E, TestBitcoinCli, TestEthereum, TestMainchain, TestMintingAuthorityActor, TestMintingGateway, TestNotary, TestOracle, activateNotary, addTeardown, cleanHostForDocker, closeOnTeardown, disconnectOnTeardown, getDockerPortMapping, getProxy, getReadyEthereumGatewayUpdates, mineLaterExecutionAnchorReceipt, projectRoot, runOnTeardown, runTestScript, signGatewayPermit, startNetwork, stringifyExt, sudo, syncEthereumVerifierUntilAnchorCovers, teardown, toArgonKeccakSignature, toEvmRecoverableSignature, waitForExecutionReceipt, waitForFinalizedBeaconExecutionAtOrAbove };
421
+ export { type EthereumGatewayUpdateBatch, EthereumProofE2eHarness, type ITeardownable, SKIP_E2E, TestEthereum, TestMainchain, TestMintingAuthorityActor, TestMintingGateway, TestNotary, TestOracle, activateNotary, addTeardown, cleanHostForDocker, closeOnTeardown, disconnectOnTeardown, getDockerPortMapping, getProxy, getReadyEthereumGatewayUpdates, mineLaterExecutionAnchorReceipt, projectRoot, runOnTeardown, runTestScript, signGatewayPermit, startNetwork, stringifyExt, sudo, syncEthereumVerifierUntilAnchorCovers, teardown, toArgonKeccakSignature, toEvmRecoverableSignature, waitForExecutionReceipt, waitForFinalizedBeaconExecutionAtOrAbove };
package/lib/index.d.ts CHANGED
@@ -120,13 +120,6 @@ type BitcoinRawTransactionResult = {
120
120
  txid: string;
121
121
  };
122
122
 
123
- declare class TestBitcoinCli {
124
- /**
125
- * Returns the localhost address of the notary (NOTE: not accessible from containers)
126
- */
127
- static run(command: string): string;
128
- }
129
-
130
123
  declare class TestOracle implements ITeardownable {
131
124
  #private;
132
125
  static BitcoinOperator: string;
@@ -425,4 +418,4 @@ declare function stringifyExt(obj: any): any;
425
418
  declare function sudo(): KeyringPair;
426
419
  declare function activateNotary(sudo: KeyringPair, client: ArgonClient, notary: TestNotary): Promise<void>;
427
420
 
428
- export { type EthereumGatewayUpdateBatch, EthereumProofE2eHarness, type ITeardownable, SKIP_E2E, TestBitcoinCli, TestEthereum, TestMainchain, TestMintingAuthorityActor, TestMintingGateway, TestNotary, TestOracle, activateNotary, addTeardown, cleanHostForDocker, closeOnTeardown, disconnectOnTeardown, getDockerPortMapping, getProxy, getReadyEthereumGatewayUpdates, mineLaterExecutionAnchorReceipt, projectRoot, runOnTeardown, runTestScript, signGatewayPermit, startNetwork, stringifyExt, sudo, syncEthereumVerifierUntilAnchorCovers, teardown, toArgonKeccakSignature, toEvmRecoverableSignature, waitForExecutionReceipt, waitForFinalizedBeaconExecutionAtOrAbove };
421
+ export { type EthereumGatewayUpdateBatch, EthereumProofE2eHarness, type ITeardownable, SKIP_E2E, TestEthereum, TestMainchain, TestMintingAuthorityActor, TestMintingGateway, TestNotary, TestOracle, activateNotary, addTeardown, cleanHostForDocker, closeOnTeardown, disconnectOnTeardown, getDockerPortMapping, getProxy, getReadyEthereumGatewayUpdates, mineLaterExecutionAnchorReceipt, projectRoot, runOnTeardown, runTestScript, signGatewayPermit, startNetwork, stringifyExt, sudo, syncEthereumVerifierUntilAnchorCovers, teardown, toArgonKeccakSignature, toEvmRecoverableSignature, waitForExecutionReceipt, waitForFinalizedBeaconExecutionAtOrAbove };
package/lib/index.js CHANGED
@@ -567,34 +567,13 @@ var BitcoinRpcClient = class {
567
567
  }
568
568
  };
569
569
 
570
- // src/TestBitcoinCli.ts
571
- import * as child_process3 from "child_process";
572
- import * as Path4 from "path";
573
- var TestBitcoinCli = class {
574
- /**
575
- * Returns the localhost address of the notary (NOTE: not accessible from containers)
576
- */
577
- static run(command) {
578
- const binPath = Path4.join(`${projectRoot()}`, "target/debug/argon-bitcoin-cli");
579
- try {
580
- return child_process3.execSync(`${binPath} ${command}`, {
581
- encoding: "utf8"
582
- }).trim();
583
- } catch (e) {
584
- console.error(`Error running command: ${command}`);
585
- console.error(e.stdout);
586
- throw e;
587
- }
588
- }
589
- };
590
-
591
570
  // src/TestOracle.ts
592
- import * as child_process4 from "child_process";
571
+ import * as child_process3 from "child_process";
593
572
  import { Keyring as Keyring2 } from "@argonprotocol/mainchain";
594
573
  import * as fs3 from "fs";
595
574
  import * as readline3 from "readline";
596
575
  import * as process4 from "process";
597
- import * as Path5 from "path";
576
+ import * as Path4 from "path";
598
577
  var TestOracle = class _TestOracle {
599
578
  static BitcoinOperator = "//Dave";
600
579
  static PriceIndexOperator = "//Eve";
@@ -609,7 +588,7 @@ var TestOracle = class _TestOracle {
609
588
  const { pathToBin, mainchainUrl, bitcoinRpcUrl } = options;
610
589
  const operatorSuri = service == "bitcoin" ? _TestOracle.BitcoinOperator : _TestOracle.PriceIndexOperator;
611
590
  this.operator = new Keyring2({ type: "sr25519" }).createFromUri(operatorSuri);
612
- const binPath = pathToBin ?? Path5.join(projectRoot(), "target/debug/argon-oracle");
591
+ const binPath = pathToBin ?? Path4.join(projectRoot(), "target/debug/argon-oracle");
613
592
  if (!fs3.existsSync(binPath)) {
614
593
  throw new Error(`Oracle binary not found at ${binPath}`);
615
594
  }
@@ -621,7 +600,7 @@ var TestOracle = class _TestOracle {
621
600
  }
622
601
  execArgs.push("--bitcoin-rpc-url", bitcoinRpcUrl);
623
602
  }
624
- this.#childProcess = child_process4.spawn(binPath, execArgs, {
603
+ this.#childProcess = child_process3.spawn(binPath, execArgs, {
625
604
  stdio: ["ignore", "pipe", "pipe"],
626
605
  env: { ...process4.env, RUST_LOG: "info", ...options.env }
627
606
  });
@@ -646,7 +625,7 @@ var TestOracle = class _TestOracle {
646
625
  // src/TestEthereum.ts
647
626
  import * as fs4 from "fs/promises";
648
627
  import * as os from "os";
649
- import * as Path6 from "path";
628
+ import * as Path5 from "path";
650
629
  import { spawn as spawn4, spawnSync } from "child_process";
651
630
  import { detectPort as detectPort2 } from "detect-port";
652
631
  import { EvmContracts } from "@argonprotocol/mainchain";
@@ -708,8 +687,8 @@ var TestEthereum = class {
708
687
  } = options ?? {};
709
688
  const elPublicPortStart = await findFreePortRange(DEFAULT_EL_PORT_START, PORT_RANGE_SIZE);
710
689
  const clPublicPortStart = await findFreePortRange(DEFAULT_CL_PORT_START, PORT_RANGE_SIZE);
711
- this.#argsDir = await fs4.mkdtemp(Path6.join(os.tmpdir(), "argon-ethereum-devnet-"));
712
- const argsFile = Path6.join(this.#argsDir, "network-params.yaml");
690
+ this.#argsDir = await fs4.mkdtemp(Path5.join(os.tmpdir(), "argon-ethereum-devnet-"));
691
+ const argsFile = Path5.join(this.#argsDir, "network-params.yaml");
713
692
  await fs4.writeFile(
714
693
  argsFile,
715
694
  renderEthereumArgs(
@@ -1109,9 +1088,9 @@ async function delay(ms) {
1109
1088
 
1110
1089
  // src/TestNetwork.ts
1111
1090
  import * as docker from "docker-compose";
1112
- import * as Path7 from "path";
1091
+ import * as Path6 from "path";
1113
1092
  async function startNetwork(testName, options) {
1114
- const config = Path7.join(__dirname, `dev.docker-compose.yml`);
1093
+ const config = Path6.join(__dirname, `dev.docker-compose.yml`);
1115
1094
  const env4 = {
1116
1095
  VERSION: "dev",
1117
1096
  ARGON_CHAIN: "dev-docker",
@@ -1978,7 +1957,8 @@ var TestMintingAuthorityActor = class {
1978
1957
  annualPercentRate: 0.05,
1979
1958
  baseFee: 0n,
1980
1959
  bitcoinXpub: args.bitcoinXpub,
1981
- treasuryProfitSharing: 0
1960
+ treasuryProfitSharing: 0,
1961
+ bonusSharingPercent: 0
1982
1962
  });
1983
1963
  await vault.getVault();
1984
1964
  await this.harness.sudoSubmit(
@@ -2216,7 +2196,6 @@ async function activateNotary(sudo2, client, notary) {
2216
2196
  export {
2217
2197
  EthereumProofE2eHarness,
2218
2198
  SKIP_E2E,
2219
- TestBitcoinCli,
2220
2199
  TestEthereum,
2221
2200
  TestMainchain,
2222
2201
  TestMintingAuthorityActor,