genlayer-js 0.27.8 → 0.27.9

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.
@@ -2889,6 +2889,9 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2889
2889
  hash: TransactionHash;
2890
2890
  round?: number;
2891
2891
  }) => Promise<DebugTraceResult>;
2892
+ getTransactionQueuePosition: (args: {
2893
+ hash: TransactionHash;
2894
+ }) => Promise<number>;
2892
2895
  cancelTransaction: (args: {
2893
2896
  hash: TransactionHash;
2894
2897
  }) => Promise<{
@@ -2889,6 +2889,9 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2889
2889
  hash: TransactionHash;
2890
2890
  round?: number;
2891
2891
  }) => Promise<DebugTraceResult>;
2892
+ getTransactionQueuePosition: (args: {
2893
+ hash: TransactionHash;
2894
+ }) => Promise<number>;
2892
2895
  cancelTransaction: (args: {
2893
2896
  hash: TransactionHash;
2894
2897
  }) => Promise<{
package/dist/index.cjs CHANGED
@@ -533,7 +533,7 @@ var contractActions = (client, publicClient) => {
533
533
  /** Retrieves the source code of a deployed contract. Localnet only. */
534
534
  getContractCode: async (address) => {
535
535
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
536
- throw new Error("Getting contract code is not supported on this network");
536
+ throw new Error(`getContractCode is only available on localnet (current chain: ${client.chain.name})`);
537
537
  }
538
538
  const result = await client.request({
539
539
  method: "gen_getContractCode",
@@ -545,7 +545,7 @@ var contractActions = (client, publicClient) => {
545
545
  /** Gets the schema (methods and constructor) of a deployed contract. Localnet only. */
546
546
  getContractSchema: async (address) => {
547
547
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
548
- throw new Error("Contract schema is not supported on this network");
548
+ throw new Error(`getContractSchema is only available on localnet (current chain: ${client.chain.name})`);
549
549
  }
550
550
  const schema = await client.request({
551
551
  method: "gen_getContractSchema",
@@ -556,7 +556,7 @@ var contractActions = (client, publicClient) => {
556
556
  /** Generates a schema for contract code without deploying it. Localnet only. */
557
557
  getContractSchemaForCode: async (contractCode) => {
558
558
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
559
- throw new Error("Contract schema is not supported on this network");
559
+ throw new Error(`getContractSchema is only available on localnet (current chain: ${client.chain.name})`);
560
560
  }
561
561
  const schema = await client.request({
562
562
  method: "gen_getContractSchemaForCode",
@@ -762,6 +762,17 @@ var validateAccount = (Account4) => {
762
762
  }
763
763
  return Account4;
764
764
  };
765
+ var CREATED_TRANSACTION_EVENT_ABI = [
766
+ {
767
+ anonymous: false,
768
+ inputs: [
769
+ { indexed: true, internalType: "bytes32", name: "txId", type: "bytes32" },
770
+ { indexed: false, internalType: "uint256", name: "txSlot", type: "uint256" }
771
+ ],
772
+ name: "CreatedTransaction",
773
+ type: "event"
774
+ }
775
+ ];
765
776
  var ADD_TRANSACTION_ABI_V5 = [
766
777
  {
767
778
  type: "function",
@@ -876,6 +887,25 @@ var isAddTransactionAbiMismatchError = (error) => {
876
887
  ].filter(Boolean).join(" ").toLowerCase();
877
888
  return errorMessage.includes("invalid pointer in tuple") || errorMessage.includes("invalid pointer") || errorMessage.includes("could not decode") || errorMessage.includes("invalid arrayify value") || errorMessage.includes("types/value length mismatch");
878
889
  };
890
+ var extractTxIdFromLogs = (client, logs) => {
891
+ const newTxEvents = _viem.parseEventLogs.call(void 0, {
892
+ abi: _optionalChain([client, 'access', _33 => _33.chain, 'access', _34 => _34.consensusMainContract, 'optionalAccess', _35 => _35.abi]),
893
+ eventName: "NewTransaction",
894
+ logs
895
+ });
896
+ if (newTxEvents.length > 0) {
897
+ return newTxEvents[0].args["txId"];
898
+ }
899
+ const createdTxEvents = _viem.parseEventLogs.call(void 0, {
900
+ abi: CREATED_TRANSACTION_EVENT_ABI,
901
+ eventName: "CreatedTransaction",
902
+ logs
903
+ });
904
+ if (createdTxEvents.length > 0) {
905
+ return createdTxEvents[0].args["txId"];
906
+ }
907
+ return null;
908
+ };
879
909
  var _sendTransaction = async ({
880
910
  client,
881
911
  publicClient,
@@ -884,8 +914,8 @@ var _sendTransaction = async ({
884
914
  senderAccount,
885
915
  value = 0n
886
916
  }) => {
887
- if (!_optionalChain([client, 'access', _33 => _33.chain, 'access', _34 => _34.consensusMainContract, 'optionalAccess', _35 => _35.address])) {
888
- throw new Error("Consensus main contract not initialized. Please ensure client is properly initialized.");
917
+ if (!_optionalChain([client, 'access', _36 => _36.chain, 'access', _37 => _37.consensusMainContract, 'optionalAccess', _38 => _38.address])) {
918
+ throw new Error(`Consensus main contract address not found in chain config for "${client.chain.name}".`);
889
919
  }
890
920
  const validatedSenderAccount = validateAccount(senderAccount);
891
921
  const nonce = await client.getCurrentNonce({ address: validatedSenderAccount.address });
@@ -894,7 +924,7 @@ var _sendTransaction = async ({
894
924
  try {
895
925
  estimatedGas = await client.estimateTransactionGas({
896
926
  from: validatedSenderAccount.address,
897
- to: _optionalChain([client, 'access', _36 => _36.chain, 'access', _37 => _37.consensusMainContract, 'optionalAccess', _38 => _38.address]),
927
+ to: _optionalChain([client, 'access', _39 => _39.chain, 'access', _40 => _40.consensusMainContract, 'optionalAccess', _41 => _41.address]),
898
928
  data: encodedDataForSend,
899
929
  value
900
930
  });
@@ -902,16 +932,16 @@ var _sendTransaction = async ({
902
932
  console.error("Gas estimation failed, using default 200_000:", err);
903
933
  estimatedGas = 200000n;
904
934
  }
905
- if (_optionalChain([validatedSenderAccount, 'optionalAccess', _39 => _39.type]) === "local") {
906
- if (!_optionalChain([validatedSenderAccount, 'optionalAccess', _40 => _40.signTransaction])) {
907
- throw new Error("Account does not support signTransaction");
935
+ if (_optionalChain([validatedSenderAccount, 'optionalAccess', _42 => _42.type]) === "local") {
936
+ if (!_optionalChain([validatedSenderAccount, 'optionalAccess', _43 => _43.signTransaction])) {
937
+ throw new Error("Local account does not support signTransaction. Use a private key account created via privateKeyToAccount().");
908
938
  }
909
939
  const gasPriceHex2 = await client.request({
910
940
  method: "eth_gasPrice"
911
941
  });
912
942
  const transactionRequest = {
913
943
  account: validatedSenderAccount,
914
- to: _optionalChain([client, 'access', _41 => _41.chain, 'access', _42 => _42.consensusMainContract, 'optionalAccess', _43 => _43.address]),
944
+ to: _optionalChain([client, 'access', _44 => _44.chain, 'access', _45 => _45.consensusMainContract, 'optionalAccess', _46 => _46.address]),
915
945
  data: encodedDataForSend,
916
946
  type: "legacy",
917
947
  nonce: Number(nonce),
@@ -924,17 +954,15 @@ var _sendTransaction = async ({
924
954
  const txHash = await client.sendRawTransaction({ serializedTransaction });
925
955
  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
926
956
  if (receipt.status === "reverted") {
927
- throw new Error("Transaction reverted");
957
+ throw new Error(`Transaction reverted: EVM tx ${txHash} to consensus contract ${_optionalChain([client, 'access', _47 => _47.chain, 'access', _48 => _48.consensusMainContract, 'optionalAccess', _49 => _49.address])} was reverted.`);
928
958
  }
929
- const newTxEvents = _viem.parseEventLogs.call(void 0, {
930
- abi: _optionalChain([client, 'access', _44 => _44.chain, 'access', _45 => _45.consensusMainContract, 'optionalAccess', _46 => _46.abi]),
931
- eventName: "NewTransaction",
932
- logs: receipt.logs
933
- });
934
- if (newTxEvents.length === 0) {
935
- throw new Error("Transaction not processed by consensus");
959
+ const txId = extractTxIdFromLogs(client, receipt.logs);
960
+ if (!txId) {
961
+ throw new Error(
962
+ `Transaction not processed by consensus: EVM tx ${txHash} succeeded but no NewTransaction or CreatedTransaction event was found in the receipt logs.`
963
+ );
936
964
  }
937
- return newTxEvents[0].args["txId"];
965
+ return txId;
938
966
  }
939
967
  let gasPriceHex;
940
968
  try {
@@ -950,7 +978,7 @@ var _sendTransaction = async ({
950
978
  const nonceBigInt = typeof nonce === "bigint" ? nonce : typeof nonce === "string" ? BigInt(nonce) : BigInt(Number(nonce));
951
979
  const formattedRequest = {
952
980
  from: validatedSenderAccount.address,
953
- to: _optionalChain([client, 'access', _47 => _47.chain, 'access', _48 => _48.consensusMainContract, 'optionalAccess', _49 => _49.address]),
981
+ to: _optionalChain([client, 'access', _50 => _50.chain, 'access', _51 => _51.consensusMainContract, 'optionalAccess', _52 => _52.address]),
954
982
  data: encodedDataForSend,
955
983
  value: `0x${value.toString(16)}`,
956
984
  gas: `0x${estimatedGas.toString(16)}`,
@@ -966,17 +994,15 @@ var _sendTransaction = async ({
966
994
  });
967
995
  const externalReceipt = await publicClient.waitForTransactionReceipt({ hash: evmTxHash });
968
996
  if (externalReceipt.status === "reverted") {
969
- throw new Error("Transaction reverted");
997
+ throw new Error(`Transaction reverted: EVM tx ${evmTxHash} to consensus contract ${_optionalChain([client, 'access', _53 => _53.chain, 'access', _54 => _54.consensusMainContract, 'optionalAccess', _55 => _55.address])} was reverted.`);
970
998
  }
971
- const externalNewTxEvents = _viem.parseEventLogs.call(void 0, {
972
- abi: _optionalChain([client, 'access', _50 => _50.chain, 'access', _51 => _51.consensusMainContract, 'optionalAccess', _52 => _52.abi]),
973
- eventName: "NewTransaction",
974
- logs: externalReceipt.logs
975
- });
976
- if (externalNewTxEvents.length === 0) {
977
- throw new Error("Transaction not processed by consensus");
999
+ const externalTxId = extractTxIdFromLogs(client, externalReceipt.logs);
1000
+ if (!externalTxId) {
1001
+ throw new Error(
1002
+ `Transaction not processed by consensus: EVM tx ${evmTxHash} succeeded but no NewTransaction or CreatedTransaction event was found in the receipt logs.`
1003
+ );
978
1004
  }
979
- return externalNewTxEvents[0].args["txId"];
1005
+ return externalTxId;
980
1006
  };
981
1007
  try {
982
1008
  return await sendWithEncodedData(encodedData);
@@ -1093,7 +1119,7 @@ var decodeTransaction = (tx) => {
1093
1119
  txData,
1094
1120
  txDataDecoded,
1095
1121
  currentTimestamp: tx.currentTimestamp.toString(),
1096
- numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _53 => _53.toString, 'call', _54 => _54()]), () => ( "0")),
1122
+ numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _56 => _56.toString, 'call', _57 => _57()]), () => ( "0")),
1097
1123
  txSlot: tx.txSlot.toString(),
1098
1124
  createdTimestamp: tx.createdTimestamp.toString(),
1099
1125
  lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
@@ -1101,9 +1127,9 @@ var decodeTransaction = (tx) => {
1101
1127
  numOfRounds: tx.numOfRounds.toString(),
1102
1128
  readStateBlockRange: {
1103
1129
  ...tx.readStateBlockRange,
1104
- activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _55 => _55.readStateBlockRange, 'optionalAccess', _56 => _56.activationBlock, 'optionalAccess', _57 => _57.toString, 'call', _58 => _58()]), () => ( "0")),
1105
- processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _59 => _59.readStateBlockRange, 'optionalAccess', _60 => _60.processingBlock, 'optionalAccess', _61 => _61.toString, 'call', _62 => _62()]), () => ( "0")),
1106
- proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _63 => _63.readStateBlockRange, 'optionalAccess', _64 => _64.proposalBlock, 'optionalAccess', _65 => _65.toString, 'call', _66 => _66()]), () => ( "0"))
1130
+ activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _58 => _58.readStateBlockRange, 'optionalAccess', _59 => _59.activationBlock, 'optionalAccess', _60 => _60.toString, 'call', _61 => _61()]), () => ( "0")),
1131
+ processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _62 => _62.readStateBlockRange, 'optionalAccess', _63 => _63.processingBlock, 'optionalAccess', _64 => _64.toString, 'call', _65 => _65()]), () => ( "0")),
1132
+ proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _66 => _66.readStateBlockRange, 'optionalAccess', _67 => _67.proposalBlock, 'optionalAccess', _68 => _68.toString, 'call', _69 => _69()]), () => ( "0"))
1107
1133
  },
1108
1134
  statusName: _chunkGJXSECNHcjs.transactionsStatusNumberToName[String(tx.status)],
1109
1135
  resultName: _chunkGJXSECNHcjs.transactionResultNumberToName[String(tx.result)],
@@ -1111,13 +1137,13 @@ var decodeTransaction = (tx) => {
1111
1137
  txExecutionResultName: tx.txExecutionResult !== void 0 ? _chunkGJXSECNHcjs.executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
1112
1138
  lastRound: {
1113
1139
  ...tx.lastRound,
1114
- round: _nullishCoalesce(_optionalChain([tx, 'access', _67 => _67.lastRound, 'optionalAccess', _68 => _68.round, 'optionalAccess', _69 => _69.toString, 'call', _70 => _70()]), () => ( "0")),
1115
- leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _71 => _71.lastRound, 'optionalAccess', _72 => _72.leaderIndex, 'optionalAccess', _73 => _73.toString, 'call', _74 => _74()]), () => ( "0")),
1116
- votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _75 => _75.lastRound, 'optionalAccess', _76 => _76.votesCommitted, 'optionalAccess', _77 => _77.toString, 'call', _78 => _78()]), () => ( "0")),
1117
- votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _79 => _79.lastRound, 'optionalAccess', _80 => _80.votesRevealed, 'optionalAccess', _81 => _81.toString, 'call', _82 => _82()]), () => ( "0")),
1118
- appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _83 => _83.lastRound, 'optionalAccess', _84 => _84.appealBond, 'optionalAccess', _85 => _85.toString, 'call', _86 => _86()]), () => ( "0")),
1119
- rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _87 => _87.lastRound, 'optionalAccess', _88 => _88.rotationsLeft, 'optionalAccess', _89 => _89.toString, 'call', _90 => _90()]), () => ( "0")),
1120
- validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _91 => _91.lastRound, 'optionalAccess', _92 => _92.validatorVotes]), () => ( []))).map(
1140
+ round: _nullishCoalesce(_optionalChain([tx, 'access', _70 => _70.lastRound, 'optionalAccess', _71 => _71.round, 'optionalAccess', _72 => _72.toString, 'call', _73 => _73()]), () => ( "0")),
1141
+ leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _74 => _74.lastRound, 'optionalAccess', _75 => _75.leaderIndex, 'optionalAccess', _76 => _76.toString, 'call', _77 => _77()]), () => ( "0")),
1142
+ votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _78 => _78.lastRound, 'optionalAccess', _79 => _79.votesCommitted, 'optionalAccess', _80 => _80.toString, 'call', _81 => _81()]), () => ( "0")),
1143
+ votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _82 => _82.lastRound, 'optionalAccess', _83 => _83.votesRevealed, 'optionalAccess', _84 => _84.toString, 'call', _85 => _85()]), () => ( "0")),
1144
+ appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _86 => _86.lastRound, 'optionalAccess', _87 => _87.appealBond, 'optionalAccess', _88 => _88.toString, 'call', _89 => _89()]), () => ( "0")),
1145
+ rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _90 => _90.lastRound, 'optionalAccess', _91 => _91.rotationsLeft, 'optionalAccess', _92 => _92.toString, 'call', _93 => _93()]), () => ( "0")),
1146
+ validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _94 => _94.lastRound, 'optionalAccess', _95 => _95.validatorVotes]), () => ( []))).map(
1121
1147
  (vote) => _chunkGJXSECNHcjs.voteTypeNumberToName[String(vote)]
1122
1148
  )
1123
1149
  }
@@ -1199,7 +1225,7 @@ var simplifyTransactionReceipt = (tx) => {
1199
1225
  var decodeLocalnetTransaction = (tx) => {
1200
1226
  if (!tx.data) return tx;
1201
1227
  try {
1202
- const leaderReceipt = _optionalChain([tx, 'access', _93 => _93.consensus_data, 'optionalAccess', _94 => _94.leader_receipt]);
1228
+ const leaderReceipt = _optionalChain([tx, 'access', _96 => _96.consensus_data, 'optionalAccess', _97 => _97.leader_receipt]);
1203
1229
  if (leaderReceipt) {
1204
1230
  const receipts = Array.isArray(leaderReceipt) ? leaderReceipt : [leaderReceipt];
1205
1231
  receipts.forEach((receipt) => {
@@ -1230,7 +1256,7 @@ var decodeLocalnetTransaction = (tx) => {
1230
1256
  }
1231
1257
  });
1232
1258
  }
1233
- if (_optionalChain([tx, 'access', _95 => _95.data, 'optionalAccess', _96 => _96.calldata]) && typeof tx.data.calldata === "string") {
1259
+ if (_optionalChain([tx, 'access', _98 => _98.data, 'optionalAccess', _99 => _99.calldata]) && typeof tx.data.calldata === "string") {
1234
1260
  tx.data.calldata = {
1235
1261
  base64: tx.data.calldata,
1236
1262
  ...calldataToUserFriendlyJson(b64ToArray(tx.data.calldata))
@@ -1256,7 +1282,7 @@ var receiptActions = (client, publicClient) => ({
1256
1282
  hash
1257
1283
  });
1258
1284
  if (!transaction) {
1259
- throw new Error("Transaction not found");
1285
+ throw new Error(`Transaction not found: ${hash}`);
1260
1286
  }
1261
1287
  const transactionStatusString = String(transaction.status);
1262
1288
  const requestedStatus = _chunkGJXSECNHcjs.transactionsStatusNameToNumber[status];
@@ -1271,7 +1297,7 @@ var receiptActions = (client, publicClient) => ({
1271
1297
  return finalTransaction;
1272
1298
  }
1273
1299
  if (retries === 0) {
1274
- throw new Error("Transaction status is not " + status);
1300
+ throw new Error(`Timed out waiting for transaction ${hash} to reach status "${status}" (current status: ${transactionStatusString}).`);
1275
1301
  }
1276
1302
  await sleep(interval);
1277
1303
  return receiptActions(client, publicClient).waitForTransactionReceipt({
@@ -1293,8 +1319,8 @@ var transactionActions = (client, publicClient) => ({
1293
1319
  transaction2.statusName = localnetStatus;
1294
1320
  return decodeLocalnetTransaction(transaction2);
1295
1321
  }
1296
- const contractAddress = _optionalChain([client, 'access', _97 => _97.chain, 'access', _98 => _98.consensusDataContract, 'optionalAccess', _99 => _99.address]);
1297
- const contractAbi = _optionalChain([client, 'access', _100 => _100.chain, 'access', _101 => _101.consensusDataContract, 'optionalAccess', _102 => _102.abi]);
1322
+ const contractAddress = _optionalChain([client, 'access', _100 => _100.chain, 'access', _101 => _101.consensusDataContract, 'optionalAccess', _102 => _102.address]);
1323
+ const contractAbi = _optionalChain([client, 'access', _103 => _103.chain, 'access', _104 => _104.consensusDataContract, 'optionalAccess', _105 => _105.abi]);
1298
1324
  const [txDataRaw, allDataRaw] = await Promise.all([
1299
1325
  publicClient.readContract({
1300
1326
  address: contractAddress,
@@ -1324,12 +1350,12 @@ var transactionActions = (client, publicClient) => ({
1324
1350
  return _nullishCoalesce(tx2.triggered_transactions, () => ( []));
1325
1351
  }
1326
1352
  const tx = await transactionActions(client, publicClient).getTransaction({ hash });
1327
- const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _103 => _103.readStateBlockRange, 'optionalAccess', _104 => _104.proposalBlock]), () => ( "0")));
1353
+ const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _106 => _106.readStateBlockRange, 'optionalAccess', _107 => _107.proposalBlock]), () => ( "0")));
1328
1354
  if (proposalBlock === BigInt(0)) return [];
1329
1355
  const scanRange = BigInt(100);
1330
1356
  const latestBlock = await publicClient.getBlockNumber();
1331
1357
  const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
1332
- const consensusAddress = _optionalChain([client, 'access', _105 => _105.chain, 'access', _106 => _106.consensusMainContract, 'optionalAccess', _107 => _107.address]);
1358
+ const consensusAddress = _optionalChain([client, 'access', _108 => _108.chain, 'access', _109 => _109.consensusMainContract, 'optionalAccess', _110 => _110.address]);
1333
1359
  const internalMessageProcessedTopic = _viem.keccak256.call(void 0, _viem.stringToBytes.call(void 0, "InternalMessageProcessed(bytes32,address,address)"));
1334
1360
  const logs = await publicClient.getLogs({
1335
1361
  address: consensusAddress,
@@ -1376,10 +1402,36 @@ var transactionActions = (client, publicClient) => ({
1376
1402
  params: [hash, signature]
1377
1403
  });
1378
1404
  },
1405
+ /** Returns the queue slot position of a transaction in the pending queue. */
1406
+ getTransactionQueuePosition: async ({ hash }) => {
1407
+ const consensusAddress = _optionalChain([client, 'access', _111 => _111.chain, 'access', _112 => _112.consensusMainContract, 'optionalAccess', _113 => _113.address]);
1408
+ const consensusAbi = _optionalChain([client, 'access', _114 => _114.chain, 'access', _115 => _115.consensusMainContract, 'optionalAccess', _116 => _116.abi]);
1409
+ const queuesAddress = await publicClient.readContract({
1410
+ address: consensusAddress,
1411
+ abi: consensusAbi,
1412
+ functionName: "queues"
1413
+ });
1414
+ const QUEUES_ABI = [
1415
+ {
1416
+ inputs: [{ internalType: "bytes32", name: "txId", type: "bytes32" }],
1417
+ name: "getTransactionQueuePosition",
1418
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1419
+ stateMutability: "view",
1420
+ type: "function"
1421
+ }
1422
+ ];
1423
+ const position = await publicClient.readContract({
1424
+ address: queuesAddress,
1425
+ abi: QUEUES_ABI,
1426
+ functionName: "getTransactionQueuePosition",
1427
+ args: [hash]
1428
+ });
1429
+ return Number(position);
1430
+ },
1379
1431
  /** Estimates gas required for a transaction. */
1380
1432
  estimateTransactionGas: async (transactionParams) => {
1381
1433
  const formattedParams = {
1382
- from: transactionParams.from || _optionalChain([client, 'access', _108 => _108.account, 'optionalAccess', _109 => _109.address]),
1434
+ from: transactionParams.from || _optionalChain([client, 'access', _117 => _117.account, 'optionalAccess', _118 => _118.address]),
1383
1435
  to: transactionParams.to,
1384
1436
  data: transactionParams.data || "0x",
1385
1437
  value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
@@ -1422,7 +1474,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
1422
1474
  chainName: selectedNetwork.name,
1423
1475
  rpcUrls: selectedNetwork.rpcUrls.default.http,
1424
1476
  nativeCurrency: selectedNetwork.nativeCurrency,
1425
- blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _110 => _110.blockExplorers, 'optionalAccess', _111 => _111.default, 'access', _112 => _112.url])]
1477
+ blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _119 => _119.blockExplorers, 'optionalAccess', _120 => _120.default, 'access', _121 => _121.url])]
1426
1478
  };
1427
1479
  const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
1428
1480
  if (currentChainId !== chainIdHex) {
@@ -1456,10 +1508,10 @@ var metamaskClient = async (snapSource = "npm") => {
1456
1508
  }
1457
1509
  const isFlask = async () => {
1458
1510
  try {
1459
- const clientVersion = await _optionalChain([window, 'access', _113 => _113.ethereum, 'optionalAccess', _114 => _114.request, 'call', _115 => _115({
1511
+ const clientVersion = await _optionalChain([window, 'access', _122 => _122.ethereum, 'optionalAccess', _123 => _123.request, 'call', _124 => _124({
1460
1512
  method: "web3_clientVersion"
1461
1513
  })]);
1462
- return _optionalChain([clientVersion, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117("flask")]);
1514
+ return _optionalChain([clientVersion, 'optionalAccess', _125 => _125.includes, 'call', _126 => _126("flask")]);
1463
1515
  } catch (error) {
1464
1516
  console.error("Error detecting Flask:", error);
1465
1517
  return false;
@@ -1467,7 +1519,7 @@ var metamaskClient = async (snapSource = "npm") => {
1467
1519
  };
1468
1520
  const installedSnaps = async () => {
1469
1521
  try {
1470
- return await _optionalChain([window, 'access', _118 => _118.ethereum, 'optionalAccess', _119 => _119.request, 'call', _120 => _120({
1522
+ return await _optionalChain([window, 'access', _127 => _127.ethereum, 'optionalAccess', _128 => _128.request, 'call', _129 => _129({
1471
1523
  method: "wallet_getSnaps"
1472
1524
  })]);
1473
1525
  } catch (error) {
@@ -1554,7 +1606,7 @@ function extractRevertReason(err) {
1554
1606
  }
1555
1607
  const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
1556
1608
  if (revertError instanceof _viem.ContractFunctionRevertedError) {
1557
- if (_optionalChain([revertError, 'access', _121 => _121.data, 'optionalAccess', _122 => _122.errorName])) {
1609
+ if (_optionalChain([revertError, 'access', _130 => _130.data, 'optionalAccess', _131 => _131.errorName])) {
1558
1610
  return revertError.data.errorName;
1559
1611
  }
1560
1612
  return revertError.reason || "Unknown reason";
@@ -1642,7 +1694,7 @@ var stakingActions = (client, publicClient) => {
1642
1694
  };
1643
1695
  const getStakingAddress = () => {
1644
1696
  const stakingConfig = client.chain.stakingContract;
1645
- if (!_optionalChain([stakingConfig, 'optionalAccess', _123 => _123.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1697
+ if (!_optionalChain([stakingConfig, 'optionalAccess', _132 => _132.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1646
1698
  throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
1647
1699
  }
1648
1700
  return stakingConfig.address;
@@ -1727,10 +1779,10 @@ var stakingActions = (client, publicClient) => {
1727
1779
  },
1728
1780
  /** Claims pending validator withdrawals. */
1729
1781
  validatorClaim: async (options) => {
1730
- if (!_optionalChain([options, 'optionalAccess', _124 => _124.validator]) && !client.account) {
1782
+ if (!_optionalChain([options, 'optionalAccess', _133 => _133.validator]) && !client.account) {
1731
1783
  throw new Error("Either provide validator address or initialize client with an account");
1732
1784
  }
1733
- const validatorAddress = _optionalChain([options, 'optionalAccess', _125 => _125.validator]) || client.account.address;
1785
+ const validatorAddress = _optionalChain([options, 'optionalAccess', _134 => _134.validator]) || client.account.address;
1734
1786
  const data = _viem.encodeFunctionData.call(void 0, {
1735
1787
  abi: _chunkNOMVZBCRcjs.STAKING_ABI,
1736
1788
  functionName: "validatorClaim",
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-DqSbucSW.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-9P6HoP_s.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-CX8nErk-.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-DqSbucSW.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-Bf1V-aai.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-DPzGu_2l.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
@@ -533,7 +533,7 @@ var contractActions = (client, publicClient) => {
533
533
  /** Retrieves the source code of a deployed contract. Localnet only. */
534
534
  getContractCode: async (address) => {
535
535
  if (client.chain.id !== localnet.id) {
536
- throw new Error("Getting contract code is not supported on this network");
536
+ throw new Error(`getContractCode is only available on localnet (current chain: ${client.chain.name})`);
537
537
  }
538
538
  const result = await client.request({
539
539
  method: "gen_getContractCode",
@@ -545,7 +545,7 @@ var contractActions = (client, publicClient) => {
545
545
  /** Gets the schema (methods and constructor) of a deployed contract. Localnet only. */
546
546
  getContractSchema: async (address) => {
547
547
  if (client.chain.id !== localnet.id) {
548
- throw new Error("Contract schema is not supported on this network");
548
+ throw new Error(`getContractSchema is only available on localnet (current chain: ${client.chain.name})`);
549
549
  }
550
550
  const schema = await client.request({
551
551
  method: "gen_getContractSchema",
@@ -556,7 +556,7 @@ var contractActions = (client, publicClient) => {
556
556
  /** Generates a schema for contract code without deploying it. Localnet only. */
557
557
  getContractSchemaForCode: async (contractCode) => {
558
558
  if (client.chain.id !== localnet.id) {
559
- throw new Error("Contract schema is not supported on this network");
559
+ throw new Error(`getContractSchema is only available on localnet (current chain: ${client.chain.name})`);
560
560
  }
561
561
  const schema = await client.request({
562
562
  method: "gen_getContractSchemaForCode",
@@ -762,6 +762,17 @@ var validateAccount = (Account4) => {
762
762
  }
763
763
  return Account4;
764
764
  };
765
+ var CREATED_TRANSACTION_EVENT_ABI = [
766
+ {
767
+ anonymous: false,
768
+ inputs: [
769
+ { indexed: true, internalType: "bytes32", name: "txId", type: "bytes32" },
770
+ { indexed: false, internalType: "uint256", name: "txSlot", type: "uint256" }
771
+ ],
772
+ name: "CreatedTransaction",
773
+ type: "event"
774
+ }
775
+ ];
765
776
  var ADD_TRANSACTION_ABI_V5 = [
766
777
  {
767
778
  type: "function",
@@ -876,6 +887,25 @@ var isAddTransactionAbiMismatchError = (error) => {
876
887
  ].filter(Boolean).join(" ").toLowerCase();
877
888
  return errorMessage.includes("invalid pointer in tuple") || errorMessage.includes("invalid pointer") || errorMessage.includes("could not decode") || errorMessage.includes("invalid arrayify value") || errorMessage.includes("types/value length mismatch");
878
889
  };
890
+ var extractTxIdFromLogs = (client, logs) => {
891
+ const newTxEvents = parseEventLogs({
892
+ abi: client.chain.consensusMainContract?.abi,
893
+ eventName: "NewTransaction",
894
+ logs
895
+ });
896
+ if (newTxEvents.length > 0) {
897
+ return newTxEvents[0].args["txId"];
898
+ }
899
+ const createdTxEvents = parseEventLogs({
900
+ abi: CREATED_TRANSACTION_EVENT_ABI,
901
+ eventName: "CreatedTransaction",
902
+ logs
903
+ });
904
+ if (createdTxEvents.length > 0) {
905
+ return createdTxEvents[0].args["txId"];
906
+ }
907
+ return null;
908
+ };
879
909
  var _sendTransaction = async ({
880
910
  client,
881
911
  publicClient,
@@ -885,7 +915,7 @@ var _sendTransaction = async ({
885
915
  value = 0n
886
916
  }) => {
887
917
  if (!client.chain.consensusMainContract?.address) {
888
- throw new Error("Consensus main contract not initialized. Please ensure client is properly initialized.");
918
+ throw new Error(`Consensus main contract address not found in chain config for "${client.chain.name}".`);
889
919
  }
890
920
  const validatedSenderAccount = validateAccount(senderAccount);
891
921
  const nonce = await client.getCurrentNonce({ address: validatedSenderAccount.address });
@@ -904,7 +934,7 @@ var _sendTransaction = async ({
904
934
  }
905
935
  if (validatedSenderAccount?.type === "local") {
906
936
  if (!validatedSenderAccount?.signTransaction) {
907
- throw new Error("Account does not support signTransaction");
937
+ throw new Error("Local account does not support signTransaction. Use a private key account created via privateKeyToAccount().");
908
938
  }
909
939
  const gasPriceHex2 = await client.request({
910
940
  method: "eth_gasPrice"
@@ -924,17 +954,15 @@ var _sendTransaction = async ({
924
954
  const txHash = await client.sendRawTransaction({ serializedTransaction });
925
955
  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
926
956
  if (receipt.status === "reverted") {
927
- throw new Error("Transaction reverted");
957
+ throw new Error(`Transaction reverted: EVM tx ${txHash} to consensus contract ${client.chain.consensusMainContract?.address} was reverted.`);
928
958
  }
929
- const newTxEvents = parseEventLogs({
930
- abi: client.chain.consensusMainContract?.abi,
931
- eventName: "NewTransaction",
932
- logs: receipt.logs
933
- });
934
- if (newTxEvents.length === 0) {
935
- throw new Error("Transaction not processed by consensus");
959
+ const txId = extractTxIdFromLogs(client, receipt.logs);
960
+ if (!txId) {
961
+ throw new Error(
962
+ `Transaction not processed by consensus: EVM tx ${txHash} succeeded but no NewTransaction or CreatedTransaction event was found in the receipt logs.`
963
+ );
936
964
  }
937
- return newTxEvents[0].args["txId"];
965
+ return txId;
938
966
  }
939
967
  let gasPriceHex;
940
968
  try {
@@ -966,17 +994,15 @@ var _sendTransaction = async ({
966
994
  });
967
995
  const externalReceipt = await publicClient.waitForTransactionReceipt({ hash: evmTxHash });
968
996
  if (externalReceipt.status === "reverted") {
969
- throw new Error("Transaction reverted");
997
+ throw new Error(`Transaction reverted: EVM tx ${evmTxHash} to consensus contract ${client.chain.consensusMainContract?.address} was reverted.`);
970
998
  }
971
- const externalNewTxEvents = parseEventLogs({
972
- abi: client.chain.consensusMainContract?.abi,
973
- eventName: "NewTransaction",
974
- logs: externalReceipt.logs
975
- });
976
- if (externalNewTxEvents.length === 0) {
977
- throw new Error("Transaction not processed by consensus");
999
+ const externalTxId = extractTxIdFromLogs(client, externalReceipt.logs);
1000
+ if (!externalTxId) {
1001
+ throw new Error(
1002
+ `Transaction not processed by consensus: EVM tx ${evmTxHash} succeeded but no NewTransaction or CreatedTransaction event was found in the receipt logs.`
1003
+ );
978
1004
  }
979
- return externalNewTxEvents[0].args["txId"];
1005
+ return externalTxId;
980
1006
  };
981
1007
  try {
982
1008
  return await sendWithEncodedData(encodedData);
@@ -1256,7 +1282,7 @@ var receiptActions = (client, publicClient) => ({
1256
1282
  hash
1257
1283
  });
1258
1284
  if (!transaction) {
1259
- throw new Error("Transaction not found");
1285
+ throw new Error(`Transaction not found: ${hash}`);
1260
1286
  }
1261
1287
  const transactionStatusString = String(transaction.status);
1262
1288
  const requestedStatus = transactionsStatusNameToNumber[status];
@@ -1271,7 +1297,7 @@ var receiptActions = (client, publicClient) => ({
1271
1297
  return finalTransaction;
1272
1298
  }
1273
1299
  if (retries === 0) {
1274
- throw new Error("Transaction status is not " + status);
1300
+ throw new Error(`Timed out waiting for transaction ${hash} to reach status "${status}" (current status: ${transactionStatusString}).`);
1275
1301
  }
1276
1302
  await sleep(interval);
1277
1303
  return receiptActions(client, publicClient).waitForTransactionReceipt({
@@ -1376,6 +1402,32 @@ var transactionActions = (client, publicClient) => ({
1376
1402
  params: [hash, signature]
1377
1403
  });
1378
1404
  },
1405
+ /** Returns the queue slot position of a transaction in the pending queue. */
1406
+ getTransactionQueuePosition: async ({ hash }) => {
1407
+ const consensusAddress = client.chain.consensusMainContract?.address;
1408
+ const consensusAbi = client.chain.consensusMainContract?.abi;
1409
+ const queuesAddress = await publicClient.readContract({
1410
+ address: consensusAddress,
1411
+ abi: consensusAbi,
1412
+ functionName: "queues"
1413
+ });
1414
+ const QUEUES_ABI = [
1415
+ {
1416
+ inputs: [{ internalType: "bytes32", name: "txId", type: "bytes32" }],
1417
+ name: "getTransactionQueuePosition",
1418
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1419
+ stateMutability: "view",
1420
+ type: "function"
1421
+ }
1422
+ ];
1423
+ const position = await publicClient.readContract({
1424
+ address: queuesAddress,
1425
+ abi: QUEUES_ABI,
1426
+ functionName: "getTransactionQueuePosition",
1427
+ args: [hash]
1428
+ });
1429
+ return Number(position);
1430
+ },
1379
1431
  /** Estimates gas required for a transaction. */
1380
1432
  estimateTransactionGas: async (transactionParams) => {
1381
1433
  const formattedParams = {
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { O 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, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, 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, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-9P6HoP_s.cjs';
2
+ export { O 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, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, 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, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-CX8nErk-.cjs';
3
3
  export { G as GenLayerChain } from '../chains-DqSbucSW.cjs';
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { O 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, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, 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, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-Bf1V-aai.js';
2
+ export { O 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, z as DebugTraceResult, a as DecodedCallData, D as DecodedDeployData, a7 as DelegatorClaimOptions, a6 as DelegatorExitOptions, a5 as DelegatorJoinOptions, Z as DelegatorJoinResult, R as EpochData, U as EpochInfo, E as ExecutionResult, 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, K as PendingWithdrawal, a4 as SetIdentityOptions, a3 as SetOperatorOptions, A as SnapSource, Q as StakeInfo, a8 as StakingActions, B as StakingContract, X as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a1 as ValidatorClaimOptions, $ as ValidatorDepositOptions, a0 as ValidatorExitOptions, I as ValidatorIdentity, J as ValidatorInfo, _ as ValidatorJoinOptions, Y as ValidatorJoinResult, a2 as ValidatorPrimeOptions, F as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-DPzGu_2l.js';
3
3
  export { G as GenLayerChain } from '../chains-DqSbucSW.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.27.8",
4
+ "version": "0.27.9",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",