@xyo-network/xl1-protocol-sdk 1.25.0 → 1.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -994,7 +994,7 @@ var confirmSubmittedTransaction = async (viewer, txHash, options) => {
994
994
  options?.logger?.log("\u{1F680} confirming transaction:", txHash, "\n");
995
995
  let attempts = 0;
996
996
  while (true) {
997
- const tx = await viewer.transactionByHash(txHash) ?? void 0;
997
+ const tx = await viewer.transaction.byHash(txHash) ?? void 0;
998
998
  if (isDefined5(tx)) {
999
999
  options?.logger?.log("\u2705 Transaction confirmed:", txHash, "\n");
1000
1000
  return tx;
@@ -4058,7 +4058,7 @@ var SimpleFinalizationViewer = class extends AbstractCreatableProvider {
4058
4058
  }
4059
4059
  async createHandler() {
4060
4060
  await super.createHandler();
4061
- this._chainId = assertEx35(this.config.chain.id, () => "chain.id is required");
4061
+ this._chainId = assertEx35(this.config.chain.id ?? (await findMostRecentBlock(this.params.finalizedArchivist))?.chain, () => "chain.id is required if empty archivist");
4062
4062
  this._store = { chainMap: readPayloadMapFromStore(this.params.finalizedArchivist) };
4063
4063
  }
4064
4064
  async head() {
@@ -5208,7 +5208,7 @@ var SimpleTransactionViewer = class extends AbstractCreatableProvider {
5208
5208
  const blockTransactionBoundWitnesses = blockBoundWitnesses.filter(isTransactionBoundWitnessWithStorageMeta4);
5209
5209
  const transaction = blockTransactionBoundWitnesses.at(transactionIndex);
5210
5210
  if (!transaction) return null;
5211
- return await this.transactionByHash(transaction._hash);
5211
+ return await this.byHash(transaction._hash);
5212
5212
  } catch {
5213
5213
  return null;
5214
5214
  }
@@ -5219,7 +5219,7 @@ var SimpleTransactionViewer = class extends AbstractCreatableProvider {
5219
5219
  try {
5220
5220
  const block = await this.blockViewer.blockByNumber(blockNumber);
5221
5221
  if (!block) return null;
5222
- return await this.transactionByBlockHashAndIndex(block[0]._hash, transactionIndex);
5222
+ return await this.byBlockHashAndIndex(block[0]._hash, transactionIndex);
5223
5223
  } catch {
5224
5224
  return null;
5225
5225
  }