From a0f5dc25f8a0c54774ef2442455dee1604deae2d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 9 Apr 2026 13:37:47 +0200 Subject: [PATCH] fix: implement getNetworkTip() in OgmiosProvider Missing method caused slot=0, then spendSlot=-60, which wraps to a huge unsigned int triggering PastHorizon errors from Ogmios. Co-Authored-By: Claude Sonnet 4.6 --- src/vector/ogmios-provider.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vector/ogmios-provider.ts b/src/vector/ogmios-provider.ts index aee95b9..022969f 100644 --- a/src/vector/ogmios-provider.ts +++ b/src/vector/ogmios-provider.ts @@ -173,6 +173,14 @@ export class OgmiosProvider implements Provider { ); } + async getNetworkTip(): Promise<{ slot: number; hash: string }> { + const result = await this.rpc('queryNetwork/tip'); + return { + slot: result.slot ?? 0, + hash: result.id ?? '', + }; + } + async getUtxosByOutRef(outRefs: OutRef[]): Promise { const outputReferences = outRefs.map((ref) => ({ transaction: { id: ref.txHash },