genlayer-js 0.11.0 → 0.11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
 
2
2
 
3
+ ## 0.11.1 (2025-07-09)
4
+
3
5
  ## 0.11.0 (2025-05-28)
4
6
 
5
7
 
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkN65Y4TC3cjs = require('../chunk-N65Y4TC3.cjs');
5
+ var _chunkZKBMABRAcjs = require('../chunk-ZKBMABRA.cjs');
6
6
  require('../chunk-75ZPJI57.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.localnet = _chunkN65Y4TC3cjs.localnet; exports.studionet = _chunkN65Y4TC3cjs.studionet; exports.testnetAsimov = _chunkN65Y4TC3cjs.testnetAsimov;
11
+ exports.localnet = _chunkZKBMABRAcjs.localnet; exports.studionet = _chunkZKBMABRAcjs.studionet; exports.testnetAsimov = _chunkZKBMABRAcjs.testnetAsimov;
@@ -2,7 +2,7 @@ import {
2
2
  localnet,
3
3
  studionet,
4
4
  testnetAsimov
5
- } from "../chunk-565IJBV4.js";
5
+ } from "../chunk-GEN4SJ6K.js";
6
6
  import "../chunk-MLKGABMK.js";
7
7
  export {
8
8
  localnet,
@@ -8038,7 +8038,7 @@ import { defineChain as defineChain3 } from "viem";
8038
8038
  var TESTNET_JSON_RPC_URL = " http://34.32.169.58:9151";
8039
8039
  var EXPLORER_URL2 = "https://explorer-asimov.genlayer.com/";
8040
8040
  var CONSENSUS_MAIN_CONTRACT3 = {
8041
- address: "0x174782d5819dD26F3d6967c995EE43db7DB824F8",
8041
+ address: "0xe30293d600fF9B2C865d91307826F28006A458f4",
8042
8042
  abi: [
8043
8043
  {
8044
8044
  inputs: [],
@@ -8502,25 +8502,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8502
8502
  name: "TransactionActivated",
8503
8503
  type: "event"
8504
8504
  },
8505
- {
8506
- anonymous: false,
8507
- inputs: [
8508
- {
8509
- indexed: true,
8510
- internalType: "uint256",
8511
- name: "batchId",
8512
- type: "uint256"
8513
- },
8514
- {
8515
- indexed: false,
8516
- internalType: "address[]",
8517
- name: "validators",
8518
- type: "address[]"
8519
- }
8520
- ],
8521
- name: "TransactionActivatedValidators",
8522
- type: "event"
8523
- },
8524
8505
  {
8525
8506
  anonymous: false,
8526
8507
  inputs: [
@@ -8799,19 +8780,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8799
8780
  stateMutability: "view",
8800
8781
  type: "function"
8801
8782
  },
8802
- {
8803
- inputs: [],
8804
- name: "EVENTS_BATCH_SIZE",
8805
- outputs: [
8806
- {
8807
- internalType: "uint256",
8808
- name: "",
8809
- type: "uint256"
8810
- }
8811
- ],
8812
- stateMutability: "view",
8813
- type: "function"
8814
- },
8815
8783
  {
8816
8784
  inputs: [],
8817
8785
  name: "acceptOwnership",
@@ -8912,11 +8880,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8912
8880
  internalType: "bytes32",
8913
8881
  name: "_commitHash",
8914
8882
  type: "bytes32"
8915
- },
8916
- {
8917
- internalType: "uint256",
8918
- name: "_validatorIndex",
8919
- type: "uint256"
8920
8883
  }
8921
8884
  ],
8922
8885
  name: "commitVote",
@@ -9329,11 +9292,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
9329
9292
  internalType: "uint256",
9330
9293
  name: "_nonce",
9331
9294
  type: "uint256"
9332
- },
9333
- {
9334
- internalType: "uint256",
9335
- name: "_validatorIndex",
9336
- type: "uint256"
9337
9295
  }
9338
9296
  ],
9339
9297
  name: "revealVote",
@@ -9469,7 +9427,7 @@ var CONSENSUS_MAIN_CONTRACT3 = {
9469
9427
  bytecode: ""
9470
9428
  };
9471
9429
  var CONSENSUS_DATA_CONTRACT3 = {
9472
- address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16",
9430
+ address: "0x2a50afD9d3E0ACC824aC4850d7B4c5561aB5D27a",
9473
9431
  abi: [
9474
9432
  {
9475
9433
  inputs: [],
@@ -11017,6 +10975,16 @@ var CONSENSUS_DATA_CONTRACT3 = {
11017
10975
  internalType: "address",
11018
10976
  name: "ghostAddress",
11019
10977
  type: "address"
10978
+ },
10979
+ {
10980
+ internalType: "uint256",
10981
+ name: "numOfMessagesIssuedOnAcceptance",
10982
+ type: "uint256"
10983
+ },
10984
+ {
10985
+ internalType: "uint256",
10986
+ name: "numOfMessagesIssuedOnFinalization",
10987
+ type: "uint256"
11020
10988
  }
11021
10989
  ],
11022
10990
  stateMutability: "view",
@@ -11424,6 +11392,26 @@ var CONSENSUS_DATA_CONTRACT3 = {
11424
11392
  internalType: "struct ITransactions.RoundData[]",
11425
11393
  name: "roundData",
11426
11394
  type: "tuple[]"
11395
+ },
11396
+ {
11397
+ internalType: "uint256",
11398
+ name: "numOfMessagesIssuedOnAcceptance",
11399
+ type: "uint256"
11400
+ },
11401
+ {
11402
+ internalType: "uint256",
11403
+ name: "numOfMessagesIssuedOnFinalization",
11404
+ type: "uint256"
11405
+ },
11406
+ {
11407
+ internalType: "address",
11408
+ name: "txOrigin",
11409
+ type: "address"
11410
+ },
11411
+ {
11412
+ internalType: "uint256",
11413
+ name: "initialRotations",
11414
+ type: "uint256"
11427
11415
  }
11428
11416
  ],
11429
11417
  internalType: "struct ITransactions.Transaction",
@@ -8038,7 +8038,7 @@ var studionet = _viem.defineChain.call(void 0, {
8038
8038
  var TESTNET_JSON_RPC_URL = " http://34.32.169.58:9151";
8039
8039
  var EXPLORER_URL2 = "https://explorer-asimov.genlayer.com/";
8040
8040
  var CONSENSUS_MAIN_CONTRACT3 = {
8041
- address: "0x174782d5819dD26F3d6967c995EE43db7DB824F8",
8041
+ address: "0xe30293d600fF9B2C865d91307826F28006A458f4",
8042
8042
  abi: [
8043
8043
  {
8044
8044
  inputs: [],
@@ -8502,25 +8502,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8502
8502
  name: "TransactionActivated",
8503
8503
  type: "event"
8504
8504
  },
8505
- {
8506
- anonymous: false,
8507
- inputs: [
8508
- {
8509
- indexed: true,
8510
- internalType: "uint256",
8511
- name: "batchId",
8512
- type: "uint256"
8513
- },
8514
- {
8515
- indexed: false,
8516
- internalType: "address[]",
8517
- name: "validators",
8518
- type: "address[]"
8519
- }
8520
- ],
8521
- name: "TransactionActivatedValidators",
8522
- type: "event"
8523
- },
8524
8505
  {
8525
8506
  anonymous: false,
8526
8507
  inputs: [
@@ -8799,19 +8780,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8799
8780
  stateMutability: "view",
8800
8781
  type: "function"
8801
8782
  },
8802
- {
8803
- inputs: [],
8804
- name: "EVENTS_BATCH_SIZE",
8805
- outputs: [
8806
- {
8807
- internalType: "uint256",
8808
- name: "",
8809
- type: "uint256"
8810
- }
8811
- ],
8812
- stateMutability: "view",
8813
- type: "function"
8814
- },
8815
8783
  {
8816
8784
  inputs: [],
8817
8785
  name: "acceptOwnership",
@@ -8912,11 +8880,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
8912
8880
  internalType: "bytes32",
8913
8881
  name: "_commitHash",
8914
8882
  type: "bytes32"
8915
- },
8916
- {
8917
- internalType: "uint256",
8918
- name: "_validatorIndex",
8919
- type: "uint256"
8920
8883
  }
8921
8884
  ],
8922
8885
  name: "commitVote",
@@ -9329,11 +9292,6 @@ var CONSENSUS_MAIN_CONTRACT3 = {
9329
9292
  internalType: "uint256",
9330
9293
  name: "_nonce",
9331
9294
  type: "uint256"
9332
- },
9333
- {
9334
- internalType: "uint256",
9335
- name: "_validatorIndex",
9336
- type: "uint256"
9337
9295
  }
9338
9296
  ],
9339
9297
  name: "revealVote",
@@ -9469,7 +9427,7 @@ var CONSENSUS_MAIN_CONTRACT3 = {
9469
9427
  bytecode: ""
9470
9428
  };
9471
9429
  var CONSENSUS_DATA_CONTRACT3 = {
9472
- address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16",
9430
+ address: "0x2a50afD9d3E0ACC824aC4850d7B4c5561aB5D27a",
9473
9431
  abi: [
9474
9432
  {
9475
9433
  inputs: [],
@@ -11017,6 +10975,16 @@ var CONSENSUS_DATA_CONTRACT3 = {
11017
10975
  internalType: "address",
11018
10976
  name: "ghostAddress",
11019
10977
  type: "address"
10978
+ },
10979
+ {
10980
+ internalType: "uint256",
10981
+ name: "numOfMessagesIssuedOnAcceptance",
10982
+ type: "uint256"
10983
+ },
10984
+ {
10985
+ internalType: "uint256",
10986
+ name: "numOfMessagesIssuedOnFinalization",
10987
+ type: "uint256"
11020
10988
  }
11021
10989
  ],
11022
10990
  stateMutability: "view",
@@ -11424,6 +11392,26 @@ var CONSENSUS_DATA_CONTRACT3 = {
11424
11392
  internalType: "struct ITransactions.RoundData[]",
11425
11393
  name: "roundData",
11426
11394
  type: "tuple[]"
11395
+ },
11396
+ {
11397
+ internalType: "uint256",
11398
+ name: "numOfMessagesIssuedOnAcceptance",
11399
+ type: "uint256"
11400
+ },
11401
+ {
11402
+ internalType: "uint256",
11403
+ name: "numOfMessagesIssuedOnFinalization",
11404
+ type: "uint256"
11405
+ },
11406
+ {
11407
+ internalType: "address",
11408
+ name: "txOrigin",
11409
+ type: "address"
11410
+ },
11411
+ {
11412
+ internalType: "uint256",
11413
+ name: "initialRotations",
11414
+ type: "uint256"
11427
11415
  }
11428
11416
  ],
11429
11417
  internalType: "struct ITransactions.Transaction",
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkN65Y4TC3cjs = require('./chunk-N65Y4TC3.cjs');
6
+ var _chunkZKBMABRAcjs = require('./chunk-ZKBMABRA.cjs');
7
7
 
8
8
 
9
9
 
@@ -28,7 +28,7 @@ var _viem = require('viem');
28
28
  function accountActions(client) {
29
29
  return {
30
30
  fundAccount: async ({ address, amount }) => {
31
- if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !== _chunkN65Y4TC3cjs.localnet.id) {
31
+ if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !== _chunkZKBMABRAcjs.localnet.id) {
32
32
  throw new Error("Client is not connected to the localnet");
33
33
  }
34
34
  return client.request({
@@ -410,7 +410,7 @@ function makeCalldataObject(method, args, kwargs) {
410
410
  var contractActions = (client, publicClient) => {
411
411
  return {
412
412
  getContractSchema: async (address) => {
413
- if (client.chain.id !== _chunkN65Y4TC3cjs.localnet.id) {
413
+ if (client.chain.id !== _chunkZKBMABRAcjs.localnet.id) {
414
414
  throw new Error("Contract schema is not supported on this network");
415
415
  }
416
416
  const schema = await client.request({
@@ -420,7 +420,7 @@ var contractActions = (client, publicClient) => {
420
420
  return schema;
421
421
  },
422
422
  getContractSchemaForCode: async (contractCode) => {
423
- if (client.chain.id !== _chunkN65Y4TC3cjs.localnet.id) {
423
+ if (client.chain.id !== _chunkZKBMABRAcjs.localnet.id) {
424
424
  throw new Error("Contract schema is not supported on this network");
425
425
  }
426
426
  const schema = await client.request({
@@ -701,7 +701,7 @@ var receiptActions = (client, publicClient) => ({
701
701
  const transactionStatusFinalized = _chunkH4ZYXVV2cjs.transactionsStatusNameToNumber["FINALIZED" /* FINALIZED */];
702
702
  const requestedStatus = _chunkH4ZYXVV2cjs.transactionsStatusNameToNumber[status];
703
703
  if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ && transactionStatusString === transactionStatusFinalized) {
704
- if (client.chain.id === _chunkN65Y4TC3cjs.localnet.id) {
704
+ if (client.chain.id === _chunkZKBMABRAcjs.localnet.id) {
705
705
  return _decodeLocalnetTransaction(transaction);
706
706
  }
707
707
  return transaction;
@@ -720,7 +720,7 @@ var receiptActions = (client, publicClient) => ({
720
720
  });
721
721
  var transactionActions = (client, publicClient) => ({
722
722
  getTransaction: async ({ hash }) => {
723
- if (client.chain.id === _chunkN65Y4TC3cjs.localnet.id) {
723
+ if (client.chain.id === _chunkZKBMABRAcjs.localnet.id) {
724
724
  const transaction2 = await client.getTransaction({ hash });
725
725
  const localnetStatus = transaction2.status === "ACTIVATED" ? "PENDING" /* PENDING */ : transaction2.status;
726
726
  transaction2.status = Number(_chunkH4ZYXVV2cjs.transactionsStatusNameToNumber[localnetStatus]);
@@ -857,9 +857,9 @@ var snapID = {
857
857
 
858
858
  // src/wallet/connect.ts
859
859
  var networks = {
860
- localnet: _chunkN65Y4TC3cjs.localnet,
861
- studionet: _chunkN65Y4TC3cjs.studionet,
862
- testnetAsimov: _chunkN65Y4TC3cjs.testnetAsimov
860
+ localnet: _chunkZKBMABRAcjs.localnet,
861
+ studionet: _chunkZKBMABRAcjs.studionet,
862
+ testnetAsimov: _chunkZKBMABRAcjs.testnetAsimov
863
863
  };
864
864
  var connect = async (client, network = "studionet", snapSource = "npm") => {
865
865
  if (!window.ethereum) {
@@ -958,7 +958,7 @@ function walletActions(client) {
958
958
  function chainActions(client) {
959
959
  return {
960
960
  initializeConsensusSmartContract: async (forceReset = false) => {
961
- if (_optionalChain([client, 'access', _46 => _46.chain, 'optionalAccess', _47 => _47.id]) === _chunkN65Y4TC3cjs.testnetAsimov.id) {
961
+ if (_optionalChain([client, 'access', _46 => _46.chain, 'optionalAccess', _47 => _47.id]) === _chunkZKBMABRAcjs.testnetAsimov.id) {
962
962
  return;
963
963
  }
964
964
  if (!forceReset && _optionalChain([client, 'access', _48 => _48.chain, 'access', _49 => _49.consensusMainContract, 'optionalAccess', _50 => _50.address]) && _optionalChain([client, 'access', _51 => _51.chain, 'access', _52 => _52.consensusMainContract, 'optionalAccess', _53 => _53.abi])) {
@@ -1027,8 +1027,8 @@ var getCustomTransportConfig = (config) => {
1027
1027
  }
1028
1028
  };
1029
1029
  };
1030
- var createClient = (config = { chain: _chunkN65Y4TC3cjs.localnet }) => {
1031
- const chainConfig = config.chain || _chunkN65Y4TC3cjs.localnet;
1030
+ var createClient = (config = { chain: _chunkZKBMABRAcjs.localnet }) => {
1031
+ const chainConfig = config.chain || _chunkZKBMABRAcjs.localnet;
1032
1032
  if (config.endpoint) {
1033
1033
  chainConfig.rpcUrls.default.http = [config.endpoint];
1034
1034
  }
@@ -1076,4 +1076,4 @@ var createAccount = (accountPrivateKey) => {
1076
1076
 
1077
1077
 
1078
1078
 
1079
- exports.abi = abi_exports; exports.chains = _chunkN65Y4TC3cjs.chains_exports; exports.createAccount = createAccount; exports.createClient = createClient; exports.generatePrivateKey = generatePrivateKey;
1079
+ exports.abi = abi_exports; exports.chains = _chunkZKBMABRAcjs.chains_exports; exports.createAccount = createAccount; exports.createClient = createClient; exports.generatePrivateKey = generatePrivateKey;
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  localnet,
4
4
  studionet,
5
5
  testnetAsimov
6
- } from "./chunk-565IJBV4.js";
6
+ } from "./chunk-GEN4SJ6K.js";
7
7
  import {
8
8
  CalldataAddress,
9
9
  transactionResultNumberToName,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.11.0",
4
+ "version": "0.11.1",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",