genlayer-js 0.28.4 → 0.28.5

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.
@@ -2916,6 +2916,14 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2916
2916
  txId: `0x${string}`;
2917
2917
  value?: bigint;
2918
2918
  }) => Promise<any>;
2919
+ finalizeTransaction: (args: {
2920
+ account?: Account;
2921
+ txId: `0x${string}`;
2922
+ }) => Promise<`0x${string}`>;
2923
+ finalizeIdlenessTxs: (args: {
2924
+ account?: Account;
2925
+ txIds: readonly `0x${string}`[];
2926
+ }) => Promise<`0x${string}`>;
2919
2927
  getMinAppealBond: (args: {
2920
2928
  txId: `0x${string}`;
2921
2929
  }) => Promise<bigint>;
@@ -2916,6 +2916,14 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2916
2916
  txId: `0x${string}`;
2917
2917
  value?: bigint;
2918
2918
  }) => Promise<any>;
2919
+ finalizeTransaction: (args: {
2920
+ account?: Account;
2921
+ txId: `0x${string}`;
2922
+ }) => Promise<`0x${string}`>;
2923
+ finalizeIdlenessTxs: (args: {
2924
+ account?: Account;
2925
+ txIds: readonly `0x${string}`[];
2926
+ }) => Promise<`0x${string}`>;
2919
2927
  getMinAppealBond: (args: {
2920
2928
  txId: `0x${string}`;
2921
2929
  }) => Promise<bigint>;
package/dist/index.cjs CHANGED
@@ -792,60 +792,52 @@ var contractActions = (client, publicClient) => {
792
792
  }
793
793
  const senderAccount = account || client.account;
794
794
  const encodedData = _encodeSubmitAppealData({ client, txId });
795
- const validatedAccount = validateAccount(senderAccount);
796
- if (!_optionalChain([client, 'access', _35 => _35.chain, 'access', _36 => _36.consensusMainContract, 'optionalAccess', _37 => _37.address])) {
797
- throw new Error("Consensus main contract not initialized.");
798
- }
799
- const nonce = await client.getCurrentNonce({ address: validatedAccount.address });
800
- let estimatedGas;
801
- try {
802
- estimatedGas = await client.estimateTransactionGas({
803
- to: client.chain.consensusMainContract.address,
804
- data: encodedData,
805
- value
806
- });
807
- } catch (err) {
808
- console.error("Gas estimation failed, using default 200_000:", err);
809
- estimatedGas = 200000n;
810
- }
811
- const gasPriceHex = await client.request({ method: "eth_gasPrice" });
812
- const txRequest = {
813
- account: validatedAccount,
814
- to: client.chain.consensusMainContract.address,
815
- data: encodedData,
795
+ await _sendConsensusCall({
796
+ client,
797
+ publicClient,
798
+ encodedData,
799
+ senderAccount,
816
800
  value,
817
- gas: estimatedGas,
818
- gasPrice: BigInt(gasPriceHex),
819
- nonce,
820
- chainId: client.chain.id
821
- };
822
- if (validatedAccount.type === "local") {
823
- if (!validatedAccount.signTransaction) {
824
- throw new Error("Local account does not support signTransaction.");
825
- }
826
- const serializedTransaction = await validatedAccount.signTransaction(txRequest);
827
- const evmHash = await client.sendRawTransaction({ serializedTransaction });
828
- const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
829
- if (receipt.status === "reverted") {
830
- throw new Error(`Appeal reverted: EVM tx ${evmHash}`);
831
- }
832
- } else {
833
- const evmHash = await client.request({
834
- method: "eth_sendTransaction",
835
- params: [{
836
- from: validatedAccount.address,
837
- to: client.chain.consensusMainContract.address,
838
- data: encodedData,
839
- value: value ? `0x${value.toString(16)}` : void 0,
840
- gas: `0x${estimatedGas.toString(16)}`
841
- }]
842
- });
843
- const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
844
- if (receipt.status === "reverted") {
845
- throw new Error(`Appeal reverted: EVM tx ${evmHash}`);
846
- }
847
- }
801
+ operationName: "Appeal"
802
+ });
848
803
  return txId;
804
+ },
805
+ /** Finalizes a single GenLayer transaction that is ready to be finalized. Returns the EVM transaction hash. */
806
+ finalizeTransaction: async (args) => {
807
+ const { account, txId } = args;
808
+ const senderAccount = account || client.account;
809
+ const encodedData = _viem.encodeFunctionData.call(void 0, {
810
+ abi: _optionalChain([client, 'access', _35 => _35.chain, 'access', _36 => _36.consensusMainContract, 'optionalAccess', _37 => _37.abi]),
811
+ functionName: "finalizeTransaction",
812
+ args: [txId]
813
+ });
814
+ return _sendConsensusCall({
815
+ client,
816
+ publicClient,
817
+ encodedData,
818
+ senderAccount,
819
+ operationName: "Finalize"
820
+ });
821
+ },
822
+ /** Batch-finalizes idle GenLayer transactions (those stuck without progressing). Returns the EVM transaction hash. */
823
+ finalizeIdlenessTxs: async (args) => {
824
+ const { account, txIds } = args;
825
+ if (txIds.length === 0) {
826
+ throw new Error("finalizeIdlenessTxs requires at least one txId.");
827
+ }
828
+ const senderAccount = account || client.account;
829
+ const encodedData = _viem.encodeFunctionData.call(void 0, {
830
+ abi: _optionalChain([client, 'access', _38 => _38.chain, 'access', _39 => _39.consensusMainContract, 'optionalAccess', _40 => _40.abi]),
831
+ functionName: "finalizeIdlenessTxs",
832
+ args: [txIds]
833
+ });
834
+ return _sendConsensusCall({
835
+ client,
836
+ publicClient,
837
+ encodedData,
838
+ senderAccount,
839
+ operationName: "Finalize idleness"
840
+ });
849
841
  }
850
842
  };
851
843
  };
@@ -910,7 +902,7 @@ var getAddTransactionInputCount = (abi) => {
910
902
  const candidate = item;
911
903
  return candidate.type === "function" && candidate.name === "addTransaction";
912
904
  });
913
- return Array.isArray(_optionalChain([addTransactionFunction, 'optionalAccess', _38 => _38.inputs])) ? addTransactionFunction.inputs.length : 0;
905
+ return Array.isArray(_optionalChain([addTransactionFunction, 'optionalAccess', _41 => _41.inputs])) ? addTransactionFunction.inputs.length : 0;
914
906
  };
915
907
  var _encodeAddTransactionData = ({
916
908
  client,
@@ -937,7 +929,7 @@ var _encodeAddTransactionData = ({
937
929
  functionName: "addTransaction",
938
930
  args: [...addTransactionArgs, 0n]
939
931
  });
940
- if (getAddTransactionInputCount(_optionalChain([client, 'access', _39 => _39.chain, 'access', _40 => _40.consensusMainContract, 'optionalAccess', _41 => _41.abi])) >= 6) {
932
+ if (getAddTransactionInputCount(_optionalChain([client, 'access', _42 => _42.chain, 'access', _43 => _43.consensusMainContract, 'optionalAccess', _44 => _44.abi])) >= 6) {
941
933
  return {
942
934
  primaryEncodedData: encodedDataV6,
943
935
  fallbackEncodedData: encodedDataV5
@@ -953,11 +945,74 @@ var _encodeSubmitAppealData = ({
953
945
  txId
954
946
  }) => {
955
947
  return _viem.encodeFunctionData.call(void 0, {
956
- abi: _optionalChain([client, 'access', _42 => _42.chain, 'access', _43 => _43.consensusMainContract, 'optionalAccess', _44 => _44.abi]),
948
+ abi: _optionalChain([client, 'access', _45 => _45.chain, 'access', _46 => _46.consensusMainContract, 'optionalAccess', _47 => _47.abi]),
957
949
  functionName: "submitAppeal",
958
950
  args: [txId]
959
951
  });
960
952
  };
953
+ var _sendConsensusCall = async ({
954
+ client,
955
+ publicClient,
956
+ encodedData,
957
+ senderAccount,
958
+ value = 0n,
959
+ operationName = "Consensus call"
960
+ }) => {
961
+ if (!_optionalChain([client, 'access', _48 => _48.chain, 'access', _49 => _49.consensusMainContract, 'optionalAccess', _50 => _50.address])) {
962
+ throw new Error("Consensus main contract not initialized.");
963
+ }
964
+ const validatedAccount = validateAccount(senderAccount);
965
+ const nonce = await client.getCurrentNonce({ address: validatedAccount.address });
966
+ let estimatedGas;
967
+ try {
968
+ estimatedGas = await client.estimateTransactionGas({
969
+ to: client.chain.consensusMainContract.address,
970
+ data: encodedData,
971
+ value
972
+ });
973
+ } catch (err) {
974
+ console.error("Gas estimation failed, using default 200_000:", err);
975
+ estimatedGas = 200000n;
976
+ }
977
+ const gasPriceHex = await client.request({ method: "eth_gasPrice" });
978
+ if (validatedAccount.type === "local") {
979
+ if (!validatedAccount.signTransaction) {
980
+ throw new Error("Local account does not support signTransaction.");
981
+ }
982
+ const txRequest = {
983
+ account: validatedAccount,
984
+ to: client.chain.consensusMainContract.address,
985
+ data: encodedData,
986
+ value,
987
+ gas: estimatedGas,
988
+ gasPrice: BigInt(gasPriceHex),
989
+ nonce,
990
+ chainId: client.chain.id
991
+ };
992
+ const serializedTransaction = await validatedAccount.signTransaction(txRequest);
993
+ const evmHash2 = await client.sendRawTransaction({ serializedTransaction });
994
+ const receipt2 = await publicClient.waitForTransactionReceipt({ hash: evmHash2 });
995
+ if (receipt2.status === "reverted") {
996
+ throw new Error(`${operationName} reverted: EVM tx ${evmHash2}`);
997
+ }
998
+ return evmHash2;
999
+ }
1000
+ const evmHash = await client.request({
1001
+ method: "eth_sendTransaction",
1002
+ params: [{
1003
+ from: validatedAccount.address,
1004
+ to: client.chain.consensusMainContract.address,
1005
+ data: encodedData,
1006
+ value: value ? `0x${value.toString(16)}` : void 0,
1007
+ gas: `0x${estimatedGas.toString(16)}`
1008
+ }]
1009
+ });
1010
+ const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
1011
+ if (receipt.status === "reverted") {
1012
+ throw new Error(`${operationName} reverted: EVM tx ${evmHash}`);
1013
+ }
1014
+ return evmHash;
1015
+ };
961
1016
  var isAddTransactionAbiMismatchError = (error) => {
962
1017
  const seen = /* @__PURE__ */ new WeakSet();
963
1018
  const serializedError = typeof error === "object" && error !== null ? JSON.stringify(error, (_key, value) => {
@@ -974,9 +1029,9 @@ var isAddTransactionAbiMismatchError = (error) => {
974
1029
  }) : "";
975
1030
  const errorObject = error;
976
1031
  const errorMessage = [
977
- _optionalChain([errorObject, 'optionalAccess', _45 => _45.shortMessage]),
978
- _optionalChain([errorObject, 'optionalAccess', _46 => _46.details]),
979
- _optionalChain([errorObject, 'optionalAccess', _47 => _47.message]),
1032
+ _optionalChain([errorObject, 'optionalAccess', _51 => _51.shortMessage]),
1033
+ _optionalChain([errorObject, 'optionalAccess', _52 => _52.details]),
1034
+ _optionalChain([errorObject, 'optionalAccess', _53 => _53.message]),
980
1035
  serializedError,
981
1036
  String(_nullishCoalesce(error, () => ( "")))
982
1037
  ].filter(Boolean).join(" ").toLowerCase();
@@ -984,7 +1039,7 @@ var isAddTransactionAbiMismatchError = (error) => {
984
1039
  };
985
1040
  var extractTxIdFromLogs = (client, logs) => {
986
1041
  const newTxEvents = _viem.parseEventLogs.call(void 0, {
987
- abi: _optionalChain([client, 'access', _48 => _48.chain, 'access', _49 => _49.consensusMainContract, 'optionalAccess', _50 => _50.abi]),
1042
+ abi: _optionalChain([client, 'access', _54 => _54.chain, 'access', _55 => _55.consensusMainContract, 'optionalAccess', _56 => _56.abi]),
988
1043
  eventName: "NewTransaction",
989
1044
  logs
990
1045
  });
@@ -1009,7 +1064,7 @@ var _sendTransaction = async ({
1009
1064
  senderAccount,
1010
1065
  value = 0n
1011
1066
  }) => {
1012
- if (!_optionalChain([client, 'access', _51 => _51.chain, 'access', _52 => _52.consensusMainContract, 'optionalAccess', _53 => _53.address])) {
1067
+ if (!_optionalChain([client, 'access', _57 => _57.chain, 'access', _58 => _58.consensusMainContract, 'optionalAccess', _59 => _59.address])) {
1013
1068
  throw new Error(`Consensus main contract address not found in chain config for "${client.chain.name}".`);
1014
1069
  }
1015
1070
  const validatedSenderAccount = validateAccount(senderAccount);
@@ -1019,7 +1074,7 @@ var _sendTransaction = async ({
1019
1074
  try {
1020
1075
  estimatedGas = await client.estimateTransactionGas({
1021
1076
  from: validatedSenderAccount.address,
1022
- to: _optionalChain([client, 'access', _54 => _54.chain, 'access', _55 => _55.consensusMainContract, 'optionalAccess', _56 => _56.address]),
1077
+ to: _optionalChain([client, 'access', _60 => _60.chain, 'access', _61 => _61.consensusMainContract, 'optionalAccess', _62 => _62.address]),
1023
1078
  data: encodedDataForSend,
1024
1079
  value
1025
1080
  });
@@ -1027,8 +1082,8 @@ var _sendTransaction = async ({
1027
1082
  console.error("Gas estimation failed, using default 200_000:", err);
1028
1083
  estimatedGas = 200000n;
1029
1084
  }
1030
- if (_optionalChain([validatedSenderAccount, 'optionalAccess', _57 => _57.type]) === "local") {
1031
- if (!_optionalChain([validatedSenderAccount, 'optionalAccess', _58 => _58.signTransaction])) {
1085
+ if (_optionalChain([validatedSenderAccount, 'optionalAccess', _63 => _63.type]) === "local") {
1086
+ if (!_optionalChain([validatedSenderAccount, 'optionalAccess', _64 => _64.signTransaction])) {
1032
1087
  throw new Error("Local account does not support signTransaction. Use a private key account created via privateKeyToAccount().");
1033
1088
  }
1034
1089
  const gasPriceHex2 = await client.request({
@@ -1036,7 +1091,7 @@ var _sendTransaction = async ({
1036
1091
  });
1037
1092
  const transactionRequest = {
1038
1093
  account: validatedSenderAccount,
1039
- to: _optionalChain([client, 'access', _59 => _59.chain, 'access', _60 => _60.consensusMainContract, 'optionalAccess', _61 => _61.address]),
1094
+ to: _optionalChain([client, 'access', _65 => _65.chain, 'access', _66 => _66.consensusMainContract, 'optionalAccess', _67 => _67.address]),
1040
1095
  data: encodedDataForSend,
1041
1096
  type: "legacy",
1042
1097
  nonce: Number(nonce),
@@ -1049,7 +1104,7 @@ var _sendTransaction = async ({
1049
1104
  const txHash = await client.sendRawTransaction({ serializedTransaction });
1050
1105
  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
1051
1106
  if (receipt.status === "reverted") {
1052
- throw new Error(`Transaction reverted: EVM tx ${txHash} to consensus contract ${_optionalChain([client, 'access', _62 => _62.chain, 'access', _63 => _63.consensusMainContract, 'optionalAccess', _64 => _64.address])} was reverted.`);
1107
+ throw new Error(`Transaction reverted: EVM tx ${txHash} to consensus contract ${_optionalChain([client, 'access', _68 => _68.chain, 'access', _69 => _69.consensusMainContract, 'optionalAccess', _70 => _70.address])} was reverted.`);
1053
1108
  }
1054
1109
  const txId = extractTxIdFromLogs(client, receipt.logs);
1055
1110
  if (!txId) {
@@ -1073,7 +1128,7 @@ var _sendTransaction = async ({
1073
1128
  const nonceBigInt = typeof nonce === "bigint" ? nonce : typeof nonce === "string" ? BigInt(nonce) : BigInt(Number(nonce));
1074
1129
  const formattedRequest = {
1075
1130
  from: validatedSenderAccount.address,
1076
- to: _optionalChain([client, 'access', _65 => _65.chain, 'access', _66 => _66.consensusMainContract, 'optionalAccess', _67 => _67.address]),
1131
+ to: _optionalChain([client, 'access', _71 => _71.chain, 'access', _72 => _72.consensusMainContract, 'optionalAccess', _73 => _73.address]),
1077
1132
  data: encodedDataForSend,
1078
1133
  value: `0x${value.toString(16)}`,
1079
1134
  gas: `0x${estimatedGas.toString(16)}`,
@@ -1092,7 +1147,7 @@ var _sendTransaction = async ({
1092
1147
  }
1093
1148
  const externalReceipt = await publicClient.waitForTransactionReceipt({ hash: evmTxHash });
1094
1149
  if (externalReceipt.status === "reverted") {
1095
- throw new Error(`Transaction reverted: EVM tx ${evmTxHash} to consensus contract ${_optionalChain([client, 'access', _68 => _68.chain, 'access', _69 => _69.consensusMainContract, 'optionalAccess', _70 => _70.address])} was reverted.`);
1150
+ throw new Error(`Transaction reverted: EVM tx ${evmTxHash} to consensus contract ${_optionalChain([client, 'access', _74 => _74.chain, 'access', _75 => _75.consensusMainContract, 'optionalAccess', _76 => _76.address])} was reverted.`);
1096
1151
  }
1097
1152
  const externalTxId = extractTxIdFromLogs(client, externalReceipt.logs);
1098
1153
  if (!externalTxId) {
@@ -1217,7 +1272,7 @@ var decodeTransaction = (tx) => {
1217
1272
  txData,
1218
1273
  txDataDecoded,
1219
1274
  currentTimestamp: tx.currentTimestamp.toString(),
1220
- numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _71 => _71.toString, 'call', _72 => _72()]), () => ( "0")),
1275
+ numOfInitialValidators: _nullishCoalesce(_optionalChain([numOfInitialValidators, 'optionalAccess', _77 => _77.toString, 'call', _78 => _78()]), () => ( "0")),
1221
1276
  txSlot: tx.txSlot.toString(),
1222
1277
  createdTimestamp: tx.createdTimestamp.toString(),
1223
1278
  lastVoteTimestamp: tx.lastVoteTimestamp.toString(),
@@ -1225,9 +1280,9 @@ var decodeTransaction = (tx) => {
1225
1280
  numOfRounds: tx.numOfRounds.toString(),
1226
1281
  readStateBlockRange: {
1227
1282
  ...tx.readStateBlockRange,
1228
- activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _73 => _73.readStateBlockRange, 'optionalAccess', _74 => _74.activationBlock, 'optionalAccess', _75 => _75.toString, 'call', _76 => _76()]), () => ( "0")),
1229
- processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _77 => _77.readStateBlockRange, 'optionalAccess', _78 => _78.processingBlock, 'optionalAccess', _79 => _79.toString, 'call', _80 => _80()]), () => ( "0")),
1230
- proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _81 => _81.readStateBlockRange, 'optionalAccess', _82 => _82.proposalBlock, 'optionalAccess', _83 => _83.toString, 'call', _84 => _84()]), () => ( "0"))
1283
+ activationBlock: _nullishCoalesce(_optionalChain([tx, 'access', _79 => _79.readStateBlockRange, 'optionalAccess', _80 => _80.activationBlock, 'optionalAccess', _81 => _81.toString, 'call', _82 => _82()]), () => ( "0")),
1284
+ processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _83 => _83.readStateBlockRange, 'optionalAccess', _84 => _84.processingBlock, 'optionalAccess', _85 => _85.toString, 'call', _86 => _86()]), () => ( "0")),
1285
+ proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _87 => _87.readStateBlockRange, 'optionalAccess', _88 => _88.proposalBlock, 'optionalAccess', _89 => _89.toString, 'call', _90 => _90()]), () => ( "0"))
1231
1286
  },
1232
1287
  statusName: _chunkGJXSECNHcjs.transactionsStatusNumberToName[String(tx.status)],
1233
1288
  resultName: _chunkGJXSECNHcjs.transactionResultNumberToName[String(tx.result)],
@@ -1235,13 +1290,13 @@ var decodeTransaction = (tx) => {
1235
1290
  txExecutionResultName: tx.txExecutionResult !== void 0 ? _chunkGJXSECNHcjs.executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
1236
1291
  lastRound: {
1237
1292
  ...tx.lastRound,
1238
- round: _nullishCoalesce(_optionalChain([tx, 'access', _85 => _85.lastRound, 'optionalAccess', _86 => _86.round, 'optionalAccess', _87 => _87.toString, 'call', _88 => _88()]), () => ( "0")),
1239
- leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _89 => _89.lastRound, 'optionalAccess', _90 => _90.leaderIndex, 'optionalAccess', _91 => _91.toString, 'call', _92 => _92()]), () => ( "0")),
1240
- votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _93 => _93.lastRound, 'optionalAccess', _94 => _94.votesCommitted, 'optionalAccess', _95 => _95.toString, 'call', _96 => _96()]), () => ( "0")),
1241
- votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _97 => _97.lastRound, 'optionalAccess', _98 => _98.votesRevealed, 'optionalAccess', _99 => _99.toString, 'call', _100 => _100()]), () => ( "0")),
1242
- appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _101 => _101.lastRound, 'optionalAccess', _102 => _102.appealBond, 'optionalAccess', _103 => _103.toString, 'call', _104 => _104()]), () => ( "0")),
1243
- rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _105 => _105.lastRound, 'optionalAccess', _106 => _106.rotationsLeft, 'optionalAccess', _107 => _107.toString, 'call', _108 => _108()]), () => ( "0")),
1244
- validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _109 => _109.lastRound, 'optionalAccess', _110 => _110.validatorVotes]), () => ( []))).map(
1293
+ round: _nullishCoalesce(_optionalChain([tx, 'access', _91 => _91.lastRound, 'optionalAccess', _92 => _92.round, 'optionalAccess', _93 => _93.toString, 'call', _94 => _94()]), () => ( "0")),
1294
+ leaderIndex: _nullishCoalesce(_optionalChain([tx, 'access', _95 => _95.lastRound, 'optionalAccess', _96 => _96.leaderIndex, 'optionalAccess', _97 => _97.toString, 'call', _98 => _98()]), () => ( "0")),
1295
+ votesCommitted: _nullishCoalesce(_optionalChain([tx, 'access', _99 => _99.lastRound, 'optionalAccess', _100 => _100.votesCommitted, 'optionalAccess', _101 => _101.toString, 'call', _102 => _102()]), () => ( "0")),
1296
+ votesRevealed: _nullishCoalesce(_optionalChain([tx, 'access', _103 => _103.lastRound, 'optionalAccess', _104 => _104.votesRevealed, 'optionalAccess', _105 => _105.toString, 'call', _106 => _106()]), () => ( "0")),
1297
+ appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _107 => _107.lastRound, 'optionalAccess', _108 => _108.appealBond, 'optionalAccess', _109 => _109.toString, 'call', _110 => _110()]), () => ( "0")),
1298
+ rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _111 => _111.lastRound, 'optionalAccess', _112 => _112.rotationsLeft, 'optionalAccess', _113 => _113.toString, 'call', _114 => _114()]), () => ( "0")),
1299
+ validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _115 => _115.lastRound, 'optionalAccess', _116 => _116.validatorVotes]), () => ( []))).map(
1245
1300
  (vote) => _chunkGJXSECNHcjs.voteTypeNumberToName[String(vote)]
1246
1301
  )
1247
1302
  }
@@ -1323,7 +1378,7 @@ var simplifyTransactionReceipt = (tx) => {
1323
1378
  var decodeLocalnetTransaction = (tx) => {
1324
1379
  if (!tx.data) return tx;
1325
1380
  try {
1326
- const leaderReceipt = _optionalChain([tx, 'access', _111 => _111.consensus_data, 'optionalAccess', _112 => _112.leader_receipt]);
1381
+ const leaderReceipt = _optionalChain([tx, 'access', _117 => _117.consensus_data, 'optionalAccess', _118 => _118.leader_receipt]);
1327
1382
  if (leaderReceipt) {
1328
1383
  const receipts = Array.isArray(leaderReceipt) ? leaderReceipt : [leaderReceipt];
1329
1384
  receipts.forEach((receipt) => {
@@ -1354,7 +1409,7 @@ var decodeLocalnetTransaction = (tx) => {
1354
1409
  }
1355
1410
  });
1356
1411
  }
1357
- if (_optionalChain([tx, 'access', _113 => _113.data, 'optionalAccess', _114 => _114.calldata]) && typeof tx.data.calldata === "string") {
1412
+ if (_optionalChain([tx, 'access', _119 => _119.data, 'optionalAccess', _120 => _120.calldata]) && typeof tx.data.calldata === "string") {
1358
1413
  tx.data.calldata = {
1359
1414
  base64: tx.data.calldata,
1360
1415
  ...calldataToUserFriendlyJson(b64ToArray(tx.data.calldata))
@@ -1417,8 +1472,8 @@ var transactionActions = (client, publicClient) => ({
1417
1472
  transaction2.statusName = localnetStatus;
1418
1473
  return decodeLocalnetTransaction(transaction2);
1419
1474
  }
1420
- const contractAddress = _optionalChain([client, 'access', _115 => _115.chain, 'access', _116 => _116.consensusDataContract, 'optionalAccess', _117 => _117.address]);
1421
- const contractAbi = _optionalChain([client, 'access', _118 => _118.chain, 'access', _119 => _119.consensusDataContract, 'optionalAccess', _120 => _120.abi]);
1475
+ const contractAddress = _optionalChain([client, 'access', _121 => _121.chain, 'access', _122 => _122.consensusDataContract, 'optionalAccess', _123 => _123.address]);
1476
+ const contractAbi = _optionalChain([client, 'access', _124 => _124.chain, 'access', _125 => _125.consensusDataContract, 'optionalAccess', _126 => _126.abi]);
1422
1477
  const [txDataRaw, allDataRaw] = await Promise.all([
1423
1478
  publicClient.readContract({
1424
1479
  address: contractAddress,
@@ -1448,12 +1503,12 @@ var transactionActions = (client, publicClient) => ({
1448
1503
  return _nullishCoalesce(tx2.triggered_transactions, () => ( []));
1449
1504
  }
1450
1505
  const tx = await transactionActions(client, publicClient).getTransaction({ hash });
1451
- const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _121 => _121.readStateBlockRange, 'optionalAccess', _122 => _122.proposalBlock]), () => ( "0")));
1506
+ const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _127 => _127.readStateBlockRange, 'optionalAccess', _128 => _128.proposalBlock]), () => ( "0")));
1452
1507
  if (proposalBlock === BigInt(0)) return [];
1453
1508
  const scanRange = BigInt(100);
1454
1509
  const latestBlock = await publicClient.getBlockNumber();
1455
1510
  const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
1456
- const consensusAddress = _optionalChain([client, 'access', _123 => _123.chain, 'access', _124 => _124.consensusMainContract, 'optionalAccess', _125 => _125.address]);
1511
+ const consensusAddress = _optionalChain([client, 'access', _129 => _129.chain, 'access', _130 => _130.consensusMainContract, 'optionalAccess', _131 => _131.address]);
1457
1512
  const internalMessageProcessedTopic = _viem.keccak256.call(void 0, _viem.stringToBytes.call(void 0, "InternalMessageProcessed(bytes32,address,address)"));
1458
1513
  const logs = await publicClient.getLogs({
1459
1514
  address: consensusAddress,
@@ -1502,8 +1557,8 @@ var transactionActions = (client, publicClient) => ({
1502
1557
  },
1503
1558
  /** Returns the queue slot position of a transaction in the pending queue. */
1504
1559
  getTransactionQueuePosition: async ({ hash }) => {
1505
- const consensusAddress = _optionalChain([client, 'access', _126 => _126.chain, 'access', _127 => _127.consensusMainContract, 'optionalAccess', _128 => _128.address]);
1506
- const consensusAbi = _optionalChain([client, 'access', _129 => _129.chain, 'access', _130 => _130.consensusMainContract, 'optionalAccess', _131 => _131.abi]);
1560
+ const consensusAddress = _optionalChain([client, 'access', _132 => _132.chain, 'access', _133 => _133.consensusMainContract, 'optionalAccess', _134 => _134.address]);
1561
+ const consensusAbi = _optionalChain([client, 'access', _135 => _135.chain, 'access', _136 => _136.consensusMainContract, 'optionalAccess', _137 => _137.abi]);
1507
1562
  const queuesAddress = await publicClient.readContract({
1508
1563
  address: consensusAddress,
1509
1564
  abi: consensusAbi,
@@ -1529,7 +1584,7 @@ var transactionActions = (client, publicClient) => ({
1529
1584
  /** Estimates gas required for a transaction. */
1530
1585
  estimateTransactionGas: async (transactionParams) => {
1531
1586
  const formattedParams = {
1532
- from: transactionParams.from || _optionalChain([client, 'access', _132 => _132.account, 'optionalAccess', _133 => _133.address]),
1587
+ from: transactionParams.from || _optionalChain([client, 'access', _138 => _138.account, 'optionalAccess', _139 => _139.address]),
1533
1588
  to: transactionParams.to,
1534
1589
  data: transactionParams.data || "0x",
1535
1590
  value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
@@ -1572,7 +1627,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
1572
1627
  chainName: selectedNetwork.name,
1573
1628
  rpcUrls: selectedNetwork.rpcUrls.default.http,
1574
1629
  nativeCurrency: selectedNetwork.nativeCurrency,
1575
- blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _134 => _134.blockExplorers, 'optionalAccess', _135 => _135.default, 'access', _136 => _136.url])]
1630
+ blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _140 => _140.blockExplorers, 'optionalAccess', _141 => _141.default, 'access', _142 => _142.url])]
1576
1631
  };
1577
1632
  const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
1578
1633
  if (currentChainId !== chainIdHex) {
@@ -1606,10 +1661,10 @@ var metamaskClient = async (snapSource = "npm") => {
1606
1661
  }
1607
1662
  const isFlask = async () => {
1608
1663
  try {
1609
- const clientVersion = await _optionalChain([window, 'access', _137 => _137.ethereum, 'optionalAccess', _138 => _138.request, 'call', _139 => _139({
1664
+ const clientVersion = await _optionalChain([window, 'access', _143 => _143.ethereum, 'optionalAccess', _144 => _144.request, 'call', _145 => _145({
1610
1665
  method: "web3_clientVersion"
1611
1666
  })]);
1612
- return _optionalChain([clientVersion, 'optionalAccess', _140 => _140.includes, 'call', _141 => _141("flask")]);
1667
+ return _optionalChain([clientVersion, 'optionalAccess', _146 => _146.includes, 'call', _147 => _147("flask")]);
1613
1668
  } catch (error) {
1614
1669
  console.error("Error detecting Flask:", error);
1615
1670
  return false;
@@ -1617,7 +1672,7 @@ var metamaskClient = async (snapSource = "npm") => {
1617
1672
  };
1618
1673
  const installedSnaps = async () => {
1619
1674
  try {
1620
- return await _optionalChain([window, 'access', _142 => _142.ethereum, 'optionalAccess', _143 => _143.request, 'call', _144 => _144({
1675
+ return await _optionalChain([window, 'access', _148 => _148.ethereum, 'optionalAccess', _149 => _149.request, 'call', _150 => _150({
1621
1676
  method: "wallet_getSnaps"
1622
1677
  })]);
1623
1678
  } catch (error) {
@@ -1704,7 +1759,7 @@ function extractRevertReason(err) {
1704
1759
  }
1705
1760
  const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
1706
1761
  if (revertError instanceof _viem.ContractFunctionRevertedError) {
1707
- if (_optionalChain([revertError, 'access', _145 => _145.data, 'optionalAccess', _146 => _146.errorName])) {
1762
+ if (_optionalChain([revertError, 'access', _151 => _151.data, 'optionalAccess', _152 => _152.errorName])) {
1708
1763
  return revertError.data.errorName;
1709
1764
  }
1710
1765
  return revertError.reason || "Unknown reason";
@@ -1792,7 +1847,7 @@ var stakingActions = (client, publicClient) => {
1792
1847
  };
1793
1848
  const getStakingAddress = () => {
1794
1849
  const stakingConfig = client.chain.stakingContract;
1795
- if (!_optionalChain([stakingConfig, 'optionalAccess', _147 => _147.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1850
+ if (!_optionalChain([stakingConfig, 'optionalAccess', _153 => _153.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
1796
1851
  throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
1797
1852
  }
1798
1853
  return stakingConfig.address;
@@ -1877,10 +1932,10 @@ var stakingActions = (client, publicClient) => {
1877
1932
  },
1878
1933
  /** Claims pending validator withdrawals. */
1879
1934
  validatorClaim: async (options) => {
1880
- if (!_optionalChain([options, 'optionalAccess', _148 => _148.validator]) && !client.account) {
1935
+ if (!_optionalChain([options, 'optionalAccess', _154 => _154.validator]) && !client.account) {
1881
1936
  throw new Error("Either provide validator address or initialize client with an account");
1882
1937
  }
1883
- const validatorAddress = _optionalChain([options, 'optionalAccess', _149 => _149.validator]) || client.account.address;
1938
+ const validatorAddress = _optionalChain([options, 'optionalAccess', _155 => _155.validator]) || client.account.address;
1884
1939
  const data = _viem.encodeFunctionData.call(void 0, {
1885
1940
  abi: _chunkPZEHAYIUcjs.STAKING_ABI,
1886
1941
  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-D6DgvIVA.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-DQCfqVjw.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-D3H572Cz.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-D6DgvIVA.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-DDgbU3hK.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-BpBLcwxn.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
@@ -792,60 +792,52 @@ var contractActions = (client, publicClient) => {
792
792
  }
793
793
  const senderAccount = account || client.account;
794
794
  const encodedData = _encodeSubmitAppealData({ client, txId });
795
- const validatedAccount = validateAccount(senderAccount);
796
- if (!client.chain.consensusMainContract?.address) {
797
- throw new Error("Consensus main contract not initialized.");
798
- }
799
- const nonce = await client.getCurrentNonce({ address: validatedAccount.address });
800
- let estimatedGas;
801
- try {
802
- estimatedGas = await client.estimateTransactionGas({
803
- to: client.chain.consensusMainContract.address,
804
- data: encodedData,
805
- value
806
- });
807
- } catch (err) {
808
- console.error("Gas estimation failed, using default 200_000:", err);
809
- estimatedGas = 200000n;
810
- }
811
- const gasPriceHex = await client.request({ method: "eth_gasPrice" });
812
- const txRequest = {
813
- account: validatedAccount,
814
- to: client.chain.consensusMainContract.address,
815
- data: encodedData,
795
+ await _sendConsensusCall({
796
+ client,
797
+ publicClient,
798
+ encodedData,
799
+ senderAccount,
816
800
  value,
817
- gas: estimatedGas,
818
- gasPrice: BigInt(gasPriceHex),
819
- nonce,
820
- chainId: client.chain.id
821
- };
822
- if (validatedAccount.type === "local") {
823
- if (!validatedAccount.signTransaction) {
824
- throw new Error("Local account does not support signTransaction.");
825
- }
826
- const serializedTransaction = await validatedAccount.signTransaction(txRequest);
827
- const evmHash = await client.sendRawTransaction({ serializedTransaction });
828
- const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
829
- if (receipt.status === "reverted") {
830
- throw new Error(`Appeal reverted: EVM tx ${evmHash}`);
831
- }
832
- } else {
833
- const evmHash = await client.request({
834
- method: "eth_sendTransaction",
835
- params: [{
836
- from: validatedAccount.address,
837
- to: client.chain.consensusMainContract.address,
838
- data: encodedData,
839
- value: value ? `0x${value.toString(16)}` : void 0,
840
- gas: `0x${estimatedGas.toString(16)}`
841
- }]
842
- });
843
- const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
844
- if (receipt.status === "reverted") {
845
- throw new Error(`Appeal reverted: EVM tx ${evmHash}`);
846
- }
847
- }
801
+ operationName: "Appeal"
802
+ });
848
803
  return txId;
804
+ },
805
+ /** Finalizes a single GenLayer transaction that is ready to be finalized. Returns the EVM transaction hash. */
806
+ finalizeTransaction: async (args) => {
807
+ const { account, txId } = args;
808
+ const senderAccount = account || client.account;
809
+ const encodedData = encodeFunctionData({
810
+ abi: client.chain.consensusMainContract?.abi,
811
+ functionName: "finalizeTransaction",
812
+ args: [txId]
813
+ });
814
+ return _sendConsensusCall({
815
+ client,
816
+ publicClient,
817
+ encodedData,
818
+ senderAccount,
819
+ operationName: "Finalize"
820
+ });
821
+ },
822
+ /** Batch-finalizes idle GenLayer transactions (those stuck without progressing). Returns the EVM transaction hash. */
823
+ finalizeIdlenessTxs: async (args) => {
824
+ const { account, txIds } = args;
825
+ if (txIds.length === 0) {
826
+ throw new Error("finalizeIdlenessTxs requires at least one txId.");
827
+ }
828
+ const senderAccount = account || client.account;
829
+ const encodedData = encodeFunctionData({
830
+ abi: client.chain.consensusMainContract?.abi,
831
+ functionName: "finalizeIdlenessTxs",
832
+ args: [txIds]
833
+ });
834
+ return _sendConsensusCall({
835
+ client,
836
+ publicClient,
837
+ encodedData,
838
+ senderAccount,
839
+ operationName: "Finalize idleness"
840
+ });
849
841
  }
850
842
  };
851
843
  };
@@ -958,6 +950,69 @@ var _encodeSubmitAppealData = ({
958
950
  args: [txId]
959
951
  });
960
952
  };
953
+ var _sendConsensusCall = async ({
954
+ client,
955
+ publicClient,
956
+ encodedData,
957
+ senderAccount,
958
+ value = 0n,
959
+ operationName = "Consensus call"
960
+ }) => {
961
+ if (!client.chain.consensusMainContract?.address) {
962
+ throw new Error("Consensus main contract not initialized.");
963
+ }
964
+ const validatedAccount = validateAccount(senderAccount);
965
+ const nonce = await client.getCurrentNonce({ address: validatedAccount.address });
966
+ let estimatedGas;
967
+ try {
968
+ estimatedGas = await client.estimateTransactionGas({
969
+ to: client.chain.consensusMainContract.address,
970
+ data: encodedData,
971
+ value
972
+ });
973
+ } catch (err) {
974
+ console.error("Gas estimation failed, using default 200_000:", err);
975
+ estimatedGas = 200000n;
976
+ }
977
+ const gasPriceHex = await client.request({ method: "eth_gasPrice" });
978
+ if (validatedAccount.type === "local") {
979
+ if (!validatedAccount.signTransaction) {
980
+ throw new Error("Local account does not support signTransaction.");
981
+ }
982
+ const txRequest = {
983
+ account: validatedAccount,
984
+ to: client.chain.consensusMainContract.address,
985
+ data: encodedData,
986
+ value,
987
+ gas: estimatedGas,
988
+ gasPrice: BigInt(gasPriceHex),
989
+ nonce,
990
+ chainId: client.chain.id
991
+ };
992
+ const serializedTransaction = await validatedAccount.signTransaction(txRequest);
993
+ const evmHash2 = await client.sendRawTransaction({ serializedTransaction });
994
+ const receipt2 = await publicClient.waitForTransactionReceipt({ hash: evmHash2 });
995
+ if (receipt2.status === "reverted") {
996
+ throw new Error(`${operationName} reverted: EVM tx ${evmHash2}`);
997
+ }
998
+ return evmHash2;
999
+ }
1000
+ const evmHash = await client.request({
1001
+ method: "eth_sendTransaction",
1002
+ params: [{
1003
+ from: validatedAccount.address,
1004
+ to: client.chain.consensusMainContract.address,
1005
+ data: encodedData,
1006
+ value: value ? `0x${value.toString(16)}` : void 0,
1007
+ gas: `0x${estimatedGas.toString(16)}`
1008
+ }]
1009
+ });
1010
+ const receipt = await publicClient.waitForTransactionReceipt({ hash: evmHash });
1011
+ if (receipt.status === "reverted") {
1012
+ throw new Error(`${operationName} reverted: EVM tx ${evmHash}`);
1013
+ }
1014
+ return evmHash;
1015
+ };
961
1016
  var isAddTransactionAbiMismatchError = (error) => {
962
1017
  const seen = /* @__PURE__ */ new WeakSet();
963
1018
  const serializedError = typeof error === "object" && error !== null ? JSON.stringify(error, (_key, value) => {
@@ -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-DQCfqVjw.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-D3H572Cz.cjs';
3
3
  export { G as GenLayerChain } from '../chains-D6DgvIVA.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-DDgbU3hK.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-BpBLcwxn.js';
3
3
  export { G as GenLayerChain } from '../chains-D6DgvIVA.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genlayer-js",
3
3
  "type": "module",
4
- "version": "0.28.4",
4
+ "version": "0.28.5",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",