UNPKG

@apexfusionfoundation/blockfrost-js

Version:

A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API

67 lines (66 loc) 3.07 kB
import { components } from '@blockfrost/openapi'; import { PaginationOptions } from '../../../types'; import { BlockFrostAPI } from '../../../index'; /** * Obtains information about a specific script. * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1%7Bscript_hash%7D/get | API docs for Script} * * @param scriptHash - Hash of the script * @returns Information about a specific script * */ export declare function scriptsByHash(this: BlockFrostAPI, scriptHash: string): Promise<components['schemas']['script']>; /** * Obtains list of scripts (paginated). * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts/get | API docs for Scripts} * * @param pagination - Optional, Pagination options * @returns List of scripts * */ export declare function scripts(this: BlockFrostAPI, pagination?: PaginationOptions): Promise<components['schemas']['scripts']>; /** * Obtains JSON representation of a timelock script. * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1%7Bscript_hash%7D~1json/get | API docs for Script JSON} * * @param scriptHash - Hash of the script * @returns JSON representation of a timelock script * */ export declare function scriptsJson(this: BlockFrostAPI, scriptHash: string): Promise<components['schemas']['script_json']>; /** * Obtains CBOR representation of a plutus script. * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1%7Bscript_hash%7D~1cbor/get | API docs for Script CBOR} * * @param scriptHash - Hash of the script * @returns CBOR representation of a plutus script * */ export declare function scriptsCbor(this: BlockFrostAPI, scriptHash: string): Promise<components['schemas']['script_cbor']>; /** * Obtains JSON value of a datum by its hash. * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1datum~1%7Bdatum_hash%7D/get | API docs for Datum value} * * @param datumHash - Hash of the datum * @returns JSON value of a datum specified by its hash * */ export declare function scriptsDatum(this: BlockFrostAPI, datumHash: string): Promise<components['schemas']['script_datum']>; /** * Obtains CBOR serialized datum by its hash. * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1datum~1%7Bdatum_hash%7D~1cbor/get | API docs for Datum CBOR value} * * @param datumHash - Hash of the datum * @returns JSON value of a datum specified by its hash * */ export declare function scriptsDatumCbor(this: BlockFrostAPI, datumHash: string): Promise<components['schemas']['script_datum_cbor']>; /** * Obtains list of redeemers of a specific script * @see {@link https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1%7Bscript_hash%7D~1redeemers/get | API docs for Redeemers of a specific script} * * @param scriptHash - Hash of the script * @returns List of redeemers of a specific script * */ export declare function scriptsRedeemers(this: BlockFrostAPI, scriptHash: string): Promise<components['schemas']['script_redeemers']>;