@harmoniclabs/plu-ts-onchain
Version:
An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript
68 lines (67 loc) • 2.32 kB
TypeScript
import { UPLCVersion } from "@harmoniclabs/uplc";
export interface CompilerUplcOptimizations {
/**
*
**/
groupApplications: boolean;
/**
**/
inlineSingleUse: boolean;
/**
**/
simplifyWrappedPartialFuncApps: boolean;
/**
*
**/
removeForceDelay: boolean;
}
export declare const productionUplcOptimizations: CompilerUplcOptimizations;
export declare const debugUplcOptimizations: CompilerUplcOptimizations;
export declare const defaultUplcOptimizations: CompilerUplcOptimizations;
export declare function isDebugUplcOptimizations(options?: Partial<CompilerUplcOptimizations>): boolean;
export declare function completeUplcOptimizations(options: Partial<CompilerUplcOptimizations>, complete?: CompilerUplcOptimizations): CompilerUplcOptimizations;
export interface CompilerOptions {
/**
* uplc version (encoded in the script)
*/
targetUplcVersion: UPLCVersion;
/**
* @todo TODO
*
* @default true
*
* set to `false` only for debugging purposes
**/
removeTraces: boolean;
/**
* @todo TODO
*
* if `true` replaces all `IRHoisted` with `IRLetted`
*
* handling letted terms is more expansive than hoisted terms
* because hoisted (since closed terms) are blindly added as roots of the script
*
* however this approach impacts the "script startup cost" considerably
* esxpecially for scripts with different branches (eg. multi purpose scripts)
* where some hoisted may never be used in some branches,
* but still are added to the "initialization cost"
*
* on the other hand, handling letted instead of hoisted may impact compliation time
*
* for this reason it is best to set this option to `true` only for production
**/
delayHoists: boolean;
/**
*
**/
uplcOptimizations: Partial<CompilerUplcOptimizations>;
/**
*
**/
addMarker: boolean;
}
export declare const extremeOptions: CompilerOptions;
export declare const productionOptions: CompilerOptions;
export declare const debugOptions: CompilerOptions;
export declare const defaultOptions: CompilerOptions;
export declare function completeCompilerOptions(options: Partial<CompilerOptions>, complete?: CompilerOptions): CompilerOptions;