@indigo-labs/indigo-sdk
Version:
Indigo SDK for interacting with Indigo endpoints via lucid-evolution
16 lines (14 loc) • 511 B
text/typescript
import { SpendingValidator } from '@lucid-evolution/lucid';
import { _pythFeedValidator } from '../../validators/pyth-feed-validator';
import { applyParamsToScript } from '@evolution-sdk/evolution/uplc';
import { PythFeedParams, serialisePythFeedParams } from './types';
export const mkPythFeedValidator = (
params: PythFeedParams,
): SpendingValidator => {
return {
type: 'PlutusV3',
script: applyParamsToScript(_pythFeedValidator.cborHex, [
serialisePythFeedParams(params),
]),
};
};