genlayer-js 0.21.0 → 0.21.2

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.
@@ -3,11 +3,11 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkTCAQ6AVFcjs = require('../chunk-TCAQ6AVF.cjs');
6
+ var _chunkCX76PQR5cjs = require('../chunk-CX76PQR5.cjs');
7
7
  require('../chunk-75ZPJI57.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
- exports.localnet = _chunkTCAQ6AVFcjs.localnet; exports.studionet = _chunkTCAQ6AVFcjs.studionet; exports.testnetAsimov = _chunkTCAQ6AVFcjs.testnetAsimov; exports.testnetBradbury = _chunkTCAQ6AVFcjs.testnetBradbury;
13
+ exports.localnet = _chunkCX76PQR5cjs.localnet; exports.studionet = _chunkCX76PQR5cjs.studionet; exports.testnetAsimov = _chunkCX76PQR5cjs.testnetAsimov; exports.testnetBradbury = _chunkCX76PQR5cjs.testnetBradbury;
@@ -3,7 +3,7 @@ import {
3
3
  studionet,
4
4
  testnetAsimov,
5
5
  testnetBradbury
6
- } from "../chunk-5KRGDGMO.js";
6
+ } from "../chunk-T3O6IXYQ.js";
7
7
  import "../chunk-MLKGABMK.js";
8
8
  export {
9
9
  localnet,
@@ -9518,8 +9518,7 @@ var STAKING_ABI = [
9518
9518
  ];
9519
9519
 
9520
9520
  // src/chains/testnetAsimov.ts
9521
- var TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
9522
- var TESTNET_WS_URL = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
9521
+ var TESTNET_JSON_RPC_URL = "http://34.12.136.220:9151";
9523
9522
  var STAKING_CONTRACT = {
9524
9523
  address: "0x63Fa5E0bb10fb6fA98F44726C5518223F767687A",
9525
9524
  abi: STAKING_ABI
@@ -13501,8 +13500,7 @@ var testnetAsimov = _viem.defineChain.call(void 0, {
13501
13500
  name: "Genlayer Asimov Testnet",
13502
13501
  rpcUrls: {
13503
13502
  default: {
13504
- http: [TESTNET_JSON_RPC_URL],
13505
- webSocket: [TESTNET_WS_URL]
13503
+ http: [TESTNET_JSON_RPC_URL]
13506
13504
  }
13507
13505
  },
13508
13506
  nativeCurrency: {
@@ -13526,8 +13524,7 @@ var testnetAsimov = _viem.defineChain.call(void 0, {
13526
13524
 
13527
13525
  // src/chains/testnetBradbury.ts
13528
13526
 
13529
- var TESTNET_JSON_RPC_URL2 = "https://zksync-os-testnet-genlayer.zksync.dev";
13530
- var TESTNET_WS_URL2 = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
13527
+ var TESTNET_JSON_RPC_URL2 = "http://34.91.102.53:9151";
13531
13528
  var STAKING_CONTRACT2 = {
13532
13529
  address: "0x4A4449E617F8D10FDeD0b461CadEf83939E821A5",
13533
13530
  abi: STAKING_ABI
@@ -16855,8 +16852,7 @@ var testnetBradbury = _viem.defineChain.call(void 0, {
16855
16852
  name: "Genlayer Bradbury Testnet",
16856
16853
  rpcUrls: {
16857
16854
  default: {
16858
- http: [TESTNET_JSON_RPC_URL2],
16859
- webSocket: [TESTNET_WS_URL2]
16855
+ http: [TESTNET_JSON_RPC_URL2]
16860
16856
  }
16861
16857
  },
16862
16858
  nativeCurrency: {
@@ -9518,8 +9518,7 @@ var STAKING_ABI = [
9518
9518
  ];
9519
9519
 
9520
9520
  // src/chains/testnetAsimov.ts
9521
- var TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev";
9522
- var TESTNET_WS_URL = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
9521
+ var TESTNET_JSON_RPC_URL = "http://34.12.136.220:9151";
9523
9522
  var STAKING_CONTRACT = {
9524
9523
  address: "0x63Fa5E0bb10fb6fA98F44726C5518223F767687A",
9525
9524
  abi: STAKING_ABI
@@ -13501,8 +13500,7 @@ var testnetAsimov = defineChain3({
13501
13500
  name: "Genlayer Asimov Testnet",
13502
13501
  rpcUrls: {
13503
13502
  default: {
13504
- http: [TESTNET_JSON_RPC_URL],
13505
- webSocket: [TESTNET_WS_URL]
13503
+ http: [TESTNET_JSON_RPC_URL]
13506
13504
  }
13507
13505
  },
13508
13506
  nativeCurrency: {
@@ -13526,8 +13524,7 @@ var testnetAsimov = defineChain3({
13526
13524
 
13527
13525
  // src/chains/testnetBradbury.ts
13528
13526
  import { defineChain as defineChain4 } from "viem";
13529
- var TESTNET_JSON_RPC_URL2 = "https://zksync-os-testnet-genlayer.zksync.dev";
13530
- var TESTNET_WS_URL2 = "wss://zksync-os-testnet-genlayer.zksync.dev/ws";
13527
+ var TESTNET_JSON_RPC_URL2 = "http://34.91.102.53:9151";
13531
13528
  var STAKING_CONTRACT2 = {
13532
13529
  address: "0x4A4449E617F8D10FDeD0b461CadEf83939E821A5",
13533
13530
  abi: STAKING_ABI
@@ -16855,8 +16852,7 @@ var testnetBradbury = defineChain4({
16855
16852
  name: "Genlayer Bradbury Testnet",
16856
16853
  rpcUrls: {
16857
16854
  default: {
16858
- http: [TESTNET_JSON_RPC_URL2],
16859
- webSocket: [TESTNET_WS_URL2]
16855
+ http: [TESTNET_JSON_RPC_URL2]
16860
16856
  }
16861
16857
  },
16862
16858
  nativeCurrency: {
@@ -218,7 +218,8 @@ type GenLayerRawTransaction = {
218
218
  currentTimestamp: bigint;
219
219
  sender: Address;
220
220
  recipient: Address;
221
- numOfInitialValidators: bigint;
221
+ numOfInitialValidators?: bigint;
222
+ initialRotations?: bigint;
222
223
  txSlot: bigint;
223
224
  createdTimestamp: bigint;
224
225
  lastVoteTimestamp: bigint;
@@ -218,7 +218,8 @@ type GenLayerRawTransaction = {
218
218
  currentTimestamp: bigint;
219
219
  sender: Address;
220
220
  recipient: Address;
221
- numOfInitialValidators: bigint;
221
+ numOfInitialValidators?: bigint;
222
+ initialRotations?: bigint;
222
223
  txSlot: bigint;
223
224
  createdTimestamp: bigint;
224
225
  lastVoteTimestamp: bigint;
package/dist/index.cjs CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkTCAQ6AVFcjs = require('./chunk-TCAQ6AVF.cjs');
9
+ var _chunkCX76PQR5cjs = require('./chunk-CX76PQR5.cjs');
10
10
 
11
11
 
12
12
 
@@ -32,7 +32,7 @@ var _viem = require('viem');
32
32
  function accountActions(client) {
33
33
  return {
34
34
  fundAccount: async ({ address, amount }) => {
35
- if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !== _chunkTCAQ6AVFcjs.localnet.id) {
35
+ if (_optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]) !== _chunkCX76PQR5cjs.localnet.id) {
36
36
  throw new Error("Client is not connected to the localnet");
37
37
  }
38
38
  return client.request({
@@ -416,8 +416,8 @@ function serialize(data) {
416
416
  // src/abi/index.ts
417
417
  var abi_exports = {};
418
418
  _chunk75ZPJI57cjs.__export.call(void 0, abi_exports, {
419
- STAKING_ABI: () => _chunkTCAQ6AVFcjs.STAKING_ABI,
420
- VALIDATOR_WALLET_ABI: () => _chunkTCAQ6AVFcjs.VALIDATOR_WALLET_ABI,
419
+ STAKING_ABI: () => _chunkCX76PQR5cjs.STAKING_ABI,
420
+ VALIDATOR_WALLET_ABI: () => _chunkCX76PQR5cjs.VALIDATOR_WALLET_ABI,
421
421
  calldata: () => calldata,
422
422
  transactions: () => transactions
423
423
  });
@@ -517,7 +517,7 @@ function _toJsonSafeDeep(value, seen) {
517
517
  var contractActions = (client, publicClient) => {
518
518
  return {
519
519
  getContractCode: async (address) => {
520
- if (client.chain.id !== _chunkTCAQ6AVFcjs.localnet.id) {
520
+ if (client.chain.id !== _chunkCX76PQR5cjs.localnet.id) {
521
521
  throw new Error("Getting contract code is not supported on this network");
522
522
  }
523
523
  const result = await client.request({
@@ -528,7 +528,7 @@ var contractActions = (client, publicClient) => {
528
528
  return new TextDecoder().decode(codeBytes);
529
529
  },
530
530
  getContractSchema: async (address) => {
531
- if (client.chain.id !== _chunkTCAQ6AVFcjs.localnet.id) {
531
+ if (client.chain.id !== _chunkCX76PQR5cjs.localnet.id) {
532
532
  throw new Error("Contract schema is not supported on this network");
533
533
  }
534
534
  const schema = await client.request({
@@ -538,7 +538,7 @@ var contractActions = (client, publicClient) => {
538
538
  return schema;
539
539
  },
540
540
  getContractSchemaForCode: async (contractCode) => {
541
- if (client.chain.id !== _chunkTCAQ6AVFcjs.localnet.id) {
541
+ if (client.chain.id !== _chunkCX76PQR5cjs.localnet.id) {
542
542
  throw new Error("Contract schema is not supported on this network");
543
543
  }
544
544
  const schema = await client.request({
@@ -1006,13 +1006,15 @@ var decodeInputData = (rlpEncodedAppData, recipient) => {
1006
1006
  }
1007
1007
  };
1008
1008
  var decodeTransaction = (tx) => {
1009
- const txDataDecoded = decodeInputData(tx.txData, tx.recipient);
1009
+ const txData = _nullishCoalesce(tx.txData, () => ( tx.txCalldata));
1010
+ const numOfInitialValidators = _nullishCoalesce(tx.numOfInitialValidators, () => ( tx.initialRotations));
1011
+ const txDataDecoded = decodeInputData(txData, tx.recipient);
1010
1012
  const decodedTx = {
1011
1013
  ...tx,
1012
- txData: tx.txData,
1014
+ txData,
1013
1015
  txDataDecoded,
1014
1016
  currentTimestamp: tx.currentTimestamp.toString(),
1015
- numOfInitialValidators: tx.numOfInitialValidators.toString(),
1017
+ numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]), () => ( "0")),
1016
1018
  txSlot: tx.txSlot.toString(),
1017
1019
  createdTimestamp: tx.createdTimestamp.toString(),
1018
1020
  lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
@@ -1020,21 +1022,21 @@ var decodeTransaction = (tx) => {
1020
1022
  numOfRounds: tx.numOfRounds.toString(),
1021
1023
  readStateBlockRange: {
1022
1024
  ...tx.readStateBlockRange,
1023
- activationBlock: tx.readStateBlockRange.activationBlock.toString(),
1024
- processingBlock: tx.readStateBlockRange.processingBlock.toString(),
1025
- proposalBlock: tx.readStateBlockRange.proposalBlock.toString()
1025
+ activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _40 => _40.readStateBlockRange, 'optionalAccess', _41 => _41.activationBlock, 'optionalAccess', _42 => _42.toString, 'call', _43 => _43()]), () => ( "0")),
1026
+ processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _44 => _44.readStateBlockRange, 'optionalAccess', _45 => _45.processingBlock, 'optionalAccess', _46 => _46.toString, 'call', _47 => _47()]), () => ( "0")),
1027
+ proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _48 => _48.readStateBlockRange, 'optionalAccess', _49 => _49.proposalBlock, 'optionalAccess', _50 => _50.toString, 'call', _51 => _51()]), () => ( "0"))
1026
1028
  },
1027
1029
  statusName: _chunkW4V73RPNcjs.transactionsStatusNumberToName[String(tx.status)],
1028
1030
  resultName: _chunkW4V73RPNcjs.transactionResultNumberToName[String(tx.result)],
1029
1031
  lastRound: {
1030
1032
  ...tx.lastRound,
1031
- round: tx.lastRound.round.toString(),
1032
- leaderIndex: tx.lastRound.leaderIndex.toString(),
1033
- votesCommitted: tx.lastRound.votesCommitted.toString(),
1034
- votesRevealed: tx.lastRound.votesRevealed.toString(),
1035
- appealBond: tx.lastRound.appealBond.toString(),
1036
- rotationsLeft: tx.lastRound.rotationsLeft.toString(),
1037
- validatorVotesName: tx.lastRound.validatorVotes.map(
1033
+ round: _nullishCoalesce(_optionalChain([tx, 'access', _52 => _52.lastRound, 'optionalAccess', _53 => _53.round, 'optionalAccess', _54 => _54.toString, 'call', _55 => _55()]), () => ( "0")),
1034
+ leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _56 => _56.lastRound, 'optionalAccess', _57 => _57.leaderIndex, 'optionalAccess', _58 => _58.toString, 'call', _59 => _59()]), () => ( "0")),
1035
+ votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _60 => _60.lastRound, 'optionalAccess', _61 => _61.votesCommitted, 'optionalAccess', _62 => _62.toString, 'call', _63 => _63()]), () => ( "0")),
1036
+ votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _64 => _64.lastRound, 'optionalAccess', _65 => _65.votesRevealed, 'optionalAccess', _66 => _66.toString, 'call', _67 => _67()]), () => ( "0")),
1037
+ appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _68 => _68.lastRound, 'optionalAccess', _69 => _69.appealBond, 'optionalAccess', _70 => _70.toString, 'call', _71 => _71()]), () => ( "0")),
1038
+ rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _72 => _72.lastRound, 'optionalAccess', _73 => _73.rotationsLeft, 'optionalAccess', _74 => _74.toString, 'call', _75 => _75()]), () => ( "0")),
1039
+ validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _76 => _76.lastRound, 'optionalAccess', _77 => _77.validatorVotes]), () => ( []))).map(
1038
1040
  (vote) => _chunkW4V73RPNcjs.voteTypeNumberToName[String(vote)]
1039
1041
  )
1040
1042
  }
@@ -1116,7 +1118,7 @@ var simplifyTransactionReceipt = (tx) => {
1116
1118
  var decodeLocalnetTransaction = (tx) => {
1117
1119
  if (!tx.data) return tx;
1118
1120
  try {
1119
- const leaderReceipt = _optionalChain([tx, 'access', _38 => _38.consensus_data, 'optionalAccess', _39 => _39.leader_receipt]);
1121
+ const leaderReceipt = _optionalChain([tx, 'access', _78 => _78.consensus_data, 'optionalAccess', _79 => _79.leader_receipt]);
1120
1122
  if (leaderReceipt) {
1121
1123
  const receipts = Array.isArray(leaderReceipt) ? leaderReceipt : [leaderReceipt];
1122
1124
  receipts.forEach((receipt) => {
@@ -1147,7 +1149,7 @@ var decodeLocalnetTransaction = (tx) => {
1147
1149
  }
1148
1150
  });
1149
1151
  }
1150
- if (_optionalChain([tx, 'access', _40 => _40.data, 'optionalAccess', _41 => _41.calldata]) && typeof tx.data.calldata === "string") {
1152
+ if (_optionalChain([tx, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.calldata]) && typeof tx.data.calldata === "string") {
1151
1153
  tx.data.calldata = {
1152
1154
  base64: tx.data.calldata,
1153
1155
  ...calldataToUserFriendlyJson(b64ToArray(tx.data.calldata))
@@ -1178,7 +1180,7 @@ var receiptActions = (client, publicClient) => ({
1178
1180
  const requestedStatus = _chunkW4V73RPNcjs.transactionsStatusNameToNumber[status];
1179
1181
  if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ && _chunkW4V73RPNcjs.isDecidedState.call(void 0, transactionStatusString)) {
1180
1182
  let finalTransaction = transaction;
1181
- if (client.chain.id === _chunkTCAQ6AVFcjs.localnet.id) {
1183
+ if (client.chain.id === _chunkCX76PQR5cjs.localnet.id) {
1182
1184
  finalTransaction = decodeLocalnetTransaction(transaction);
1183
1185
  }
1184
1186
  if (!fullTransaction) {
@@ -1209,8 +1211,8 @@ var transactionActions = (client, publicClient) => ({
1209
1211
  return decodeLocalnetTransaction(transaction2);
1210
1212
  }
1211
1213
  const transaction = await publicClient.readContract({
1212
- address: _optionalChain([client, 'access', _42 => _42.chain, 'access', _43 => _43.consensusDataContract, 'optionalAccess', _44 => _44.address]),
1213
- abi: _optionalChain([client, 'access', _45 => _45.chain, 'access', _46 => _46.consensusDataContract, 'optionalAccess', _47 => _47.abi]),
1214
+ address: _optionalChain([client, 'access', _82 => _82.chain, 'access', _83 => _83.consensusDataContract, 'optionalAccess', _84 => _84.address]),
1215
+ abi: _optionalChain([client, 'access', _85 => _85.chain, 'access', _86 => _86.consensusDataContract, 'optionalAccess', _87 => _87.abi]),
1214
1216
  functionName: "getTransactionData",
1215
1217
  args: [
1216
1218
  hash,
@@ -1249,7 +1251,7 @@ var transactionActions = (client, publicClient) => ({
1249
1251
  },
1250
1252
  estimateTransactionGas: async (transactionParams) => {
1251
1253
  const formattedParams = {
1252
- from: transactionParams.from || _optionalChain([client, 'access', _48 => _48.account, 'optionalAccess', _49 => _49.address]),
1254
+ from: transactionParams.from || _optionalChain([client, 'access', _88 => _88.account, 'optionalAccess', _89 => _89.address]),
1253
1255
  to: transactionParams.to,
1254
1256
  data: transactionParams.data || "0x",
1255
1257
  value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
@@ -1270,10 +1272,10 @@ var snapID = {
1270
1272
 
1271
1273
  // src/wallet/connect.ts
1272
1274
  var networks = {
1273
- localnet: _chunkTCAQ6AVFcjs.localnet,
1274
- studionet: _chunkTCAQ6AVFcjs.studionet,
1275
- testnetAsimov: _chunkTCAQ6AVFcjs.testnetAsimov,
1276
- testnetBradbury: _chunkTCAQ6AVFcjs.testnetBradbury
1275
+ localnet: _chunkCX76PQR5cjs.localnet,
1276
+ studionet: _chunkCX76PQR5cjs.studionet,
1277
+ testnetAsimov: _chunkCX76PQR5cjs.testnetAsimov,
1278
+ testnetBradbury: _chunkCX76PQR5cjs.testnetBradbury
1277
1279
  };
1278
1280
  var connect = async (client, network = "studionet", snapSource = "npm") => {
1279
1281
  if (!window.ethereum) {
@@ -1292,7 +1294,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
1292
1294
  chainName: selectedNetwork.name,
1293
1295
  rpcUrls: selectedNetwork.rpcUrls.default.http,
1294
1296
  nativeCurrency: selectedNetwork.nativeCurrency,
1295
- blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _50 => _50.blockExplorers, 'optionalAccess', _51 => _51.default, 'access', _52 => _52.url])]
1297
+ blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _90 => _90.blockExplorers, 'optionalAccess', _91 => _91.default, 'access', _92 => _92.url])]
1296
1298
  };
1297
1299
  const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
1298
1300
  if (currentChainId !== chainIdHex) {
@@ -1326,10 +1328,10 @@ var metamaskClient = async (snapSource = "npm") => {
1326
1328
  }
1327
1329
  const isFlask = async () => {
1328
1330
  try {
1329
- const clientVersion = await _optionalChain([window, 'access', _53 => _53.ethereum, 'optionalAccess', _54 => _54.request, 'call', _55 => _55({
1331
+ const clientVersion = await _optionalChain([window, 'access', _93 => _93.ethereum, 'optionalAccess', _94 => _94.request, 'call', _95 => _95({
1330
1332
  method: "web3_clientVersion"
1331
1333
  })]);
1332
- return _optionalChain([clientVersion, 'optionalAccess', _56 => _56.includes, 'call', _57 => _57("flask")]);
1334
+ return _optionalChain([clientVersion, 'optionalAccess', _96 => _96.includes, 'call', _97 => _97("flask")]);
1333
1335
  } catch (error) {
1334
1336
  console.error("Error detecting Flask:", error);
1335
1337
  return false;
@@ -1337,7 +1339,7 @@ var metamaskClient = async (snapSource = "npm") => {
1337
1339
  };
1338
1340
  const installedSnaps = async () => {
1339
1341
  try {
1340
- return await _optionalChain([window, 'access', _58 => _58.ethereum, 'optionalAccess', _59 => _59.request, 'call', _60 => _60({
1342
+ return await _optionalChain([window, 'access', _98 => _98.ethereum, 'optionalAccess', _99 => _99.request, 'call', _100 => _100({
1341
1343
  method: "wallet_getSnaps"
1342
1344
  })]);
1343
1345
  } catch (error) {
@@ -1389,7 +1391,7 @@ function formatStakingAmount(amount) {
1389
1391
  // src/staking/actions.ts
1390
1392
  var FALLBACK_GAS = 1000000n;
1391
1393
  var GAS_BUFFER_MULTIPLIER = 2n;
1392
- var COMBINED_ERROR_ABI = [..._chunkTCAQ6AVFcjs.STAKING_ABI, ..._chunkTCAQ6AVFcjs.VALIDATOR_WALLET_ABI];
1394
+ var COMBINED_ERROR_ABI = [..._chunkCX76PQR5cjs.STAKING_ABI, ..._chunkCX76PQR5cjs.VALIDATOR_WALLET_ABI];
1393
1395
  function extractRevertReason(err) {
1394
1396
  if (err instanceof _viem.BaseError) {
1395
1397
  const rawError = err.walk((e) => e instanceof _viem.RawContractError);
@@ -1424,7 +1426,7 @@ function extractRevertReason(err) {
1424
1426
  }
1425
1427
  const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
1426
1428
  if (revertError instanceof _viem.ContractFunctionRevertedError) {
1427
- if (_optionalChain([revertError, 'access', _61 => _61.data, 'optionalAccess', _62 => _62.errorName])) {
1429
+ if (_optionalChain([revertError, 'access', _101 => _101.data, 'optionalAccess', _102 => _102.errorName])) {
1428
1430
  return revertError.data.errorName;
1429
1431
  }
1430
1432
  return revertError.reason || "Unknown reason";
@@ -1512,7 +1514,7 @@ var stakingActions = (client, publicClient) => {
1512
1514
  };
1513
1515
  const getStakingAddress = () => {
1514
1516
  const stakingConfig = client.chain.stakingContract;
1515
- if (!_optionalChain([stakingConfig, 'optionalAccess', _63 => _63.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1517
+ if (!_optionalChain([stakingConfig, 'optionalAccess', _103 => _103.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1516
1518
  throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
1517
1519
  }
1518
1520
  return stakingConfig.address;
@@ -1521,7 +1523,7 @@ var stakingActions = (client, publicClient) => {
1521
1523
  const address = getStakingAddress();
1522
1524
  return _viem.getContract.call(void 0, {
1523
1525
  address,
1524
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1526
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1525
1527
  client: { public: publicClient, wallet: client }
1526
1528
  });
1527
1529
  };
@@ -1529,7 +1531,7 @@ var stakingActions = (client, publicClient) => {
1529
1531
  const address = getStakingAddress();
1530
1532
  return _viem.getContract.call(void 0, {
1531
1533
  address,
1532
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1534
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1533
1535
  client: publicClient
1534
1536
  });
1535
1537
  };
@@ -1538,11 +1540,11 @@ var stakingActions = (client, publicClient) => {
1538
1540
  const amount = parseStakingAmount(options.amount);
1539
1541
  const stakingAddress = getStakingAddress();
1540
1542
  const data = options.operator ? _viem.encodeFunctionData.call(void 0, {
1541
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1543
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1542
1544
  functionName: "validatorJoin",
1543
1545
  args: [options.operator]
1544
1546
  }) : _viem.encodeFunctionData.call(void 0, {
1545
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1547
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1546
1548
  functionName: "validatorJoin"
1547
1549
  });
1548
1550
  const result = await executeWrite({ to: stakingAddress, data, value: amount });
@@ -1551,7 +1553,7 @@ var stakingActions = (client, publicClient) => {
1551
1553
  let eventFound = false;
1552
1554
  for (const log of receipt.logs) {
1553
1555
  try {
1554
- const decoded = _viem.decodeEventLog.call(void 0, { abi: _chunkTCAQ6AVFcjs.STAKING_ABI, data: log.data, topics: log.topics });
1556
+ const decoded = _viem.decodeEventLog.call(void 0, { abi: _chunkCX76PQR5cjs.STAKING_ABI, data: log.data, topics: log.topics });
1555
1557
  if (decoded.eventName === "ValidatorJoin") {
1556
1558
  validatorWallet = decoded.args.validator;
1557
1559
  eventFound = true;
@@ -1578,7 +1580,7 @@ var stakingActions = (client, publicClient) => {
1578
1580
  validatorDeposit: async (options) => {
1579
1581
  const amount = parseStakingAmount(options.amount);
1580
1582
  const data = _viem.encodeFunctionData.call(void 0, {
1581
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1583
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1582
1584
  functionName: "validatorDeposit"
1583
1585
  });
1584
1586
  return executeWrite({ to: getStakingAddress(), data, value: amount });
@@ -1586,19 +1588,19 @@ var stakingActions = (client, publicClient) => {
1586
1588
  validatorExit: async (options) => {
1587
1589
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1588
1590
  const data = _viem.encodeFunctionData.call(void 0, {
1589
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1591
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1590
1592
  functionName: "validatorExit",
1591
1593
  args: [shares]
1592
1594
  });
1593
1595
  return executeWrite({ to: getStakingAddress(), data });
1594
1596
  },
1595
1597
  validatorClaim: async (options) => {
1596
- if (!_optionalChain([options, 'optionalAccess', _64 => _64.validator]) && !client.account) {
1598
+ if (!_optionalChain([options, 'optionalAccess', _104 => _104.validator]) && !client.account) {
1597
1599
  throw new Error("Either provide validator address or initialize client with an account");
1598
1600
  }
1599
- const validatorAddress = _optionalChain([options, 'optionalAccess', _65 => _65.validator]) || client.account.address;
1601
+ const validatorAddress = _optionalChain([options, 'optionalAccess', _105 => _105.validator]) || client.account.address;
1600
1602
  const data = _viem.encodeFunctionData.call(void 0, {
1601
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1603
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1602
1604
  functionName: "validatorClaim",
1603
1605
  args: [validatorAddress]
1604
1606
  });
@@ -1607,7 +1609,7 @@ var stakingActions = (client, publicClient) => {
1607
1609
  },
1608
1610
  validatorPrime: async (options) => {
1609
1611
  const data = _viem.encodeFunctionData.call(void 0, {
1610
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1612
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1611
1613
  functionName: "validatorPrime",
1612
1614
  args: [options.validator]
1613
1615
  });
@@ -1615,7 +1617,7 @@ var stakingActions = (client, publicClient) => {
1615
1617
  },
1616
1618
  setOperator: async (options) => {
1617
1619
  const data = _viem.encodeFunctionData.call(void 0, {
1618
- abi: _chunkTCAQ6AVFcjs.VALIDATOR_WALLET_ABI,
1620
+ abi: _chunkCX76PQR5cjs.VALIDATOR_WALLET_ABI,
1619
1621
  functionName: "setOperator",
1620
1622
  args: [options.operator]
1621
1623
  });
@@ -1631,7 +1633,7 @@ var stakingActions = (client, publicClient) => {
1631
1633
  }
1632
1634
  }
1633
1635
  const data = _viem.encodeFunctionData.call(void 0, {
1634
- abi: _chunkTCAQ6AVFcjs.VALIDATOR_WALLET_ABI,
1636
+ abi: _chunkCX76PQR5cjs.VALIDATOR_WALLET_ABI,
1635
1637
  functionName: "setIdentity",
1636
1638
  args: [
1637
1639
  options.moniker,
@@ -1650,7 +1652,7 @@ var stakingActions = (client, publicClient) => {
1650
1652
  delegatorJoin: async (options) => {
1651
1653
  const amount = parseStakingAmount(options.amount);
1652
1654
  const data = _viem.encodeFunctionData.call(void 0, {
1653
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1655
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1654
1656
  functionName: "delegatorJoin",
1655
1657
  args: [options.validator]
1656
1658
  });
@@ -1666,7 +1668,7 @@ var stakingActions = (client, publicClient) => {
1666
1668
  delegatorExit: async (options) => {
1667
1669
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1668
1670
  const data = _viem.encodeFunctionData.call(void 0, {
1669
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1671
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1670
1672
  functionName: "delegatorExit",
1671
1673
  args: [options.validator, shares]
1672
1674
  });
@@ -1678,7 +1680,7 @@ var stakingActions = (client, publicClient) => {
1678
1680
  }
1679
1681
  const delegatorAddress = options.delegator || client.account.address;
1680
1682
  const data = _viem.encodeFunctionData.call(void 0, {
1681
- abi: _chunkTCAQ6AVFcjs.STAKING_ABI,
1683
+ abi: _chunkCX76PQR5cjs.STAKING_ABI,
1682
1684
  functionName: "delegatorClaim",
1683
1685
  args: [delegatorAddress, options.validator]
1684
1686
  });
@@ -1696,7 +1698,7 @@ var stakingActions = (client, publicClient) => {
1696
1698
  }
1697
1699
  const walletContract = _viem.getContract.call(void 0, {
1698
1700
  address: validator,
1699
- abi: _chunkTCAQ6AVFcjs.VALIDATOR_WALLET_ABI,
1701
+ abi: _chunkCX76PQR5cjs.VALIDATOR_WALLET_ABI,
1700
1702
  client: publicClient
1701
1703
  });
1702
1704
  const [view, owner, operator, identityRaw, currentEpoch] = await Promise.all([
@@ -1991,8 +1993,8 @@ var getCustomTransportConfig = (config, chainConfig) => {
1991
1993
  }
1992
1994
  };
1993
1995
  };
1994
- var createClient = (config = { chain: _chunkTCAQ6AVFcjs.localnet }) => {
1995
- const chainConfig = config.chain || _chunkTCAQ6AVFcjs.localnet;
1996
+ var createClient = (config = { chain: _chunkCX76PQR5cjs.localnet }) => {
1997
+ const chainConfig = config.chain || _chunkCX76PQR5cjs.localnet;
1996
1998
  if (config.endpoint) {
1997
1999
  chainConfig.rpcUrls.default.http = [config.endpoint];
1998
2000
  }
@@ -2129,4 +2131,4 @@ function validateValueAgainstType(value, type) {
2129
2131
 
2130
2132
 
2131
2133
 
2132
- exports.abi = abi_exports; exports.buildGenVmPositionalArgs = buildGenVmPositionalArgs; exports.chains = _chunkTCAQ6AVFcjs.chains_exports; exports.createAccount = createAccount; exports.createClient = createClient; exports.decodeInputData = decodeInputData; exports.decodeLocalnetTransaction = decodeLocalnetTransaction; exports.decodeTransaction = decodeTransaction; exports.formatStakingAmount = formatStakingAmount; exports.generatePrivateKey = generatePrivateKey; exports.parseStakingAmount = parseStakingAmount; exports.simplifyTransactionReceipt = simplifyTransactionReceipt;
2134
+ exports.abi = abi_exports; exports.buildGenVmPositionalArgs = buildGenVmPositionalArgs; exports.chains = _chunkCX76PQR5cjs.chains_exports; exports.createAccount = createAccount; exports.createClient = createClient; exports.decodeInputData = decodeInputData; exports.decodeLocalnetTransaction = decodeLocalnetTransaction; exports.decodeTransaction = decodeTransaction; exports.formatStakingAmount = formatStakingAmount; exports.generatePrivateKey = generatePrivateKey; exports.parseStakingAmount = parseStakingAmount; exports.simplifyTransactionReceipt = simplifyTransactionReceipt;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address, Hex } from 'viem';
3
3
  import { G as GenLayerChain } from './chains-B7B7UXdn.cjs';
4
- import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-DxwfPDf6.cjs';
4
+ import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-Dja_Xmq_.cjs';
5
5
  import * as abitype from 'abitype';
6
6
  import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem from 'viem';
2
2
  import { Account, Address, Hex } from 'viem';
3
3
  import { G as GenLayerChain } from './chains-B7B7UXdn.js';
4
- import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-B3hpL2wZ.js';
4
+ import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-CsIdmK96.js';
5
5
  import * as abitype from 'abitype';
6
6
  import * as viem__types_types_authorization from 'viem/_types/types/authorization';
7
7
  import * as viem_accounts from 'viem/accounts';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  studionet,
7
7
  testnetAsimov,
8
8
  testnetBradbury
9
- } from "./chunk-5KRGDGMO.js";
9
+ } from "./chunk-T3O6IXYQ.js";
10
10
  import {
11
11
  CalldataAddress,
12
12
  isDecidedState,
@@ -1006,13 +1006,15 @@ var decodeInputData = (rlpEncodedAppData, recipient) => {
1006
1006
  }
1007
1007
  };
1008
1008
  var decodeTransaction = (tx) => {
1009
- const txDataDecoded = decodeInputData(tx.txData, tx.recipient);
1009
+ const txData = tx.txData ?? tx.txCalldata;
1010
+ const numOfInitialValidators = tx.numOfInitialValidators ?? tx.initialRotations;
1011
+ const txDataDecoded = decodeInputData(txData, tx.recipient);
1010
1012
  const decodedTx = {
1011
1013
  ...tx,
1012
- txData: tx.txData,
1014
+ txData,
1013
1015
  txDataDecoded,
1014
1016
  currentTimestamp: tx.currentTimestamp.toString(),
1015
- numOfInitialValidators: tx.numOfInitialValidators.toString(),
1017
+ numOfInitialValidators: numOfInitialValidators?.toString() ?? "0",
1016
1018
  txSlot: tx.txSlot.toString(),
1017
1019
  createdTimestamp: tx.createdTimestamp.toString(),
1018
1020
  lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
@@ -1020,21 +1022,21 @@ var decodeTransaction = (tx) => {
1020
1022
  numOfRounds: tx.numOfRounds.toString(),
1021
1023
  readStateBlockRange: {
1022
1024
  ...tx.readStateBlockRange,
1023
- activationBlock: tx.readStateBlockRange.activationBlock.toString(),
1024
- processingBlock: tx.readStateBlockRange.processingBlock.toString(),
1025
- proposalBlock: tx.readStateBlockRange.proposalBlock.toString()
1025
+ activationBlock: tx.readStateBlockRange?.activationBlock?.toString() ?? "0",
1026
+ processingBlock: tx.readStateBlockRange?.processingBlock?.toString() ?? "0",
1027
+ proposalBlock: tx.readStateBlockRange?.proposalBlock?.toString() ?? "0"
1026
1028
  },
1027
1029
  statusName: transactionsStatusNumberToName[String(tx.status)],
1028
1030
  resultName: transactionResultNumberToName[String(tx.result)],
1029
1031
  lastRound: {
1030
1032
  ...tx.lastRound,
1031
- round: tx.lastRound.round.toString(),
1032
- leaderIndex: tx.lastRound.leaderIndex.toString(),
1033
- votesCommitted: tx.lastRound.votesCommitted.toString(),
1034
- votesRevealed: tx.lastRound.votesRevealed.toString(),
1035
- appealBond: tx.lastRound.appealBond.toString(),
1036
- rotationsLeft: tx.lastRound.rotationsLeft.toString(),
1037
- validatorVotesName: tx.lastRound.validatorVotes.map(
1033
+ round: tx.lastRound?.round?.toString() ?? "0",
1034
+ leaderIndex: tx.lastRound?.leaderIndex?.toString() ?? "0",
1035
+ votesCommitted: tx.lastRound?.votesCommitted?.toString() ?? "0",
1036
+ votesRevealed: tx.lastRound?.votesRevealed?.toString() ?? "0",
1037
+ appealBond: tx.lastRound?.appealBond?.toString() ?? "0",
1038
+ rotationsLeft: tx.lastRound?.rotationsLeft?.toString() ?? "0",
1039
+ validatorVotesName: (tx.lastRound?.validatorVotes ?? []).map(
1038
1040
  (vote) => voteTypeNumberToName[String(vote)]
1039
1041
  )
1040
1042
  }
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { I as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-DxwfPDf6.cjs';
2
+ export { I as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-Dja_Xmq_.cjs';
3
3
  export { G as GenLayerChain } from '../chains-B7B7UXdn.cjs';
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { I as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-B3hpL2wZ.js';
2
+ export { I as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a4 as DelegatorClaimOptions, a3 as DelegatorExitOptions, a2 as DelegatorJoinOptions, U as DelegatorJoinResult, K as EpochData, O as EpochInfo, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, F as PendingWithdrawal, a1 as SetIdentityOptions, a0 as SetOperatorOptions, y as SnapSource, J as StakeInfo, a5 as StakingActions, z as StakingContract, Q as StakingTransactionResult, k as TransactionHash, x as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, w as TransactionType, _ as ValidatorClaimOptions, Y as ValidatorDepositOptions, Z as ValidatorExitOptions, B as ValidatorIdentity, E as ValidatorInfo, X as ValidatorJoinOptions, R as ValidatorJoinResult, $ as ValidatorPrimeOptions, A as ValidatorView, s as VoteType, W as WithdrawalCommit, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, u as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-CsIdmK96.js';
3
3
  export { G as GenLayerChain } from '../chains-B7B7UXdn.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.21.0",
4
+ "version": "0.21.2",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",