genlayer-js 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -152,6 +152,22 @@ console.log(childTxIds);
152
152
  // ["0xabc...", "0xdef..."]
153
153
  ```
154
154
 
155
+ ### Debugging transaction execution
156
+
157
+ Use `debugTraceTransaction` to inspect the full execution trace of a transaction, including return data, errors, and GenVM logs:
158
+
159
+ ```typescript
160
+ const trace = await client.debugTraceTransaction({
161
+ hash: txHash,
162
+ round: 0, // optional, defaults to 0
163
+ });
164
+
165
+ console.log(trace.result_code); // 0=success, 1=user error, 2=VM error
166
+ console.log(trace.return_data); // hex-encoded contract return data
167
+ console.log(trace.stderr); // standard error output
168
+ console.log(trace.genvm_log); // detailed GenVM execution logs
169
+ ```
170
+
155
171
  ### Staking Operations
156
172
 
157
173
  The SDK provides staking functionality for validators and delegators on testnet-bradbury (and testnet-asimov).
@@ -150,6 +150,18 @@ type DecodedCallData = {
150
150
  leaderOnly?: boolean;
151
151
  type: TransactionType;
152
152
  };
153
+ type DebugTraceResult = {
154
+ transaction_id: string;
155
+ result_code: number;
156
+ return_data: string;
157
+ stdout: string;
158
+ stderr: string;
159
+ genvm_log: Record<string, unknown>[];
160
+ storage_proof: string;
161
+ run_time: string;
162
+ eq_outputs: string[];
163
+ stored_at?: string;
164
+ };
153
165
  interface LeaderReceipt {
154
166
  calldata: string;
155
167
  class_name: string;
@@ -2886,4 +2898,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2886
2898
  }) => Promise<bigint>;
2887
2899
  } & StakingActions;
2888
2900
 
2889
- export { type ValidatorExitOptions as $, type StakingContract as A, type ValidatorView as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorIdentity as F, type GenLayerClient as G, type Hash as H, type ValidatorInfo as I, type PendingWithdrawal as J, type BannedValidatorInfo as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type StakeInfo as O, type PendingDeposit as P, type EpochData as Q, type EpochInfo as R, STAKING_ABI as S, type TransactionDataElement as T, type StakingTransactionResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinResult as X, type DelegatorJoinResult as Y, type ValidatorJoinOptions as Z, type ValidatorDepositOptions as _, type DecodedCallData as a, type ValidatorClaimOptions as a0, type ValidatorPrimeOptions as a1, type SetOperatorOptions as a2, type SetIdentityOptions as a3, type DelegatorJoinOptions as a4, type DelegatorExitOptions as a5, type DelegatorClaimOptions as a6, type StakingActions as a7, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type SnapSource as z };
2901
+ export { type ValidatorDepositOptions as $, type SnapSource as A, type StakingContract as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorView as F, type GenLayerClient as G, type Hash as H, type ValidatorIdentity as I, type ValidatorInfo as J, type PendingWithdrawal as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type BannedValidatorInfo as O, type PendingDeposit as P, type StakeInfo as Q, type EpochData as R, STAKING_ABI as S, type TransactionDataElement as T, type EpochInfo as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type StakingTransactionResult as X, type ValidatorJoinResult as Y, type DelegatorJoinResult as Z, type ValidatorJoinOptions as _, type DecodedCallData as a, type ValidatorExitOptions as a0, type ValidatorClaimOptions as a1, type ValidatorPrimeOptions as a2, type SetOperatorOptions as a3, type SetIdentityOptions as a4, type DelegatorJoinOptions as a5, type DelegatorExitOptions as a6, type DelegatorClaimOptions as a7, type StakingActions as a8, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type DebugTraceResult as z };
@@ -150,6 +150,18 @@ type DecodedCallData = {
150
150
  leaderOnly?: boolean;
151
151
  type: TransactionType;
152
152
  };
153
+ type DebugTraceResult = {
154
+ transaction_id: string;
155
+ result_code: number;
156
+ return_data: string;
157
+ stdout: string;
158
+ stderr: string;
159
+ genvm_log: Record<string, unknown>[];
160
+ storage_proof: string;
161
+ run_time: string;
162
+ eq_outputs: string[];
163
+ stored_at?: string;
164
+ };
153
165
  interface LeaderReceipt {
154
166
  calldata: string;
155
167
  class_name: string;
@@ -2886,4 +2898,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
2886
2898
  }) => Promise<bigint>;
2887
2899
  } & StakingActions;
2888
2900
 
2889
- export { type ValidatorExitOptions as $, type StakingContract as A, type ValidatorView as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorIdentity as F, type GenLayerClient as G, type Hash as H, type ValidatorInfo as I, type PendingWithdrawal as J, type BannedValidatorInfo as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type StakeInfo as O, type PendingDeposit as P, type EpochData as Q, type EpochInfo as R, STAKING_ABI as S, type TransactionDataElement as T, type StakingTransactionResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinResult as X, type DelegatorJoinResult as Y, type ValidatorJoinOptions as Z, type ValidatorDepositOptions as _, type DecodedCallData as a, type ValidatorClaimOptions as a0, type ValidatorPrimeOptions as a1, type SetOperatorOptions as a2, type SetIdentityOptions as a3, type DelegatorJoinOptions as a4, type DelegatorExitOptions as a5, type DelegatorClaimOptions as a6, type StakingActions as a7, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type SnapSource as z };
2901
+ export { type ValidatorDepositOptions as $, type SnapSource as A, type StakingContract as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorView as F, type GenLayerClient as G, type Hash as H, type ValidatorIdentity as I, type ValidatorInfo as J, type PendingWithdrawal as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type BannedValidatorInfo as O, type PendingDeposit as P, type StakeInfo as Q, type EpochData as R, STAKING_ABI as S, type TransactionDataElement as T, type EpochInfo as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type StakingTransactionResult as X, type ValidatorJoinResult as Y, type DelegatorJoinResult as Z, type ValidatorJoinOptions as _, type DecodedCallData as a, type ValidatorExitOptions as a0, type ValidatorClaimOptions as a1, type ValidatorPrimeOptions as a2, type SetOperatorOptions as a3, type SetIdentityOptions as a4, type DelegatorJoinOptions as a5, type DelegatorExitOptions as a6, type DelegatorClaimOptions as a7, type StakingActions as a8, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type DebugTraceResult as z };
package/dist/index.cjs CHANGED
@@ -530,6 +530,7 @@ function extractGenCallResult(result) {
530
530
  }
531
531
  var contractActions = (client, publicClient) => {
532
532
  return {
533
+ /** Retrieves the source code of a deployed contract. Localnet only. */
533
534
  getContractCode: async (address) => {
534
535
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
535
536
  throw new Error("Getting contract code is not supported on this network");
@@ -541,6 +542,7 @@ var contractActions = (client, publicClient) => {
541
542
  const codeBytes = b64ToArray(result);
542
543
  return new TextDecoder().decode(codeBytes);
543
544
  },
545
+ /** Gets the schema (methods and constructor) of a deployed contract. Localnet only. */
544
546
  getContractSchema: async (address) => {
545
547
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
546
548
  throw new Error("Contract schema is not supported on this network");
@@ -551,6 +553,7 @@ var contractActions = (client, publicClient) => {
551
553
  });
552
554
  return schema;
553
555
  },
556
+ /** Generates a schema for contract code without deploying it. Localnet only. */
554
557
  getContractSchemaForCode: async (contractCode) => {
555
558
  if (client.chain.id !== _chunkNOMVZBCRcjs.localnet.id) {
556
559
  throw new Error("Contract schema is not supported on this network");
@@ -561,6 +564,7 @@ var contractActions = (client, publicClient) => {
561
564
  });
562
565
  return schema;
563
566
  },
567
+ /** Executes a read-only contract call without modifying state. */
564
568
  readContract: async (args) => {
565
569
  const {
566
570
  account,
@@ -597,6 +601,7 @@ var contractActions = (client, publicClient) => {
597
601
  }
598
602
  return toJsonSafeDeep(decoded);
599
603
  },
604
+ /** Simulates a state-modifying contract call without executing on-chain. */
600
605
  simulateWriteContract: async (args) => {
601
606
  const {
602
607
  account,
@@ -628,6 +633,7 @@ var contractActions = (client, publicClient) => {
628
633
  const resultBinary = _viem.fromHex.call(void 0, prefixedResult, "bytes");
629
634
  return decode(resultBinary);
630
635
  },
636
+ /** Executes a state-modifying function on a contract through consensus. Returns the transaction hash. */
631
637
  writeContract: async (args) => {
632
638
  const {
633
639
  account,
@@ -658,6 +664,7 @@ var contractActions = (client, publicClient) => {
658
664
  value
659
665
  });
660
666
  },
667
+ /** Deploys a new intelligent contract to GenLayer. Returns the transaction hash. */
661
668
  deployContract: async (args) => {
662
669
  const {
663
670
  account,
@@ -689,6 +696,7 @@ var contractActions = (client, publicClient) => {
689
696
  senderAccount
690
697
  });
691
698
  },
699
+ /** Calculates the minimum bond required to appeal a transaction. */
692
700
  getMinAppealBond: async (args) => {
693
701
  const { txId } = args;
694
702
  if (!_optionalChain([client, 'access', _11 => _11.chain, 'access', _12 => _12.feeManagerContract, 'optionalAccess', _13 => _13.address]) || !_optionalChain([client, 'access', _14 => _14.chain, 'access', _15 => _15.roundsStorageContract, 'optionalAccess', _16 => _16.address])) {
@@ -710,6 +718,7 @@ var contractActions = (client, publicClient) => {
710
718
  });
711
719
  return minBond;
712
720
  },
721
+ /** Appeals a consensus transaction to trigger a new round of validation. */
713
722
  appealTransaction: async (args) => {
714
723
  const { account, txId } = args;
715
724
  let { value } = args;
@@ -1235,6 +1244,7 @@ var decodeLocalnetTransaction = (tx) => {
1235
1244
 
1236
1245
  // src/transactions/actions.ts
1237
1246
  var receiptActions = (client, publicClient) => ({
1247
+ /** Polls until a transaction reaches the specified status. Returns the transaction receipt. */
1238
1248
  waitForTransactionReceipt: async ({
1239
1249
  hash,
1240
1250
  status = "ACCEPTED" /* ACCEPTED */,
@@ -1274,6 +1284,7 @@ var receiptActions = (client, publicClient) => ({
1274
1284
  }
1275
1285
  });
1276
1286
  var transactionActions = (client, publicClient) => ({
1287
+ /** Fetches transaction data including status, execution result, and consensus details. */
1277
1288
  getTransaction: async ({ hash }) => {
1278
1289
  if (client.chain.isStudio) {
1279
1290
  const transaction2 = await client.getTransaction({ hash });
@@ -1306,6 +1317,7 @@ var transactionActions = (client, publicClient) => ({
1306
1317
  };
1307
1318
  return decodeTransaction(transaction);
1308
1319
  },
1320
+ /** Returns transaction IDs of child transactions created from emitted messages. */
1309
1321
  getTriggeredTransactionIds: async ({ hash }) => {
1310
1322
  if (client.chain.isStudio) {
1311
1323
  const tx2 = await client.getTransaction({ hash });
@@ -1328,6 +1340,15 @@ var transactionActions = (client, publicClient) => ({
1328
1340
  });
1329
1341
  return logs.map((log) => log.topics[1]).filter(Boolean);
1330
1342
  },
1343
+ /** Fetches the full execution trace including return data, stdout, stderr, and GenVM logs. */
1344
+ debugTraceTransaction: async ({ hash, round = 0 }) => {
1345
+ const result = await client.request({
1346
+ method: "gen_dbg_traceTransaction",
1347
+ params: [{ txID: hash, round }]
1348
+ });
1349
+ return result;
1350
+ },
1351
+ /** Cancels a pending transaction. Studio networks only. */
1331
1352
  cancelTransaction: async ({ hash }) => {
1332
1353
  if (!client.chain.isStudio) {
1333
1354
  throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
@@ -1355,6 +1376,7 @@ var transactionActions = (client, publicClient) => ({
1355
1376
  params: [hash, signature]
1356
1377
  });
1357
1378
  },
1379
+ /** Estimates gas required for a transaction. */
1358
1380
  estimateTransactionGas: async (transactionParams) => {
1359
1381
  const formattedParams = {
1360
1382
  from: transactionParams.from || _optionalChain([client, 'access', _108 => _108.account, 'optionalAccess', _109 => _109.address]),
@@ -1642,6 +1664,7 @@ var stakingActions = (client, publicClient) => {
1642
1664
  });
1643
1665
  };
1644
1666
  return {
1667
+ /** Joins as a validator with the specified stake amount. */
1645
1668
  validatorJoin: async (options) => {
1646
1669
  const amount = parseStakingAmount(options.amount);
1647
1670
  const stakingAddress = getStakingAddress();
@@ -1683,6 +1706,7 @@ var stakingActions = (client, publicClient) => {
1683
1706
  amountRaw: amount
1684
1707
  };
1685
1708
  },
1709
+ /** Adds additional self-stake to an active validator position. */
1686
1710
  validatorDeposit: async (options) => {
1687
1711
  const amount = parseStakingAmount(options.amount);
1688
1712
  const data = _viem.encodeFunctionData.call(void 0, {
@@ -1691,6 +1715,7 @@ var stakingActions = (client, publicClient) => {
1691
1715
  });
1692
1716
  return executeWrite({ to: getStakingAddress(), data, value: amount });
1693
1717
  },
1718
+ /** Exits a validator position by burning the specified shares. */
1694
1719
  validatorExit: async (options) => {
1695
1720
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1696
1721
  const data = _viem.encodeFunctionData.call(void 0, {
@@ -1700,6 +1725,7 @@ var stakingActions = (client, publicClient) => {
1700
1725
  });
1701
1726
  return executeWrite({ to: getStakingAddress(), data });
1702
1727
  },
1728
+ /** Claims pending validator withdrawals. */
1703
1729
  validatorClaim: async (options) => {
1704
1730
  if (!_optionalChain([options, 'optionalAccess', _124 => _124.validator]) && !client.account) {
1705
1731
  throw new Error("Either provide validator address or initialize client with an account");
@@ -1713,6 +1739,7 @@ var stakingActions = (client, publicClient) => {
1713
1739
  const result = await executeWrite({ to: getStakingAddress(), data });
1714
1740
  return { ...result, claimedAmount: 0n };
1715
1741
  },
1742
+ /** Primes a validator for participation in the next epoch. */
1716
1743
  validatorPrime: async (options) => {
1717
1744
  const data = _viem.encodeFunctionData.call(void 0, {
1718
1745
  abi: _chunkNOMVZBCRcjs.STAKING_ABI,
@@ -1721,6 +1748,7 @@ var stakingActions = (client, publicClient) => {
1721
1748
  });
1722
1749
  return executeWrite({ to: getStakingAddress(), data });
1723
1750
  },
1751
+ /** Sets the operator address for a validator wallet. */
1724
1752
  setOperator: async (options) => {
1725
1753
  const data = _viem.encodeFunctionData.call(void 0, {
1726
1754
  abi: _chunkNOMVZBCRcjs.VALIDATOR_WALLET_ABI,
@@ -1729,6 +1757,7 @@ var stakingActions = (client, publicClient) => {
1729
1757
  });
1730
1758
  return executeWrite({ to: options.validator, data });
1731
1759
  },
1760
+ /** Sets validator identity information (name, website, social links). */
1732
1761
  setIdentity: async (options) => {
1733
1762
  let extraCidBytes = "0x";
1734
1763
  if (options.extraCid) {
@@ -1755,6 +1784,7 @@ var stakingActions = (client, publicClient) => {
1755
1784
  });
1756
1785
  return executeWrite({ to: options.validator, data });
1757
1786
  },
1787
+ /** Delegates stake to a validator. */
1758
1788
  delegatorJoin: async (options) => {
1759
1789
  const amount = parseStakingAmount(options.amount);
1760
1790
  const data = _viem.encodeFunctionData.call(void 0, {
@@ -1771,6 +1801,7 @@ var stakingActions = (client, publicClient) => {
1771
1801
  amountRaw: amount
1772
1802
  };
1773
1803
  },
1804
+ /** Exits a delegation by burning the specified shares. */
1774
1805
  delegatorExit: async (options) => {
1775
1806
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1776
1807
  const data = _viem.encodeFunctionData.call(void 0, {
@@ -1780,6 +1811,7 @@ var stakingActions = (client, publicClient) => {
1780
1811
  });
1781
1812
  return executeWrite({ to: getStakingAddress(), data });
1782
1813
  },
1814
+ /** Claims pending delegator withdrawals. */
1783
1815
  delegatorClaim: async (options) => {
1784
1816
  if (!options.delegator && !client.account) {
1785
1817
  throw new Error("Either provide delegator address or initialize client with an account");
@@ -1792,10 +1824,12 @@ var stakingActions = (client, publicClient) => {
1792
1824
  });
1793
1825
  return executeWrite({ to: getStakingAddress(), data });
1794
1826
  },
1827
+ /** Checks if an address is an active validator. */
1795
1828
  isValidator: async (address) => {
1796
1829
  const contract = getReadOnlyStakingContract();
1797
1830
  return contract.read.isValidator([address]);
1798
1831
  },
1832
+ /** Returns comprehensive information about a validator including stake, identity, and status. */
1799
1833
  getValidatorInfo: async (validator) => {
1800
1834
  const contract = getReadOnlyStakingContract();
1801
1835
  const isVal = await contract.read.isValidator([validator]);
@@ -1875,6 +1909,7 @@ var stakingActions = (client, publicClient) => {
1875
1909
  pendingWithdrawals
1876
1910
  };
1877
1911
  },
1912
+ /** Returns delegation stake information for a delegator-validator pair. */
1878
1913
  getStakeInfo: async (delegator, validator) => {
1879
1914
  const contract = getReadOnlyStakingContract();
1880
1915
  const shares = await contract.read.sharesOf([delegator, validator]);
@@ -1928,6 +1963,7 @@ var stakingActions = (client, publicClient) => {
1928
1963
  pendingWithdrawals
1929
1964
  };
1930
1965
  },
1966
+ /** Returns current epoch information including timing, stake requirements, and inflation data. */
1931
1967
  getEpochInfo: async () => {
1932
1968
  const contract = getReadOnlyStakingContract();
1933
1969
  const [
@@ -1984,6 +2020,7 @@ var stakingActions = (client, publicClient) => {
1984
2020
  delegatorMinStakeRaw: delMinStake
1985
2021
  };
1986
2022
  },
2023
+ /** Returns detailed data for a specific epoch. */
1987
2024
  getEpochData: async (epochNumber) => {
1988
2025
  const contract = getReadOnlyStakingContract();
1989
2026
  const [currentEpoch, epochOdd, epochEven] = await Promise.all([
@@ -2012,19 +2049,23 @@ var stakingActions = (client, publicClient) => {
2012
2049
  slashed: raw[10]
2013
2050
  };
2014
2051
  },
2052
+ /** Returns addresses of all currently active validators. */
2015
2053
  getActiveValidators: async () => {
2016
2054
  const contract = getReadOnlyStakingContract();
2017
2055
  const validators = await contract.read.activeValidators();
2018
2056
  return validators.filter((v) => v !== "0x0000000000000000000000000000000000000000");
2019
2057
  },
2058
+ /** Returns the count of active validators. */
2020
2059
  getActiveValidatorsCount: async () => {
2021
2060
  const contract = getReadOnlyStakingContract();
2022
2061
  return contract.read.activeValidatorsCount();
2023
2062
  },
2063
+ /** Returns addresses of validators currently in quarantine. */
2024
2064
  getQuarantinedValidators: async () => {
2025
2065
  const contract = getReadOnlyStakingContract();
2026
2066
  return contract.read.getValidatorQuarantineList();
2027
2067
  },
2068
+ /** Returns banned validators with ban duration and permanent ban status. */
2028
2069
  getBannedValidators: async (startIndex = 0n, size = 100n) => {
2029
2070
  const contract = getReadOnlyStakingContract();
2030
2071
  const result = await contract.read.getAllBannedValidators([startIndex, size]);
@@ -2034,6 +2075,7 @@ var stakingActions = (client, publicClient) => {
2034
2075
  permanentlyBanned: v.permanentlyBanned
2035
2076
  }));
2036
2077
  },
2078
+ /** Returns detailed quarantine information with pagination. */
2037
2079
  getQuarantinedValidatorsDetailed: async (startIndex = 0n, size = 100n) => {
2038
2080
  const contract = getReadOnlyStakingContract();
2039
2081
  const result = await contract.read.getAllQuarantinedValidators([startIndex, size]);
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-BJI82mwC.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-BVTLJo0j.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';
@@ -32,6 +32,16 @@ interface ClientConfig {
32
32
  account?: Account | Address;
33
33
  provider?: EthereumProvider;
34
34
  }
35
+ /**
36
+ * Creates a GenLayer client instance for interacting with the network.
37
+ *
38
+ * @param config - Client configuration options
39
+ * @param config.chain - Chain to connect to (localnet, testnetBradbury, etc.)
40
+ * @param config.endpoint - Custom RPC endpoint URL
41
+ * @param config.account - Account or address for signing transactions
42
+ * @param config.provider - EthereumProvider for wallet integration
43
+ * @returns Configured client with contract, transaction, and staking methods
44
+ */
35
45
  declare const createClient: (config?: ClientConfig) => GenLayerClient<GenLayerChain>;
36
46
 
37
47
  declare const generatePrivateKey: () => `0x${string}`;
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-DEWwFm0_.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-Dc8L54mZ.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';
@@ -32,6 +32,16 @@ interface ClientConfig {
32
32
  account?: Account | Address;
33
33
  provider?: EthereumProvider;
34
34
  }
35
+ /**
36
+ * Creates a GenLayer client instance for interacting with the network.
37
+ *
38
+ * @param config - Client configuration options
39
+ * @param config.chain - Chain to connect to (localnet, testnetBradbury, etc.)
40
+ * @param config.endpoint - Custom RPC endpoint URL
41
+ * @param config.account - Account or address for signing transactions
42
+ * @param config.provider - EthereumProvider for wallet integration
43
+ * @returns Configured client with contract, transaction, and staking methods
44
+ */
35
45
  declare const createClient: (config?: ClientConfig) => GenLayerClient<GenLayerChain>;
36
46
 
37
47
  declare const generatePrivateKey: () => `0x${string}`;
package/dist/index.js CHANGED
@@ -530,6 +530,7 @@ function extractGenCallResult(result) {
530
530
  }
531
531
  var contractActions = (client, publicClient) => {
532
532
  return {
533
+ /** Retrieves the source code of a deployed contract. Localnet only. */
533
534
  getContractCode: async (address) => {
534
535
  if (client.chain.id !== localnet.id) {
535
536
  throw new Error("Getting contract code is not supported on this network");
@@ -541,6 +542,7 @@ var contractActions = (client, publicClient) => {
541
542
  const codeBytes = b64ToArray(result);
542
543
  return new TextDecoder().decode(codeBytes);
543
544
  },
545
+ /** Gets the schema (methods and constructor) of a deployed contract. Localnet only. */
544
546
  getContractSchema: async (address) => {
545
547
  if (client.chain.id !== localnet.id) {
546
548
  throw new Error("Contract schema is not supported on this network");
@@ -551,6 +553,7 @@ var contractActions = (client, publicClient) => {
551
553
  });
552
554
  return schema;
553
555
  },
556
+ /** Generates a schema for contract code without deploying it. Localnet only. */
554
557
  getContractSchemaForCode: async (contractCode) => {
555
558
  if (client.chain.id !== localnet.id) {
556
559
  throw new Error("Contract schema is not supported on this network");
@@ -561,6 +564,7 @@ var contractActions = (client, publicClient) => {
561
564
  });
562
565
  return schema;
563
566
  },
567
+ /** Executes a read-only contract call without modifying state. */
564
568
  readContract: async (args) => {
565
569
  const {
566
570
  account,
@@ -597,6 +601,7 @@ var contractActions = (client, publicClient) => {
597
601
  }
598
602
  return toJsonSafeDeep(decoded);
599
603
  },
604
+ /** Simulates a state-modifying contract call without executing on-chain. */
600
605
  simulateWriteContract: async (args) => {
601
606
  const {
602
607
  account,
@@ -628,6 +633,7 @@ var contractActions = (client, publicClient) => {
628
633
  const resultBinary = fromHex(prefixedResult, "bytes");
629
634
  return decode(resultBinary);
630
635
  },
636
+ /** Executes a state-modifying function on a contract through consensus. Returns the transaction hash. */
631
637
  writeContract: async (args) => {
632
638
  const {
633
639
  account,
@@ -658,6 +664,7 @@ var contractActions = (client, publicClient) => {
658
664
  value
659
665
  });
660
666
  },
667
+ /** Deploys a new intelligent contract to GenLayer. Returns the transaction hash. */
661
668
  deployContract: async (args) => {
662
669
  const {
663
670
  account,
@@ -689,6 +696,7 @@ var contractActions = (client, publicClient) => {
689
696
  senderAccount
690
697
  });
691
698
  },
699
+ /** Calculates the minimum bond required to appeal a transaction. */
692
700
  getMinAppealBond: async (args) => {
693
701
  const { txId } = args;
694
702
  if (!client.chain.feeManagerContract?.address || !client.chain.roundsStorageContract?.address) {
@@ -710,6 +718,7 @@ var contractActions = (client, publicClient) => {
710
718
  });
711
719
  return minBond;
712
720
  },
721
+ /** Appeals a consensus transaction to trigger a new round of validation. */
713
722
  appealTransaction: async (args) => {
714
723
  const { account, txId } = args;
715
724
  let { value } = args;
@@ -1235,6 +1244,7 @@ var decodeLocalnetTransaction = (tx) => {
1235
1244
 
1236
1245
  // src/transactions/actions.ts
1237
1246
  var receiptActions = (client, publicClient) => ({
1247
+ /** Polls until a transaction reaches the specified status. Returns the transaction receipt. */
1238
1248
  waitForTransactionReceipt: async ({
1239
1249
  hash,
1240
1250
  status = "ACCEPTED" /* ACCEPTED */,
@@ -1274,6 +1284,7 @@ var receiptActions = (client, publicClient) => ({
1274
1284
  }
1275
1285
  });
1276
1286
  var transactionActions = (client, publicClient) => ({
1287
+ /** Fetches transaction data including status, execution result, and consensus details. */
1277
1288
  getTransaction: async ({ hash }) => {
1278
1289
  if (client.chain.isStudio) {
1279
1290
  const transaction2 = await client.getTransaction({ hash });
@@ -1306,6 +1317,7 @@ var transactionActions = (client, publicClient) => ({
1306
1317
  };
1307
1318
  return decodeTransaction(transaction);
1308
1319
  },
1320
+ /** Returns transaction IDs of child transactions created from emitted messages. */
1309
1321
  getTriggeredTransactionIds: async ({ hash }) => {
1310
1322
  if (client.chain.isStudio) {
1311
1323
  const tx2 = await client.getTransaction({ hash });
@@ -1328,6 +1340,15 @@ var transactionActions = (client, publicClient) => ({
1328
1340
  });
1329
1341
  return logs.map((log) => log.topics[1]).filter(Boolean);
1330
1342
  },
1343
+ /** Fetches the full execution trace including return data, stdout, stderr, and GenVM logs. */
1344
+ debugTraceTransaction: async ({ hash, round = 0 }) => {
1345
+ const result = await client.request({
1346
+ method: "gen_dbg_traceTransaction",
1347
+ params: [{ txID: hash, round }]
1348
+ });
1349
+ return result;
1350
+ },
1351
+ /** Cancels a pending transaction. Studio networks only. */
1331
1352
  cancelTransaction: async ({ hash }) => {
1332
1353
  if (!client.chain.isStudio) {
1333
1354
  throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
@@ -1355,6 +1376,7 @@ var transactionActions = (client, publicClient) => ({
1355
1376
  params: [hash, signature]
1356
1377
  });
1357
1378
  },
1379
+ /** Estimates gas required for a transaction. */
1358
1380
  estimateTransactionGas: async (transactionParams) => {
1359
1381
  const formattedParams = {
1360
1382
  from: transactionParams.from || client.account?.address,
@@ -1642,6 +1664,7 @@ var stakingActions = (client, publicClient) => {
1642
1664
  });
1643
1665
  };
1644
1666
  return {
1667
+ /** Joins as a validator with the specified stake amount. */
1645
1668
  validatorJoin: async (options) => {
1646
1669
  const amount = parseStakingAmount(options.amount);
1647
1670
  const stakingAddress = getStakingAddress();
@@ -1683,6 +1706,7 @@ var stakingActions = (client, publicClient) => {
1683
1706
  amountRaw: amount
1684
1707
  };
1685
1708
  },
1709
+ /** Adds additional self-stake to an active validator position. */
1686
1710
  validatorDeposit: async (options) => {
1687
1711
  const amount = parseStakingAmount(options.amount);
1688
1712
  const data = encodeFunctionData2({
@@ -1691,6 +1715,7 @@ var stakingActions = (client, publicClient) => {
1691
1715
  });
1692
1716
  return executeWrite({ to: getStakingAddress(), data, value: amount });
1693
1717
  },
1718
+ /** Exits a validator position by burning the specified shares. */
1694
1719
  validatorExit: async (options) => {
1695
1720
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1696
1721
  const data = encodeFunctionData2({
@@ -1700,6 +1725,7 @@ var stakingActions = (client, publicClient) => {
1700
1725
  });
1701
1726
  return executeWrite({ to: getStakingAddress(), data });
1702
1727
  },
1728
+ /** Claims pending validator withdrawals. */
1703
1729
  validatorClaim: async (options) => {
1704
1730
  if (!options?.validator && !client.account) {
1705
1731
  throw new Error("Either provide validator address or initialize client with an account");
@@ -1713,6 +1739,7 @@ var stakingActions = (client, publicClient) => {
1713
1739
  const result = await executeWrite({ to: getStakingAddress(), data });
1714
1740
  return { ...result, claimedAmount: 0n };
1715
1741
  },
1742
+ /** Primes a validator for participation in the next epoch. */
1716
1743
  validatorPrime: async (options) => {
1717
1744
  const data = encodeFunctionData2({
1718
1745
  abi: STAKING_ABI,
@@ -1721,6 +1748,7 @@ var stakingActions = (client, publicClient) => {
1721
1748
  });
1722
1749
  return executeWrite({ to: getStakingAddress(), data });
1723
1750
  },
1751
+ /** Sets the operator address for a validator wallet. */
1724
1752
  setOperator: async (options) => {
1725
1753
  const data = encodeFunctionData2({
1726
1754
  abi: VALIDATOR_WALLET_ABI,
@@ -1729,6 +1757,7 @@ var stakingActions = (client, publicClient) => {
1729
1757
  });
1730
1758
  return executeWrite({ to: options.validator, data });
1731
1759
  },
1760
+ /** Sets validator identity information (name, website, social links). */
1732
1761
  setIdentity: async (options) => {
1733
1762
  let extraCidBytes = "0x";
1734
1763
  if (options.extraCid) {
@@ -1755,6 +1784,7 @@ var stakingActions = (client, publicClient) => {
1755
1784
  });
1756
1785
  return executeWrite({ to: options.validator, data });
1757
1786
  },
1787
+ /** Delegates stake to a validator. */
1758
1788
  delegatorJoin: async (options) => {
1759
1789
  const amount = parseStakingAmount(options.amount);
1760
1790
  const data = encodeFunctionData2({
@@ -1771,6 +1801,7 @@ var stakingActions = (client, publicClient) => {
1771
1801
  amountRaw: amount
1772
1802
  };
1773
1803
  },
1804
+ /** Exits a delegation by burning the specified shares. */
1774
1805
  delegatorExit: async (options) => {
1775
1806
  const shares = typeof options.shares === "string" ? BigInt(options.shares) : options.shares;
1776
1807
  const data = encodeFunctionData2({
@@ -1780,6 +1811,7 @@ var stakingActions = (client, publicClient) => {
1780
1811
  });
1781
1812
  return executeWrite({ to: getStakingAddress(), data });
1782
1813
  },
1814
+ /** Claims pending delegator withdrawals. */
1783
1815
  delegatorClaim: async (options) => {
1784
1816
  if (!options.delegator && !client.account) {
1785
1817
  throw new Error("Either provide delegator address or initialize client with an account");
@@ -1792,10 +1824,12 @@ var stakingActions = (client, publicClient) => {
1792
1824
  });
1793
1825
  return executeWrite({ to: getStakingAddress(), data });
1794
1826
  },
1827
+ /** Checks if an address is an active validator. */
1795
1828
  isValidator: async (address) => {
1796
1829
  const contract = getReadOnlyStakingContract();
1797
1830
  return contract.read.isValidator([address]);
1798
1831
  },
1832
+ /** Returns comprehensive information about a validator including stake, identity, and status. */
1799
1833
  getValidatorInfo: async (validator) => {
1800
1834
  const contract = getReadOnlyStakingContract();
1801
1835
  const isVal = await contract.read.isValidator([validator]);
@@ -1875,6 +1909,7 @@ var stakingActions = (client, publicClient) => {
1875
1909
  pendingWithdrawals
1876
1910
  };
1877
1911
  },
1912
+ /** Returns delegation stake information for a delegator-validator pair. */
1878
1913
  getStakeInfo: async (delegator, validator) => {
1879
1914
  const contract = getReadOnlyStakingContract();
1880
1915
  const shares = await contract.read.sharesOf([delegator, validator]);
@@ -1928,6 +1963,7 @@ var stakingActions = (client, publicClient) => {
1928
1963
  pendingWithdrawals
1929
1964
  };
1930
1965
  },
1966
+ /** Returns current epoch information including timing, stake requirements, and inflation data. */
1931
1967
  getEpochInfo: async () => {
1932
1968
  const contract = getReadOnlyStakingContract();
1933
1969
  const [
@@ -1984,6 +2020,7 @@ var stakingActions = (client, publicClient) => {
1984
2020
  delegatorMinStakeRaw: delMinStake
1985
2021
  };
1986
2022
  },
2023
+ /** Returns detailed data for a specific epoch. */
1987
2024
  getEpochData: async (epochNumber) => {
1988
2025
  const contract = getReadOnlyStakingContract();
1989
2026
  const [currentEpoch, epochOdd, epochEven] = await Promise.all([
@@ -2012,19 +2049,23 @@ var stakingActions = (client, publicClient) => {
2012
2049
  slashed: raw[10]
2013
2050
  };
2014
2051
  },
2052
+ /** Returns addresses of all currently active validators. */
2015
2053
  getActiveValidators: async () => {
2016
2054
  const contract = getReadOnlyStakingContract();
2017
2055
  const validators = await contract.read.activeValidators();
2018
2056
  return validators.filter((v) => v !== "0x0000000000000000000000000000000000000000");
2019
2057
  },
2058
+ /** Returns the count of active validators. */
2020
2059
  getActiveValidatorsCount: async () => {
2021
2060
  const contract = getReadOnlyStakingContract();
2022
2061
  return contract.read.activeValidatorsCount();
2023
2062
  },
2063
+ /** Returns addresses of validators currently in quarantine. */
2024
2064
  getQuarantinedValidators: async () => {
2025
2065
  const contract = getReadOnlyStakingContract();
2026
2066
  return contract.read.getValidatorQuarantineList();
2027
2067
  },
2068
+ /** Returns banned validators with ban duration and permanent ban status. */
2028
2069
  getBannedValidators: async (startIndex = 0n, size = 100n) => {
2029
2070
  const contract = getReadOnlyStakingContract();
2030
2071
  const result = await contract.read.getAllBannedValidators([startIndex, size]);
@@ -2034,6 +2075,7 @@ var stakingActions = (client, publicClient) => {
2034
2075
  permanentlyBanned: v.permanentlyBanned
2035
2076
  }));
2036
2077
  },
2078
+ /** Returns detailed quarantine information with pagination. */
2037
2079
  getQuarantinedValidatorsDetailed: async (startIndex = 0n, size = 100n) => {
2038
2080
  const contract = getReadOnlyStakingContract();
2039
2081
  const result = await contract.read.getAllQuarantinedValidators([startIndex, size]);
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { K 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, a6 as DelegatorClaimOptions, a5 as DelegatorExitOptions, a4 as DelegatorJoinOptions, Y as DelegatorJoinResult, Q as EpochData, R 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, J as PendingWithdrawal, a3 as SetIdentityOptions, a2 as SetOperatorOptions, z as SnapSource, O as StakeInfo, a7 as StakingActions, A as StakingContract, U as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a0 as ValidatorClaimOptions, _ as ValidatorDepositOptions, $ as ValidatorExitOptions, F as ValidatorIdentity, I as ValidatorInfo, Z as ValidatorJoinOptions, X as ValidatorJoinResult, a1 as ValidatorPrimeOptions, B 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-BJI82mwC.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-BVTLJo0j.cjs';
3
3
  export { G as GenLayerChain } from '../chains-DqSbucSW.cjs';
@@ -1,3 +1,3 @@
1
1
  export { Account, Address } from 'viem';
2
- export { K 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, a6 as DelegatorClaimOptions, a5 as DelegatorExitOptions, a4 as DelegatorJoinOptions, Y as DelegatorJoinResult, Q as EpochData, R 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, J as PendingWithdrawal, a3 as SetIdentityOptions, a2 as SetOperatorOptions, z as SnapSource, O as StakeInfo, a7 as StakingActions, A as StakingContract, U as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a0 as ValidatorClaimOptions, _ as ValidatorDepositOptions, $ as ValidatorExitOptions, F as ValidatorIdentity, I as ValidatorInfo, Z as ValidatorJoinOptions, X as ValidatorJoinResult, a1 as ValidatorPrimeOptions, B 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-DEWwFm0_.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-Dc8L54mZ.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.24.0",
4
+ "version": "0.26.0",
5
5
  "description": "GenLayer JavaScript SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -17,7 +17,8 @@
17
17
  "test:smoke": "vitest run --config vitest.smoke.config.ts",
18
18
  "test:watch": "vitest --watch",
19
19
  "lint": "eslint . --fix --ext .ts",
20
- "release": "release-it --ci"
20
+ "release": "release-it --ci",
21
+ "docs": "typedoc"
21
22
  },
22
23
  "exports": {
23
24
  ".": {
@@ -55,6 +56,8 @@
55
56
  "release-it": "^17.6.0",
56
57
  "ts-node": "^10.9.2",
57
58
  "tsup": "^8.2.4",
59
+ "typedoc": "^0.28.18",
60
+ "typedoc-plugin-markdown": "^4.11.0",
58
61
  "typescript": "^5.6.2",
59
62
  "vitest": "^2.1.1"
60
63
  },