@alephium/web3 1.7.0 → 1.7.1

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.
@@ -379,6 +379,9 @@ class Contract extends Artifact {
379
379
  return signerParams;
380
380
  }
381
381
  buildByteCodeToDeploy(initialFields, isDevnet, exposePrivateFunctions = false) {
382
+ if (exposePrivateFunctions && !isDevnet) {
383
+ throw new Error('Cannot expose private functions in non-devnet environment');
384
+ }
382
385
  try {
383
386
  const bytecode = exposePrivateFunctions && isDevnet
384
387
  ? this.getByteCodeForTesting()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -589,6 +589,10 @@ export class Contract extends Artifact {
589
589
  }
590
590
 
591
591
  buildByteCodeToDeploy(initialFields: Fields, isDevnet: boolean, exposePrivateFunctions = false): string {
592
+ if (exposePrivateFunctions && !isDevnet) {
593
+ throw new Error('Cannot expose private functions in non-devnet environment')
594
+ }
595
+
592
596
  try {
593
597
  const bytecode =
594
598
  exposePrivateFunctions && isDevnet