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 <noreply@anthropic.com>
This commit is contained in:
@@ -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<UTxO[]> {
|
||||
const outputReferences = outRefs.map((ref) => ({
|
||||
transaction: { id: ref.txHash },
|
||||
|
||||
Reference in New Issue
Block a user